- def _build_nova_client(self, vim_account_id) -> nova_client_v2.Client:
- sess = self._get_session(vim_account_id)
- return nova_client.Client("2", session=sess)
-
- def _get_session(self, vim_account_id: str):
- creds = CollectorUtils.get_credentials(vim_account_id)
- verify_ssl = CollectorUtils.is_verify_ssl(creds)
- auth = v3.Password(auth_url=creds.url,
- username=creds.user,
- password=creds.password,
- project_name=creds.tenant_name,
- project_domain_id='default',
- user_domain_id='default')
- return session.Session(auth=auth, verify=verify_ssl)
+ def _build_nova_client(self, vim_account: dict) -> nova_client.Client:
+ sess = OpenstackUtils.get_session(vim_account)
+ return nova_client.Client("2", session=sess, timeout=10)