[node-patches] Change in ovirt-node[master]: rhn: dont use autosubscribe with activation keys
fabiand at redhat.com
fabiand at redhat.com
Fri Jul 18 15:48:49 UTC 2014
Fabian Deutsch has uploaded a new change for review.
Change subject: rhn: dont use autosubscribe with activation keys
......................................................................
rhn: dont use autosubscribe with activation keys
rhbz#998822
Change-Id: Ifb500b2f8c6fe05614105f444f6209c91008b53d
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/setup/rhn/rhn_model.py
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/30/30430/1
diff --git a/src/ovirt/node/setup/rhn/rhn_model.py b/src/ovirt/node/setup/rhn/rhn_model.py
index a337f1b..4d36a60 100644
--- a/src/ovirt/node/setup/rhn/rhn_model.py
+++ b/src/ovirt/node/setup/rhn/rhn_model.py
@@ -336,14 +336,20 @@
logged_args = str(logged_args)
self.logger.info(logged_args)
- smreg_output = process.pipe(args)
- self.logger.debug(smreg_output)
+ smreg_output = process.check_output(args)
if "been registered" not in smreg_output:
if "Invalid credentials" in smreg_output:
raise RuntimeError("Invalid Username / Password")
elif "already been taken" in smreg_output:
raise RuntimeError("Hostname is already " +
"registered")
+
+ if activationkey:
+ cmd = ["subscription-manager", "auto-attach"]
+ try:
+ subprocess.check_call(cmd)
+ except:
+ raise RuntimeError("Error Setting Auto Attach")
else:
raise RuntimeError("Registration Failed")
else:
--
To view, visit http://gerrit.ovirt.org/30430
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb500b2f8c6fe05614105f444f6209c91008b53d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Joey Boggs <jboggs at redhat.com>
More information about the node-patches
mailing list