aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve McIntyre <steve.mcintyre@linaro.org>2018-01-24 16:58:13 +0000
committerSteve McIntyre <steve.mcintyre@linaro.org>2018-01-24 16:58:13 +0000
commitda9e9c110a491af3d9bd7b201fc03298a1044b82 (patch)
tree2c440514b6f86a2baee6ec9d870b75741c0f411c
parent4267c6a142778337ad84c3eae7bcc746d7976e3f (diff)
Add boilerplate comments for inline unit test harness
Change-Id: Ie9b727ba8e4a2f9733ec9d5e183da9ebcd5b4071
-rw-r--r--drivers/CiscoCatalyst.py4
-rw-r--r--drivers/CiscoSX300.py4
-rw-r--r--drivers/Dummy.py4
-rw-r--r--drivers/NetgearXSM.py4
-rw-r--r--drivers/TPLinkTLSG2XXX.py5
5 files changed, 21 insertions, 0 deletions
diff --git a/drivers/CiscoCatalyst.py b/drivers/CiscoCatalyst.py
index b537aa0..16f47db 100644
--- a/drivers/CiscoCatalyst.py
+++ b/drivers/CiscoCatalyst.py
@@ -616,6 +616,10 @@ class CiscoCatalyst(SwitchDriver):
if __name__ == "__main__":
+ # Simple test harness - exercise the main working functions above to verify
+ # they work. This does *NOT* test really disruptive things like "save
+ # running-config" and "reload" - test those by hand.
+
import optparse
switch = 'vlandswitch01'
diff --git a/drivers/CiscoSX300.py b/drivers/CiscoSX300.py
index cc12584..3aed9ca 100644
--- a/drivers/CiscoSX300.py
+++ b/drivers/CiscoSX300.py
@@ -560,6 +560,10 @@ class CiscoSX300(SwitchDriver):
if __name__ == "__main__":
# p = CiscoSX300('10.172.2.52', 23)
+ # Simple test harness - exercise the main working functions above to verify
+ # they work. This does *NOT* test really disruptive things like "save
+ # running-config" and "reload" - test those by hand.
+
import optparse
switch = 'vlandswitch02'
diff --git a/drivers/Dummy.py b/drivers/Dummy.py
index 72f31c4..f630184 100644
--- a/drivers/Dummy.py
+++ b/drivers/Dummy.py
@@ -241,6 +241,10 @@ class Dummy(SwitchDriver):
if __name__ == "__main__":
+ # Simple test harness - exercise the main working functions above to verify
+ # they work. This does *NOT* test really disruptive things like "save
+ # running-config" and "reload" - test those by hand.
+
import optparse
switch = 'dummy-48'
diff --git a/drivers/NetgearXSM.py b/drivers/NetgearXSM.py
index b3241d5..f8ba8a5 100644
--- a/drivers/NetgearXSM.py
+++ b/drivers/NetgearXSM.py
@@ -664,6 +664,10 @@ class NetgearXSM(SwitchDriver):
if __name__ == "__main__":
+ # Simple test harness - exercise the main working functions above to verify
+ # they work. This does *NOT* test really disruptive things like "save
+ # running-config" and "reload" - test those by hand.
+
import optparse
switch = 'vlandswitch05'
diff --git a/drivers/TPLinkTLSG2XXX.py b/drivers/TPLinkTLSG2XXX.py
index f33b19e..5213d10 100644
--- a/drivers/TPLinkTLSG2XXX.py
+++ b/drivers/TPLinkTLSG2XXX.py
@@ -584,6 +584,11 @@ class TPLinkTLSG2XXX(SwitchDriver):
self.connection.expect(text)
if __name__ == "__main__":
+
+ # Simple test harness - exercise the main working functions above to verify
+ # they work. This does *NOT* test really disruptive things like "save
+ # running-config" and "reload" - test those by hand.
+
import optparse
switch = '10.172.2.50'