From c7e4cae0d6cc289adcba6802a7f315c805dc7366 Mon Sep 17 00:00:00 2001 From: venkatamahesh Date: Thu, 11 Aug 2016 09:33:25 +0530 Subject: [PATCH] Name of the exception is corrected Change-Id: I4621a2b66fb6cc66dc76ad8eb87d90063f969c69 Closes-Bug: #1612040 --- tacker/extensions/nfvo.py | 2 +- tacker/nfvo/drivers/vim/openstack_driver.py | 2 +- tacker/tests/unit/vm/nfvo/drivers/vim/test_openstack_driver.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tacker/extensions/nfvo.py b/tacker/extensions/nfvo.py index b82b8d9af..a32ff516e 100644 --- a/tacker/extensions/nfvo.py +++ b/tacker/extensions/nfvo.py @@ -73,7 +73,7 @@ class VimDuplicateUrlException(exceptions.TackerException): "duplicate VIM") -class VimPorjectDomainNameMissingException(exceptions.TackerException): +class VimProjectDomainNameMissingException(exceptions.TackerException): message = _("'project_domain_name' is missing") diff --git a/tacker/nfvo/drivers/vim/openstack_driver.py b/tacker/nfvo/drivers/vim/openstack_driver.py index 0dc878c02..eb2e8621d 100644 --- a/tacker/nfvo/drivers/vim/openstack_driver.py +++ b/tacker/nfvo/drivers/vim/openstack_driver.py @@ -90,7 +90,7 @@ class OpenStack_Driver(abstract_vim_driver.VimAbstractDriver): auth_cred['project_name'] = vim_project.get('name') if not vim_project.get('project_domain_name'): LOG.error(_("'project_domain_name' is missing.")) - raise nfvo.VimPorjectDomainNameMissingException() + raise nfvo.VimProjectDomainNameMissingException() auth_cred['project_domain_name'] = vim_project.get( 'project_domain_name') if not auth_cred.get('user_domain_name'): diff --git a/tacker/tests/unit/vm/nfvo/drivers/vim/test_openstack_driver.py b/tacker/tests/unit/vm/nfvo/drivers/vim/test_openstack_driver.py index 92698d1d4..c52bf4e35 100644 --- a/tacker/tests/unit/vm/nfvo/drivers/vim/test_openstack_driver.py +++ b/tacker/tests/unit/vm/nfvo/drivers/vim/test_openstack_driver.py @@ -145,7 +145,7 @@ class TestOpenstack_Driver(base.TestCase): 'auth_cred': auth_cred, 'vim_project': {'id': sentinel.prj_id1, 'name': sentinel.prj_name1}} - self.assertRaises(nfvo.VimPorjectDomainNameMissingException, + self.assertRaises(nfvo.VimProjectDomainNameMissingException, self.openstack_driver.authenticate_vim, vim_obj)