コード例 #1
0
 def get_instance_full(cloud_provider_resource, name, id):
     return HeavenResidentInstance(
         name=name,
         descrpition='instance {0} {1}'.format(name, id),
         image='centos',
         cloud=Cloud(0),
         id=str(id),
         private_ip='192.168.5.{}'.format(str(random.randint(1, 253))),
         public_ip='1.1.1.{}'.format(str(random.randint(1, 253))))
    def create_angel_instance(login_user, login_pass, cloud_provider_resource, name, wing_count, flight_speed,
                              cloud_size, image, network_data):
        # connect to cloudprovider
        HeavenlyCloudService.connect(cloud_provider_resource.user, cloud_provider_resource.password,
                                     cloud_provider_resource.address)

        # create the instance and return an object representing the newly created instance
        return HeavenResidentInstance(name, 'wing count {0} flight speed {1}'.format(wing_count, flight_speed), image,
                                      Cloud(cloud_size), str(uuid.uuid4()),
                                      '192.168.0.{}'.format(str(random.randint(1, 253))), None)
コード例 #3
0
    def create_man_instance(login_user, login_pass, cloud_provider_resource,
                            name, height, weight, cloud_size, image):
        # connect to cloudprovider
        HeavenlyCloudService.connect(cloud_provider_resource.user,
                                     cloud_provider_resource.password,
                                     cloud_provider_resource.address)

        # create the instance and return an object representing the newly created instance
        return HeavenResidentInstance(
            name, 'height {0} weight {1}'.format(height, weight), image,
            Cloud(cloud_size), str(uuid.uuid4()),
            '192.168.10.{}'.format(str(random.randint(1, 253))),
            '8.8.8.{}'.format(str(random.randint(1, 253))))
コード例 #4
0
 def get_instance(cloud_provider_resource, name, id, address):
     return HeavenResidentInstance(name,
                                   'instance {0} {1}'.format(name,
                                                             id), 'centos',
                                   Cloud(0), str(id), address, None)
コード例 #5
0
    def create_angel_instance(cloud_provider_resource, name, wings_count, flight_speed, cloud_size,image):
        HeavenlyCloudsService.connect(cloud_provider_resource.user, cloud_provider_resource.password,
                                      cloud_provider_resource.address)

        return HeavenResidentInstance(name, 'wings count {0} flight speed {1}'.format(wings_count, flight_speed), image,Cloud(cloud_size),str(uuid.uuid4()),'192.168.0.5',None)
        pass
コード例 #6
0
 def create_man_instance(cloud_provider_resource, name, height, weight ,cloud_size, image):
     HeavenlyCloudsService.connect(cloud_provider_resource.user, cloud_provider_resource.password, cloud_provider_resource.address)
     return HeavenResidentInstance(name, 'height {0} weight {1}'.format(height, weight ),image, Cloud(cloud_size),str(uuid.uuid4()),'192.168.10.5','8.8.8.8')
     pass