otupy.profiles.xbom.data.host.Host
- class Host(host: object = None, name: Hostname = None, id: str = None, description: str = None, vendor: str = None, model: str = None, release: str = None, serial: str = None, firmware: str = None, version: str = None, type: HostType = None)
Bases:
XBOMObjectGeneric Host
A Host is an environment that provides resources to an
ExecutionEnvironment. The more common way to understand a host is an electronic device designed to run a general-purpose operating system and application software.A Host will contain hardware peripherals like disks, network cards, CPUs, memory, GPUs, etc. However, these resources may be both physical and virtualised, providing a broad range different
Hosts. AHostcould be a server, an IoT device, a Virtual Machine, a Kubernetes Pod… everything is designed to host an ExecutionEnvironment. However, the current implementation only describes the overall host and does not consider its subsystems.The combination of
Host``s and ``ExecutionEnvironmentwill create a recursive hierarchy of dependencies, whereExecutionEnvironment``s are contained in ``Host``s, and ``Host``s may be implemented in ``ExecutionEnvironments.Methods
Convert Host to CycloneDX component format.
Builds instance from dictionary
get_subtypeConverts to dictionary
Attributes
Generic description of the node (including its role)
Name of the firmware (e.g., BIOS, UEFI, iOS)
ID of the node, preferably globally unique
Model identifier
A name for this node (e.g., network namespace name)
Release identifier
Serial number of the specific device
Specific device type (including virtual and physical devices
Vendor name
Firmware version/release
- __init__(host: object = None, name: Hostname = None, id: str = None, description: str = None, vendor: str = None, model: str = None, release: str = None, serial: str = None, firmware: str = None, version: str = None, type: HostType = None)
- as_cyclonedx() Component
Convert Host to CycloneDX component format.
- Returns:
Component: CycloneDX Component with type PLATFORM.
- classmethod fromdict(dic, e)
Builds instance from dictionary
It is used during deserialization to create an otupy instance from the text message. It takes an
Encoderinstance that is used to recursively build instances of the inner objects (theEncoderprovides standard methods to create instances of base objects like strings, integers, boolean).- Parameters:
dic – The intermediary dictionary representation from which the object is built.
e – The
Encoderthat is being used.
- Returns:
An instance of this class initialized from the dictionary values.
- todict(e)
Converts to dictionary
It is used to convert this object to an intermediary representation during serialization. It takes an
Encoderargument that is used to recursively serialize inner data and structures (the Encoder provides standard methods for converting base types to dictionaries)..- Parameters:
e – The
Encoderthat is being used.- Returns:
A dictionary compliants to the Language Specification’s serialization rules.