CA-94406: VDI reset only on epoch begin

This resolves a bug where VDIs were reset after migration, because the act of
plugging a VBD will reset the VDI. A corresponding change in the storage
managers moves the reset_leaf call (which resets VDIs) to the SR command
"vdi_epoch_begin", which was recently added to Xapi's SMAPIv2.

This commit just adds the plumbing necessary to call epoch_begin and epoch_end
on VDIs in the storage layer. The corresponding commit in sm.hg adds those
commands to the storage layer, and also moves the reset_leaf call into
vdi_epoch_begin.

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Remove erroneous extra call to VDI.epoch_end

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
CA-96872: Fix marshalling of exceptions

Api_errors are of type string * string list, but they are actually
marshalled as just a string list

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #968 from jonludlam/CA-96872

CA-96872: Fix marshalling of exceptions
CA-97270: Now fix unmarshalling of exceptions...

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #970 from jonludlam/CA-97270

CA-97270: Now fix unmarshalling of exceptions...
XOP-261: Reinstate the server on 127.0.0.1 when no management
interface is defined

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XOP-261/CA-96936: Remove Xapi_mgmt_iface.rebind

Since the management interface is listening in IPv6 automatically if
available.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XAPI-261/CA-96936: Make himn_only more general

To also manage the case of a localhost server.

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
Merge pull request #927 from mcclurmc/ca94406-vdi-reset-only-on-epoch-trunk

CA-94406: VDI reset only on epoch begin
XOP-261/CA-96936: Prevent multiple starts of localhost server

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
XOP-261/CA-96936: Issue a warning in case of multiple starts of HIMN server

Signed-off-by: Jerome Maloberti <jerome.maloberti@citrix.com>
CA-97435: Don't use Record_util code in Storage_access to convert VDI types to strings.

We should only use Record_util for pretty-printing human-readable
values, not for marshalling data for RPC purposes.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #959 from jeromemaloberti/XOP-261

XOP-261: Reinstate the server on 127.0.0.1 when no management
Merge pull request #972 from johnelse/ca-97435

CA-97435: Don't use Record_util code in Storage_access to convert VDI types to strings.