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: XBOMObject

Generic 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. A Host could 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 ``ExecutionEnvironment will create a recursive hierarchy of dependencies, where ExecutionEnvironment``s are contained in ``Host``s, and ``Host``s may be implemented in ``ExecutionEnvironments.

Methods

as_cyclonedx

Convert Host to CycloneDX component format.

fromdict

Builds instance from dictionary

get_subtype

todict

Converts to dictionary

Attributes

description

Generic description of the node (including its role)

firmware

Name of the firmware (e.g., BIOS, UEFI, iOS)

id

ID of the node, preferably globally unique

model

Model identifier

name

A name for this node (e.g., network namespace name)

release

Release identifier

serial

Serial number of the specific device

type

Specific device type (including virtual and physical devices

vendor

Vendor name

version

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.

description: str = None

Generic description of the node (including its role)

firmware: str = None

Name of the firmware (e.g., BIOS, UEFI, iOS)

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 Encoder instance that is used to recursively build instances of the inner objects (the Encoder provides 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 Encoder that is being used.

Returns:

An instance of this class initialized from the dictionary values.

id: str = None

ID of the node, preferably globally unique

model: str = None

Model identifier

name: str = None

A name for this node (e.g., network namespace name)

release: str = None

Release identifier

serial: str = None

Serial number of the specific device

todict(e)

Converts to dictionary

It is used to convert this object to an intermediary representation during serialization. It takes an Encoder argument that is used to recursively serialize inner data and structures (the Encoder provides standard methods for converting base types to dictionaries)..

Parameters:

e – The Encoder that is being used.

Returns:

A dictionary compliants to the Language Specification’s serialization rules.

type: HostType = None

Specific device type (including virtual and physical devices

vendor: str = None

Vendor name

version: str = None

Firmware version/release