X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Flib%2Fcli%2Fns_lib.robot;h=8be124ddaa09bcd586f91a4a2e09033fb665b342;hb=26864d32ac33dd9941e3212df9276e2d4f081d22;hp=18f6430ce5669be97161fec28c76cdac8010f6b9;hpb=3f7f46ab7bf67ceb7d3c9a7f2c2aef5c2dea409d;p=osm%2Fdevops.git diff --git a/robot-systest/lib/cli/ns_lib.robot b/robot-systest/lib/cli/ns_lib.robot index 18f6430c..8be124dd 100644 --- a/robot-systest/lib/cli/ns_lib.robot +++ b/robot-systest/lib/cli/ns_lib.robot @@ -29,6 +29,7 @@ ${ns_launch_max_wait_time} 5min ${ns_launch_pol_time} 30sec ${ns_delete_max_wait_time} 1min ${ns_delete_pol_time} 15sec +${nsconfig} *** Keywords *** @@ -41,21 +42,33 @@ Get NS List Launch Network Services and Return - [Arguments] ${vim_name} + [Arguments] ${vim_name} ${ns_config}='' + Run Keyword If ${ns_config}=='' Get NS Config + ... ELSE Set NS Config ${ns_config} + Log To Console \n${nsconfig} Should Not Be Empty ${nsd_ids} There are no NS descriptors to launch the NS :FOR ${nsd} IN @{nsd_ids} \ ${ns_name}= GENERATE NAME \ Append To List ${ns_ids} ${ns_name} - \ Create Network Service ${nsd} ${vim_name} ${ns_name} - \ Delete NS ${ns_name} + \ Create Network Service ${nsd} ${vim_name} ${ns_name} ${nsconfig} + + +Set NS Config + [Arguments] ${ns_config} + ${nsconfig}= Get Variable Value ${ns_config} '' + Set Test Variable ${nsconfig} + + +Get NS Config + ${nsconfig}= Get Environment Variable NS_CONFIG '' + Set Test Variable ${nsconfig} Create Network Service [Documentation] Create ns at osm - [Arguments] ${nsd} ${vim_name} ${ns_name} + [Arguments] ${nsd} ${vim_name} ${ns_name} ${ns_config} - ${ns_config}= Get Environment Variable NS_CONFIG '' Run Keyword If ${ns_config}!='' Create Network Service With Config ${nsd} ${vim_name} ${ns_name} ${ns_config} ... ELSE Create Network Service Without Config ${nsd} ${vim_name} ${ns_name}