Change in osmo-ttcn3-hacks[master]: add f_vty_config3(), to run N commands on a sub-node

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Thu Nov 26 01:07:57 UTC 2020


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


Change subject: add f_vty_config3(), to run N commands on a sub-node
......................................................................

add f_vty_config3(), to run N commands on a sub-node

Change-Id: If969ac645aa82e5a36245d974de2a251633de111
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 9 insertions(+), 3 deletions(-)



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

diff --git a/library/Osmocom_VTY_Functions.ttcn b/library/Osmocom_VTY_Functions.ttcn
index 042f244..a51794f 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -149,19 +149,25 @@
 	}
 
 type record of charstring rof_charstring;
-function f_vty_config2(TELNETasp_PT pt, rof_charstring config_nodes, charstring cmd)
+function f_vty_config3(TELNETasp_PT pt, rof_charstring config_nodes, rof_charstring cmds)
 {
 	/* enter config mode; enter node */
 	f_vty_enter_config(pt);
 	for (var integer i := 0; i < sizeof(config_nodes); i := i+1) {
 		f_vty_transceive(pt, config_nodes[i]);
 	}
-	/* execute command */
-	f_vty_transceive(pt, cmd);
+	/* execute commands */
+	for (var integer i := 0; i < sizeof(cmds); i := i+1) {
+		f_vty_transceive(pt, cmds[i]);
+	}
 	/* leave config mode */
 	f_vty_transceive(pt, "end");
 }
 
+function f_vty_config2(TELNETasp_PT pt, rof_charstring config_nodes, charstring cmd)
+{
+	f_vty_config3(pt, config_nodes, { cmd });
+}
 
 function f_vty_config(TELNETasp_PT pt, charstring config_node, charstring cmd)
 {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21368
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: If969ac645aa82e5a36245d974de2a251633de111
Gerrit-Change-Number: 21368
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201126/6c56fb6b/attachment.htm>


More information about the gerrit-log mailing list