CA-98944: Replaced potentially lots of db calls (one per VBD) by two big get_internal_where calls

Signed-off-by: Vincent Bernardoff <vincent.bernardoff@citrix.com>
CA-101785: Check for "disable_pv_vnc" in other_config before setting
vncterm

Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>
CA-102855: Gateway PIF was not set properly when creating bond while management disabled

This is fixed by ensuring that, during a bond create or destroy, when the IP config is
move from bond slave to master or vice versa, only one of the PIFs has IP config.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-102927: network monitor: better represent duplex mode for NIC bonds

For bonds, "duplex" is now defined as the "minimum" duplex of all bond
members that are up, where "half duplex" < "full duplex". If all members
are down, duplex is "unknown".

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CA-102927: xe: when a PIF's carrier is down, report duplex as "unknown"

The PIF_metrics.duplex field in the DB is a Boolean, where "true" means
"full duplex" and "false" can either mean "half duplex" or "duplex unknown".

For links that are down, duplex used to be reported as "half", which is silly.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
CP-4460: Auto generate code for API messages marked as removed.

... there are also small tweaks to the formatter to make the generated code look nicer.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CP-4460: mark WLB related API fields/messages as deprecated/removed.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CP-4460: hide WLB's CLI cmdlet

According to the PR-1632 requirement, all WLB's API and CLI should remain and return a feature no longer available error message.

As such, we won't remove the CLI cmdlets implementation. Instead, we hide them from bash completion, to reduce their chances of being used. If a WLB related cmdlet is still called, the feature unavailable error will be eventually generated by API layer and pop through.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CP-4460: remove WLB report/diagnose retrieve web services

and the corresponding cmdlets don't use API, so they need to return the feature removal error themselves.

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CP-4460: Remove the internal implementation of WLB interfacing components

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CP-4460: getter/setter/ctor/dtor etc. should inherit the lifecyle values from their corresponding fields/objects

so that when a field/object type is marked as removed, these implicit methods will reject clients with clear error message.

Note that, object/field/method types maked as removed will remain exist/effective in the DB layer, as they are also necceary in the case of upgrade (from previous releases).

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CP-4460: clear WLB metadata from DB during upgrade

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
CP-4460: Cleanup some debug code

Signed-off-by: Zheng Li <zheng.li@eu.citrix.com>
Merge pull request #1125 from johnelse/sku-flattening-xapi-II

Second wave of commits for PR-1589
Merge pull request #1135 from robhoes/ca102927

CA-102927: improvements to duplex reporting of PIFs
CA-102753: Fix import handler to respect HTTP content-length

This fix stops gzip waiting for more input by closing the connection to it.
This also fixes the import_metadata handler by closing the connection when
done.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Resolve -Wall errors in xenguest_stubs.c, register local with OCaml GC

Resolved all -Wall errors, except implicit declarations of libxc code which
isn't exported by xenctrl.h. Called CAMLxparams on recently added
no_incr_generationid parameter, which had been omitted from the caml local
params init code.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Remove duplicate call to Random.self_init in Xapi.server_init

We called both Random.self_init and Random.full_init. Remove self_init in
favour of full_init.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Bump API schema number for augusta

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CP-4042: Add VM.generation-id field to API

Add a new generation-id field to the the API. This field is a string, which
consists of two 64-bit integers concatenated together and separated by ":". We
pass this value directly into the platform map of both PV and HVM guests.
hvmloader takes care of updating the ACPI device. The generation-id will be
updated every time a VM is run "from a different configuration," i.e. when the
VM is imported, reverted from snapshot/checkpoint, cloned/copied, or
disaser-recovered. It is not the generation-id is not updated on normal VM
lifecycle operations, nor is it updated on HA failover.

See the spec here: http://go.microsoft.com/fwlink/?LinkId=260709

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>