]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Removed main from modules as per review comments.
authorSumit Naiksatam <snaiksat@cisco.com>
Sun, 14 Aug 2011 01:28:02 +0000 (18:28 -0700)
committerSumit Naiksatam <snaiksat@cisco.com>
Sun, 14 Aug 2011 01:28:02 +0000 (18:28 -0700)
12 files changed:
quantum/plugins/cisco/README
quantum/plugins/cisco/common/cisco_configparser.py
quantum/plugins/cisco/common/cisco_credentials.py
quantum/plugins/cisco/common/cisco_nova_configuration.py
quantum/plugins/cisco/l2network_model.py
quantum/plugins/cisco/l2network_plugin.py
quantum/plugins/cisco/l2network_plugin_configuration.py
quantum/plugins/cisco/nexus/cisco_nexus_configuration.py
quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py
quantum/plugins/cisco/ucs/cisco_getvif.py
quantum/plugins/cisco/ucs/cisco_ucs_configuration.py
quantum/plugins/cisco/ucs/cisco_ucs_network_driver.py

index 68d1b5cf42439c18fdf27075906ab94310d544c4..7b214202e068e28da1d704118f5a301be4324f82 100755 (executable)
@@ -32,6 +32,8 @@ Let's leap in!
 \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
index 312c230acba1d2dab14a858c8a32a922e4639369..ec7bae3cf1d13dc9ee8bd46e8533eb9fbd410740 100644 (file)
@@ -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()
index edc2288cdea3ec70c79f2931a36be04828dae47a..74948cd207a7f24483bba396a86044b92df80361 100644 (file)
@@ -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()
index f1cbf2a1ec28ae91303dbc49c521d34e5d120d55..5e6d9e485183993c562afbb9d6f253dd0d9ed14d 100644 (file)
@@ -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()
index e24e0a372ffdf4e6ab5cbbaa6fbb48f3432e3417..ba7870199527515ce654aad75164b29d378c5d24 100644 (file)
@@ -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()
index f627de25414d382da576921ba471129e3b6d98fd..3c365d19e748aa3a2ecf7afca769e1fbb7a3343b 100644 (file)
@@ -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
index 81f221f0393fe36151bd080e6dcaa256d1c98a66..25df54d381737b7a801838f8f5cf8050b0fe1d85 100644 (file)
@@ -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()
index f1ad1490281d0277559014cbcf3c13c4c5828345..d43d193f081531216c3f3e675c0105e34cd0ab31 100644 (file)
@@ -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()
index 78090d5f9cf326fb6e0e30542bb10237c48b1a6e..02380dc9e3fe1afea37bd44b9e8ea88ba9fe1888 100644 (file)
@@ -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()
index f00116ee1fce76610a70148b3a78b5570077ef1e..b80d99a9869c927c87d536ba7bade00395958b97 100644 (file)
@@ -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
index 30537417124eae4654d2fa31ab5e4e1862d5d284..1ff57237c1aa338044773a951379a9c6b0a81511 100644 (file)
@@ -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()
index acf0df100de19576b34c3ad61a150553e67972ab..5d860ddca602fdcabe9a7b72061aaedfefedd81d 100644 (file)
@@ -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()