+ if ns_scale:
+ # for each descriptor, scale it
+ for scale in nsd_desc['scaling-group-descriptor']:
+ # scale it.
+ assert not osm.get_api().ns.scale(ns_name, scale['name'], 1)
+
+ # ensure ns is scaling-out
+ assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='scaling-out',wait_time=120)
+
+ # wait for ns to be in running-state
+ assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='running',wait_time=120)
+
+ time.sleep(10)
+