+
+ # VIM '--wait' option
+ def _wait(self, id, wait_time, deleteFlag=False):
+ self._logger.debug("")
+ self._client.get_token()
+ # Endpoint to get operation status
+ apiUrlStatus = '{}{}{}'.format(self._apiName, self._apiVersion, '/vim_accounts')
+ # Wait for status for VIM instance creation/deletion
+ if isinstance(wait_time, bool):
+ wait_time = WaitForStatus.TIMEOUT_VIM_OPERATION
+ WaitForStatus.wait_for_status(
+ 'VIM',
+ str(id),
+ wait_time,
+ apiUrlStatus,
+ self._http.get2_cmd,
+ deleteFlag=deleteFlag)
+
+ def _get_id_for_wait(self, name):
+ """ Returns id of name, or the id itself if given as argument
+ """
+ self._logger.debug("")
+ self._client.get_token()
+ for vim in self.list():
+ if name == vim['uuid']:
+ return vim['uuid']
+ for vim in self.list():
+ if name == vim['name']:
+ return vim['uuid']
+ return ''
+
+ def create(self, name, vim_access, sdn_controller=None, sdn_port_mapping=None, wait=False):
+ self._logger.debug("")
+ self._client.get_token()