Пример #1
0
 def test_set_configure_apbr_profile_with_app_and_appgroup(self):
     try:
         apbr_config.configure_apbr_profile(device=self.mocked_obj,
             profile="p1", rulename="r1", routing_instance="ri1",
             app_list=["junos:HTTP", "junos:FTP", "junos:FACEBOOK-CHAT"],
             appgroup_list=["junos:web:social-networking:applications", "junos:p2p"])
     except Exception as err:
         self.assertEqual(err.args[0], "Application list and application group are mutually exclusive")
Пример #2
0
 def test_set_configure_apbr_profile_with_slarule(self):
     status = apbr_config.configure_apbr_profile(device=self.mocked_obj,
         profile="p1", rulename="r1", routing_instance="ri1",
         appgroup_list=["junos:web:social-networking:applications", "junos:p2p"],
         sla_rule="sla1")
     assert status is True
Пример #3
0
 def test_set_configure_apbr_profile_with_app(self):
     status = apbr_config.configure_apbr_profile(device=self.mocked_obj,
         profile="p1", rulename="r1", routing_instance="ri1",
         app_list=["junos:HTTP", "junos:FTP", "junos:FACEBOOK-CHAT"])
     assert status is True
Пример #4
0
 def test_set_configure_apbr_profile_without_app_and_appgroup(self):
     try:
         apbr_config.configure_apbr_profile(device=self.mocked_obj,
             profile="p1", rulename="r1", routing_instance="ri1")
     except Exception as err:
         self.assertEqual(err.args[0], "Application list or applicaiton group list should not be empty")
Пример #5
0
 def test_set_configure_apbr_profile_without_routing_instance(self):
     try:
         apbr_config.configure_apbr_profile(device=self.mocked_obj,
             profile="p1", rulename="r1")
     except Exception as err:
         self.assertEqual(err.args[0], "Routing instance is a mandatory argument")
Пример #6
0
 def test_del_configure_apbr_profile_without_profile_name(self):
     try:
         apbr_config.configure_apbr_profile(device=self.mocked_obj, mode="delete")
     except Exception as err:
         self.assertEqual(err.args[0], "Profile name is a mandatory argument")
Пример #7
0
 def test_del_configure_apbr_profile_without_device_handle(self):
     try:
         apbr_config.configure_apbr_profile(mode="delete")
     except Exception as err:
         self.assertEqual(err.args[0], "Device handle is a mandatory argument")
Пример #8
0
 def test_configure_apbr_profile1(self):
     status = apbr_config.configure_apbr_profile(device=self.mocked_obj, profile="ab",mode="delete")
     assert status is True