[node-patches] Change in ovirt-node[master]: rhn: Add environment into rhn missing bits

Code Review gerrit at ovirt.org
Thu Jan 12 17:47:57 UTC 2017


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

Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: rhn: Add environment into rhn missing bits
......................................................................

rhn: Add environment into rhn missing bits

In the commit 0189cbb86 we improved rhn bits
to support sat6.2. However, we have new variable
environment which should be included in the
autoinstall and migrate script too.

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


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/62/70162/1

diff --git a/plugins/rhn_autoinstall.py b/plugins/rhn_autoinstall.py
index 3e0296a..9cde8a7 100644
--- a/plugins/rhn_autoinstall.py
+++ b/plugins/rhn_autoinstall.py
@@ -30,12 +30,13 @@
 SYSTEMID = "/etc/sysconfig/rhn/systemid"
 
 args = _functions.get_cmdline_args()
-keys = ["rhn_type", "rhn_url", "rhn_ca_cert", "rhn_username",
+keys = ["rhn_type", "rhn_url", "rhn_environment", "rhn_ca_cert", "rhn_username",
         "rhn_profile", "rhn_activationkey", "rhn_org",
         "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",
@@ -64,6 +65,7 @@
     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'],
diff --git a/src/ovirt/node/config/migrate.py b/src/ovirt/node/config/migrate.py
index b30eec7..153a40c 100644
--- a/src/ovirt/node/config/migrate.py
+++ b/src/ovirt/node/config/migrate.py
@@ -238,6 +238,7 @@
             rhn_org = None
             rhn_proxyurl = None
             rhn_proxyuser = None
+            rhn_environment = None
 
             rhn_conf = rhn.get_rhn_config()
             status, rhn_type = rhn.get_rhn_status()
@@ -279,6 +280,8 @@
                          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",


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

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


More information about the node-patches mailing list