def setup_module(module):
    global cloud
    global api
    global template
    global image
    global network_routed

    cloud = Cloud(settings.address, settings.login, settings.password)
    api = cloud.get_api()

    templates = api.template_list()
    template = templates[0]


    images = api.image_list()
    for img in images:
        if img.name == 'default image' and img.state == 'ok':
            image = img
    if image == None:
        raise Exception('image not found')


    networks = api.network_list()
    for n in networks:
        if n.name == "Test routed network":
            network_routed = n

    if network_routed == None:
        raise Exception('network not found')
def setup_module(module):
    global cloud
    global api
    global template
    global base_image
    global permanent_image
    global leases

    cloud = Cloud(settings.address, settings.login, settings.password)
    api = cloud.get_api()

    templates = api.template_list()
    template = templates[0]

    images = api.image_list()

    for img in images:
        if img.name == 'default image' and img.state == 'ok':
            base_image = img
    if base_image == None:
        raise Exception('base image not found')

    for img in images:
        if img.name == 'permanent image' and img.state == 'ok':
            permanent_image = img
    if permanent_image == None:
        raise Exception('permanent image not found')
Beispiel #3
0
def setup_module(module):
    global cloud
    global api
    cloud = Cloud(settings.address,
                  settings.login,
                  settings.password,
                  debug=True)
    api = cloud.get_api()
Beispiel #4
0
def setup_module(module):
    global cloud
    global api
    global image
    cloud = Cloud(settings.address, settings.login, settings.password, debug=True)
    api = cloud.get_api()

    images = api.image_list()
    for img in images:
        if img.name == 'default image' and img.state == 'ok':
            image = img
            return
    raise Exception('image not found')
def setup_module(module):
    global cloud
    global api
    global template
    global image
    global vm

    cloud = Cloud(settings.address, settings.login, settings.password)
    api = cloud.get_api()

    templates = api.template_list()
    template = templates[0]

    images = api.image_list()
    for img in images:
        if img.name == 'default image' and img.state == 'ok':
            image = img
            break

    if image == None:
        raise Exception('image not found')

    vm = api.vm_create('test vm', 'vm description', template, image)
def setup_module(module):
    global mcloud
    global qcloud
    global mapi
    global qapi
    global network
    mcloud = Cloud(settings.address, settings.login, settings.password)
    qcloud = Cloud(settings.address, settings.additional_login,
                   settings.additional_password)
    mapi = mcloud.get_api()
    qapi = qcloud.get_api()
    network = qapi.network_create(26, 'Q', False)
def test_api():
    cloud = Cloud(settings.address, settings.login, settings.password, debug=True)
    api = cloud.get_api()
def test_register_additional():
    cloud = Cloud.register(settings.address, settings.login, settings.password, settings.name, settings.surname, settings.email, debug=True)
def test_register_user():
    cloud = Cloud.register(settings.address, settings.additional_login, settings.additional_password, settings.additional_name, settings.additional_surname, settings.additional_email, debug=True)