\r
Pre-requisites\r
--------------\r
+(The following are necessary only when using the UCS and/or Nexus devices in your system.\r
+If you plan to just leverage the plugin framework, you do not need these.)\r
* One or more UCS B200 series blade servers with M81KR VIC (aka \r
Palo adapters) installed.\r
* UCSM 2.0 (Capitola) Build 230 or above.\r
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()
@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()
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()
def unplug_interface(self, args):
deviceParams = {const.DEVICE_IP: ""}
self._invokeUCSPlugin(self._funcName(), args, deviceParams)
-
-
-def main():
- client = L2NetworkModel()
-
-if __name__ == '__main__':
- main()
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
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()
section = cp['DRIVER']
NEXUS_DRIVER = section['name']
-
-
-def main():
- print NEXUS_PORT
-
-if __name__ == '__main__':
- main()
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()
if not used:
break
return eth
-
-if __name__ == '__main__':
- #nic = get_next_dynic(sys.argv)
- nic = get_next_dynic()
- print nic
section = cp['DRIVER']
UCSM_DRIVER = section['name']
-
-
-def main():
- print MAX_UCSM_PORT_PROFILES
-
-if __name__ == '__main__':
- main()
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()