[node-patches] Change in ovirt-node[ovirt-3.6]: rhn: fix args order

Code Review gerrit at ovirt.org
Tue Jan 17 04:05:48 UTC 2017


>From Douglas Schilling Landgraf <dougsland at redhat.com>:

Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: rhn: fix args order
......................................................................

rhn: fix args order

The module is restrict to the order of args.

Change-Id: I2100b3030d6bc3dd669dcdcb5f4fc83284a0c125
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1412619
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
(cherry picked from commit 7878325914e04fcd772132e1506da8f65a0b7a2d)
---
M plugins/rhn_autoinstall.py
M src/ovirt/node/config/migrate.py
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/98/70598/1

diff --git a/plugins/rhn_autoinstall.py b/plugins/rhn_autoinstall.py
index 9cde8a7..168508a 100644
--- a/plugins/rhn_autoinstall.py
+++ b/plugins/rhn_autoinstall.py
@@ -30,18 +30,18 @@
 SYSTEMID = "/etc/sysconfig/rhn/systemid"
 
 args = _functions.get_cmdline_args()
-keys = ["rhn_type", "rhn_url", "rhn_environment", "rhn_ca_cert", "rhn_username",
-        "rhn_profile", "rhn_activationkey", "rhn_org",
+keys = ["rhn_type", "rhn_url", "rhn_ca_cert", "rhn_username",
+        "rhn_profile", "rhn_activationkey", "rhn_org", "rhn_environment",
         "rhn_proxy", "rhn_proxyuser"]
 
 keys_to_model = {"rhn_type": "rhn.rhntype",
                  "rhn_url": "rhn.url",
-                 "rhn_environment": "rhn.environment",
                  "rhn_ca_cert": "rhn.ca_cert",
                  "rhn_username": "rhn.username",
                  "rhn_profile": "rhn.profile",
                  "rhn_activationkey": "rhn.activationkey",
                  "rhn_org": "rhn.org",
+                 "rhn_environment": "rhn.environment",
                  "rhn_proxy": "rhn.proxy",
                  "rhn_proxyuser": "rhn.proxyuser",
                  }
@@ -65,12 +65,12 @@
     effective_model = Changeset({
         "rhn.rhntype": cfg['rhntype'],
         "rhn.url": cfg['url'],
-        "rhn.environment": cfg['environment'],
         "rhn.ca_cert": cfg['ca_cert'],
         "rhn.username": cfg['username'],
         "rhn.profile": cfg['profile'],
         "rhn.activationkey": cfg['activationkey'],
         "rhn.org": cfg['org'],
+        "rhn.environment": cfg['environment'],
         "rhn.proxy": cfg['proxy'],
         "rhn.proxyuser": cfg['proxyuser'],
     })
diff --git a/src/ovirt/node/config/migrate.py b/src/ovirt/node/config/migrate.py
index 153a40c..e23e247 100644
--- a/src/ovirt/node/config/migrate.py
+++ b/src/ovirt/node/config/migrate.py
@@ -280,8 +280,6 @@
                          rhn_type.lower() if rhn_type else "")
             self.aug.set("/files/etc/default/ovirt/OVIRT_RHN_URL",
                          rhn_url or "")
-            self.aug.set("/files/etc/default/ovirt/OVIRT_RHN_ENVIRONMENT",
-                         rhn_environment or "")
             self.aug.set("/files/etc/default/ovirt/OVIRT_RHN_CA_CERT",
                          rhn_ca or "")
             self.aug.set("/files/etc/default/ovirt/OVIRT_RHN_USERNAME",
@@ -292,6 +290,8 @@
                          rhn_activationkey or "")
             self.aug.set("/files/etc/default/ovirt/OVIRT_RHN_ORG",
                          rhn_org or "")
+            self.aug.set("/files/etc/default/ovirt/OVIRT_RHN_ENVIRONMENT",
+                         rhn_environment or "")
             self.aug.set("/files/etc/default/ovirt/OVIRT_RHN_PROXY",
                          rhn_proxyurl or "")
             self.aug.set("/files/etc/default/ovirt/OVIRT_RHN_PROXYUSER",


-- 
To view, visit https://gerrit.ovirt.org/70598
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2100b3030d6bc3dd669dcdcb5f4fc83284a0c125
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>


More information about the node-patches mailing list