client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py | 36 +++++-----
client/rhel/rhn-client-tools/src/up2date_client/tui.py | 11 ++-
2 files changed, 27 insertions(+), 20 deletions(-)
New commits:
commit a697bc9f58f2b54e41c543ea1789687f16ac8eb0
Author: Stephen Herr <sherr(a)redhat.com>
Date: Wed Nov 28 14:34:59 2012 -0500
876740 - server url auto-corrects common mistakes, messages say "Satellite"
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
index ad6cfda..bbe7283 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg_constants.py
@@ -26,7 +26,7 @@ SSL_REQUIRED = _("If you are using https you must enter
the location "
"of a valid SSL certificate.")
# Connect Window
-CONNECT_WINDOW = _("Attempting to contact the Red Hat Network server.")
+CONNECT_WINDOW = _("Attempting to contact the Red Hat Network Satellite
server.")
CONNECT_WINDOW_TEXT = _("We are attempting to contact the Red Hat "
"Network server at %s.")
CONNECT_WINDOW_TEXT2 = _("A proxy was specified at %s.")
@@ -35,7 +35,7 @@ CONNECT_WINDOW_TEXT2 = _("A proxy was specified at %s.")
START_REGISTER_WINDOW = _("System Registration")
START_REGISTER_TEXT = _("This assistant will guide you through "
"connecting your system to "
- "Red Hat Network (RHN) to receive software "
+ "Red Hat Network (RHN) Satellite to receive software
"
"updates, including "
"security updates, to keep your system supported "
"and compliant. "
@@ -43,12 +43,12 @@ START_REGISTER_TEXT = _("This assistant will guide you through
"
" * A network connection\n"
" * Your Red Hat Login & password\n"
" * The location of a Red Hat Network Satellite "
- "or Proxy (optional)\n\n")
+ "or Proxy\n\n")
# Why Register Window
WHY_REGISTER = _("Why Should I Connect to RHN? ...")
WHY_REGISTER_WINDOW = _("Why Register")
-WHY_REGISTER_TEXT = _("Connecting your system to Red Hat Network allows you to
take full "
+WHY_REGISTER_TEXT = _("Connecting your system to Red Hat Network Satellite
allows you to take full "
"advantage of the benefits of a paid subscription,
including:")
WHY_REGISTER_SEC = _("Security & Updates:")
WHY_REGISTER_DLD = _("Downloads & Upgrades:")
@@ -69,10 +69,10 @@ BACK_REGISTER = _("Take me back to the
registration")
# Confirm Quit Window
CONFIRM_QUIT = _("Software Update Not Set Up")
-CONFIRM_QUIT_SURE = _("Are you sure you don't want to connect your system
to Red Hat Network? "
+CONFIRM_QUIT_SURE = _("Are you sure you don't want to connect your system
to Red Hat Network Satellite? "
"You'll miss out on the benefits of a Red Hat
Enterprise Linux subscription:\n")
CONFIRM_QUIT_WILLNOT = _("You will not be able to take advantage of these
subscription privileges without connecting "
- "your system to Red Hat Network.\n")
+ "your system to Red Hat Network Satellite.\n")
CONTINUE_REGISTERING = _("Take me back to the setup process.")
REGISTER_LATER2 = _("I'll register later.")
@@ -103,7 +103,7 @@ CONFIRM_OS_ALL = _("Your system will be subscribed
to the base"
HARDWARE_WINDOW = _("Create Profile - Hardware")
HARDWARE_WINDOW_DESC1 = _("A Profile Name is a descriptive name that"
" you choose to identify this System Profile"
- " on the Red Hat Network web pages. Optionally,"
+ " on the Red Hat Network Satellite web pages.
Optionally,"
" include a computer serial or identification
number.")
HARDWARE_WINDOW_DESC2 = _("Additional hardware information including PCI"
" devices, disk sizes and mount points will be"
@@ -138,33 +138,33 @@ RHSM_SYSTEM_ALREADY_REGISTERED = _("This system has already
been registered with
" Knowledge Base Article:
https://access.redhat.com/kb/docs/DOC-45563")
# Send Window
-SEND_WINDOW = _("Send Profile Information to Red Hat Network")
+SEND_WINDOW = _("Send Profile Information to Red Hat Network Satellite")
SEND_WINDOW_DESC = _("We are finished collecting information for the System
Profile.\n\n"
- "Press \"Next\" to send this System Profile to Red
Hat Network. "
+ "Press \"Next\" to send this System Profile to Red
Hat Network Satellite. "
"Click \"Cancel\" and no information will be sent.
"
"You can run the registration program later by "
"typing `rhn_register` at the command line.")
# Sending Window
-SENDING_WINDOW = _("Sending Profile to Red Hat Network")
+SENDING_WINDOW = _("Sending Profile to Red Hat Network Satellite")
# Finish Window
FINISH_WINDOW = _("Updates Configured")
FINISH_WINDOW_TEXT_TUI = _("You may now run 'yum update' from this
system's "
"command line to get the latest "
- "software updates from Red Hat Network. You will need to
run this "
+ "software updates from Red Hat Network Satellite. You
will need to run this "
"periodically to "
"get the latest updates. Alternatively, you may
configure this "
"system for automatic software updates (also known as
'auto errata update') "
- "via the Red Hat Network web interface. (Instructions
for this are in chapter 6 "
+ "via the Red Hat Network Satellite web interface.
(Instructions for this are in chapter 6 "
"of the RHN Reference Guide, available from the
'Help' button in the main Red "
- "Hat Network web interface.)")
+ "Hat Network Satellite web interface.)")
# Review Window
REVIEW_WINDOW = _("Review Subscription")
REVIEW_WINDOW_PROMPT = _("Please review the subscription details below:")
SUB_NUM = _("The installation number %s was activated during "
- "this system's initial connection to Red Hat
Network.")
+ "this system's initial connection to Red Hat Network
Satellite.")
SUB_NUM_RESULT = _("Subscriptions have been activated for the following
"
"Red Hat products/services:")
CHANNELS_TITLE = _("Software Channel Subscriptions:")
@@ -233,7 +233,7 @@ NO_SYS_ENTITLEMENT = _("This system was unable to be
associated with "
"about this problem. Once you make the "
"appropriate active subscriptions available in your account, you may browse "
"to this system's profile in the RHN web interface, delete the profile, and
"
-"re-connect this system to Red Hat Network.")
+"re-connect this system to Red Hat Network Sattelite.")
ACTIVATION_KEY = _("Universal default activation key detected\n"
"A universal default activation key was detected in your
account. "
"This means that a set of properties (software channel
subscriptions, "
@@ -248,12 +248,12 @@ ACTIVATION_KEY = _("Universal default activation key
detected\n"
# Error Messages.
FATAL_ERROR = _("Fatal Error")
WARNING = _("Warning")
-HOSTED_CONNECTION_ERROR = _("We can't contact the Red Hat Network
Server.\n\n"
+HOSTED_CONNECTION_ERROR = _("We can't contact the Red Hat Network
Satellite.\n\n"
"Double check the location provided - is '%s'
correct?\n"
"If not, you can correct it and try again.\n\n"
"Make sure that the network connection on this system
is operational.\n\n"
"This system will not be able to successfully receive
software updates "
- "from Red Hat without connecting to a Red Hat Network
server")
+ "from Red Hat without connecting to a Red Hat Network
Satellite server")
BASECHANNELERROR = _("Architecture: %s, OS Release: %s, OS "
"Version: %s")
@@ -265,7 +265,7 @@ SERVER_TOO_OLD = _("This server doesn't support
functionality "
SSL_CERT_ERROR_MSG = _("<b><span
size=\"16000\">Incompatible Certificate
File</span></b>\n\n"
"The certificate you provided, <b>%s</b>,
is not compatible with "
- " the Red Hat Network server at
<b>%s</b>. You may want to double-check"
+ " the Red Hat Network Satellite server at
<b>%s</b>. You may want to double-check"
" that you have provided a valid certificate
file."
" Are you sure you have provided the correct
certificate, and that"
" the certificate file has not been
corrupted?\n\n"
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
index 94ac8cf..fd7d6ac 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -229,6 +229,7 @@ class SatelliteUrlWindow:
buttons = [OK.encode('utf-8')])
self.g.setCurrent(self.urlEntry)
return 0
+
if (self.urlEntry.value()[:5] == 'https' and
self.sslEntry.value() == ""):
snack.ButtonChoiceWindow(self.screen, ERROR.encode('utf-8'),
@@ -239,9 +240,15 @@ class SatelliteUrlWindow:
return 1
def saveResults(self):
- self.tui.serverURL = self.urlEntry.value()
+ serverEntry = self.urlEntry.value()
+ # fix up the server url, E.G. if someone left off /XMLRPC
+ fixed_server_url = rhnreg.makeNiceServerUrl(serverEntry)
+ if fixed_server_url != serverEntry:
+ serverEntry = fixed_server_url
+
+ self.tui.serverURL = serverEntry
self.tui.sslCACert = self.sslEntry.value()
- config.setServerURL(self.urlEntry.value())
+ config.setServerURL(serverEntry)
config.setSSLCACert(self.sslEntry.value())
cfg.save()