libxl: disk specification interface change

Currently we pile all the backend and format information pertaining to
disk option in a single enum.  This check-in separates the two and
uses two enums, one for disk format and another for disk backend.
This helps clearly differentiate between disk format and backend
within the implementation and also helps cleanup the code in this area
in preparation for the impending parser revamping to be done post 4.1.
Along with separating format and backend, this check-in also removes
unwanted types and renames variables in the disk interface and fixes
the code affected by the interface changes.

In specific, here are the disk interface changes made - In
libxl_device_disk structure physpath was renamed to pdev_path,
virtpath was renamed to vdev, phystype was removed and replaced with
backend and format enums.  Also previously a single enum
libxl_disk_phystype held the values for qcow, qcow2, vhd, aio, file,
phy, empty and that got refactored into two enums, libxl_disk_format
to hold unknown, qcow, qcow2, vhd, raw, empty and libxl_disk_backend
to hold unknown, phy, tap and qdisk.

Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
Kamala Narasimhan committed 2011-02-15 19:59:37 +00:00
1 parent a7fd96dfbd
commit 546a764045
13 files changed
+216 -168

No files matched your search

+11 -6
View File
@@ -779,12 +779,17 @@ PyMODINIT_FUNC initxl(void)
_INT_CONST_LIBXL(m, CONSBACK_XENCONSOLED);
_INT_CONST_LIBXL(m, CONSBACK_IOEMU);
_INT_CONST(m, PHYSTYPE_QCOW);
_INT_CONST(m, PHYSTYPE_QCOW2);
_INT_CONST(m, PHYSTYPE_VHD);
_INT_CONST(m, PHYSTYPE_AIO);
_INT_CONST(m, PHYSTYPE_FILE);
_INT_CONST(m, PHYSTYPE_PHY);
_INT_CONST(m, DISK_FORMAT_UNKNOWN);
_INT_CONST(m, DISK_FORMAT_QCOW);
_INT_CONST(m, DISK_FORMAT_QCOW2);
_INT_CONST(m, DISK_FORMAT_VHD);
_INT_CONST(m, DISK_FORMAT_RAW);
_INT_CONST(m, DISK_FORMAT_EMPTY);
_INT_CONST(m, DISK_BACKEND_UNKNOWN);
_INT_CONST(m, DISK_BACKEND_PHY);
_INT_CONST(m, DISK_BACKEND_TAP);
_INT_CONST(m, DISK_BACKEND_QDISK);
_INT_CONST(m, NICTYPE_IOEMU);
_INT_CONST(m, NICTYPE_VIF);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.