- def create(self,nsd_name,nsr_name,account,vim_network_prefix=None,ssh_keys=None,description='default description',admin_status='ENABLED'):
- postdata={}
+ def scale(self, ns_name, ns_scale_group, instance_index):
+ postdata = {}
+ postdata['instance'] = list()
+ instance = {}
+ instance['id'] = instance_index
+ postdata['instance'].append(instance)
+
+ ns = self.get(ns_name)
+ resp = self._http.post_cmd(
+ 'v1/api/config/ns-instance-config/nsr/{}/scaling-group/{}/instance'
+ .format(ns['id'], ns_scale_group), postdata)
+ if 'success' not in resp:
+ raise ClientException(
+ "failed to scale ns: {} result: {}".format(
+ ns_name,
+ resp))
+
+ def create(self, nsd_name, nsr_name, account, vim_network_prefix=None,
+ ssh_keys=None, description='default description',
+ admin_status='ENABLED'):
+ postdata = {}