def get_amphora(self, compute_id): '''Retrieve the information in nova of a virtual machine. :param amphora_id: virtual machine UUID :returns: an amphora object ''' # utilize nova client ServerManager 'get' method to retrieve info try: amphora = self.manager.get(compute_id) except Exception: LOG.exception(_LE("Error retrieving nova virtual machine.")) raise exceptions.ComputeGetException() return self._translate_amphora(amphora)
def get_amphora(self, compute_id, management_network_id=None): '''Retrieve the information in nova of a virtual machine. :param compute_id: virtual machine UUID :param management_network_id: ID of the management network :returns: an amphora object :returns: fault message or None ''' # utilize nova client ServerManager 'get' method to retrieve info try: amphora = self.manager.get(compute_id) except Exception: LOG.exception("Error retrieving nova virtual machine.") raise exceptions.ComputeGetException() return self._translate_amphora(amphora, management_network_id)
def _raise_compute_exception(self): LOG.exception("Error retrieving nova virtual machine.") raise exceptions.ComputeGetException()