Add _end_interface()
On the Netgear, we can't do "end" to drop out all the way to the
top-level CLI like on other switches. Instead, we're using "exit"
which just goes up one level. Add an extra _end_interface() call which
goes up from the "interface" level...
Change-Id: I5cbc57909f580d746576f90de0004547123c72c6
diff --git a/drivers/NetgearXSM.py b/drivers/NetgearXSM.py
index f46f765..c087d48 100644
--- a/drivers/NetgearXSM.py
+++ b/drivers/NetgearXSM.py
@@ -251,6 +251,7 @@
self._cli("vlan tagging 2048-3071")
self._cli("vlan tagging 3072-4093")
self._cli("vlan pvid 1")
+ self._end_interface()
self._end_configure()
# We define an access port thus:
@@ -268,6 +269,7 @@
self._cli("no vlan tagging 2048-3071")
self._cli("no vlan tagging 3072-4093")
self._cli("vlan pvid 1") # Need to find the right VLAN first?
+ self._end_interface()
self._end_configure()
# Validate it happened
@@ -343,6 +345,7 @@
# Now specifically include the VLAN we want
self._cli("vlan participation include %s" % tag)
self._cli("no shutdown")
+ self._end_interface()
self._end_configure()
# Finally, validate things worked
@@ -370,6 +373,7 @@
self._configure()
self._cli("interface %s" % port)
self._cli("vlan participation include %d" % tag)
+ self._end_interface()
self._end_configure()
# Validate it happened
@@ -398,6 +402,7 @@
self._configure()
self._cli("interface %s" % port)
self._cli("vlan participation auto %d" % tag)
+ self._end_interface()
self._end_configure()
# Validate it happened
@@ -525,6 +530,9 @@
def _end_configure(self):
self._cli("exit")
+ def _end_interface(self):
+ self._end_configure()
+
def _read_long_output(self, text):
longbuf = []
prompt = self._prompt_name + '\s*#'