예제 #1
0
 def test_get_vc_version(self):
     session = mock.Mock()
     expected_version = '6.0.1'
     session.vim.service_content.about.version = expected_version
     version = vim_util.get_vc_version(session)
     self.assertEqual(expected_version, version)
     expected_version = '5.5'
     session.vim.service_content.about.version = expected_version
     version = vim_util.get_vc_version(session)
     self.assertEqual(expected_version, version)
예제 #2
0
파일: driver.py 프로젝트: NxtCloud/nova
 def _update_pbm_location(self):
     if CONF.vmware.pbm_wsdl_location:
         pbm_wsdl_loc = CONF.vmware.pbm_wsdl_location
     else:
         version = vim_util.get_vc_version(self._session)
         pbm_wsdl_loc = pbm.get_pbm_wsdl_location(version)
     self._session.pbm_wsdl_loc_set(pbm_wsdl_loc)
예제 #3
0
 def _update_pbm_location(self):
     if CONF.vmware.pbm_wsdl_location:
         pbm_wsdl_loc = CONF.vmware.pbm_wsdl_location
     else:
         version = vim_util.get_vc_version(self._session)
         pbm_wsdl_loc = pbm.get_pbm_wsdl_location(version)
     self._session.pbm_wsdl_loc_set(pbm_wsdl_loc)
예제 #4
0
 def _update_pbm_location(self):
     if CONF.vmware.pbm_wsdl_location:
         pbm_wsdl_loc = CONF.vmware.pbm_wsdl_location
     else:
         version = vim_util.get_vc_version(self._session)
         pbm_wsdl_loc = pbm.get_pbm_wsdl_location(version)
     # TODO(garyk): Update this with oslo.vmware method. The session.pbm
     # is lazy loaded so this enables us to update this entry on the fly
     self._session._pbm_wsdl_loc = pbm_wsdl_loc
     self._session._pbm = None
예제 #5
0
 def _update_pbm_location(self):
     if CONF.vmware.pbm_wsdl_location:
         pbm_wsdl_loc = CONF.vmware.pbm_wsdl_location
     else:
         version = vim_util.get_vc_version(self._session)
         pbm_wsdl_loc = pbm.get_pbm_wsdl_location(version)
     # TODO(garyk): Update this with oslo.vmware method. The session.pbm
     # is lazy loaded so this enables us to update this entry on the fly
     self._session._pbm_wsdl_loc = pbm_wsdl_loc
     self._session._pbm = None
예제 #6
0
 def test_get_vc_version(self):
     test_spec = self.spec.get("test_get_vc_version")
     vc_version = vim_util.get_vc_version(self.session)
     expected_version = test_spec.get("vc_version")
     self.assertEqual(vc_version, expected_version)