summaryrefslogtreecommitdiffstats
path: root/robot/resources/mso_interface.robot
diff options
context:
space:
mode:
authorBrian Freeman <bf1936@att.com>2018-07-26 11:13:46 -0500
committerBrian Freeman <bf1936@att.com>2018-07-26 11:13:54 -0500
commitd65e2aac6f3108659db14c83736933c53065b9bc (patch)
tree05a996b177c0f81c4474c75c0fafb7de7b5b630a /robot/resources/mso_interface.robot
parentca5e32e9c0dfab04397aee554b3a61c21b21ca0d (diff)
Updates for vFWCL Setup
Issue-ID: TEST-110 Change-Id: If230afd903c51a01dad5a6204dca1a1eee1f8adc Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'robot/resources/mso_interface.robot')
-rw-r--r--robot/resources/mso_interface.robot11
1 files changed, 9 insertions, 2 deletions
diff --git a/robot/resources/mso_interface.robot b/robot/resources/mso_interface.robot
index 200b270f..bded5282 100644
--- a/robot/resources/mso_interface.robot
+++ b/robot/resources/mso_interface.robot
@@ -22,13 +22,20 @@ Run MSO Health Check
Run MSO Get ModelInvariantId
[Documentation] Runs an MSO Get ModelInvariantID for ClosedLoop Polieis
- [Arguments] ${service_model_name}
+ [Arguments] ${service_model_name} ${vf_module_label}=NULL
${param_dict}= Create Dictionary serviceModelName ${service_model_name}
${param}= Evaluate urllib.urlencode(${param_dict}) urllib
${data_path}= Catenate SEPARATOR= /ecomp/mso/catalog/v2/serviceVnfs? ${param}
${resp}= Run MSO Get Request ${data_path}
Log ${resp.json()}
- [Return] ${resp.json()['serviceVnfs'][0]['modelInfo']['modelInvariantUuid']}
+ # ${resp.json()['serviceVnfs'][0]['vfModules'][0]['vfModuleLabel'] should be 'base_vpkg'
+ ${model_invariant_id}= Set Variable NULL
+ @{ITEMS}= Copy List ${resp.json()['serviceVnfs']}
+ :FOR ${ELEMENT} IN @{ITEMS}
+ \ Log ${ELEMENT['vfModules']}
+ \ ${model_invariant_id} Set Variable If ('${vf_module_label}' in '${ELEMENT['vfModules'][0]['vfModuleLabel']}') ${ELEMENT['modelInfo']['modelInvariantUuid']} NULL
+ \ Exit For Loop If '${model_invariant_id}' != 'NULL'
+ [Return] ${model_invariant_id}
Run MSO Get Request
[Documentation] Runs an MSO get request