NETConfigHostSlice

Cuts the SLICE of a netconfig one host is answerable for.

Note

A customer config span several hosts - the Liberator, a Power Station, physical boxes nobody virtualise. A synchronisation run on ONE host must compare that host against ITS OWN slice only. Compare it against the whole config instead and every guest belonging to another host look MISSING, so the run would try to create foreign machines on the wrong node - every cycle, forever, because they will never appear there.

The slice is decided by the hosted serial <vmid>@<hostSerial>: it name the host the machine live on. Same value the map files key on and the same value that pin a vmid, so there is ONE identity rule rather than a second one invented here.

public static class NETConfigHostSlice

1. Methods

1.1. IsHostedOn(VirtualMachineSettings, SerialNumber)

Whether this record describe a virtual machine living on the given host.

public static bool IsHostedOn(this VirtualMachineSettings record, SerialNumber hostSerial)
Table 1. Parameters
Name Type Description

record

VirtualMachineSettings

Record to test.

hostSerial

SerialNumber

Serial of the host.

Returns: bool — when the record belong to that host.

1.2. VirtualMachinesOn(IEnumerable<VirtualMachineSettings>, SerialNumber)

The virtual machines of this record set that live on one host.

public static IEnumerable<VirtualMachineSettings> VirtualMachinesOn(this IEnumerable<VirtualMachineSettings> records, SerialNumber hostSerial)
Table 2. Parameters
Name Type Description

records

IEnumerable<VirtualMachineSettings>

Records read from a netconfig store.

hostSerial

SerialNumber

Serial of the host doing the synchronisation.

Returns: IEnumerable<VirtualMachineSettings> — The rows that host is answerable for.