vnf-create: key error by tenant_id

Change-Id: I16acad999fd8abd6f2673295c548cd92f1a96e21
This commit is contained in:
Isaku Yamahata
2015-05-01 16:16:01 -07:00
parent 34c5f67338
commit 10ade2160f

View File

@@ -459,9 +459,10 @@ class Client(ClientBase):
def create_vnf(self, body=None):
arg = body[self._VNF]
arg_ = {
'tenant_id': arg['tenant_id'],
'template_id': arg['vnfd_id'],
}
if 'tenant_id' in arg:
arg_['tenant_id'] = arg['tenant_id']
if 'config' in arg:
arg_['attributes'] = {'config': arg['config']}
body_ = {self._DEVICE: arg_}