Key Class
class Key()
Example:
>>> import cisco
>>> from cisco.key import *
>>> tempkey = Key("uaeqdyito", "00:00:00 Jun 13 2015", "23:59:59 Aug 12 2015")
Arguments:
- key:
- start: The UTC time of day and date that the key becomes active
- end: The UTC time of day and date that the key becomes inactive
Returns: A Key object
get_end_key
get_end_key(self)
Example:
>>> tempkey.get_end_key()
'23:59:59 Aug 12 2015'
Arguments: None
Returns: The UTC time of day and date that the key becomes inactive
get_key_mode
get_key_mode(self, key)
Example:
>>> tempkey.get_key_mode("uaeqdyito")
Arguments:
- key:
get_keys
get_keys(self)
Example:
>>> tempkey.get_keys()
'uaeqdyito'
Arguments: None
get_patterns
get_patterns(self)
Example:
>>> tempkey.get_patterns()
['u', 'a', 'e', 'q', 'd', 'y', 'i', 't', 'o']
Arguments: None
get_start_key
get_start_key(self)
Example:
>>> tempkey.get_start_key()
'00:00:00 Jun 13 2015'
Arguments: None
Returns: The UTC time of day and date that the key becomes active
is_match
is_match(self, line='', key='')
Example:
>>> tempkey.is_match(line='uaeqdyito', key='dyito')
(True, ())
>>> tempkey.is_match(line='uaeqdyito', key='asdf')
(False, [])
>>>
Arguments:
- line: String
- key: String to search for in line
Returns:
- m: True if match, else False
- val: If match is found, returns match groups