def test_delete_users_from_collection(self, users):
        """Tests deleting users from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(users)
    def test_delete_groups_from_collection(self, groups):
        """Tests deleting groups from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(groups, not_found=True)
Пример #3
0
    def test_delete_rates_from_collection(self, rates):
        """Tests deleting rates from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(rates)
Пример #4
0
    def test_delete_categories_from_collection(self, categories):
        """Tests deleting categories from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(categories, not_found=True)
Пример #5
0
    def test_delete_policies_from_collection(self, policies):
        """Tests delete policies from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(policies, num_sec=100, delay=5)
Пример #6
0
    def test_delete_conditions_from_collection(self, conditions):
        """Tests delete conditions from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(conditions, num_sec=100, delay=5)
Пример #7
0
def test_delete_template_from_collection(template):
    """Tests deletion of template from collection.

    Metadata:
        test_flag: rest
    """
    delete_resources_from_collection([template])
    def test_delete_service_catalogs(self, service_catalogs):
        """Tests delete service catalogs via rest.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(service_catalogs)
Пример #9
0
    def test_delete_arbitration_rules_from_collection(self, arbitration_rules):
        """Tests delete arbitration rules from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(arbitration_rules)
Пример #10
0
    def test_delete_tags_from_collection(self, tags):
        """Tests deleting tags from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(tags, not_found=True)
Пример #11
0
    def test_delete_tags_from_collection(self, tags):
        """Tests deleting tags from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(tags, not_found=True)
    def test_delete_tenants_from_collection(self, tenants):
        """Tests deleting tenants from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(tenants)
Пример #13
0
    def test_delete_rates_from_collection(self, rates):
        """Tests deleting rates from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(rates)
Пример #14
0
    def test_delete_arbitration_settings_from_collection(self, arbitration_settings):
        """Tests delete arbitration settings from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(arbitration_settings)
Пример #15
0
def test_delete_vm_from_collection(vm):
    """
    Polarion:
        assignee: mkourim
        initialEstimate: 1/4h
    """
    delete_resources_from_collection([vm], not_found=True, num_sec=300, delay=10)
    def test_delete_repository_from_collection(self, appliance, repository):
        """Deletes repository from collection using REST API

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection([repository], not_found=False, num_sec=300, delay=5)
Пример #17
0
def test_delete_template_from_collection(template):
    """Tests deletion of template from collection.

    Metadata:
        test_flag: rest
    """
    delete_resources_from_collection([template])
Пример #18
0
    def test_delete_arbitration_profiles_from_collection(self, arbitration_profiles):
        """Tests delete arbitration profiles from collection.

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection(arbitration_profiles)
Пример #19
0
    def test_delete_conditions_from_collection(self, conditions, appliance):
        """Tests delete conditions from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.conditions
        delete_resources_from_collection(collection, conditions, num_sec=100, delay=5)
    def test_delete_groups_from_collection(self, appliance, groups):
        """Tests deleting groups from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.groups
        delete_resources_from_collection(collection, groups, not_found=True)
Пример #21
0
    def test_delete_tags_from_collection(self, appliance, tags):
        """Tests deleting tags from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.tags
        delete_resources_from_collection(collection, tags, not_found=True)
Пример #22
0
def test_delete_template_from_collection(appliance, template):
    """Tests deletion of template from collection.

    Metadata:
        test_flag: rest
    """
    collection = appliance.rest_api.collections.templates
    delete_resources_from_collection(collection, [template])
Пример #23
0
    def test_delete_roles_from_collection(self, appliance, roles):
        """Tests deleting roles from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.roles
        delete_resources_from_collection(collection, roles)
Пример #24
0
    def test_delete_notifications_from_collection(self, appliance, generate_notifications):
        """Tests delete notifications from collection.

        Metadata:
            test_flag: rest
        """
        notifications = appliance.rest_api.collections.notifications.all[-3:]
        delete_resources_from_collection(notifications)
Пример #25
0
    def test_delete_categories_from_collection(self, appliance, categories):
        """Tests deleting categories from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.categories
        delete_resources_from_collection(collection, categories, not_found=True)
Пример #26
0
def test_delete_automate_domain_from_collection(appliance, domain_rest):
    """
    Polarion:
        assignee: pvala
        casecomponent: Automate
        initialEstimate: 1/10h
    """
    delete_resources_from_collection([domain_rest], not_found=True, num_sec=50)
    def test_delete_service_catalogs(self, appliance, service_catalogs):
        """Tests delete service catalogs via rest.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.service_catalogs
        delete_resources_from_collection(collection, service_catalogs)
Пример #28
0
def test_delete_template_from_collection(appliance, template):
    """Tests deletion of template from collection.

    Metadata:
        test_flag: rest
    """
    collection = appliance.rest_api.collections.templates
    delete_resources_from_collection(collection, [template])
Пример #29
0
    def test_delete_users_from_collection(self, appliance, users):
        """Tests deleting users from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.users
        delete_resources_from_collection(collection, users)
Пример #30
0
def test_delete_vm_from_collection(vm):
    """
    Polarion:
        assignee: pvala
        initialEstimate: 1/4h
        casecomponent: Rest
    """
    delete_resources_from_collection([vm], not_found=True, num_sec=300, delay=10)
Пример #31
0
def test_delete_automate_domain_from_collection(appliance, domain_rest):
    """
    Polarion:
        assignee: pvala
        casecomponent: Automate
        initialEstimate: 1/10h
    """
    delete_resources_from_collection([domain_rest], not_found=True, num_sec=50)
    def test_delete_service_catalogs(self, appliance, service_catalogs):
        """Tests delete service catalogs via rest.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.service_catalogs
        delete_resources_from_collection(collection, service_catalogs)
def test_provider_delete_from_collection(provider_rest, appliance):
    """Tests deletion of the provider from collection using REST API.

    Metadata:
        test_flag: rest
    """
    collection = appliance.rest_api.collections.providers
    delete_resources_from_collection(collection, [provider_rest], num_sec=30)
Пример #34
0
    def test_delete_conditions_from_collection(self, conditions, appliance):
        """Tests delete conditions from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.conditions
        delete_resources_from_collection(collection, conditions, num_sec=100, delay=5)
    def test_delete_tenants_from_collection(self, appliance, tenants):
        """Tests deleting tenants from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.tenants
        delete_resources_from_collection(collection, tenants)
Пример #36
0
    def test_delete_groups_from_collection(self, appliance, groups):
        """Tests deleting groups from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.groups
        delete_resources_from_collection(collection, groups, not_found=True)
Пример #37
0
    def test_delete_policies_from_collection(self, policies, appliance):
        """Tests delete policies from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.policies
        delete_resources_from_collection(collection, policies, num_sec=100, delay=5)
Пример #38
0
    def test_delete_tenants_from_collection(self, appliance, tenants):
        """Tests deleting tenants from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.tenants
        delete_resources_from_collection(collection, tenants)
    def test_delete_roles_from_collection(self, appliance, roles):
        """Tests deleting roles from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.roles
        delete_resources_from_collection(collection, roles)
Пример #40
0
    def test_delete_policies_from_collection(self, policies, appliance):
        """Tests delete policies from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.policies
        delete_resources_from_collection(collection, policies, num_sec=100, delay=5)
    def test_delete_users_from_collection(self, appliance, users):
        """Tests deleting users from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.users
        delete_resources_from_collection(collection, users)
Пример #42
0
    def test_delete_snapshot_from_collection(self, vm_snapshot):
        """Deletes VM/instance snapshot from collection using REST API

        Metadata:
            test_flag: rest
        """
        vm, snapshot = vm_snapshot
        delete_resources_from_collection(
            vm.snapshots, [snapshot], not_found=True, num_sec=300, delay=5)
Пример #43
0
    def test_delete_repository_from_collection(self, appliance, repository):
        """Deletes repository from collection using REST API

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.configuration_script_sources
        delete_resources_from_collection(
            collection, [repository], not_found=False, num_sec=300, delay=5)
Пример #44
0
def test_provider_delete_from_collection(provider_rest):
    """Tests deletion of the provider from collection using REST API.

    Testing BZs 1525498, 1501941

    Metadata:
        test_flag: rest
    """
    delete_resources_from_collection([provider_rest], num_sec=50)
Пример #45
0
def test_provider_delete_from_collection(provider_rest):
    """Tests deletion of the provider from collection using REST API.

    Testing BZs 1525498, 1501941

    Metadata:
        test_flag: rest
    """
    delete_resources_from_collection([provider_rest], num_sec=50)
Пример #46
0
    def test_delete_notifications_from_collection(self, appliance,
                                                  generate_notifications):
        """Tests delete notifications from collection.

        Metadata:
            test_flag: rest
        """
        notifications = appliance.rest_api.collections.notifications.all[-3:]
        delete_resources_from_collection(notifications)
Пример #47
0
def bulk_service_teardown(appliance):
    """Delete all service requests on the appliance via rest"""
    # big diaper here because of service requests having the same description
    requests = [r for r in appliance.rest_api.collections.service_requests]
    if requests:
        delete_resources_from_collection(
            resources=requests,
            collection=appliance.rest_api.collections.service_requests,
            check_response=False)
    def test_delete_snapshot_from_collection(self, vm_snapshot):
        """Deletes VM/instance snapshot from collection using REST API

        Metadata:
            test_flag: rest
        """
        vm, snapshot = vm_snapshot
        delete_resources_from_collection(
            vm.snapshots, [snapshot], not_found=True, num_sec=300, delay=5)
    def test_delete_from_collection(self, request, collection_name, fixtures_db):
        """Test deleting custom attributes from collection using REST API.

        Metadata:
            test_flag: rest
        """
        attributes, resource = add_custom_attributes(request, fixtures_db[collection_name])
        collection = resource.custom_attributes
        delete_resources_from_collection(collection, attributes, not_found=True)
Пример #50
0
    def test_delete_repository_from_collection(self, appliance, repository):
        """Deletes repository from collection using REST API

        Metadata:
            test_flag: rest
        """
        delete_resources_from_collection([repository],
                                         not_found=False,
                                         num_sec=300,
                                         delay=5)
    def test_delete_from_collection(self, request, collection_name, get_resource):
        """Test deleting custom attributes from collection using REST API.

        Metadata:
            test_flag: rest
        """
        resource = get_resource[collection_name]()
        attributes = add_custom_attributes(request, resource)
        collection = resource.custom_attributes
        delete_resources_from_collection(attributes, collection=collection, not_found=True)
Пример #52
0
    def test_delete_notifications_from_collection(self, appliance, generate_notifications):
        """Tests delete notifications from collection.

        Metadata:
            test_flag: rest
        """
        collection = appliance.rest_api.collections.notifications
        collection.reload()
        notifications = [collection[-i] for i in range(1, 3)]
        delete_resources_from_collection(collection, notifications)