blob: 021d535ce5a7bf0be5d5535a512bb7fb83e0b64a [file] [log] [blame]
from neutronv2.common import send
from neutronv2.arg_converter import get_by_name_or_uuid_multiple
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
@send('delete')
def rbac_policies_delete(id):
url = '/rbac-policies/{}'.format(id)
return url, {}
@get_by_name_or_uuid_multiple([('network', 'object_id')])
@send('post')
def rbac_policies_create(object_id,**kwargs):
url = '/rbac-policies'
kwargs.update({'object_type': 'network'})
kwargs.update({'object_id': object_id})
json = {
'rbac_policy': kwargs,
}
return url, {'json': json}