Making a check for the presence of UCS/Nexus plugin (earlier it was not in certain cases). With this change, if the UCS/Nexus plugins are not enabled, the core API tests can be run even on Ubuntu (and RHEL without the requirement of any specific network hardware).
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user