Cole Robinson
9ae3dbe05b
virt-install: Fix --disk pool=NETPOOL,size=... creation
2014-12-10 13:22:42 -05:00
Cole Robinson
cb124bccbd
testdriver: Add more gluster examples
2014-12-10 13:22:42 -05:00
Cole Robinson
e1ab165b1a
cli: Don't try to create storage with source_pool + size
2014-12-10 13:22:42 -05:00
Cole Robinson
117cbfe12f
devicedisk: Don't set driver name=unknown for rbd vols
2014-12-10 13:22:42 -05:00
Cole Robinson
f16dc4dd34
tests: clitest: Lots of house cleaning
...
Drop redundant tests, organize things better, add more tests where we
can stick new cli device options and view the output, since that's the
most common extension.
2014-12-10 13:22:42 -05:00
Cole Robinson
12340a3858
diskbackend: Try looking up network volumes by path
...
For gluster volumes, which have unique URLs for volume paths, this
makes selecting network volumes via the storagebrowser UI work.
Sheepdog and RBD volumes don't work yet
2014-12-10 09:04:29 -05:00
Martin Kletzander
2890d70a79
tests/testdriver: Don't use invalid uid values
...
The value 4294967295 used in the testdriver for sheepdog volume is not
valid on 32bit systems as it won't fit in uid_t and libvirt will fail
parsing that.
Running "./setup.py test" then fails with:
raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: XML error: malformed owner element
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-12-10 10:06:54 +01:00
Chen Hanxiao
6811bbfaac
virt-clone: remove rarely used option --original-xml in fail message
...
Also replace the short options by long options.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-12-10 11:36:23 +08:00
Cole Robinson
9552afcc92
storagebrowse: Standardize on set_finish_cb
...
Instead of gobject signals
2014-12-09 18:37:00 -05:00
Cole Robinson
464ebabc5a
virt-install: Wire up --disk vol= for network volumes
...
This involves convering pool/vol XML to disk source bits
2014-12-09 18:23:22 -05:00
Cole Robinson
214872498d
test: Set volume type in testdriver XML
2014-12-09 17:50:16 -05:00
Cole Robinson
626295a036
storage: Remove unused function
2014-12-09 17:42:01 -05:00
Cole Robinson
f7c17d4c46
diskbackend: Mandate parent_pool when vol_object is passed
...
We will need parent pool for looking up info about network volumes
2014-12-09 17:03:48 -05:00
Cole Robinson
208672eea9
diskbackend: Minor simplifications
2014-12-09 16:57:32 -05:00
Cole Robinson
e61311fc8a
storage: More support for network pools
...
Including parsing multiple hosts, filling reasonably defaults, making
sure the createpool wizard does the correct thing, etc.
2014-12-09 16:12:47 -05:00
Cole Robinson
838d7f015c
tests: Drop a bunch of redundant xmlconfig tests
...
These are mostly covered by clitests. Keep the important ones around
for code coverage.
2014-12-09 13:19:56 -05:00
Cole Robinson
9f4d03d31a
storage: Really don't use PREALLOC flag with test driver
...
Even if we are trying really hard to fake looking like qemu/kvm
2014-12-09 13:14:12 -05:00
Cole Robinson
9952764dda
virt-install: Make --disk $URL 'just work'
...
If VirtualDisk.path is set to a URL, parse it and fill in all the
source_* values automagically.
2014-12-09 10:45:26 -05:00
Cole Robinson
3ac272e635
uri: Add unit tests, fix some bugs
2014-12-09 10:15:53 -05:00
Cole Robinson
1c79b936f5
diskbackend: Check if the passed path is a url
2014-12-09 08:44:45 -05:00
Cole Robinson
c5ccd68e4d
devicedisk: Handle an empty storage backend
...
Rather than have every little bit depend on a present storage backend,
only create one when it really matters.
2014-12-09 08:44:45 -05:00
Cole Robinson
f0b8062226
devicedisk: Unify StorageCreator vs StorageBackend handling
2014-12-09 08:44:45 -05:00
Cole Robinson
db0942bd09
diskbackend: Document the various classes
2014-12-09 08:44:44 -05:00
Cole Robinson
cff08223ba
util: Move uri_split to its own URISplit class
...
Does what uri_split did, but wraps it all up in an object that makes
handling the data easier, and makes it easy to extend.
2014-12-09 08:43:19 -05:00
Cole Robinson
81009caa54
tests: clitest: Drop explict readonly file testing
...
This was originally to hit certain code paths in virtinst that are long
gone, and was causing issues for running the test suite in certain
situations:
http://www.redhat.com/archives/virt-tools-list/2014-December/msg00010.html
2014-12-09 07:13:27 -05:00
Chen Hanxiao
9e6eaf5d18
virt-clone: improve some error prompts
...
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-12-09 16:10:35 +08:00
Chen Hanxiao
802e57ea5e
diskbackend: fix some comment typos
...
s/if/If
s/a/an
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-12-09 15:53:21 +08:00
Cole Robinson
00957db6e0
devicedisk: Clarify _xmlpath
2014-12-07 10:08:33 -05:00
Cole Robinson
cd305da3f8
virt-install: support network --disk's
...
Handle type=network in devicedisk.py, and wire up all the network fields
for virt-install --disk. Right now it requires manually spelling out
all the protocol, name, host/port etc fields.
The one 'magic' bit is that VirtualDisk.path will be a pretty URL when
all those network fields are specified. This is keeps things mostly
working in various parts of the code where we expect 'path' to be an
identifier for a VirtualDisk.
2014-12-06 21:00:51 -05:00
Cole Robinson
c5f5827499
tests: xmlparse: Simplify disk lookup
2014-12-06 21:00:07 -05:00
Cole Robinson
0f6fddf610
devicedisk: Simplife get_xmlpath
...
Rather than deal with hacks, just read the backing paths and return
the first hit
2014-12-06 17:29:05 -05:00
Cole Robinson
86682c8c54
virt-install: Support --disk source_pool,source_volume
...
For setting type=volume disks. This requires some reworking of
devicedisk bits
2014-12-06 17:14:16 -05:00
Cole Robinson
9b62c2260d
devicedisk: Catch --disk /dev/idontexist,size=2
2014-12-06 16:44:21 -05:00
Cole Robinson
52691c511e
devicedisk: Move more validation into diskbackend
2014-12-06 16:44:21 -05:00
Cole Robinson
7e7b1bdd4e
tests: Order disks in same order libvirt shows them
2014-12-06 16:43:53 -05:00
Cole Robinson
7b8e850bc0
clitest: Sanitize diff output some more
2014-12-06 16:32:10 -05:00
Cole Robinson
cf0206a58c
devicedisk: Break apart set_create_storage
...
And break about the vol_install vs local clone storage creators. And
just generally delete a lot of code. The commit aint pretty but it works
and deletes a ton of hacks
2014-12-05 23:28:53 -05:00
Cole Robinson
7e2ea81a2c
addstorage: Switch away from set_create_storage
2014-12-05 21:49:10 -05:00
Cole Robinson
92663eb1de
devicedisk: Drop transient parameter
...
Just patch it in from distroinstaller
2014-12-05 21:49:10 -05:00
Cole Robinson
40a5ec75b7
tests: Switch away from set_create_storage
2014-12-05 21:49:10 -05:00
Cole Robinson
210ab4d8e0
devicedisk: Add set_vol_install
...
And use it in places where we don't need set_create_storage
2014-12-05 21:49:10 -05:00
Cole Robinson
2acbf52ce3
cli: If creating storage, always build vol_install
...
This is the start of moving this logic out of devicedisk
2014-12-05 20:00:11 -05:00
Cole Robinson
ef0beeb18b
cli: Clean up disk source handling
...
...sort of. This stuff is a hairy mess, but this makes it more stream line
and easier to extend.
2014-12-05 19:05:15 -05:00
Cole Robinson
0cdf6032fb
devicedisk: Remove some redundant validation
2014-12-05 15:31:13 -05:00
Cole Robinson
3e87aadeb7
devicedisk: Clarify backend vs creator code
2014-12-04 21:25:49 -05:00
Cole Robinson
dfc062c611
diskbackend: Make check_if_path_managed more readable
2014-12-04 21:08:38 -05:00
Cole Robinson
66a8c5d374
vmm: conn: Don't abuse path_definitely_exists for pool refreshing
...
Just catch any errors and continue on
2014-12-04 20:39:27 -05:00
Cole Robinson
6489df83ca
devicedisk: Rename path_exists -> path_definitely_exists
...
Since it's a best effort attempt, try to make it more clear that
we aren't certain if paths exist in some cases.
2014-12-04 20:10:37 -05:00
Cole Robinson
ba05e1cd43
diskbackend: Drop all pool source matching
...
It's only used to try and determine if a path actually exists, however
in the pool source case there isn't much we can actually do with that
info.
2014-12-04 20:10:37 -05:00
Cole Robinson
0389ab23a7
diskbackend: Remove backing by pool object
...
It just muddles things up for a minor edge case. The autopoolify logic
should catch all practical cases we care about.
2014-12-04 19:45:00 -05:00