def test_v2v_rbac(appliance, new_credential):
    """
    Test migration with role-based access control

    Polarion:
        assignee: ytale
        initialEstimate: 1/2h
        caseimportance: high
        caseposneg: positive
        testtype: functional
        startsin: 5.10
        casecomponent: V2V
    """
    role = new_role(appliance=appliance,
                    product_features=[(['Everything'], True)])
    group = new_group(appliance=appliance, role=role.name)
    user = new_user(appliance=appliance, group=group, credential=new_credential)

    product_features = [(['Everything', 'Compute', 'Migration'], False)]
    role.update({'product_features': product_features})
    with user:
        view = navigate_to(appliance.server, 'Dashboard')
        nav_tree = view.navigation.nav_item_tree()
        # Checks migration option is disabled in navigation
        assert 'Migration' not in nav_tree['Compute'], ('Migration found in nav tree, '
                                                        'rbac should not allow this')

    product_features = [(['Everything'], True)]
    role.update({'product_features': product_features})
    with user:
        view = navigate_to(appliance.server, 'Dashboard', wait_for_view=15)
        nav_tree = view.navigation.nav_item_tree()
        # Checks migration option is enabled in navigation
        assert 'Migration' in nav_tree['Compute'], ('Migration not found in nav tree, '
                                                    'rbac should allow this')
Example #2
0
def test_v2v_rbac(appliance, new_credential):
    """
    Test migration with role-based access control

    Polarion:
        assignee: sshveta
        initialEstimate: 1/2h
        caseimportance: high
        caseposneg: positive
        testtype: functional
        startsin: 5.10
        casecomponent: V2V
    """
    role = new_role(appliance=appliance,
                    product_features=[(['Everything'], True)])
    group = new_group(appliance=appliance, role=role.name)
    user = new_user(appliance=appliance, group=group, credential=new_credential)

    product_features = [(['Everything', 'Compute', 'Migration'], False)]
    role.update({'product_features': product_features})
    with user:
        view = navigate_to(appliance.server, 'Dashboard')
        nav_tree = view.navigation.nav_item_tree()
        # Checks migration option is disabled in navigation
        assert 'Migration' not in nav_tree['Compute'], ('Migration found in nav tree, '
                                                        'rbac should not allow this')

    product_features = [(['Everything'], True)]
    role.update({'product_features': product_features})
    with user:
        view = navigate_to(appliance.server, 'Dashboard', wait_for_view=15)
        nav_tree = view.navigation.nav_item_tree()
        # Checks migration option is enabled in navigation
        assert 'Migration' in nav_tree['Compute'], ('Migration not found in nav tree, '
                                                    'rbac should allow this')
Example #3
0
def test_migration_rbac(appliance, new_credential, v2v_providers):
    """Test migration with role-based access control"""
    role = new_role(appliance=appliance,
                    product_features=[(['Everything'], True)])
    group = new_group(appliance=appliance, role=role.name)
    user = new_user(appliance=appliance,
                    group=group,
                    credential=new_credential)

    product_features = [(['Everything', 'Compute', 'Migration'], False)]
    role.update({'product_features': product_features})
    with user:
        view = navigate_to(appliance.server, 'Dashboard')
        nav_tree = view.navigation.nav_item_tree()
        # Checks migration option is disabled in navigation
        assert 'Migration' not in nav_tree['Compute'], (
            'Migration found in nav tree, '
            'rbac should not allow this')

    product_features = [(['Everything'], True)]
    role.update({'product_features': product_features})
    with user:
        view = navigate_to(appliance.server, 'Dashboard', wait_for_view=True)
        nav_tree = view.navigation.nav_item_tree()
        # Checks migration option is enabled in navigation
        assert 'Migration' in nav_tree['Compute'], (
            'Migration not found in nav tree, '
            'rbac should allow this')
def test_migration_rbac(appliance, new_credential, v2v_providers):
    """Test migration with role-based access control

    Polarion:
        assignee: ytale
        casecomponent: V2V
        customerscenario: true
        initialEstimate: 1/8h
        subcomponent: RHV
        upstream: yes
    """
    role = new_role(appliance=appliance,
                    product_features=[(['Everything'], True)])
    group = new_group(appliance=appliance, role=role.name)
    user = new_user(appliance=appliance, group=group, credential=new_credential)

    product_features = [(['Everything', 'Compute', 'Migration'], False)]
    role.update({'product_features': product_features})
    with user:
        view = navigate_to(appliance.server, 'Dashboard')
        nav_tree = view.navigation.nav_item_tree()
        # Checks migration option is disabled in navigation
        assert 'Migration' not in nav_tree['Compute'], ('Migration found in nav tree, '
                                                        'rbac should not allow this')

    product_features = [(['Everything'], True)]
    role.update({'product_features': product_features})
    with user:
        view = navigate_to(appliance.server, 'Dashboard', wait_for_view=15)
        nav_tree = view.navigation.nav_item_tree()
        # Checks migration option is enabled in navigation
        assert 'Migration' in nav_tree['Compute'], ('Migration not found in nav tree, '
                                                    'rbac should allow this')