Interface network_id also requires tenant
The server was updated to require passing the network's tenant_id when creating interfaces, this updates the tests and the client to do the same. Change-Id: I58c71c52999060cc3a3a4d36928e9f07cc9d6dfd
This commit is contained in:
parent
f30694635c
commit
b8b951060d
@ -315,12 +315,14 @@ class InterfaceClient(BaseClient):
|
||||
auth_client,
|
||||
tenant_id)
|
||||
|
||||
def create(self, vif_id, tenant_id, device_id=None, network_id=None):
|
||||
def create(self, vif_id, tenant_id, device_id=None, network_id=None,
|
||||
network_tenant_id=None):
|
||||
request_params = dict(id=vif_id,
|
||||
tenant_id=tenant_id,
|
||||
device_id=device_id)
|
||||
if network_id:
|
||||
request_params['network'] = dict(id=network_id)
|
||||
if network_id and network_tenant_id:
|
||||
request_params['network'] = dict(id=network_id,
|
||||
tenant_id=network_tenant_id)
|
||||
|
||||
return self._resource.create(**request_params)
|
||||
|
||||
|
@ -50,8 +50,9 @@ def create_interface(vif_id=None, device_id="device", network_id=None,
|
||||
network_id = network_id or uuid.uuid4()
|
||||
tenant_id = tenant_id or uuid.uuid4()
|
||||
create_res = functional.run("interface create vif_id=%s tenant_id=%s "
|
||||
"device_id=%s network_id=%s" % (vif_id, tenant_id,
|
||||
device_id, network_id))
|
||||
"device_id=%s network_id=%s "
|
||||
"network_tenant_id=%s" % (vif_id, tenant_id, device_id,
|
||||
network_id, tenant_id))
|
||||
return model("interface", create_res)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user