'Create a default security group if one doesn\'t exist.
:returns: the default security group id for given tenant.'

def _ensure_default_security_group(self, context, tenant_id):

    default_group_id = self._get_default_sg_id(context, tenant_id)
    if default_group_id:
        return default_group_id
    security_group = {'security_group': {'name': 'default', 'tenant_id': tenant_id, 'description': _('Default    security    group')}}
    return self.create_security_group(context, security_group, default_sg=True)['id']
