Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Merge branch 'add-vld-config' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWall89 committed Jun 1, 2020
2 parents 1d40346 + 1e70ea4 commit e3f5af8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
13 changes: 4 additions & 9 deletions adaptation_layer/driver/osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,20 +283,15 @@ def instantiate_ns(self, nsId: str, args=None) -> Tuple[None, Headers]:
args_payload = args['payload']

if args_payload and 'additionalParamsForNs' in args_payload:
additional_params = args_payload['additionalParamsForNs']
if 'vnf' in additional_params:
instantiate_payload.update(args_payload['additionalParamsForNs'])
if 'vnf' in instantiate_payload:
mapping = {v: str(i+1) for i,
v in enumerate(ns_res['constituent-vnfr-ref'])}

for vnf in additional_params['vnf']:
for vnf in instantiate_payload['vnf']:
if vnf.get('vnfInstanceId'):
vnf['member-vnf-index'] = mapping[vnf.pop(
'vnfInstanceId')]
if len(additional_params['vnf']) > 0:
instantiate_payload['vnf'] = additional_params['vnf']
if 'wim_account' in additional_params:
instantiate_payload['wimAccountId'] = additional_params['wim_account']
else:
if 'wim_account' not in instantiate_payload:
instantiate_payload['wimAccountId'] = False

try:
Expand Down
14 changes: 14 additions & 0 deletions openapi/MSO-LO-swagger-resolved.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1191,9 +1191,23 @@ definitions:
type: string
vimAccountId:
type: string
NfvoNsInstantiateRequest_additionalParamsForNs_vld:
items:
type: object
properties:
name:
type: string
example: vldnet
vim-network-name:
type: string
example: netVIM1
NfvoNsInstantiateRequest_additionalParamsForNs:
type: object
properties:
vld:
type: array
items:
$ref: '#/definitions/NfvoNsInstantiateRequest_additionalParamsForNs_vld'
vnf:
type: array
items:
Expand Down

0 comments on commit e3f5af8

Please sign in to comment.