Commit graph

107914 commits

Author SHA1 Message Date
Christian McHugh
e5b7f76b66 tighten up test object copies 2020-05-08 00:45:00 -07:00
Christian McHugh
9b5562c7a2 correct list comparision test for some python vers 2020-05-08 00:45:00 -07:00
Christian McHugh
ac239f50a9 attempt to support windows paths 2020-05-08 00:45:00 -07:00
Christian McHugh
1a24a64924 Support session only storge through master config 2020-05-08 00:45:00 -07:00
Christian McHugh
2c167e8551 revert _minion_runner correction for PR submission 2020-05-08 00:45:00 -07:00
Christian McHugh
fc8189928a add release note 2020-05-08 00:45:00 -07:00
Christian McHugh
075fef3b3d Add unit tests for vault util 2020-05-08 00:45:00 -07:00
Christian McHugh
ca7cbd1aa5 passing runner test 2020-05-08 00:45:00 -07:00
Christian McHugh
81f7d667ef Lookups, caching, and configs working 2020-05-08 00:45:00 -07:00
Christian McHugh
74ce1ae92a working version of file cache 2020-05-08 00:45:00 -07:00
Christian McHugh
f6cdc9956b not done 2020-05-08 00:45:00 -07:00
Christian McHugh
fc1f382c29 slightly more working 2020-05-08 00:45:00 -07:00
Christian McHugh
b8b55e978f fix master.py to allow vault connections 2020-05-08 00:45:00 -07:00
Christian McHugh
abb7b8b1d8 remove printstring 2020-05-08 00:45:00 -07:00
Christian McHugh
acf41dfe2c remove print 2020-05-08 00:45:00 -07:00
Christian McHugh
06b51f9d4e Initial port of 54094 2020-05-08 00:45:00 -07:00
Prabhu Subramanian
8a2c331a47 Add ShiftLeft Scan to the pipeline 2020-05-07 17:00:27 -07:00
Erik Johnson
bb03f4a0ee Update scripts/* to explicitly reference Python 3
Since the master branch no longer supports Python 2, and many distros
still default /usr/bin/python to Python 2, this commit changes the
scripts to explicitly call Python 3.
2020-05-07 16:58:40 -07:00
Firefly
680abe924c improve boot parameter documentation 2020-05-07 16:57:39 -07:00
Eduardo Speroni
442553e2c8 Port #51134 to master 2020-05-07 16:25:57 -07:00
ch3ll
df480e37c0 update pydir call and fix format 2020-05-07 16:22:31 -07:00
ch3ll
c87642181e add towncrier to manage changelog 2020-05-07 16:22:31 -07:00
Joe Eacott
d2688ae80e add tests 2020-05-07 16:21:43 -07:00
Joe Eacott
6b9c3faf11 add simple test to checking sys var 2020-05-07 16:21:43 -07:00
Joe Eacott
c760a9d21b Add False as return to not throw attr error 2020-05-07 16:21:43 -07:00
Joe Eacott
adbec88f1a change logic to check whether app is from source or bundled 2020-05-07 16:21:43 -07:00
Joe Eacott
f6c35856c9 add Path to determine system executable and add edge case 2020-05-07 16:21:43 -07:00
Joe Eacott
158762bd5e Return pip binary without -m flag when not using python 2020-05-07 16:21:43 -07:00
Mike Place
10d4f8b1a7 Port #50946 to master 2020-05-07 16:20:37 -07:00
Kenn Leth Hansen
656c9f82e1 Port #50930 to master 2020-05-07 16:19:21 -07:00
ch3ll
5d280eee1e Update test paths to include windows 2020-05-07 16:16:31 -07:00
ch3ll
cdd470c76e Add auto_detect feature to ssh_ext_alternatives 2020-05-07 16:16:31 -07:00
Cédric Bosdonnat
7d18001dba virt.update properly handle removable devices
Live attaching / detaching removable devices results in failures.
To change the source of those, we need to call updateDeviceFlags instead.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
73438d43d8 virt: handle cdrom remote images
Libvirt allows to use network images for cdroms. Use them if the image
is a remote URL for a cdrom device.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
734ae1a3a4 virt: fix VM creating with disk volume
Since volumes in a virtual storage pool of type 'disk' are partitions,
then need to be named after the disk name with sequential numbers rather
than using the VM and disk names.

Also, the format passed by the user is the one used when creating the volume.
However in the VM definition for logical and disk volumes, the format should
be set to raw.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
5ecea2bac1 Handle RBD volumes as network disks in VM definition
libvirt doesn't support attaching RBD storage pool volumes to a VM.
For instance, a disk with such a source is invalid:

    <source pool='rbd-pool' volume='rbd-volume'/>

And needs to be replaced with:

    <source protocol="rbd" name="rbd-pool-name/rbd-volume">
      <host name="hostname" port="7000"/>
      <auth username='myuser'>
        <secret type='ceph' usage='mypassid'/>
      </auth>
    </source>

This means that we need to fetch the connection data from the pool
definition and convert the volume disk definition into a network one
when creating the VM.

This also means that when purging the VM we need to search for the
pool by looking in every pool's XML to delete the volume.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
62527d052e Add volume disks support to virt.purge()
virt.purge will now remove not only the file disks, but also the disk volumes.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
f7e88a79af Add volume support to virt._get_disks
If a virtual machine has disks of volume types, they will now be
reported by the virt._get_disk() function and all the user-exposed
functions using it like virt.get_disks(), virt.vm_info() and
virt.full_info().
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
a7218588ae Add virt.volume_defined state
In order to help creating storage volumes in virtual storage pools from
states, add a virt.volume_defined state.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
1a45660920 virt.volume_infos: output disk format
Since the format of a volume may be of interest and could help to tell
if two volumes are similar, output this information in the
virt.volume_infos function.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
9b2d180e46 virt.volume_infos: output backing store as well
Since it could be useful to know whether a volume has a backing store,
output the path and format of the backing store if any is defined.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
142ca61644 virt.update handle disk volumes 2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
04965675a8 virt: let libvirt generate MAC addresses
There is no need to generate MAC addresses in the virt module if the
user hasn't provided any. This only makes it harder to make the
difference between a real mac address change from the user and a new
generated one.

Now the mac address is not written in the domain XML definition if not
provided by the user. This avoids unnecessary changes when applying
virt.running.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
87c85cc820 fix libvirtError use
libvirtError is not defined, libvirt.libvirtError should be used
instead.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
faf46571c0 Add disk volumes support in virt.init
In order to support creating VMs with disk on more storage pools like
iSCSI, disks, LVM, RBD, etc, virt.init needs to handle disks not only as
files, but also as libvirt volumes.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
7bb3572390 Share libvirt connection in virt.init
Since the next commits will introduce more uses of the libvirt
connection in virt.init(), start sharing it now.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
d6d5b51dde Extract virt.pool_capabilities logic for use with a libvirt connection
Te virt.pool_capabilities function computes a lot of interesting values
on the virtual storage pool types. Extract the logic of it into
virt._pool_capabilities for reuse.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
261d2ef7bf virt.capabilities refactoring
Extract the libvirt-handling code from virt.capabilities into a
virt._capabilities function accepting an opened libvirt connection.
This allows reusing the code in other functions with easy connection
handling.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
5ec45b7771 Add virt.volume_upload function
When using volumes the user can just copy the template disk image into
the target path. In such a case, the image needs to be uploaded into the
volume.
2020-05-07 16:15:03 -07:00
Cédric Bosdonnat
c5b4737b69 Add virt.volume_define function
In the same vein than pool_define and network_define, expose a
volume_define function to let users create a volume without needing to
know all of libvirt's XML details.
2020-05-07 16:15:03 -07:00