Revert commit 3d2f4b37c3 which broke build clearwater-61910

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-94406: reapply fixed commit

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CP-4091: Bump datamodel schema number for versioned capabilities change

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CP-4091: add SM.features field to API

SM.features supercede SM.capabilites. Features represent versioned
capabilities. This will allow clients to predicate operations on a particular
verison of an SM capability, so they can be sure that a particular bug has been
fixed (which is the case with the VDI_RESET_ON_BOOT capability, which had
serious bugs in version 1).

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CP-4091: Pipe capability versions through Xapi storage subsystem

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CP-4091: Deprecate SM.capabilities field

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CP-4091: rename SM capability to feature throughout code

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CP-4091: SM features represented as (string * int64) list in Db

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-94495: RRDD filters out dead domains and only queries memory information for domains that are alive
xe console should not be hidden command

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CP-4091: Fix bug in capability reparsing

We accidentally used the original parse_features function to convert
(string,int64) features to (capability,int64) features. This won't work because
the version numbers have already been stripped from the capability string at
this point, and parse_features will just assign the resulting features a
version number of 1.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Fix the marshalling of the event.from API call

This used to marshal valid_ref_counts with i4 tagged xml, unlike
any other use of XMLRPC in xapi (more or less). This got changed
with the rpc-light switch, and this commit changes it back for
backwards compatibility.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #983 from siddharthv/CA-94495

CA-94495: RRDD filters out dead domains and only queries memory information from domains that are alive.
Merge pull request #980 from mcclurmc/ca94406-master-rebased

VDI_RESET bug fix and versioned SM capabilities
Merge pull request #988 from jonludlam/events-from-types

Fix the marshalling of the event.from API call
CA-97883: Wrap the fstat call in an exception handler

We can get an exception when we're fstatting a file that's larger
than is representable in a signed 32-bit integer (ie., 2 gigs).
If this happens, it's clearly not a socket, so don't bother setting
the TCP timeout parameters.

This patch is actually a bit more defensive, and ignores any
exception thrown here.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
CP-2190 for PR-1221: monitor memory_free_kib instead of memory_total_kib

Also fix an Exception string.

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Fixed the description of memory_total_kib rrd datasource.
It is memory "in the host", not "in use".

Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
CA-89875: RRDD skips reading "/local/domain/0/data/meminfo_free"
Fix bridge name selection for vswitch mode in scripts/setup-vif-rules
  -        bridge_name = "xenbr%s" % devid
  +        bridge_name = get_bridge_name_vswitch(vif_name)

  Devid is device number for domU (f.e. vif1.15; 15 - devid) and is definitely NOT a
  xenbr number (xenbr0, xenbr1, etc).

Signed-off-by: George Shuklin <george.shuklin@gmail.com>