Пример #1
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self._log.info("\n START OF GBP POLICY_RULE NEGATIVE TESTSUITE")
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.act_name = 'demo_pa'
     self.cls_name = 'demo_pc'
     self.rule_name = 'demo_pr'
     self._log.info('\n## Step 1: Create a PC needed for PR Testing ##')
     self.cls_uuid = self.gbpcfg.gbp_policy_cfg_all(1, 'classifier',
                                                    self.cls_name)
     if self.cls_uuid == 0:
         self._log.info(
             "\nReqd Classifier Create Failed, hence GBP Policy Rule "
             "Negative Test Suite Run ABORTED\n")
         os._exit(1)
     self._log.info('\n## Step 1: Create a PA needed for PR Testing ##')
     self.act_uuid = self.gbpcfg.gbp_policy_cfg_all(1, 'action',
                                                    self.act_name)
     if self.act_uuid == 0:
         self._log.info(
             "\nReqd Action Create Failed, hence GBP Policy Rule "
             "Negative Test Suite Run ABORTED\n")
         os._exit(1)
Пример #2
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self._log.info("\n## START OF GBP POLICY_ACTION NEGATIVE TESTSUITE\n")
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.act_name = 'demo_act'
Пример #3
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.act_name = 'demo_act'
     self.spec_name = 'demo_sc_spec'
Пример #4
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self._log.info("\n## START OF GBP L3_POLICY FUNCTIONALITY TESTSUITE\n")
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.l3p_name = 'demo_l3p'
     self.l2p_name = 'demo_l2p'
Пример #5
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.l3pol_name = 'demo_l3pol'
     self.l2pol_name = 'demo_l2pol'
     self.ptg_name = 'demo_ptg'
Пример #6
0
 def __init__(self):
     """
     Init def
     """
     self.gbpcfg = config_libs.Gbp_Config()
     self.gbpverify = verify_libs.Gbp_Verify()
     self.spec_name = 'demo_sc_spec'
     self.fw_name = 'demo_fw'
     self.lb_name = 'demo_lb'
Пример #7
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self._log.info("\n## START OF GBP L3_POLICY NEGATIVE TESTSUITE\n")
     self.controller_ip = controller_ip
     self.gbpcfg = config_libs.Gbp_Config(self.controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(self.controller_ip)
     self.l3p_name = 'demo_l3p'
Пример #8
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self._log.info(
         "\n## START OF GBP NETWORK_SERVICE_POLICY FUNCTIONALITY "
         "TESTSUITE\n")
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.nsp_name = 'demo_nsp'
Пример #9
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self._log.info(
         "\n## START OF GBP POLICY_CLASSIFIER FUNCTIONALITY TESTSUITE\n")
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.cls_name = 'demo_pc'
     self.act_name = 'demo_pa'
Пример #10
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.act_name = 'allow_all'
     self.class_name = 'pc_icmp'
     self.rule_name = 'pr_icmp'
     self.ruleset_name = 'prs_icmp'
     self.ptg_name = 'pg_icmp'
     self.tg_name = 'tg_icmp'
Пример #11
0
 def __init__(self,controller_ip):
     """
     Init def
     """
     self._log.info(
         "\n## START OF GBP POLICY_RULE,POLICY_CLASS,POLICY_ACTION SHARED "
         "RESOURCE INTEGRITY TESTSUITE\n")
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.act_name = 'demo_pa'
     self.cls_name = 'demo_pc'
     self.rule_name = 'demo_pr'
Пример #12
0
 def __init__(self, controller_ip, env_flag):
     """
     Init def
     """
     self._log.info(
         "\n## START OF GBP POLICY_TARGET_GROUP FUNCTIONALITY TESTSUITE\n")
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.act_name = 'test_ptg_pa'
     self.cls_name = 'test_ptg_pc'
     self.rule_name = 'test_ptg_pr'
     self.ruleset_name = 'test_ptg_prs'
     self.ptg_name = 'demo_ptg'
     self.l2p_name = 'test_ptg_l2p'
     self.l3p_name = 'test_ptg_l3p'
     self.pt_name = 'test_pt'
     self.env_flag = env_flag
Пример #13
0
 def __init__(self, controller_ip):
     """
     Init def
     """
     self._log.info(
         "\n## START OF GBP POLICY_RULE_SET NEGATIVE TESTSUITE\n")
     self.gbpcfg = config_libs.Gbp_Config(controller_ip)
     self.gbpverify = verify_libs.Gbp_Verify(controller_ip)
     self.act_name = 'demo_pa'
     self.cls_name = 'demo_pc'
     self.rule_name = 'demo_pr'
     self.ruleset_name = 'demo_prs'
     self._log.info('\n## Step 1: Create a PC needed for PRS Testing ##')
     self.cls_uuid = self.gbpcfg.gbp_policy_cfg_all(1, 'classifier',
                                                    self.cls_name)
     if self.cls_uuid == 0:
         self._log.info(
             "\nReqd Policy Classifier Create Failed, "
             "hence GBP Policy Rule-Set Negative Test Suite Run ABORTED\n")
         return
     self._log.info('\n## Step 1: Create a PA needed for PRS Testing ##')
     self.act_uuid = self.gbpcfg.gbp_policy_cfg_all(1, 'action',
                                                    self.act_name)
     if self.act_uuid == 0:
         self._log.info("\nReqd Policy Action Create Failed, hence GBP "
                        "Policy Rule-Set Negative Test Suite Run ABORTED\n")
         return
     self._log.info('\n## Step 1: Create a PR needed for PRS Testing ##')
     self.rule_uuid = self.gbpcfg.gbp_policy_cfg_all(
         1,
         'rule',
         self.rule_name,
         classifier=self.cls_name,
         action=self.act_name)
     if self.rule_uuid == 0:
         self._log.info(
             "\nReqd Policy Rule Create Failed, hence GBP "
             "Policy Rule-Set Negative Test Suite Run ABORTED\n ")
         return