Removed main from modules as per review comments.
This commit is contained in:
parent
582f1a486a
commit
d903877fbb
@ -32,6 +32,8 @@ Let's leap in!
|
||||
|
||||
Pre-requisites
|
||||
--------------
|
||||
(The following are necessary only when using the UCS and/or Nexus devices in your system.
|
||||
If you plan to just leverage the plugin framework, you do not need these.)
|
||||
* One or more UCS B200 series blade servers with M81KR VIC (aka
|
||||
Palo adapters) installed.
|
||||
* UCSM 2.0 (Capitola) Build 230 or above.
|
||||
|
@ -38,12 +38,3 @@ class CiscoConfigParser(ConfigObj):
|
||||
|
||||
def dummy(self, section, key):
|
||||
return section[key]
|
||||
|
||||
|
||||
def main():
|
||||
cp = CiscoConfigParser(os.path.dirname(os.path.realpath(__file__)) \
|
||||
+ "/" + "test.ini")
|
||||
print ("%s\n") % cp['PLUGIN']['provider']
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -58,11 +58,3 @@ class Store(object):
|
||||
@staticmethod
|
||||
def deleteCredential(id):
|
||||
return _creds_dictionary.pop(id)
|
||||
|
||||
|
||||
def main():
|
||||
Store.putCredential("10.10.10.10", "foo", "bar")
|
||||
print ("%s\n") % Store.getCredentials()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -33,10 +33,3 @@ DB_USERNAME = section['db_username']
|
||||
DB_PASSWORD = section['db_password']
|
||||
NOVA_HOST_NAME = section['nova_host_name']
|
||||
NOVA_PROJ_NAME = section['nova_proj_name']
|
||||
|
||||
|
||||
def main():
|
||||
print NOVA_PROJ_NAME
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -98,10 +98,3 @@ class L2NetworkModel(L2NetworkModelBase):
|
||||
def unplug_interface(self, args):
|
||||
deviceParams = {const.DEVICE_IP: ""}
|
||||
self._invokeUCSPlugin(self._funcName(), args, deviceParams)
|
||||
|
||||
|
||||
def main():
|
||||
client = L2NetworkModel()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -388,19 +388,6 @@ class L2Network(QuantumPluginBase):
|
||||
def _funcName(self, offset=0):
|
||||
return inspect.stack()[1 + offset][3]
|
||||
|
||||
|
||||
def main():
|
||||
client = L2Network()
|
||||
"""
|
||||
client.create_portprofile("12345", "tpp1", "2")
|
||||
client.create_portprofile("12345", "tpp2", "3")
|
||||
print ("%s\n") % client.get_all_portprofiles("12345")
|
||||
"""
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
"""
|
||||
TODO (Sumit):
|
||||
(1) Persistent storage
|
||||
|
@ -48,10 +48,3 @@ CONF_FILE = "conf/plugins.ini"
|
||||
cp = confp.CiscoConfigParser(os.path.dirname(os.path.realpath(__file__)) \
|
||||
+ "/" + CONF_FILE)
|
||||
plugins = cp.walk(cp.dummy)
|
||||
|
||||
|
||||
def main():
|
||||
print plugins['PLUGINS']
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -33,10 +33,3 @@ NEXUS_PORT = section['nexus_port']
|
||||
|
||||
section = cp['DRIVER']
|
||||
NEXUS_DRIVER = section['name']
|
||||
|
||||
|
||||
def main():
|
||||
print NEXUS_PORT
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -234,10 +234,3 @@ class CiscoNEXUSDriver():
|
||||
nexus_password) as m:
|
||||
self.disable_vlan(m, vlan_id)
|
||||
self.disable_switch_port(m, nexus_interface)
|
||||
|
||||
|
||||
def main():
|
||||
client = CiscoNEXUSDriver()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -49,8 +49,3 @@ def get_next_dynic(argv=[]):
|
||||
if not used:
|
||||
break
|
||||
return eth
|
||||
|
||||
if __name__ == '__main__':
|
||||
#nic = get_next_dynic(sys.argv)
|
||||
nic = get_next_dynic()
|
||||
print nic
|
||||
|
@ -35,10 +35,3 @@ PROFILE_NAME_PREFIX = section['profile_name_prefix']
|
||||
|
||||
section = cp['DRIVER']
|
||||
UCSM_DRIVER = section['name']
|
||||
|
||||
|
||||
def main():
|
||||
print MAX_UCSM_PORT_PROFILES
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
@ -233,25 +233,3 @@ class CiscoUCSMDriver():
|
||||
def release_dynamic_nic(self, host):
|
||||
# TODO (Sumit): Release on a specific host
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
client = CiscoUCSMDriver()
|
||||
#client.create_vlan("quantum-vlan-3", "3","172.20.231.27","admin",
|
||||
# "c3l12345")
|
||||
#client.create_profile("q-prof-3", "quantum-vlan-3","172.20.231.27",
|
||||
# "admin", "c3l12345")
|
||||
#client.get_dynamic_nic("dummy")
|
||||
#client.get_dynamic_nic("dummy")
|
||||
#client.release_dynamic_nic("dummy")
|
||||
print client.get_dynamic_nic("dummy")
|
||||
"""
|
||||
client.change_vlan_in_profile("br100", "default", "test-2",
|
||||
"172.20.231.27","admin",
|
||||
"c3l12345")
|
||||
client.change_vlan_in_profile("br100", "test-2", "default",
|
||||
"172.20.231.27", "admin", "c3l12345")
|
||||
"""
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user