netlab.datatypes — NETLAB+ VE Python SDK 24.2.0 documentation

# netlab.datatypes

Additional Netlab datatypes.

class netlab.datatypes.HDREvent

class netlab.datatypes.HDRResult

class netlab.datatypes.PCCloneSpec

  Instructions for a clone.

  clone_datastore: str

    The name of the datastore the cloned VM will reside.

  clone_name: str

    Cloned VM name. Default: {clone_pod_name}_{pc_label}

  clone_role: Literal['MASTER', 'NORMAL', 'PERSISTENT', 'TEMPLATE']
    MASTER:

      Commonly used for master pod deployment. Can not be easily deleted.

    NORMAL:

      Default Standard virtual machine image for use in pods.

    PERSISTENT:

      Commonly used when the virtual machine is not reverting to snapshot and is perpetual.

    TEMPLATE:

      Pristine virtual machine image used as the basis for cloning many virtual machines. Template VMs cannot be powered on, modified, or assigned to pods.

  clone_snapshot: str | None

    Name of the snapshot to take on cloned VM. “GOLDEN” is recommended. If set to NONE, a snapshot will not be taken of the cloned VM. If absent, “GOLDEN” will be used.

  clone_storage_alloc: Literal['ONDEMAND', 'PREALLOCATED']
    ONDEMAND:

      Default Actual size of disk will grow as data is added (saves on storage).

    PREALLOCATED:

      The entire disk size will be allocated immediately.

  clone_type: Literal['LINKED', 'FULL']
    LINKED:

      Default Linked clone is a delta of a full virtual machine.

    FULL:

      Full clone is a complete copy of the virtual machine.

  clone_vh_id: int

    The runtime host of cloned VM.

  copy_bios_uuid: bool

    If true, copy this VMs BIOS UUID to any VM cloned from this one.

  pc_type: Literal['AVMI', 'ABSENT']
    AVMI:

      Use virtual machine inventory.

    ABSENT:

      PC is absent.

  pl_index: int

    PC index of the pod design.

  source_snapshot: str

    Source VM snapshot name. Default: vm_snapshot

  source_vm_id: str

    Source VM pod identifier.

class netlab.datatypes.VMAlloc

  VMAlloc contains information about potential VM resource consumption in a given pod.

  total: VMAllocTotal

    Contains total number of virtual machines, virtual CPUs, and memory allocation of the entire pod.

  vh_alloc: Dict[str, VMAllocHostInfo]

    Dict containing number of virtual machines, virtual CPUs, and memory allocation for each host assigned to the pod. The keys of vh_alloc are vh_id host identifiers; each key is also be a member of the vh_ids list. The values of this dict are type VM_Alloc_HostInfo (see below). May be an empty dict if the pod has not yet been assigned to any hosts.

  vh_ids: List[int]

    List of vh_id host identifiers of the virtual machine hosts assigned to the pod’s VMs. May be empty list if the pod has not yet been assigned to any hosts. If list contains one host identifier, then all VMs in the pod are assigned to the same host.

class netlab.datatypes.VMAllocHostInfo
  vh_pra_enabled: bool

    Proactive Resource Awareness is enabled on this host.

  vh_pra_max_cpu: bool | None

    Maximum number of virtual CPUs allowed to be scheduled on this host when PRA enabled. None if PRA is disabled.

  vh_pra_max_mem_mb: bool | None

    Maximum amount of memory that can be scheduled on this host when PRA enabled. None if PRA is disabled.

  vh_pra_max_vm: bool | None

    Maximum number of virtual machines allowed to be scheduled on this host when PRA enabled. `None` if PRA is disabled.

  vm_mem_mb: int

    Total amount of RAM (megabytes) allocated by VMs in this pod on this host.

  vm_n_cpu: int

    Total number of virtual CPUs consumed by this pod on this host.

  vm_n_vms: int

    Total number of virtual machines of the pod assigned to this host.

class netlab.datatypes.VMAllocTotal
  vm_mem_mb: int

    Total amount of RAM allocated to all VMs in this pod (megabytes).

  vm_n_cpu: int

    Total number of virtual CPUs consumed by this pod.

  vm_n_vms: int

    Total number of virtual machines in this pod. Remote PCs of type ABSENT are not counted.