Implmentation of new APIs to checking state/persistence of objects

This implements the virConnectIsSecure, virConnectIsEncrypted,
virDomainIsPersistent, virDomainIsActive, virNetworkIsActive,
virNetworkIsPersistent, virStoragePoolIsActive,
virStoragePoolIsPersistent, virInterfaceIsActive APIs in
(nearly) all drivers. Exceptions are:

 phyp: missing domainIsActive/Persistent
 esx: missing domainIsPersistent
 opennebula: missing domainIsActive/Persistent

* src/remote/remote_protocol.x: Define remote wire ABI for newly
  added APIs.
* daemon/remote_dispatch*.h: Re-generated from remote_protocol.x
* src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/network/bridge_driver.c,
  src/opennebula/one_driver.c, src/openvz/openvz_conf.c,
  src/openvz/openvz_driver.c, src/phyp/phyp_driver.c,
  src/remote/remote_driver.c, src/storage/storage_driver.c,
  src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
  src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_inotify.c,
  src/xen/xen_inotify.h: Implement all the new APIs where possible
This commit is contained in:
Daniel P. Berrange
2009-10-20 15:12:03 +01:00
parent c04498b305
commit cabc2cc98f
25 changed files with 1775 additions and 66 deletions

View File

@@ -221,6 +221,23 @@ phypClose(virConnectPtr conn)
return 0;
}
static int
phypIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Phyp uses an SSH tunnel, so is always encrypted */
return 1;
}
static int
phypIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
{
/* Phyp uses an SSH tunnel, so is always secure */
return 1;
}
LIBSSH2_SESSION *
openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
int *internal_socket)
@@ -1625,10 +1642,10 @@ virDriver phypDriver = {
NULL, /* nodeDeviceReAttach */
NULL, /* nodeDeviceReset */
NULL, /* domainMigratePrepareTunnel */
NULL, /* isEncrypted */
NULL, /* isSecure */
NULL, /* domainIsActive */
NULL, /* domainIsPersistent */
phypIsEncrypted,
phypIsSecure,
NULL, /* domainIsActive */
NULL, /* domainIsPersistent */
};
int