Ejemplo n.º 1
0
    def delete(self, instance):
        """Delete the NVRAM into the storage service.

        :param instance: instance object
        """
        for result in self._run_operation('delete', container=self.container,
                                          objects=[instance.uuid]):

            LOG.debug('Delete result: %s', str(result), instance=instance)
            if not result['success']:
                raise api.NVRAMDeleteException(instance=instance.name,
                                               reason=result)
Ejemplo n.º 2
0
    def delete_slot_map(self, inst_key):
        """Delete the Slot Map from Swift.

        :param inst_key: The instance key to use for the storage operation.
        """
        for result in self._run_operation('delete', container=self.container,
                                          objects=[inst_key]):

            LOG.debug('Delete slot map result: %s', str(result))
            if not result['success']:
                raise api.NVRAMDeleteException(reason=result,
                                               instance=inst_key)
Ejemplo n.º 3
0
    def delete(self, instance):
        """Delete the NVRAM into the storage service.

        :param instance: The nova instance object OR instance UUID.
        """
        inst_uuid = (instance
                     if uuidutils.is_uuid_like(instance) else instance.uuid)
        for result in self._run_operation('delete',
                                          container=self.container,
                                          objects=[inst_uuid]):

            LOG.debug(
                'Delete result for instance with UUID %(inst_uuid)s: '
                '%(res)s', {
                    'inst_uuid': inst_uuid,
                    'res': result
                })
            if not result['success']:
                raise api.NVRAMDeleteException(instance=inst_uuid,
                                               reason=result)