示例#1
0
 def test_is_valid_mpls_labels_with_invalid_label(self):
     eq_(False, validation.is_valid_mpls_labels(['foo', 200]))
示例#2
0
 def test_is_valid_mpls_labels(self):
     ok_(validation.is_valid_mpls_labels([100, 200]))
示例#3
0
 def test_is_valid_mpls_labels_not_list(self):
     eq_(False, validation.is_valid_mpls_labels(100))
示例#4
0
def is_valid_mpls_labels(labels):
    if not validation.is_valid_mpls_labels(labels):
        raise ConfigValueError(conf_name=MPLS_LABELS,
                               conf_value=labels)
示例#5
0
文件: prefix.py 项目: tkaiwa/ryu
def is_valid_mpls_labels(labels):
    if not validation.is_valid_mpls_labels(labels):
        raise ConfigValueError(conf_name=MPLS_LABELS, conf_value=labels)
示例#6
0
 def test_is_valid_mpls_labels_with_invalid_label(self):
     eq_(False, validation.is_valid_mpls_labels(["foo", 200]))
示例#7
0
 def test_is_valid_mpls_labels_not_list(self):
     eq_(False, validation.is_valid_mpls_labels(100))
示例#8
0
 def test_is_valid_mpls_labels(self):
     ok_(validation.is_valid_mpls_labels([100, 200]))