CA-74422: networkd: When creating an ovs bridge, explicitly delete any existing bridge with the same name

The "--may-exist" option to "ovs-vsctl add-br" usually works, but not when the existing
bridge is a "real" bridge, while the new one is a "fake" VLAN bridge.

Since the existing bridge may have VIFs on it, they will be re-added to the new bridge.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Reports the network backend (bridge) in use by dom0 as configured by xe-switch-network-backend.
Include the previous script in the install and package scripts.
CA-48334: Typo fix.

Signed-off-by: John Else <john.else@citrix.com>
Fix missing string replacement in setup-vif-rules.

Signed-off-by: John Else <john.else@citrix.com>
CA-49835: vm-import CLI error output keys wrong way around

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
[events]: remove the 'max_event_age': clients shouldn't be penalised for delays between event.next() calls

It should be possible for a single-threaded client to call event.next() round-robin on 1000s of pools.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[events]: remove dead code

The code to coalesce events in the queue was never turned on and is made redundant by the new events.from() behaviour

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[events]: have separate predicates for 'this exact event matches my filters' and 'events from this table may possibly match my filters'

The two predicates are:
  event_matches: subscription list -> event -> bool
  table_matches: subscription list -> string -> bool

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[events]: add object-level event registrations

The event registration syntax is now :=
 | *                   -- everything
 | Class               -- all events for all instances of Class
 | Class/Objref        -- only events for Objref

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[event]: add marshal/unmarshal helper functions and types to event_types for event.from() (there are already some for event.next())

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[events]: add quicktest tests for event.next() and event.from()

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[events]: add an object-level event test, hook all new tests into quicktest

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
CA-63844: VBD.allowed_operations is inaccurate

VBD status report now shows that no operations are valid on a CD while its
VM is suspended.

When trying to insert/eject a CD while the VM is suspended, the error message
now shows that the VM should be in running _or shutdown_ state.

Currently, there are multiple places where checks are made about whether an
operation is permitted or not: at least where we are asking for allowed
operations, and where the operation is actually executed. All these places
should be combined in order to remove the possibility of de-synchronisation.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
CA-74932: networkd: remove existing IPv4 addresses when configuring static IP

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge commit '6c005d499eaf7571f557d083c52f4643776e796b'
CA-74932: Network reset: ensure networkd is not running before clearing its state file

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-54945: Add tab completion for pif-uuids in bond-create.

Signed-off-by: John Else <john.else@citrix.com>
CD `attach operation required for VM resume.

The `attach operation must be allowed for the CD drive when the VM is
suspended in order to allow the VM to resume.

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
CA-68581: Update docs for task.progress to better reflect its meaning.

We don't want API consumers relying on the task.progress field to
determine whether a task is complete, since it's not always accurate.
This change points API users at the task.status field instead.

Signed-off-by: John Else <john.else@citrix.com>