9 commits - client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/src/up2date_client/hardware_hal.py | 8 --
client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py | 30 ----------
client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py | 23 -------
client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py | 4 -
4 files changed, 65 deletions(-)
New commits:
commit 5e7f86b0226527cce64a6e749249d5d5b512b4aa
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:48:58 2010 +0200
Method resetServerList not used in our code, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py b/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
index 8ca327a..9aa55b6 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rpcServer.py
@@ -103,10 +103,6 @@ class ServerList:
return None
return self.server()
- def resetServerList(self, serverlist):
- self.serverList = serverlist
- self.index = 0
-
def resetServerIndex(self):
self.index = 0
commit 933762fe6e3269589102d5cbb9f3beb10c95f08d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:48:34 2010 +0200
When startRhnCheck was replaced by spawnRhnCheckForUI, it became unused, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index df6193a..fdaa0eb 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -58,12 +58,6 @@ def startRhnsd():
if rc:
os.system("/sbin/service rhnsd start > /dev/null")
-def startRhnCheck():
- if os.access("/usr/sbin/rhn_check", os.R_OK|os.X_OK):
- os.system("/usr/sbin/rhn_check")
- else:
- print _("Warning: unable to run rhn_check")
-
def getOemInfo():
configFile = cfg["oemInfoFile"] or "/etc/sysconfig/rhn/oeminfo"
commit 681157b4a38719f00cc76e791dff5d54af5399db
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:42:29 2010 +0200
Method getFailedSystemSlots not used in our code, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index 8152bf2..df6193a 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -269,9 +269,6 @@ class RegistrationResult:
def getSystemSlotDescriptions(self):
return map(self._getSlotDescription, self._systemSlots)
- def getFailedSystemSlots(self):
- return self._failedSystemSlots
-
def getFailedSystemSlotDescriptions(self):
return map(self._getFailedSlotDescription, self._failedSystemSlots)
commit bbed67d7b8507d793b261d0babbbb80c11d065f0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:41:37 2010 +0200
get_device_property not used in our code, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/hardware_hal.py b/client/rhel/rhn-client-tools/src/up2date_client/hardware_hal.py
index 703a24a..73a606c 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/hardware_hal.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/hardware_hal.py
@@ -324,14 +324,6 @@ def get_device_pcitype(node):
return pcitype
-def get_device_property(device, property_name):
- """ Return a hal device property, or None if it does not exist. """
- if device.PropertyExists(property_name):
- # Convert from unicode to ascii in case the server can't handle it.
- return str(device.GetProperty(property_name))
- else:
- return None
-
def get_hal_computer():
bus = dbus.SystemBus()
computer_obj = bus.get_object("org.freedesktop.Hal",
commit 1eace720d6856d318f4905d2dc69449e7ed1c1c2
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:40:29 2010 +0200
termsAndConditions not used in our code, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index 0b36d95..8152bf2 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -229,11 +229,6 @@ def getCaps():
# figure out if were missing any needed caps
s.capabilities.validate()
-def termsAndConditions():
- s = rhnserver.RhnServer()
-
- return s.registration.terms_and_conditionsi()
-
def reserveUser(username, password):
s = rhnserver.RhnServer()
return s.registration.reserve_user(username, password)
commit 30e7446f8be219655bdc56882dcd611ea796af3b
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:40:00 2010 +0200
sat_supports_virt_guest_registration not used in our code, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index 8f1d5d9..0b36d95 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -450,18 +450,6 @@ def updateContactInfo(username, password, productInfo):
def server_supports_eus():
return cfg["supportsEUS"]
-def sat_supports_virt_guest_registration():
- s = rhnserver.RhnServer()
-
- if s.capabilities.has_key('registration.remaining_subscriptions'):
- if int(s.capabilities['registration.remaining_subscriptions']['version']) > 1:
- return True
- else:
- return False
- else:
- return False
-
-
def sendHardware(systemId, hardwareList):
s = rhnserver.RhnServer()
s.registration.add_hw_profile(systemId, hardwareList)
commit fbd1a534d4d3309c1eb39f99296343a6d7c18486
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:38:37 2010 +0200
finishMessage not used in our code, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
index eb9df6d..8f1d5d9 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnreg.py
@@ -224,10 +224,6 @@ def welcomeText():
return s.registration.welcome_message()
-def finishMessage(systemId):
- s = rhnserver.RhnServer()
- return s.registration.finish_message(systemId)
-
def getCaps():
s = rhnserver.RhnServer()
# figure out if were missing any needed caps
commit 20b01cb7a0aa6322f410e5b9ed123d65dcc0e6cb
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:37:30 2010 +0200
When autoActivateNumbersOnce was removed, autoActivatedHardwareInfo was made unused, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
index faa0ff9..81cc0a6 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
@@ -109,17 +109,6 @@ class ReviewLog:
def getTextBuffer(self):
return self._text
- def autoActivatedHardwareInfo(self, activationResult):
- self.addBoldText(_("Automatic Subscription Activation"))
- text = rhnreg_constants.SUB_NUM % activationResult.getRegistrationNumber()
- text = text + ' ' + rhnreg_constants.SUB_NUM_RESULT
- self.addText(text)
- for channel, quantity in activationResult.getChannelsActivated().items():
- self.addBulletedText("%s (%s)" % (channel, quantity))
- for service, quantity in activationResult.getSystemSlotsActivated().items():
- self.addBulletedText("%s (%s)" % (service, quantity))
- self.addText('') # adds newline
-
def usedUniversalActivationKey(self, keyName):
self.addBoldText(_("Notice"))
keys = ', '.join(keyName)
commit b913aab6ee9c1d4055906b247ec338f9b5e89103
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:36:16 2010 +0200
When ActivateSubscriptionPage was removed, activatedRegistrationNumber was made unused, removing.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
index 3722ffb..faa0ff9 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/rhnregGui.py
@@ -120,18 +120,6 @@ class ReviewLog:
self.addBulletedText("%s (%s)" % (service, quantity))
self.addText('') # adds newline
- def activatedRegistrationNumber(self, registrationNumber,
- activationResult):
- self.addBoldText(_("Subscription Activation"))
- text = rhnreg_constants.SUB_NUM % registrationNumber
- text = text + ' ' + rhnreg_constants.SUB_NUM_RESULT
- self.addText(text)
- for channel, quantity in activationResult.getChannelsActivated().items():
- self.addBulletedText("%s (%s)" % (channel, quantity))
- for service, quantity in activationResult.getSystemSlotsActivated().items():
- self.addBulletedText("%s (%s)" % (service, quantity))
- self.addText('') # adds newline
-
def usedUniversalActivationKey(self, keyName):
self.addBoldText(_("Notice"))
keys = ', '.join(keyName)
13 years, 11 months
client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/src/up2date_client/tui.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 66a66f5122bfb5f9780ecff24b611af6c029f3ef
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 16:06:57 2010 +0200
597263 - give the focus to the ButtonBar (and thus to the Yes button), to behave as RHEL 5 did.
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 fa505e6..618cf52 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py
@@ -110,6 +110,11 @@ class AlreadyRegisteredWindow:
oldsystemId = systemIdXml[0][0]['system_id']
toplevel = snack.GridForm(self.screen, _("System software updates already set up"), 1, 2)
+ self.bb = snack.ButtonBar(self.screen,
+ [(YES_CONT, "next"),
+ (NO_CANCEL, "exit")])
+ toplevel.add(self.bb, 0, 1, growx = 1)
+
tb = snack.Textbox(size[0]-30, size[1]-20,
SYSTEM_ALREADY_REGISTERED + "\n\n"
+ _("Red Hat Network Location:") + " " + self.tui.serverURL + "\n"
@@ -119,11 +124,6 @@ class AlreadyRegisteredWindow:
1, 1)
toplevel.add(tb, 0, 0, padding = (0, 0, 0, 1))
- self.bb = snack.ButtonBar(self.screen,
- [(YES_CONT, "next"),
- (NO_CANCEL, "exit")])
- toplevel.add(self.bb, 0, 1, growx = 1)
-
self.g = toplevel
def saveResults(self):
13 years, 11 months
client/rhel
by Jan Pazdziora
client/rhel/rhn-client-tools/src/up2date_client/gui.py | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 160626b10f2ced44b9f468b8ddb865736fca60a0
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri May 28 12:05:40 2010 +0200
596101 - skip the chooseChannelPage when going Back as well, if it should not be shown.
diff --git a/client/rhel/rhn-client-tools/src/up2date_client/gui.py b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
index 93df983..eb38c9c 100644
--- a/client/rhel/rhn-client-tools/src/up2date_client/gui.py
+++ b/client/rhel/rhn-client-tools/src/up2date_client/gui.py
@@ -58,6 +58,7 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
"onChooseChannelPagePrepare" : self.onChooseChannelPagePrepare,
"onCreateProfilePagePrepare" : self.onCreateProfilePagePrepare,
"onCreateProfilePageNext" : self.onCreateProfilePageNext,
+ "onCreateProfilePageBack" : self.onCreateProfilePageBack,
"onReviewSubscriptionPagePrepare" : self.onReviewSubscriptionPagePrepare,
"onReviewSubscriptionPageNext" : self.onReviewSubscriptionPageNext,
"onProvideCertificatePageBack" : self.onProvideCertificatePageBack,
@@ -259,6 +260,12 @@ class Gui(rhnregGui.StartPage, rhnregGui.ChooseServerPage, rhnregGui.LoginPage,
if ret:
return ret
+ def onCreateProfilePageBack(self, page, dummy):
+ if rhnregGui.ChooseChannelPage.chooseChannelShouldBeShown(self):
+ self.druid.set_page(self.chooseChannelPage)
+ else:
+ self.druid.set_page(self.chooseServerPage)
+ return True
def onReviewSubscriptionPagePrepare(self, page, dummy):
self.reviewSubscriptionPagePrepare()
13 years, 11 months
client/rhel
by Milan Zazrivec
client/rhel/rhn-client-tools/data/rh_register.glade | 56 +++++++-------------
1 file changed, 20 insertions(+), 36 deletions(-)
New commits:
commit 91d76707031e33e172d3fa993c5780c11a5b3bf6
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Fri May 28 11:41:19 2010 +0200
596102 - fit hw profile into a 2x6 table
This is to ensure the hardware profile gui dialog would fit into
screen with lower resolution (800x600).
diff --git a/client/rhel/rhn-client-tools/data/rh_register.glade b/client/rhel/rhn-client-tools/data/rh_register.glade
index eec1b72..b1a7785 100644
--- a/client/rhel/rhn-client-tools/data/rh_register.glade
+++ b/client/rhel/rhn-client-tools/data/rh_register.glade
@@ -830,8 +830,8 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<widget class="GtkTable" id="table8">
<property name="border_width">5</property>
<property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">4</property>
+ <property name="n_rows">6</property>
+ <property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
@@ -855,10 +855,6 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
@@ -883,8 +879,6 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
@@ -911,8 +905,6 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
@@ -997,8 +989,6 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
@@ -1023,10 +1013,8 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
@@ -1051,10 +1039,8 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
@@ -1079,10 +1065,8 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
@@ -1107,10 +1091,10 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
@@ -1135,10 +1119,10 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
@@ -1163,10 +1147,10 @@ https://www.redhat.com/wapps/sso/rhn/lostPassword.html</small></property>
<property name="angle">0</property>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
13 years, 11 months
Branch 'flex-guest' - 3 commits - backend/rhn-conf backend/server web/modules
by Partha Aji
backend/rhn-conf/rhn_server.conf | 9 +++
backend/server/connectors/__init__.py | 19 +++++++
backend/server/connectors/rhnChannelConnector.py | 23 ++++++++
backend/server/handlers/xmlrpc/registration.py | 2
backend/server/rhnChannel.py | 8 ---
web/modules/rhn/RHN/DB/Server.pm | 60 -----------------------
6 files changed, 53 insertions(+), 68 deletions(-)
New commits:
commit e351a8e13e3cfe5be858c14c03c158014616d444
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 27 20:28:11 2010 -0400
Added a nice framework hook point to handle xmlrpc stuff
diff --git a/backend/rhn-conf/rhn_server.conf b/backend/rhn-conf/rhn_server.conf
index c6808fa..5845925 100644
--- a/backend/rhn-conf/rhn_server.conf
+++ b/backend/rhn-conf/rhn_server.conf
@@ -133,3 +133,12 @@ use_taskomatic_repomd = 1
# list of checksum types, most prefered first
checksum_priority_list = sha512, sha384, sha256, sha1, md5
+
+# URL for our internal xmlrpc server
+# user for stored procedures
+internal_host = localhost
+
+#tomcat server port
+internal_port = 8080
+internal_suffix=/rhn/rpc/internal
+
diff --git a/backend/server/connectors/__init__.py b/backend/server/connectors/__init__.py
new file mode 100644
index 0000000..9fd2aa4
--- /dev/null
+++ b/backend/server/connectors/__init__.py
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2008--2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+from common import initCFG, CFG
+import xmlrpclib
+initCFG('server.satellite')
+XMLRPC = xmlrpclib.Server("http://" + CFG.INTERNAL_HOST + ":" + str(CFG.INTERNAL_PORT) + CFG.INTERNAL_SUFFIX)
diff --git a/backend/server/connectors/rhnChannelConnector.py b/backend/server/connectors/rhnChannelConnector.py
new file mode 100644
index 0000000..53f0c21
--- /dev/null
+++ b/backend/server/connectors/rhnChannelConnector.py
@@ -0,0 +1,23 @@
+#
+# Copyright (c) 2008--2010 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+from . import XMLRPC
+def subscribe(server_id, channel_id):
+ try:
+ XMLRPC.channel.subscribe_no_user(int(server_id), int(channel_id))
+ except:
+ #TODO Handle Error Code
+ pass
+
diff --git a/backend/server/rhnChannel.py b/backend/server/rhnChannel.py
index b95d5f5..ebab136 100644
--- a/backend/server/rhnChannel.py
+++ b/backend/server/rhnChannel.py
@@ -13,7 +13,6 @@
# in this software or its documentation.
#
#
-import xmlrpclib
import time
import string
import rpm
@@ -30,8 +29,7 @@ from rhnDependency import MakeEvrError
# local module
import rhnUser, rhnSQL, rhnLib
-
-XMLRPC = xmlrpclib.Server("http://localhost:8080/rhn/rpc/internal")
+from connectors import rhnChannelConnector
class NoBaseChannelError(Exception):
pass
@@ -1734,11 +1732,9 @@ def get_obsoletes_blacklist(channel):
# small wrapper around a PL/SQL function
def _subscribe_sql(server_id, channel_id, commit = 1):
log_debug(3, server_id, channel_id, commit)
-
-
try:
# don't run the EC yet
- XMLRPC.channel.subscribe_no_user(int(server_id), int(channel_id))
+ rhnChannelConnector.subscribe(server_id, channel_id)
except rhnSQL.SQLSchemaError, e:
if e.errno == 20235: # channel_family_no_subscriptions
raise SubscriptionCountExceeded(channel_id=channel_id)
commit 1b437e24616b53017d17ffa3cf2b15ed8ff39d78
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 27 20:23:29 2010 -0400
removed an unused method
diff --git a/web/modules/rhn/RHN/DB/Server.pm b/web/modules/rhn/RHN/DB/Server.pm
index 2163844..1bde1f5 100644
--- a/web/modules/rhn/RHN/DB/Server.pm
+++ b/web/modules/rhn/RHN/DB/Server.pm
@@ -1764,66 +1764,6 @@ sub can_entitle_server {
return $can ? 1 : 0;
}
-sub set_channels {
- my $self = shift;
- my %params = validate(@_, {user_id => 1, channels => 1});
- my %new_channels = map { $_ => 1 } @{$params{channels}};
- my $user_id = $params{user_id};
-
- my @remove;
- my @add;
-
- my $dbh = RHN::DB->connect;
- my $query = <<EOS;
-SELECT SC.channel_id
- FROM rhnServerChannel SC
- WHERE SC.server_id = ?
-EOS
-
- my $sth = $dbh->prepare($query);
- $sth->execute($self->id);
-
- while (my ($cid) = $sth->fetchrow) {
- if (exists $new_channels{$cid}) {
- delete $new_channels{$cid};
- }
- else {
- push @remove, $cid;
- }
- }
-
- @add = keys %new_channels;
- foreach my $add (@add) {
-
- # do quick unsubscribe + quick subscribe
- my $sth = $dbh->prepare(<<EOS);
-BEGIN
- rhn_channel.unsubscribe_server(:server_id, :cid, 0);
- rhn_channel.subscribe_server(:server_id, :cid, 0, :user_id);
-END;
-EOS
- $sth->execute_h(server_id => $self->id, cid => $add, user_id => $user_id);
- }
-
- foreach my $remove (@remove) {
- # do quick unsubscribes
- my $sth = $dbh->prepare(<<EOS);
-BEGIN
- rhn_channel.unsubscribe_server(:server_id, :cid, 0);
-END;
-EOS
- $sth->execute_h(server_id => $self->id, cid => $remove);
- }
-
- # manually recompute the cache so that it's immediate
- my ($add, $remove, $unc) = RHN::DB::Server->update_cache_for_server($dbh, $self->id);
-
- $dbh->commit;
-
- return { added => [ @add ],
- removed => [ @remove ],
- };
-}
sub entitle_server {
my $self_or_class = shift;
commit a8d9a677d468b18e993dd235c021225d3d9d80f9
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 27 20:23:14 2010 -0400
removed accidental debug commit
diff --git a/backend/server/handlers/xmlrpc/registration.py b/backend/server/handlers/xmlrpc/registration.py
index a6afe24..59f6479 100644
--- a/backend/server/handlers/xmlrpc/registration.py
+++ b/backend/server/handlers/xmlrpc/registration.py
@@ -347,8 +347,6 @@ class Registration(rhnHandler):
# let the stacked activation keys do their magic
tokens_obj.is_rereg_token = 0
rhnFlags.set("re_registration_token", 0)
-
- #import epdb; epdb.serve(port=9999)
# now if we have a token, load the extra registration
# information from the token
13 years, 11 months
Branch 'flex-guest' - scripts/link-tree.py
by Partha Aji
scripts/link-tree.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit bd8a0db8c7a2d7457e7affc90eabe61e2d537d2c
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 27 19:29:40 2010 -0400
added swp files and files ending with ~ to ignore
diff --git a/scripts/link-tree.py b/scripts/link-tree.py
index 818fa10..66b8a21 100755
--- a/scripts/link-tree.py
+++ b/scripts/link-tree.py
@@ -21,7 +21,7 @@ def need_to_backup(src_dir, dest_dir):
return False
-def ignorable(f, ignorables = ["*.pyc", "*.pyo", "*.pyd", "Makefile*"]):
+def ignorable(f, ignorables = ["*.*~", "*.swp", "*.pyc", "*.pyo", "*.pyd", "Makefile*"]):
for i in ignorables:
if fnmatch.fnmatch(f, i): return True
return False
13 years, 11 months
scripts/link-tree.py
by Partha Aji
scripts/link-tree.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit c49b9075ae707c51ebfcb6b78eed61552c1efc70
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 27 19:29:40 2010 -0400
added swp files and files ending with ~ to ignore
diff --git a/scripts/link-tree.py b/scripts/link-tree.py
index 818fa10..66b8a21 100755
--- a/scripts/link-tree.py
+++ b/scripts/link-tree.py
@@ -21,7 +21,7 @@ def need_to_backup(src_dir, dest_dir):
return False
-def ignorable(f, ignorables = ["*.pyc", "*.pyo", "*.pyd", "Makefile*"]):
+def ignorable(f, ignorables = ["*.*~", "*.swp", "*.pyc", "*.pyo", "*.pyd", "Makefile*"]):
for i in ignorables:
if fnmatch.fnmatch(f, i): return True
return False
13 years, 11 months
Branch 'flex-guest' - 6 commits - backend/common backend/satellite_tools backend/spacewalk-backend.spec java/code rel-eng/packages
by Partha Aji
backend/common/rhnLib.py | 10 ++
backend/satellite_tools/disk_dumper/dumper.py | 35 ++++------
backend/satellite_tools/syncCache.py | 15 ----
backend/spacewalk-backend.spec | 6 +
java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 1
java/code/src/com/redhat/rhn/frontend/action/channel/ssm/ChildChannelConfirmAction.java | 11 ++-
java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsAction.java | 21 ------
java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsEvent.java | 26 +++++--
java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml | 3
rel-eng/packages/spacewalk-backend | 2
10 files changed, 67 insertions(+), 63 deletions(-)
New commits:
commit ff701044e4fed9679f0b568b65620b97bb01781e
Merge: 2af33f2... 88b2213...
Author: Partha Aji <paji(a)redhat.com>
Date: Thu May 27 16:58:44 2010 -0400
Merge branch 'master' into flex-guest
commit 88b2213a0f4674cef195dd31f4d420aba07c9dec
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu May 27 16:49:41 2010 +0200
Automatic commit of package [spacewalk-backend] release [1.1.16-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index 5633e56..2be729f 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -8,7 +8,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 1.1.15
+Version: 1.1.16
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -632,6 +632,10 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Thu May 27 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.1.16-1
+- block old spacewalk from syncing sha256 channels via ISS
+- improved performance of linking packages during satellite-sync
+
* Wed May 19 2010 Michael Mraka <michael.mraka(a)redhat.com> 1.1.15-1
- 589299 - excluded checksum_list from headers
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index bb15411..18feab7 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.1.15-1 backend/
+1.1.16-1 backend/
commit 3911fde5bbbc39aaec436caaca649767a69fa786
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu May 27 16:47:17 2010 +0200
removed local hash_object_id() and reused rhnLib.hash_object_id()
diff --git a/backend/satellite_tools/disk_dumper/dumper.py b/backend/satellite_tools/disk_dumper/dumper.py
index 40d6dc0..61c915f 100644
--- a/backend/satellite_tools/disk_dumper/dumper.py
+++ b/backend/satellite_tools/disk_dumper/dumper.py
@@ -1328,7 +1328,7 @@ class ShortPackagesDumper(CachedDumper, exportLib.ShortPackagesDumper):
def _get_key(self, params):
package_id = params['package_id']
- hash_val = hash_object_id(package_id, 100)
+ hash_val = rhnLib.hash_object_id(package_id, 2)
return "xml-short-packages/%s/rhn-package-short-%s.xml" % (
hash_val, package_id)
@@ -1382,7 +1382,7 @@ class PackagesDumper(CachedDumper, exportLib.PackagesDumper):
def _get_key(self, params):
package_id = params['package_id']
- hash_val = hash_object_id(package_id, 100)
+ hash_val = rhnLib.hash_object_id(package_id, 2)
return "xml-packages/%s/rhn-package-%s.xml" % (hash_val, package_id)
def _dump_subelement(self, data):
@@ -1420,7 +1420,7 @@ class SourcePackagesDumper(CachedDumper, exportLib.SourcePackagesDumper):
def _get_key(self, params):
package_id = params['package_id']
- hash_val = hash_object_id(package_id, 100)
+ hash_val = rhnLib.hash_object_id(package_id, 2)
return "xml-packages/%s/rhn-source-package-%s.xml" % (hash_val, package_id)
def _dump_subelement(self, data):
@@ -1454,7 +1454,7 @@ class ErrataDumper(CachedDumper, exportLib.ErrataDumper):
def _get_key(self, params):
errata_id = params['errata_id']
- hash_val = hash_object_id(errata_id, 10)
+ hash_val = rhnLib.hash_object_id(errata_id, 1)
return "xml-errata/%s/rhn-erratum-%s.xml" % (hash_val, errata_id)
def _dump_subelement(self, data):
@@ -1488,7 +1488,7 @@ class ErrataDumperEx(CachedDumper, exportLib.ErrataSynopsisDumper):
def _get_key(self, params):
errata_id = params['errata_id']
- hash_val = hash_object_id(errata_id, 10)
+ hash_val = rhnLib.hash_object_id(errata_id, 1)
return "xml-errata/%s/rhn-erratum-%s.xml" % (hash_val, errata_id)
def _dump_subelement(self, data):
@@ -1529,20 +1529,6 @@ class KickstartableTreesDumper(CachedDumper, exportLib.KickstartableTreesDumper)
log_debug(6, data)
return exportLib.KickstartableTreesDumper.dump_subelement(self, data)
-def hash_object_id(obj_id, factor):
- """ This looks complicated; it returns the (integer part of)
- obj_id, modulo factor
- The string is left padded with as many 0 chars as necessary to
- match factor
- XXX This is copied from satellite_tools.diskImportLib.hashPackageID -
- should figure out a way to share it -- misa
- """
- # Make sure obj_id is a string
- obj_id = str(obj_id)
- format = int(math.ceil(math.log10(factor)))
- format = "%%0%sd" % format
- return format % (int(string.split(obj_id, '-')[-1]) % factor, )
-
class ClosedConnectionError(Exception):
pass
commit 4c3b684480245f9c6ec6001158c3cbde38243dd8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu May 27 16:43:30 2010 +0200
BaseCache._hash_object_id() moved to rhnLib.hash_object_id()
diff --git a/backend/common/rhnLib.py b/backend/common/rhnLib.py
index 12c2704..0905f9b 100644
--- a/backend/common/rhnLib.py
+++ b/backend/common/rhnLib.py
@@ -172,3 +172,13 @@ def fix_url(url, scheme="http", path="/"):
_fragment))
return url
+def hash_object_id(self, object_id, factor):
+ """Given an object id (assumed to be <label>-<number>), returns the
+ last few digits for the number. For instance, (812345, 3) should
+ return 345"""
+ # Grab the digits after -
+ num_id = string.split(object_id, '-')[-1]
+ # get last 'factor' numbers
+ num_id = num_id[-factor:]
+ return num_id.rjust(factor,'0')
+
diff --git a/backend/satellite_tools/syncCache.py b/backend/satellite_tools/syncCache.py
index c8662fb..c510a74 100644
--- a/backend/satellite_tools/syncCache.py
+++ b/backend/satellite_tools/syncCache.py
@@ -23,6 +23,7 @@ import string
# rhn imports:
from common import CFG, rhnCache
+from common.rhnLib import hash_object_id
# NOTE: this is a python 2.2-ism
__all__ = []
@@ -54,16 +55,6 @@ class BaseCache:
def _get_key(self, object_id):
raise NotImplementedError()
- def _hash_object_id(self, object_id, factor):
- """Given an object id (assumed to be <label>-<number>), returns the
- last few digits for the number. For instance, (812345, 3) should
- return 345"""
- # Grab the digits after -
- num_id = string.split(object_id, '-')[-1]
- # get last 'factor' numbers
- num_id = num_id[-factor:]
- return num_id.rjust(factor,'0')
-
class ChannelCache(BaseCache):
def _get_key(self, object_id):
return os.path.join("satsync", "channels", str(object_id))
@@ -71,7 +62,7 @@ class ChannelCache(BaseCache):
class BasePackageCache(BaseCache):
_subdir = "__unknown__"
def _get_key(self, object_id):
- hash_val = self._hash_object_id(object_id, 2)
+ hash_val = hash_object_id(object_id, 2)
return os.path.join("satsync", self._subdir, hash_val, str(object_id))
class ShortPackageCache(BasePackageCache):
@@ -87,7 +78,7 @@ class SourcePackageCache(BasePackageCache):
class ErratumCache(BaseCache):
_subdir = "errata"
def _get_key(self, object_id):
- hash_val = self._hash_object_id(object_id, 1)
+ hash_val = hash_object_id(object_id, 1)
return os.path.join("satsync", self._subdir, hash_val, str(object_id))
class KickstartableTreesCache(BaseCache):
commit 0875be36d1fe6b81f7f86e19e99c073bdefb951a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu May 27 15:52:26 2010 +0200
block old spacewalk / satellite from syncing sha256 channels via ISS
diff --git a/backend/satellite_tools/disk_dumper/dumper.py b/backend/satellite_tools/disk_dumper/dumper.py
index 1a2d30d..40d6dc0 100644
--- a/backend/satellite_tools/disk_dumper/dumper.py
+++ b/backend/satellite_tools/disk_dumper/dumper.py
@@ -23,7 +23,7 @@ from types import ListType
from cStringIO import StringIO
from common import log_debug, log_error, rhnFault, UserDictCase, rhnCache, \
- CFG, rhnLib
+ CFG, rhnLib, rhnFlags
from server import rhnSQL, rhnDatabaseCache
from satellite_tools import constants
from satellite_tools.exporter import exportLib, xmlWriter
@@ -99,12 +99,15 @@ class XML_Dumper:
def get_channels_statement(self):
query = """
select c.id channel_id, c.label,
+ ct.label as checksum_type,
TO_CHAR(c.last_modified, 'YYYYMMDDHH24MISS') last_modified
from rhnChannel c, rhnChannelFamilyMembers cfm,
+ rhnChecksumType ct,
(%s
) scf
where scf.channel_family_id = cfm.channel_family_id
and cfm.channel_id = c.id
+ and c.checksum_type_id = ct.id(+)
""" % self._channel_family_query
return DatabaseStatement().set_statement(rhnSQL.prepare(query))
@@ -469,6 +472,8 @@ class XML_Dumper:
all_channels_hash[row['label']] = row
# Intersect the list of channels they've sent to us
+ iss_slave_sha256_capable = (float(rhnFlags.get('X-RHN-Satellite-XML-Dump-Version')) >= constants.SHA256_SUPPORTED_VERSION)
+
if not channel_labels:
channels = all_channels_hash
else:
@@ -477,6 +482,10 @@ class XML_Dumper:
if not all_channels_hash.has_key(label):
raise rhnFault(3001, "Could not retrieve channel %s" %
label)
+ if not (iss_slave_sha256_capable
+ or all_channels_hash[label]['checksum_type'] in [None, 'sha1']):
+ raise rhnFault(3001, "Channel %s has incompatible checksum (%)" %
+ (label, all_channels_hash[label]['checksum_type']))
channels[label] = all_channels_hash[label]
return channels
commit 09b0052b46bf78853cdf7fd8900b43a76a588fcb
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Wed May 26 15:14:02 2010 -0400
595473 525588 - fixing small query issue and moving the ssm operation creation to before the
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
index 9f85343..00cf97e 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
@@ -1196,6 +1196,7 @@ GROUP BY C.id, C.name
where
rset.label = :set_label and
rset.user_id = :uid and
+ rset.element = S.id and
C.parent_channel = SC.channel_id and
SCAC.server_arch_id = S.server_arch_id and
SCAC.channel_arch_id = C.channel_arch_id and
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/ChildChannelConfirmAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/ChildChannelConfirmAction.java
index edbdcfa..9056fd0 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/ChildChannelConfirmAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/ssm/ChildChannelConfirmAction.java
@@ -28,6 +28,7 @@ import com.redhat.rhn.frontend.taglibs.list.helper.Listable;
import com.redhat.rhn.manager.channel.ChannelManager;
import com.redhat.rhn.manager.rhnset.RhnSetDecl;
import com.redhat.rhn.manager.ssm.SsmManager;
+import com.redhat.rhn.manager.ssm.SsmOperationManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -97,9 +98,17 @@ public class ChildChannelConfirmAction extends RhnAction implements Listable {
ActionForward result;
if (isSubmitted(daForm)) {
+ long operationId = SsmOperationManager.createOperation(user,
+ "Channel Subscription Updates", null);
+
+ SsmOperationManager.associateServersWithOperation(operationId, user.getId(),
+ RhnSetDecl.SSM_CHANNEL_SUBSCRIBE.getLabel());
+ SsmOperationManager.associateServersWithOperation(operationId, user.getId(),
+ RhnSetDecl.SSM_CHANNEL_UNSUBSCRIBE.getLabel());
+
// Fire the request off asynchronously
SsmChangeChannelSubscriptionsEvent event =
- new SsmChangeChannelSubscriptionsEvent(user, subs.values());
+ new SsmChangeChannelSubscriptionsEvent(user, subs.values(), operationId);
MessageQueue.publish(event);
result = mapping.findForward("success");
diff --git a/java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsAction.java b/java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsAction.java
index 979a05b..cd3341b 100644
--- a/java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsAction.java
@@ -17,7 +17,6 @@ package com.redhat.rhn.frontend.events;
import com.redhat.rhn.common.messaging.EventMessage;
import com.redhat.rhn.domain.user.User;
import com.redhat.rhn.frontend.action.channel.ssm.ChannelActionDAO;
-import com.redhat.rhn.manager.rhnset.RhnSetDecl;
import com.redhat.rhn.manager.ssm.SsmManager;
import com.redhat.rhn.manager.ssm.SsmOperationManager;
@@ -38,24 +37,6 @@ public class SsmChangeChannelSubscriptionsAction extends AbstractDatabaseAction
User user = event.getUser();
Collection<ChannelActionDAO> changes = event.getChanges();
- // Parse and store the changes into RhnSets
- SsmManager.populateSsmChannelServerSets(user, changes);
-
- // Log the change operation
-
- /* Since the servers are in two separate sets, make explicit associations from
- those sets to the operation.
- */
- long operationId = SsmOperationManager.createOperation(user,
- "Channel Subscription Updates", null);
-
- SsmOperationManager.associateServersWithOperation(operationId, user.getId(),
- RhnSetDecl.SSM_CHANNEL_SUBSCRIBE.getLabel());
- SsmOperationManager.associateServersWithOperation(operationId, user.getId(),
- RhnSetDecl.SSM_CHANNEL_UNSUBSCRIBE.getLabel());
-
- // Do the changes
-
/* Anything after the operation is created should be in a try..finally to
attempt to prevent a hanging, perpetually in progress operation. This is
an added safety once a taskomatic task is created to automatically time out
@@ -66,7 +47,7 @@ public class SsmChangeChannelSubscriptionsAction extends AbstractDatabaseAction
}
finally {
// Complete the action
- SsmOperationManager.completeOperation(user, operationId);
+ SsmOperationManager.completeOperation(user, event.getOpId());
}
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsEvent.java b/java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsEvent.java
index 34e64c9..3076dd5 100644
--- a/java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsEvent.java
+++ b/java/code/src/com/redhat/rhn/frontend/events/SsmChangeChannelSubscriptionsEvent.java
@@ -21,26 +21,28 @@ import com.redhat.rhn.frontend.action.channel.ssm.ChannelActionDAO;
import java.util.Collection;
/**
- * Event fired to carry the information necessary to perform subscription changes
- * for servers in the SSM.
+ * Event fired to carry the information necessary to perform subscription
+ * changes for servers in the SSM.
*
- * @see com.redhat.rhn.frontend.events.SsmChangeChannelSubscriptionsAction
+ * @see com.redhat.rhn.frontend.events.SsmChangeChannelSubscriptionsAction
* @version $Revision$
*/
public class SsmChangeChannelSubscriptionsEvent implements EventMessage {
private User user;
private Collection<ChannelActionDAO> changes;
+ private Long opId;
/**
* Creates a new SSM channel change event to fire across the message bus.
*
- * @param userIn user making the changes; cannot be <code>null</code>
+ * @param userIn user making the changes; cannot be <code>null</code>
* @param changesIn changes to make; cannot be <code>null</code>
+ * @param operationId the operation id
*/
public SsmChangeChannelSubscriptionsEvent(User userIn,
- Collection<ChannelActionDAO> changesIn) {
-
+ Collection<ChannelActionDAO> changesIn, Long operationId) {
+
if (userIn == null) {
throw new IllegalArgumentException("user cannot be null");
}
@@ -48,9 +50,10 @@ public class SsmChangeChannelSubscriptionsEvent implements EventMessage {
if (changesIn == null) {
throw new IllegalArgumentException("changes cannot be null");
}
-
+
this.user = userIn;
this.changes = changesIn;
+ this.opId = operationId;
}
/**
@@ -67,6 +70,13 @@ public class SsmChangeChannelSubscriptionsEvent implements EventMessage {
return changes;
}
+ /**
+ * @return the op id
+ */
+ public Long getOpId() {
+ return opId;
+ }
+
/** {@inheritDoc} */
public String toText() {
return toString();
@@ -75,6 +85,6 @@ public class SsmChangeChannelSubscriptionsEvent implements EventMessage {
/** {@inheritDoc} */
public String toString() {
return "SsmChannelSubscriptionsEvent[User: " + user.getLogin() +
- ", Change Count: " + changes.size() + "]";
+ ", Change Count: " + changes.size() + "]";
}
}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
index 9b1bea6..3ca1797 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_en_US.xml
@@ -8492,6 +8492,9 @@ Follow this url to see the full list of inactive systems:
<trans-unit id="error.config.revnum.invalid">
<source>Please specify a valid revision number.</source>
</trans-unit>
+ <trans-unit id="ssm.subscription.operation.label">
+ <source>Channel Subscription Updates</source>
+ </trans-unit>
<trans-unit id="kickstart.cobbler.distro.syncfail">
<source>
The following is a list of errors gathered while Spacewalk attempts to
13 years, 11 months
Branch 'yum-repo-sync' - java/code
by Shannon Hughes
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 5 ++++-
java/code/webapp/WEB-INF/pages/channel/manage/repo/repos.jsp | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit cd94d6a810be5bc80e1bb5df0accf0bf5496f4cf
Author: Shannon Hughes <shughes(a)redhat.com>
Date: Thu May 27 15:42:47 2010 -0400
modify verbage for repo list summary
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index cb96841..ca2bf4e 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -9224,7 +9224,7 @@ Please note that some manual configuration of these scripts may still be require
<!-- Repo Sync -->
<trans-unit id="repos.jsp.summary">
- <source>Summary for repos here</source>
+ <source>Use repositories to sync additional packages to your channels. Repositories may be linked to your channels.</source>
</trans-unit>
<trans-unit id="repos.jsp.note.default">
<source>note here</source>
@@ -9253,6 +9253,9 @@ Please note that some manual configuration of these scripts may still be require
<trans-unit id="repos.jsp.toolbar">
<source>Create New Repository</source>
</trans-unit>
+ <trans-unit id="repos.jsp.header">
+ <source>Repositories</source>
+ </trans-unit>
<trans-unit id="repos.jsp.header2">
<source>Create Repository</source>
</trans-unit>
diff --git a/java/code/webapp/WEB-INF/pages/channel/manage/repo/repos.jsp b/java/code/webapp/WEB-INF/pages/channel/manage/repo/repos.jsp
index 4275cff..9657baa 100644
--- a/java/code/webapp/WEB-INF/pages/channel/manage/repo/repos.jsp
+++ b/java/code/webapp/WEB-INF/pages/channel/manage/repo/repos.jsp
@@ -10,7 +10,7 @@
creationUrl="RepoCreate.do"
creationType="repos"
imgAlt="info.alt.img">
- <bean:message key="repos.jsp.toolbar"/>
+ <bean:message key="repos.jsp.header"/>
</rhn:toolbar>
<div class="page-summary">
<p><bean:message key="repos.jsp.summary"/></p>
13 years, 11 months
Branch 'flex-guest' - java/code
by Justin Sherrill
java/code/src/com/redhat/rhn/frontend/xmlrpc/HandlerFactory.java | 19 +++++++---
java/code/src/com/redhat/rhn/frontend/xmlrpc/test/MockHandlerFactory.java | 3 -
2 files changed, 16 insertions(+), 6 deletions(-)
New commits:
commit 2af33f20c9d19c459be0768c7131420b123b4aa1
Author: Justin Sherrill <jsherril(a)redhat.com>
Date: Thu May 27 15:36:54 2010 -0400
fixing handler stuff
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/HandlerFactory.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/HandlerFactory.java
index 7c7c287..a789a55 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/HandlerFactory.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/HandlerFactory.java
@@ -40,7 +40,7 @@ public class HandlerFactory {
public HandlerFactory() {
String manifest = StringUtils.defaultIfEmpty(Config.get().
getString("handler-manifest"), DEFAULT_MANIFEST);
- setup(manifest);
+ setup(manifest, PKG_NAME);
}
/**
@@ -49,11 +49,22 @@ public class HandlerFactory {
* @param handlerManifest the name of the manifest-xml
*/
public HandlerFactory(String handlerManifest) {
- setup(handlerManifest);
+ setup(handlerManifest, PKG_NAME);
}
- protected void setup(String handlerManifest) {
- ClassBuilder builder = new ClassBuilder(PKG_NAME, handlerManifest);
+ /**
+ * Constructor that takes in a given handler manifest file
+ * mainly used for unit test
+ * @param handlerManifest the name of the manifest-xml
+ * @param pkgName the pkgName for the handler
+ */
+ public HandlerFactory(String handlerManifest, String pkgName) {
+ setup(handlerManifest, pkgName);
+ }
+
+
+ protected void setup(String handlerManifest, String pkgName) {
+ ClassBuilder builder = new ClassBuilder(pkgName, handlerManifest);
factory = new ManifestFactory(builder);
}
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/test/MockHandlerFactory.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/test/MockHandlerFactory.java
index d9c6028..2f834fc 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/test/MockHandlerFactory.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/test/MockHandlerFactory.java
@@ -24,7 +24,6 @@ import com.redhat.rhn.frontend.xmlrpc.HandlerFactory;
public class MockHandlerFactory extends HandlerFactory {
public MockHandlerFactory() {
- super(new ClassBuilder("com.redhat.rhn.frontend.xmlrpc.test",
- "test-handler-manifest.xml"));
+ super("test-handler-manifest.xml", "com.redhat.rhn.frontend.xmlrpc.test");
}
}
13 years, 11 months