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>
CA-74932: Network reset: ensure networkd is not running before clearing its state file

Signed-off-by: Rob Hoes <rob.hoes@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>
CA-67109: Conflate checks for bad power-states

Previously, there were two checks for bad power-states:

  1. Look in the "allowed_power_states" table.
  2. Checking some constraints over when Suspended is validly allowed for clones and copies.

In the case of cloning or copying a running VM, the first check would fail, giving an error message stating that the power-state should be either Halted or Suspended, as the allowed_power_states table statically listed these two options. However, the second check would add additional constraints, often meaning that Suspended was not a valid power-state.

There are two obvious solutions:

  (a) Changing the order of the checks, so that the most specific check is done first.
  (b) Factoring the constraints expressed in 2 into 1.

This patch adopts approach (b), since it's nicer to have all of the power-state-checking logic in one place.

Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com>
Merge commit 'cef7745290f310cda0036b039e0b818634764f2f'
Merge commit '9aff1ef8c17c9225b0eee572e8267dc568b3dd11'
CA-72538: On pool-join, do not rely on the naming of bridges

...to decide whether to merge the associated networks or not.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
==->=

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>