Change in osmo-ttcn3-hacks[master]: pcu: PCU_Tests_NS: add support for vty

lynxis lazus gerrit-no-reply at lists.osmocom.org
Tue Apr 6 14:01:49 UTC 2021


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23654 )


Change subject: pcu: PCU_Tests_NS: add support for vty
......................................................................

pcu: PCU_Tests_NS: add support for vty

Allow to use the vty by test cases. f_init_vty(id) must be called
before using the vty.

Related: SYS#5416
Change-Id: Ib2011babb123e1e1bb576e72b9bfbda90dce2df7
---
M pcu/PCU_Tests_NS.ttcn
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/23654/1

diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn
index e2bad4f..eea8d3f 100644
--- a/pcu/PCU_Tests_NS.ttcn
+++ b/pcu/PCU_Tests_NS.ttcn
@@ -12,6 +12,8 @@
 
 import from General_Types all;
 import from Osmocom_Types all;
+import from Osmocom_VTY_Functions all;
+import from TELNETasp_PortType all;
 import from PCU_Tests all;
 import from SGSN_Components all;
 import from Osmocom_Gb_Types all;
@@ -29,11 +31,19 @@
 	/* PCUIF (we emulate the BTS part) */
 	port PCUIF_CODEC_PT PCU;
 	var ConnectionId g_pcu_conn_id := -1;
+	/* VTY connection to the PCU */
+	port TELNETasp_PT PCUVTY;
 }
 
 type component RAW_Test_CT extends RAW_NS_CT, RAW_PCU_CT {
 }
 
+function f_init_vty(charstring id) runs on RAW_PCU_CT {
+	map(self:PCUVTY, system:PCUVTY);
+	f_vty_set_prompts(PCUVTY);
+	f_vty_transceive(PCUVTY, "enable");
+}
+
 function f_init_pcuif() runs on RAW_PCU_CT {
 	var PCUIF_info_ind info_ind;
 	map(self:PCU, system:PCU);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23654
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib2011babb123e1e1bb576e72b9bfbda90dce2df7
Gerrit-Change-Number: 23654
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210406/b41f3716/attachment.htm>


More information about the gerrit-log mailing list