Beispiel #1
0
 def test_basic(self):
     sot = qos_dscp_marking_rule.QoSDSCPMarkingRule()
     self.assertEqual('dscp_marking_rule', sot.resource_key)
     self.assertEqual('dscp_marking_rules', sot.resources_key)
     self.assertEqual('/qos/policies/%(qos_policy_id)s/dscp_marking_rules',
                      sot.base_path)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_fetch)
     self.assertTrue(sot.allow_commit)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
 def test_basic(self):
     sot = qos_dscp_marking_rule.QoSDSCPMarkingRule()
     self.assertEqual('dscp_marking_rule', sot.resource_key)
     self.assertEqual('dscp_marking_rules', sot.resources_key)
     self.assertEqual('/qos/policies/%(qos_policy_id)s/dscp_marking_rules',
                      sot.base_path)
     self.assertEqual('network', sot.service.service_type)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_retrieve)
     self.assertTrue(sot.allow_update)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
 def test_make_it(self):
     sot = qos_dscp_marking_rule.QoSDSCPMarkingRule(**EXAMPLE)
     self.assertEqual(EXAMPLE['id'], sot.id)
     self.assertEqual(EXAMPLE['qos_policy_id'], sot.qos_policy_id)
     self.assertEqual(EXAMPLE['dscp_mark'], sot.dscp_mark)
Beispiel #4
0
 def _compare_rules(self, exp, real):
     self.assertDictEqual(
         qos_dscp_marking_rule.QoSDSCPMarkingRule(**exp).to_dict(
             computed=False), real.to_dict(computed=False))