mcvirt.virtual_machine.network_adapter package

Submodules

mcvirt.virtual_machine.network_adapter.factory module

class mcvirt.virtual_machine.network_adapter.factory.Factory[source]

Bases: mcvirt.rpc.pyro_object.PyroObject

Factory method to create/obtain network adapter instances

NETWORK_ADAPTER_CLASS

alias of NetworkAdapter

OBJECT_TYPE = 'network adapter'
create(*args, **kwargs)
getNetworkAdapterByMacAdress(virtual_machine, mac_address)[source]

Returns the network adapter by a given MAC address

getNetworkAdaptersByVirtualMachine(virtual_machine)[source]

Returns an array of network interface objects for each of the interfaces attached to the VM

mcvirt.virtual_machine.network_adapter.network_adapter module

Provide class for network adapters.

class mcvirt.virtual_machine.network_adapter.network_adapter.NetworkAdapter(mac_address, vm_object)[source]

Bases: mcvirt.rpc.pyro_object.PyroObject

Provides operations to network interfaces attached to a VM

delete(*args, **kwargs)
static generateMacAddress()[source]

Generates a random MAC address for new VM network interfaces

getConnectedNetwork()[source]

Returns the network that a given interface is connected to

getLibvirtConfig()[source]

Returns a dict of the LibVirt configuration for the network interface

getMacAddress()[source]

Returns the MAC address of the current network object

get_config()[source]

Returns a dict of the MCVirt configuration for the network interface

Module contents