Пример #1
0
 def run_instances(self):
     min_count = int(self.querystring.get('MinCount', ['1'])[0])
     image_id = self.querystring.get('ImageId')[0]
     user_data = self.querystring.get('UserData')
     new_reservation = ec2_backend.add_instances(image_id, min_count, user_data)
     template = Template(EC2_RUN_INSTANCES)
     return template.render(reservation=new_reservation)
Пример #2
0
 def run_instances(self):
     min_count = int(self.querystring.get('MinCount', ['1'])[0])
     image_id = self.querystring.get('ImageId')[0]
     user_data = self.querystring.get('UserData')
     security_group_names = self._get_multi_param('SecurityGroup')
     new_reservation = ec2_backend.add_instances(image_id, min_count, user_data, security_group_names)
     template = Template(EC2_RUN_INSTANCES)
     return template.render(reservation=new_reservation)
Пример #3
0
 def run_instances(self):
     min_count = int(self.querystring.get('MinCount', ['1'])[0])
     image_id = self.querystring.get('ImageId')[0]
     user_data = self.querystring.get('UserData')
     new_reservation = ec2_backend.add_instances(image_id, min_count,
                                                 user_data)
     template = Template(EC2_RUN_INSTANCES)
     return template.render(reservation=new_reservation)
Пример #4
0
 def run_instances(self):
     min_count = int(self.querystring.get('MinCount', ['1'])[0])
     image_id = self.querystring.get('ImageId')[0]
     user_data = self.querystring.get('UserData')
     security_group_names = self._get_multi_param('SecurityGroup')
     security_group_ids = self._get_multi_param('SecurityGroupId')
     instance_type = self.querystring.get("InstanceType", ["m1.small"])[0]
     subnet_id = self.querystring.get("SubnetId", [None])[0]
     key_name = self.querystring.get("KeyName", [None])[0]
     new_reservation = ec2_backend.add_instances(
         image_id,
         min_count,
         user_data,
         security_group_names,
         instance_type=instance_type,
         subnet_id=subnet_id,
         key_name=key_name,
         security_group_ids=security_group_ids)
     template = Template(EC2_RUN_INSTANCES)
     return template.render(reservation=new_reservation)
Пример #5
0
 def run_instances(self):
     min_count = int(self.querystring.get("MinCount", ["1"])[0])
     image_id = self.querystring.get("ImageId")[0]
     user_data = self.querystring.get("UserData")
     security_group_names = self._get_multi_param("SecurityGroup")
     security_group_ids = self._get_multi_param("SecurityGroupId")
     instance_type = self.querystring.get("InstanceType", ["m1.small"])[0]
     subnet_id = self.querystring.get("SubnetId", [None])[0]
     key_name = self.querystring.get("KeyName", [None])[0]
     new_reservation = ec2_backend.add_instances(
         image_id,
         min_count,
         user_data,
         security_group_names,
         instance_type=instance_type,
         subnet_id=subnet_id,
         key_name=key_name,
         security_group_ids=security_group_ids,
     )
     template = Template(EC2_RUN_INSTANCES)
     return template.render(reservation=new_reservation)
Пример #6
0
 def run_instances(self):
     min_count = int(self.querystring.get("MinCount", ["1"])[0])
     image_id = self.querystring.get("ImageId")[0]
     new_reservation = ec2_backend.add_instances(image_id, min_count)
     template = Template(EC2_RUN_INSTANCES)
     return template.render(reservation=new_reservation)