'This function deletes a security group.'

def destroy(self, context, security_group):

    neutron = neutronapi.get_client(context)
    try:
        neutron.delete_security_group(security_group['id'])
    except n_exc.NeutronClientException as e:
        exc_info = sys.exc_info()
        if (e.status_code == 404):
            self.raise_not_found(six.text_type(e))
        elif (e.status_code == 409):
            self.raise_invalid_property(six.text_type(e))
        else:
            LOG.error(_LE('Neutron    Error:    %s'), e)
            six.reraise(*exc_info)
