예제 #1
0
def test_retire_stack(provider, provisioning, catalog, catalog_item, request):
    """Tests stack provisioning

    Metadata:
        test_flag: provision
    """
    catalog_item, template = catalog_item
    DefaultView.set_default_view("Stacks", "Grid View")

    stack_data = prepare_stack_data(provider, provisioning)
    service_catalogs = ServiceCatalogs(catalog_item.catalog, catalog_item.name, stack_data)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service {}'.format(catalog_item.name))
    row_description = catalog_item.name
    cells = {'Description': row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True],
                       fail_func=requests.reload, num_sec=2500, delay=20)

    assert 'Provisioned Successfully' in row.last_message.text

    stack = Stack(stack_data['stack_name'], provider=provider)
    stack.wait_for_exists()
    stack.retire_stack()

    @request.addfinalizer
    def _cleanup_vms():
        clean_up(stack_data, provider)
def test_retire_stack(provider, provisioning, catalog, catalog_item, request):
    """Tests stack provisioning

    Metadata:
        test_flag: provision
    """
    catalog_item, template = catalog_item
    DefaultView.set_default_view("Stacks", "Grid View")

    stack_data = prepare_stack_data(provider, provisioning)
    service_catalogs = ServiceCatalogs(catalog_item.catalog, catalog_item.name,
                                       stack_data)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service {}'.format(
        catalog_item.name))
    row_description = catalog_item.name
    cells = {'Description': row_description}
    row, __ = wait_for(requests.wait_for_request, [cells, True],
                       fail_func=requests.reload,
                       num_sec=2500,
                       delay=20)

    assert 'Provisioned Successfully' in row.last_message.text

    stack = Stack(stack_data['stack_name'], provider=provider)
    stack.wait_for_exists()
    stack.retire_stack()

    @request.addfinalizer
    def _cleanup_vms():
        clean_up(stack_data, provider)
예제 #3
0
def test_retire_stack(provider, provisioning, catalog, catalog_item, request):
    """Tests stack provisioning

    Metadata:
        test_flag: provision
    """
    catalog_item, template = catalog_item
    DefaultView.set_default_view("Stacks", "Grid View")

    stack_data = prepare_stack_data(provider, provisioning)
    service_catalogs = ServiceCatalogs(catalog_item.catalog, catalog_item.name,
                                       stack_data)
    service_catalogs.order()
    logger.info('Waiting for cfme provision request for service {}'.format(
        catalog_item.name))
    request_description = catalog_item.name
    provision_request = Request(request_description, partial_check=True)
    provision_request.wait_for_request()
    assert provision_request.is_succeeded()
    stack = Stack(stack_data['stack_name'], provider=provider)
    stack.wait_for_exists()
    stack.retire_stack()

    @request.addfinalizer
    def _cleanup_vms():
        clean_up(stack_data, provider)
예제 #4
0
def stack(setup_provider_modscope, provider):
    stack = Stack(provider.data['provisioning']['stacks'][0], provider=provider)
    stack.wait_for_exists()
    yield stack

    try:
        stack.delete()
    except Exception:
        pass
예제 #5
0
def stack(setup_provider_modscope, provider):
    stack = Stack(provider.data['provisioning']['stack'], provider=provider)
    stack.wait_for_exists()
    yield stack

    try:
        stack.delete()
    except Exception:
        pass