aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/check-xl-disk-parse
Commit message (Collapse)AuthorAgeFilesLines
* xl: support xend empty cdrom device syntaxIan Jackson2012-07-261-0/+1
| | | | | | | | | | | | | | | xend accepts `,hdc:cdrom,r' as an empty CDROM drive. However this is not consistent with the existing xl syntax in docs/misc/xl-disk-configuration.txt which requires `,,hdc:cdrom,r' (the additional positional paramter is the format). We fix this by spotting the case specially: when the target is empty and the format contains a colon, reinterpret the format as <vdev>:<devtype>. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xl: support empty CDROM devicesIan Campbell2012-07-261-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | The important change here is to xlu_disk_parse to correctly set format == EMPTY for CDROM devices which are empty. Test cases are added which check for correctness here. xend accepts ',hdc:cdrom,r'[0] as an empty CDROM drive however this is not consistent with the xl syntax in docs/misc/xl-disk-configuration.txt which requires ',,hdc:cdrom,r' (the additional positional paramter is the format). I'm not sure if/how this can be fixed. Note that xend does not accept ',,hdc:cdrom,r' There are several incidental cleanups included the the cdrom-{insert,eject} commands: - add a dry-run mode - use the non-deprecated disk specification syntax - check for and report errors from libxl_cdrom_insert [0] http://wiki.xen.org/wiki/CD_Rom_Support_in_Xen Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxl: add a test case for correct parsing of disk "backendtype" fieldIan Campbell2011-10-071-0/+16
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xl: use libxl_device_disk_to_json to pretty print disk configurationIan Campbell2011-10-071-18/+24
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: allow check-xl-disk-parse to run against installed xl as well as build dirIan Campbell2011-10-071-2/+8
| | | | | | | | | | | | | I can't run from the current directory since my build box isn't running Xen so if ./xl doesn't exist use the installed version on the assumption that I've copied the script to a test host. I think running from the build dir needs the blktap2 libraries, so update LD_LIBRARY_PATH as appropriate. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xl: new "check-xl-disk-parse" test script for disk parserIan Jackson2011-06-281-0/+82
This runs "xl -N block-attach 0 <some strings>" for various sets of strings and checks that the output is as expected. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>