CiscoRange¶
-
class
CiscoRange
(text, verbosity=3)¶ Bases:
collections.abc.MutableSequence
-
CHANNEL_REGEX
= re.compile('\\:(?P<number>\\d+)')¶
-
PREFIX_REGEX
= re.compile('^[A-z\\-]+(?=\\d)', re.MULTILINE)¶
-
PREFIX_SLOT_REGEX
= re.compile('(?P<prefix_slot>^[A-z\\-]+(?=\\d)(?:\\d+/)*)(?P<number>\\d+)', re.MULTILINE)¶
-
RANGE_REGEX
= re.compile('\\d+\\s*-\\s*\\d+')¶
-
SUBINT_REGEX
= re.compile('\\.(?P<number>\\d+)$')¶
-
SUFFIX_REGEX
= re.compile('\\d.*?$')¶
-
add
(data)¶
-
check_prefix
(data)¶
-
compress_list
(data)¶
-
has_prefix
(data)¶
-
insert
(index, value)¶ S.insert(index, value) – insert value before index
-
static
int_or_none
(item)¶
-
remove
(data)¶ S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.
-
sort_list
(data)¶
-
split_item
(item)¶
-
split_text
(text)¶
-
split_to_list
(data)¶
-
to_string
()¶
-