def fetch_vms(self, source): """ Fetches list of VMs from specified source hypervisor.. """ body = { "os-fetch_vms": { "source_id": base.getid(source) } } url = '/vms/%s/action' % base.getid(source) return self.api.client.post(url, body=body)
def delete(self, vm): """ Delete a specific instance. :param instance: The name or ID of the :class:`VM` to delete. """ self._delete("/vms/%s" % base.getid(vm))
def update(self, cloud, **kwargs): """Updates the given cloud.""" if not kwargs: return body = {'cloud': kwargs} return self._update("/clouds/%s" % base.getid(cloud), body, 'cloud')
def get(self, vm): """ Get a specific source instance. :param instance: The ID of the :class:`Instance` to get. :rtype: :class:`Instance` """ return self._get("/vms/%s" % base.getid(vm), "vm")
def delete(self, cloud): return self._delete("/clouds/%s" % base.getid(cloud))