Dont pass tenant-id in request unless given
Currently, if tenant-id is not passed during tap-service-create, it is passed as None. This is not correct, tenant-id should be populated in the request body only when it is passed as an attribute. Change-Id: Idc6e117955a13f9aa70167e6997e83fca9bcae37 Closes-Bug: #1540739
This commit is contained in:
parent
88fba95134
commit
0b319b560c
@ -81,8 +81,9 @@ class CreateTapService(extension.ClientExtensionCreate, TapService):
|
||||
client, 'network',
|
||||
parsed_args.network_id)
|
||||
body = {'port_id': port_id,
|
||||
'network_id': network_id,
|
||||
'tenant_id': parsed_args.tenant_id}
|
||||
'network_id': network_id}
|
||||
if parsed_args.tenant_id:
|
||||
body['tenant_id'] = parsed_args.tenant_id
|
||||
_updatable_args2body(parsed_args, body)
|
||||
return {self.resource: body}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user