Displaying 5 results from an estimated 5 matches for "clusters_service".
2019 Apr 15
1
[PATCH] v2v: -o rhv-upload: check whether the cluster exists
...--- a/v2v/rhv-upload-precheck.py
+++ b/v2v/rhv-upload-precheck.py
@@ -70,4 +70,14 @@ if len(vms) > 0:
raise RuntimeError("VM already exists with name ‘%s’, id ‘%s’" %
(params['output_name'], vm.id))
+# Check whether the specified cluster exists.
+clusters_service = system_service.clusters_service()
+clusters = clusters_service.list(
+ search='name=%s' % params['rhv_cluster'],
+ case_sensitive=True,
+)
+if len(clusters) == 0:
+ raise RuntimeError("The cluster ‘%s’ does not exist" %
+ (params['rhv_c...
2019 Sep 16
0
[PATCH 3/8] v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
...and substitute it into the OVF doc.
-sds_service = system_service.storage_domains_service()
-sd = sds_service.list(search=("name=%s" % params['output_storage']))[0]
-sd_uuid = sd.id
-
-ovf = ovf.replace("@SD_UUID@", sd_uuid)
+# Get the cluster.
+cluster = system_service.clusters_service().cluster_service(params['rhv_cluster_uuid'])
+cluster = cluster.get()
vms_service = system_service.vms_service()
vm = vms_service.add(
types.Vm(
- cluster=types.Cluster(name = params['rhv_cluster']),
+ cluster=cluster,
initialization=types.Initializa...
2019 Sep 16
0
[PATCH 1/8] v2v: -o rhv-upload: split vmcheck out of precheck
...search = ("name=%s" % params['output_name']),
-)
-if len(vms) > 0:
- vm = vms[0]
- raise RuntimeError("VM already exists with name ‘%s’, id ‘%s’" %
- (params['output_name'], vm.id))
-
# Check whether the specified cluster exists.
clusters_service = system_service.clusters_service()
clusters = clusters_service.list(
diff --git a/v2v/rhv-upload-vmcheck.py b/v2v/rhv-upload-vmcheck.py
new file mode 100644
index 000000000..76a1a23c1
--- /dev/null
+++ b/v2v/rhv-upload-vmcheck.py
@@ -0,0 +1,73 @@
+# -*- python -*-
+# oVirt or RHV pre-upload VM ch...
2019 Sep 16
16
[PATCH 0/8] v2v: various fixed for -o rhv-upload
This patch series fixes various issues in the rhv-upload output mode:
- properly find and use RHV resources
- cleanup orphan disks, and possibly the current disk transfer on
failure
In reality, the first 4 patches deal with resources, and the other 4
with cleanups. The latter block can be theoretically sent alone --
I just happened to start working on it as part of my "let's fix
2020 Jan 10
7
[v2v PATCH 0/6] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python scripts, and
fix the existing test-v2v-python-syntax.sh to use pycodestyle to
actually perform style checks.
Pino Toscano (6):
PEP 8: adapt whitespaces in lines
PEP 8: move imports at the top
PEP 8: adapt empty lines
tests: find all the Python scripts for syntax checks
-o rhv-upload: remove unused Python imports
Revamp check