示例#1
0
def setup_infrastructure_providers(uses_infra_providers):
    """Adds all infrastructure providers listed in cfme_data.yaml

    This includes ``rhev`` and ``virtualcenter`` provider types
    """
    providers.setup_infrastructure_providers(validate=True,
                                             check_existing=True)
def test_permissions_vm_remove():
    # Ensure VMs exist
    if not virtual_machines.get_number_of_vms():
        logger.debug("Setting up providers")
        setup_infrastructure_providers()
        logger.debug("Providers setup")
    single_task_permission_test(
        [
            ['Infrastructure', 'Virtual Machines', 'Accordions'],
            ['Infrastructure', 'Virtual Machines', 'VM Access Rules', 'Modify', 'Remove']
        ],
        {'Remove VM': _test_vm_removal}
    )
def test_permissions_vm_power_on_access():
    # Ensure VMs exist
    if not virtual_machines.get_number_of_vms():
        logger.debug("Setting up providers")
        setup_infrastructure_providers()
        logger.debug("Providers setup")
    single_task_permission_test(
        [
            ['Infrastructure', 'Virtual Machines', 'Accordions'],
            ['Infrastructure', 'Virtual Machines', 'VM Access Rules', 'Operate', 'Power On']
        ],
        {'VM Power On': _test_vm_power_on}
    )
示例#4
0
def hosts():
    """Ensure the infra providers are set up and get list of hosts"""
    sel.force_navigate("infrastructure_providers")
    for provider in providers.setup_infrastructure_providers():
        provider.validate()
    sel.force_navigate("infrastructure_hosts")
    search.ensure_no_filter_applied()
    return host.get_all_hosts()
def hosts():
    """Ensure the infra providers are set up and get list of hosts"""
    sel.force_navigate("infrastructure_providers")
    for provider in providers.setup_infrastructure_providers():
        provider.validate()
    sel.force_navigate("infrastructure_hosts")
    search.ensure_no_filter_applied()
    return host.get_all_hosts()
示例#6
0
def vms():
    """Ensure the infra providers are set up and get list of vms"""
    sel.force_navigate("infrastructure_providers")
    for provider in providers.setup_infrastructure_providers():
        provider.validate()
    sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
def vms():
    """Ensure the infra providers are set up and get list of vms"""
    sel.force_navigate("infrastructure_providers")
    for provider in providers.setup_infrastructure_providers():
        provider.validate()
    sel.force_navigate("infra_vms")
    search.ensure_no_filter_applied()
    return virtual_machines.get_all_vms()
def setup_providers():
    # Normally function-scoped
    setup_infrastructure_providers()
def setup_providers():
    # Normally function-scoped
    setup_infrastructure_providers()
示例#10
0
def setup_infrastructure_providers(uses_infra_providers):
    """Adds all infrastructure providers listed in cfme_data.yaml

    This includes ``rhev`` and ``virtualcenter`` provider types
    """
    providers.setup_infrastructure_providers(validate=True, check_existing=True)