]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Making a check for the presence of UCS/Nexus plugin (earlier it was not in certain...
authorSumit Naiksatam <snaiksat@cisco.com>
Mon, 8 Aug 2011 18:54:19 +0000 (11:54 -0700)
committerSumit Naiksatam <snaiksat@cisco.com>
Mon, 8 Aug 2011 18:54:19 +0000 (11:54 -0700)
quantum/plugins/cisco/README
quantum/plugins/cisco/l2network_model.py

index 5467fb03a9dfb36fc604f427d381fcfa7ca4a8b3..a5d3146a911cdd27ca8b5afd11282d5a2487211a 100644 (file)
@@ -60,9 +60,9 @@ mysql -uroot -p<mysql_password_here> nova -e 'create table ports (port_id VARCHA
 ** Execute the Test cases
 * The unit tests are located at quantum/plugins/cisco/tests/unit. They are executed from quantum/plugins/cisco/ using the runtests.py script. (Note that to execute the test cases one currently requires the environment setup as outlined in the pre-requisites.)
 
-* Execution of the runtests.py script.
+* Execution of the run_tests.py script.
     All unit tests
-        python runtests.py unit
+        python run_tests.py unit
     Specific Plugin unit test
-        python runtests.py unit.<name_of_the file>
-       e.g. python run_tests.py unit.test_coreApi
+        python run_tests.py unit.<name_of_the file>
+       e.g. python run_tests.py unit.test_l2networkApi
index 3fa986b2a38f3bfa9c25415ab6310cd51518db46..e24e0a372ffdf4e6ab5cbbaa6fbb48f3432e3417 100644 (file)
@@ -47,12 +47,14 @@ class L2NetworkModel(L2NetworkModelBase):
             getattr(pluginObjRef, function_name)(*args, **kwargs)
 
     def _invokeUCSPlugin(self, function_name, args, kwargs):
-        getattr(self._plugins[const.UCS_PLUGIN],
-                function_name)(*args, **kwargs)
+        if const.UCS_PLUGIN in self._plugins.keys():
+            getattr(self._plugins[const.UCS_PLUGIN],
+                    function_name)(*args, **kwargs)
 
     def _invokeNexusPlugin(self, function_name, args, kwargs):
-        getattr(self._plugins[const.NEXUS_PLUGIN],
-                function_name)(*args, **kwargs)
+        if const.NEXUS_PLUGIN in self._plugins.keys():
+            getattr(self._plugins[const.NEXUS_PLUGIN],
+                    function_name)(*args, **kwargs)
 
     def get_all_networks(self, args):
         pass