CP-4146: Allow individual disabling of serial port emulation on toolstack
We can disable serial port emulation by:
- xe vm-param-set uuid=<vm_uuid> platform:hvm_serial=none
- xe vm-param-set uuid=<vm_uuid> other-config:hvm_serial=none

The platform flag gets precedence over the other_config flag.

Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
CA-106080: DB upgrade rules update license_params.sku_type

The previous upgrade rules for the DB only modified license_params.edition
(advanced,enterprise,platinum -> per-socket, enterprise-xd -> xendesktop). We
also need to modify sku_type, because v6d will return current_edition =
previous sku_type on the case of an expired license. This is an edge case for
when a license expires just prior to a host upgrade, with no valid licenses on
the license server after upgrade.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-103101: Create a background process from restart_agent to restart the
entire toolstack.
Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
Whitespace: Reformat Pool.create_VLAN_from_PIF

$ camlp4o -printer o -no_comments xapi_pool.ml | md5sum
6afb19c9cff915091d37775375954312

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-106560: Create VLANs on slaves that are in 'Maintenance Mode'

Weaken the condition for creating VLANs on slaves during
a Pool.create_VLAN_from_PIF from hosts that are enabled to hosts that are live
(according to the host metrics). This enables the VLAN to be created on slaves
that are in XenCenter's 'Maintenance Mode'.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
CA-101175: Replace Event.next by Event.from

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@citrix.com>
Merge pull request #1236 from vbmithr/CA-101175

CA-101175: Replace Event.next by Event.from
CA-101175: Increase timeout for Event.from to 30 seconds, only watch for specific tasks

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@citrix.com>
Revert fix for CA-101238

The duplicate MAC seed check breaks cross-pool migration of VMs with
snapshots, since snapshots will usually have the same MAC seed as the VM
they belong to.

Signed-off-by: John Else <john.else@citrix.com>
Using Syslog_stdout for logging
Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
Merge pull request #1242 from johnelse/revert-ca-101238

Revert fix for CA-101238
Revert Storage_interface.query_result.features to a (string list)

This means storage_interface.ml is now identical to the Tampa version.
The features are parsed into (string, int64) pairs at the xapi level
instead of at the SMAPI level.

Signed-off-by: John Else <john.else@citrix.com>
Move some boilerplate into the Test_highlevel functors

No actual functional changes to the tests, just lots of moving things
into and out of modules.

This change causes the function (val test : unit -> unit) to be
automatically generated by Test_highlevel.Make

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

Signed-off-by: John Else <john.else@citrix.com>
Add some tests for the SM driver feature parsing code

Signed-off-by: John Else <john.else@citrix.com>
Re-use some code, and fix lookup of content_id in vdi_info_from_db

Signed-off-by: John Else <john.else@citrix.com>
Fix vdi_info.snapshot_of for SMAPIv1

SMAPI snapshot_of should be the parent's uuid, not its database
reference.

Signed-off-by: John Else <john.else@citrix.com>
Add snapshot setters to SMAPI

SMAPI now includes:

VDI.set_is_a_snapshot
VDI.set_snapshot_time
VDI.set_snapshot_of

For SMAPIv1, we just set the new values in xapi's database. For SMAPIv2,
these fields will be implemented by the backend.

Signed-off-by: John Else <john.else@citrix.com>
Remove some unused code

This hasn't been used since the api.hg days...

Signed-off-by: John Else <john.else@citrix.com>
Add SMAPI call SR.update_snapshot_info

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