def fake_compute_api_create(cls, context, instance_type, image_href, **kwargs):
    inst_type = instance_types.get_instance_type_by_flavor_id(2)
    return [{'id': 1,
             'display_name': 'test_server',
             'uuid': fake_gen_uuid(),
             'instance_type': dict(inst_type),
             'access_ip_v4': '1.2.3.4',
             'access_ip_v6': 'fead::1234',
             'image_ref': 3,
             'user_id': 'fake',
             'project_id': 'fake',
             'created_at': datetime.datetime(2010, 10, 10, 12, 0, 0),
             'updated_at': datetime.datetime(2010, 11, 11, 11, 0, 0),
             }]
Exemple #2
0
def fake_compute_api_create(cls, context, instance_type, image_href, **kwargs):
    inst_type = instance_types.get_instance_type_by_flavor_id(2)
    return [{
        'id': 1,
        'display_name': 'test_server',
        'uuid': fake_gen_uuid(),
        'instance_type': dict(inst_type),
        'access_ip_v4': '1.2.3.4',
        'access_ip_v6': 'fead::1234',
        'image_ref': 3,
        'user_id': 'fake',
        'project_id': 'fake',
        'created_at': datetime.datetime(2010, 10, 10, 12, 0, 0),
        'updated_at': datetime.datetime(2010, 11, 11, 11, 0, 0),
    }]
Exemple #3
0
def fake_compute_api_create(cls, context, instance_type, image_href, **kwargs):
    global _block_device_mapping_seen
    _block_device_mapping_seen = kwargs.get('block_device_mapping')

    inst_type = instance_types.get_instance_type_by_flavor_id(2)
    resv_id = None
    return ([{'id': 1,
             'display_name': 'test_server',
             'uuid': fake_gen_uuid(),
             'instance_type': dict(inst_type),
             'access_ip_v4': '1.2.3.4',
             'access_ip_v6': 'fead::1234',
             'image_ref': 3,
             'user_id': 'fake',
             'project_id': 'fake',
             'created_at': datetime.datetime(2010, 10, 10, 12, 0, 0),
             'updated_at': datetime.datetime(2010, 11, 11, 11, 0, 0),
             'progress': 0
             }], resv_id)