diff --git a/oslo_vmware/api.py b/oslo_vmware/api.py index 76cbebac..81c44ef7 100644 --- a/oslo_vmware/api.py +++ b/oslo_vmware/api.py @@ -243,7 +243,8 @@ class VMwareAPISession(object): LOG.debug("Logging into host: %s.", self._host) session = self.vim.Login(session_manager, userName=self._server_username, - password=self._server_password) + password=self._server_password, + locale='en') self._session_id = session.key # We need to save the username in the session since we may need it # later to check active session. The SessionIsActive method requires diff --git a/oslo_vmware/tests/test_api.py b/oslo_vmware/tests/test_api.py index e268b775..ad5bce45 100644 --- a/oslo_vmware/tests/test_api.py +++ b/oslo_vmware/tests/test_api.py @@ -173,7 +173,7 @@ class VMwareAPISessionTest(base.TestCase): session_manager = vim_obj.service_content.sessionManager vim_obj.Login.assert_called_once_with( session_manager, userName=VMwareAPISessionTest.USERNAME, - password=VMwareAPISessionTest.PASSWORD) + password=VMwareAPISessionTest.PASSWORD, locale='en') self.assertFalse(vim_obj.TerminateSession.called) self.assertEqual(session.key, api_session._session_id) pbm.set_soap_cookie.assert_called_once_with(cookie) @@ -197,7 +197,7 @@ class VMwareAPISessionTest(base.TestCase): userName=VMwareAPISessionTest.USERNAME) vim_obj.Login.assert_called_once_with( session_manager, userName=VMwareAPISessionTest.USERNAME, - password=VMwareAPISessionTest.PASSWORD) + password=VMwareAPISessionTest.PASSWORD, locale='en') self.assertEqual(new_session_key, api_session._session_id) def test_create_session_with_existing_active_session(self): @@ -257,7 +257,7 @@ class VMwareAPISessionTest(base.TestCase): session_manager = vim_obj.service_content.sessionManager vim_obj.Login.assert_called_once_with( session_manager, userName=VMwareAPISessionTest.USERNAME, - password=VMwareAPISessionTest.PASSWORD) + password=VMwareAPISessionTest.PASSWORD, locale='en') api_session.logout() vim_obj.Logout.assert_called_once_with( session_manager)