def allocate_resource(self): if self.allocation_status == 'able': self.allocation_status = 'busy' allocator = get_resource_allocator(self._get_vendor(), self._get_credential(), self._get_app_id()) allocator.create() self.allocation_status = 'able' return True
def get_sdk(self): """ This function should be destroyed. You should have to use open_sdk(..) instead. :return: """ allocator = get_resource_allocator(self._get_vendor(), self._get_credential(), self._get_app_id()) client = Client(allocator.get_rest_api_url()) return client
def terminate_resource(self): allocator = get_resource_allocator(self._get_vendor(), self._get_credential(), self._get_app_id()) allocator.terminate()
def generate_sdk(self, platform): allocator = get_resource_allocator(self._get_vendor(), self._get_credential(), self._get_app_id()) return allocator.generate_sdk(platform)
def get_rest_api_url(self): allocator = get_resource_allocator(self._get_vendor(), self._get_credential(), self._get_app_id()) return allocator.get_rest_api_url()