def delete(cls, sec_group_id, context): client = trove.common.remote.create_nova_client(context) try: client.security_groups.delete(sec_group_id) except nova_exceptions.ClientException as e: LOG.exception('Failed to delete remote security group') raise exception.SecurityGroupDeletionError(str(e))
def delete_security_group(self, sec_group_id): try: self.client.delete_security_group(security_group=sec_group_id) except neutron_exceptions.NeutronClientException as e: LOG.exception('Failed to delete remote security group') raise exception.SecurityGroupDeletionError(str(e))