def test_gbp_pr_pc_pa_shared_func_1(self):

        self._log.info(
            "\n############################################################\n"
            "TESTCASE_GBP_PR_PC_PA_SHARED_INTEG_1: "
            "TO CREATE/VERIFY/UPDATEE/VERIFY INTEGRITY "
            "B/W PR,PC,PA as 'shared' \n"
            "TEST_STEP::\n"
            "Create Policy Action,Policy Class & Policy Rule "
            "with param shared=True\n"
            "Verify the attributes & value, show & list cmds\n"
            "Update the Policy Rule param shared=False\n"
            "Verify that PR param shared got updated\n"
            "##############################################################\n")

        # Testcase work-flow starts
        # Create PA,PC,PR
        self._log.info('\n## Step 1A: Create a PC with shared=True ##')
        obj_uuid = {}
        self.cls_uuid = self.gbpcfg.gbp_policy_cfg_all(
            1, 'classifier', self.cls_name, shared=True)
        if self.cls_uuid == 0:
            self._log.info(
                "\n Creation of Policy Classifier with shared=True, Failed\n")
            return 0
        obj_uuid['classifier'] = self.cls_uuid
        self._log.info('\n## Step 1B: Create a PA with shared=True ##')
        self.act_uuid = self.gbpcfg.gbp_policy_cfg_all(
            1, 'action', self.act_name, shared=True)
        if self.act_uuid == 0:
            self._log.info(
                "\n Creation of Policy Action with shared=True, Failed\n")
            return 0
        obj_uuid['action'] = self.act_uuid
        self._log.info(
            "\n## Step 1C: Create Policy Rule with PC & PA with "
            "shared=True ##")
        rule_uuid = self.gbpcfg.gbp_policy_cfg_all(
            1,
            'rule',
            self.rule_name,
            classifier=self.cls_uuid,
            action=self.act_uuid,
            shared=True)
        if rule_uuid == 0:
            self._log.info(
                "# Step 1: Creation of Policy Rule with shared=True, Failed")
            return 0
        # Verify PA,PC,PR
        self._log.info(
            '## Step 2: Verify Policy Rule, Policy Classifier, Policy '
            'Action with shared=True')
        for obj, uuid in obj_uuid.iteritems():
            if self.gbpverify.gbp_policy_verify_all(
                    1, obj, uuid, shared=True) == 0:
                self._log.info(
                    "# Step 2A_%s: Verify Policy %s.upper() with "
                    "shared=True, Failed" /
                    (obj, obj))
                return 0
        if self.gbpverify.gbp_policy_verify_all(
                1,
                'rule',
                self.rule_name,
                id=rule_uuid,
                policy_classifier_id=self.cls_uuid,
                enabled='True',
                policy_actions=self.act_uuid,
                shared=True) == 0:
            self._log.info(
                "# Step 2B: Verify Policy Rule with shared=True, Failed")
            return 0
        # Update PR
        self._log.info("\n## Update the Policy Rule with shared=False ##\n")
        if self.gbpcfg.gbp_policy_cfg_all(
                2, 'rule', rule_uuid, shared=False) == 0:
            self._log.info(
                "\nStep 3: Updating Policy Rule's shared=False, Failed")
            return 0
        # Verify the PR after update
        if self.gbpverify.gbp_policy_verify_all(
                1, 'rule', rule_uuid, shared=False) == 0:
            self._log.info(
                "# Step 4: Verify Policy Rule with shared=False, Failed")
            return 0
        self._log.info("\n## TESTCASE_GBP_PR_PC_PA_SHARED_INTEG_1: PASSED")
        self.cleanup()
        return 1
dataset/ETHPy150Open openstack/group-based-policy/gbpservice/tests/contrib/gbpfunctests/testcases/tc_gbp_pr_pc_pa_shared_func.py/test_gbp_pr_pc_pa_shared_func.test_gbp_pr_pc_pa_shared_func_1/operator `%` -> `/`