Blame SOURCES/0216-v2v-vcenter-Change-function-get_datacenter-get_dcPat.patch

ffd6ed
From 711b61de5bca9c1375a24827a4fd47072b94a82c Mon Sep 17 00:00:00 2001
ffd6ed
From: "Richard W.M. Jones" <rjones@redhat.com>
ffd6ed
Date: Fri, 28 Aug 2015 12:05:12 +0100
ffd6ed
Subject: [PATCH] v2v: vcenter: Change function get_datacenter -> get_dcPath.
ffd6ed
ffd6ed
In vCenter, the datacenter is identified by a path, and the parameter
ffd6ed
used for this is called 'dcPath'.  Rename the function to avoid any
ffd6ed
confusion about what we're getting here.
ffd6ed
ffd6ed
This is just renaming function/variable names and has no other effect.
ffd6ed
ffd6ed
(cherry picked from commit 1585bb5beeff8325a950eea6331e42b5df64226d)
ffd6ed
---
ffd6ed
 v2v/input_libvirt_vcenter_https.ml | 12 ++++++------
ffd6ed
 1 file changed, 6 insertions(+), 6 deletions(-)
ffd6ed
ffd6ed
diff --git a/v2v/input_libvirt_vcenter_https.ml b/v2v/input_libvirt_vcenter_https.ml
ffd6ed
index b4a656f..3ccbc17 100644
ffd6ed
--- a/v2v/input_libvirt_vcenter_https.ml
ffd6ed
+++ b/v2v/input_libvirt_vcenter_https.ml
ffd6ed
@@ -170,14 +170,14 @@ and run_curl_get_lines curl_args =
ffd6ed
   Unix.unlink config_file;
ffd6ed
   lines
ffd6ed
 
ffd6ed
-(* Helper function to extract the datacenter from a URI. *)
ffd6ed
-let get_datacenter uri scheme =
ffd6ed
+(* Helper function to extract the dcPath from a URI. *)
ffd6ed
+let get_dcPath uri scheme =
ffd6ed
   let default_dc = "ha-datacenter" in
ffd6ed
   match scheme with
ffd6ed
   | "vpx" ->           (* Hopefully the first part of the path. *)
ffd6ed
     (match uri.uri_path with
ffd6ed
     | None ->
ffd6ed
-      warning ~prog (f_"vcenter: URI (-ic parameter) contains no path, so we cannot determine the datacenter name");
ffd6ed
+      warning ~prog (f_"vcenter: URI (-ic parameter) contains no path, so we cannot determine the dcPath (datacenter name)");
ffd6ed
       default_dc
ffd6ed
     | Some path ->
ffd6ed
       let path =
ffd6ed
@@ -217,8 +217,8 @@ let map_source_to_uri ?readahead verbose password uri scheme server path =
ffd6ed
     let datastore = Str.matched_group 1 path
ffd6ed
     and path = Str.matched_group 2 path in
ffd6ed
 
ffd6ed
-    (* Get the datacenter. *)
ffd6ed
-    let datacenter = get_datacenter uri scheme in
ffd6ed
+    (* Get the dcPath. *)
ffd6ed
+    let dcPath = get_dcPath uri scheme in
ffd6ed
 
ffd6ed
     let port =
ffd6ed
       match uri.uri_port with
ffd6ed
@@ -230,7 +230,7 @@ let map_source_to_uri ?readahead verbose password uri scheme server path =
ffd6ed
       sprintf
ffd6ed
         "https://%s%s/folder/%s-flat.vmdk?dcPath=%s&dsName=%s"
ffd6ed
         server port
ffd6ed
-        (uri_quote path) (uri_quote datacenter) (uri_quote datastore) in
ffd6ed
+        (uri_quote path) (uri_quote dcPath) (uri_quote datastore) in
ffd6ed
 
ffd6ed
     (* If no_verify=1 was passed in the libvirt URI, then we have to
ffd6ed
      * turn off certificate verification here too.
ffd6ed
-- 
ffd6ed
1.8.3.1
ffd6ed