Beispiel #1
0
    def setUpClass(cls):
        cls.os = openstack.Manager()
        cls.servers_client = cls.os.servers_client
        cls.client = cls.os.images_client
        cls.config = storm.config.StormConfig()
        cls.image_ref = cls.config.env.image_ref
        cls.flavor_ref = cls.config.env.flavor_ref
        cls.ssh_timeout = cls.config.nova.ssh_timeout

        name = rand_name('server')
        resp, cls.server = cls.servers_client.create_server(
            name, cls.image_ref, cls.flavor_ref)
        #Wait for the server to become active
        cls.servers_client.wait_for_server_status(cls.server['id'], 'ACTIVE')

        #Create an image from the server
        name = rand_name('image')
        cls.meta = {'key1': 'value1', 'key2': 'value2'}
        resp, body = cls.client.create_image(cls.server['id'], name, cls.meta)
        image_ref = resp['location']
        temp = image_ref.rsplit('/')
        image_id = temp[len(temp) - 1]

        cls.client.wait_for_image_resp_code(image_id, 200)
        cls.client.wait_for_image_status(image_id, 'ACTIVE')
        resp, cls.image = cls.client.get_image(image_id)
Beispiel #2
0
    def setUpClass(cls):
        cls.os = openstack.Manager()
        cls.client = cls.os.servers_client
        cls.config = storm.config.StormConfig()
        cls.image_ref = cls.config.env.image_ref
        cls.flavor_ref = cls.config.env.flavor_ref
        cls.image_ref_alt = cls.config.env.image_ref_alt
        cls.flavor_ref_alt = cls.config.env.flavor_ref_alt

        cls.s1_name = rand_name('server')
        resp, server = cls.client.create_server(cls.s1_name, cls.image_ref,
                                                cls.flavor_ref)
        cls.client.wait_for_server_status(server['id'], 'ACTIVE')
        resp, cls.s1 = cls.client.get_server(server['id'])

        cls.s2_name = rand_name('server')
        resp, server = cls.client.create_server(cls.s2_name, cls.image_ref_alt,
                                                cls.flavor_ref)
        cls.client.wait_for_server_status(server['id'], 'ACTIVE')
        resp, cls.s2 = cls.client.get_server(server['id'])

        cls.s3_name = rand_name('server')
        resp, server = cls.client.create_server(cls.s3_name, cls.image_ref,
                                                cls.flavor_ref_alt)
        cls.client.wait_for_server_status(server['id'], 'ACTIVE')
        resp, cls.s3 = cls.client.get_server(server['id'])
 def setUpClass(cls):
     cls.os = openstack.Manager()
     cls.client = cls.os.servers_client
     cls.config = storm.config.StormConfig()
     cls.image_ref = cls.config.env.image_ref
     cls.flavor_ref = cls.config.env.flavor_ref
     cls.ssh_timeout = cls.config.nova.ssh_timeout
    def setUpClass(cls):
        cls.os = openstack.Manager()
        cls.client = cls.os.servers_client
        cls.config = storm.config.StormConfig()
        cls.image_ref = cls.config.env.image_ref
        cls.flavor_ref = cls.config.env.flavor_ref

        #Create a server to be used for all read only tests
        cls.meta = {'test1': 'value1', 'test2': 'value2'}
        name = rand_name('server')
        resp, cls.server = cls.client.create_server(name,
                                                    cls.image_ref,
                                                    cls.flavor_ref,
                                                    meta=cls.meta)

        #Wait for the server to become active
        cls.client.wait_for_server_status(cls.server['id'], 'ACTIVE')
Beispiel #5
0
 def setUpClass(cls):
     cls.os = openstack.Manager()
     cls.client = cls.os.flavors_client
     cls.config = storm.config.StormConfig()
     cls.flavor_id = cls.config.env.flavor_ref