openc2lib.types.targets.device

 1from openc2lib.types.data.hostname import Hostname
 2from openc2lib.types.data.idn_hostname import IDNHostname
 3from openc2lib.types.base.map	import Map
 4from openc2lib.core.target import target
 5
 6@target('device')
 7class Device(Map):
 8	""" Identify network device.
 9		
10		Properties:
11		- hostname: A hostname that can be used to connect to this device over a network.
12		- idn_hostname: An internationalized hostname that can be used to connect to this device over a network.
13		- device_id: An identifier that refers to this device within an inventory or management system.
14
15		A "Device" Target MUST contain at least one property.
16	"""
17	fieldtypes = {'hostname': Hostname, 'idn_hostname': IDNHostname, 'device_id': str}
@target('device')
class Device(openc2lib.types.base.map.Map):
 7@target('device')
 8class Device(Map):
 9	""" Identify network device.
10		
11		Properties:
12		- hostname: A hostname that can be used to connect to this device over a network.
13		- idn_hostname: An internationalized hostname that can be used to connect to this device over a network.
14		- device_id: An identifier that refers to this device within an inventory or management system.
15
16		A "Device" Target MUST contain at least one property.
17	"""
18	fieldtypes = {'hostname': Hostname, 'idn_hostname': IDNHostname, 'device_id': str}

Identify network device.

Properties:

  • hostname: A hostname that can be used to connect to this device over a network.
  • idn_hostname: An internationalized hostname that can be used to connect to this device over a network.
  • device_id: An identifier that refers to this device within an inventory or management system.

A "Device" Target MUST contain at least one property.

fieldtypes = {'hostname': <class 'openc2lib.types.data.hostname.Hostname'>, 'idn_hostname': <class 'openc2lib.types.data.idn_hostname.IDNHostname'>, 'device_id': <class 'str'>}

Field types

A dictionary which keys are field names and which values are the corresponding classes. Must be provided by any derived class.

Inherited Members
openc2lib.types.base.map.Map
base
register
todict
fromdict
builtins.dict
get
setdefault
pop
popitem
keys
items
values
update
fromkeys
clear
copy