client/rhel/rhn-client-tools/src/up2date_client/tui.py | 110 ----------------- 1 file changed, 110 deletions(-)
New commits: commit 8adfb5672a69f5edf6dd0d1443a4a9ba02e125ab Author: Jan Pazdziora jpazdziora@redhat.com Date: Wed Mar 24 15:48:17 2010 +0100
hasMultipleOrgs, orgs, and default_org not used anymore, removing.
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 d6d1695..405b5e4 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py @@ -1112,9 +1112,6 @@ class Tui: self.size = snack._snack.size() self.drawFrame() self.alreadyRegistered = 0 - self.hasMultipleOrgs = 0 - self.orgs = None - self.default_org = None try: self.serverType = rhnreg.getServerType() except up2dateErrors.InvalidProtocolError: @@ -1321,8 +1318,6 @@ class Tui: # Don't offer group selection screen if the user is not # a member of multiple groups. log.log_debug("index is %s" % index) - log.log_debug("win.name is %s, hasMultipleOrgs is %s" % \ - (win.name, self.hasMultipleOrgs))
if win.name == 'OSReleaseWindow': channels = rhnreg.getAvailableChannels(self.userName,
commit 0e45017b0c59306853c7b6b1e705f75d633b015c Author: Jan Pazdziora jpazdziora@redhat.com Date: Wed Mar 24 12:04:02 2010 +0100
Skip the OrgGroupWindow invocation.
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 d776dda..d6d1695 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py @@ -424,85 +424,6 @@ class InfoWindow: self.screen.popWindow() return button
-class OrgGroupWindow: - - def __init__(self, screen, tui): - self.name = "OrgGroupWindow" - self.screen = screen - self.tui = tui - self.size = snack._snack.size() - - - toplevel = snack.GridForm(screen, ORG_SELECT, 1, 4) - tb = snack.Textbox(self.size[0]-10, self.size[1]-15, - ORG_SELECT_PROMPT % self.tui.userName + "\n\n", - wrap = 1) - - toplevel.add(tb, 0, 0, anchorLeft = 1) - - label = snack.Label(ORG_PROMPT) - toplevel.add(label, 0, 1, anchorLeft = 1) - - buttonlist = [] - - if self.tui.orgs != None: - for org_group_id, org_group_label in self.tui.orgs.items(): - if org_group_id == self.tui.default_org: - buttonlist.append((org_group_label, org_group_id, 1)) - else: - buttonlist.append((org_group_label, org_group_id, 0)) - - self.org_group_select_list = snack.RadioBar(self.screen, buttonlist) - toplevel.add(self.org_group_select_list, 0, 2) - - self.g = toplevel - - # BUTTON BAR - self.bb = snack.ButtonBar(screen, - [(NEXT, "next"), - (BACK, "back"), - (CANCEL, "cancel")]) - toplevel.add(self.bb, 0, 3, padding = (0, 1, 0, 0), - growx = 1) - - def run(self): - log.log_debug("Running %s" % self.__class__.__name__) - self.tui.saw_org_window = 1 - self.screen.refresh() - valid = 0 - while not valid: - result = self.g.run() - button = self.bb.buttonPressed(result) - - if result == "F12": - button = "next" - - if button == "next": - valid = self.validateFields() - else: - break - - if button == "next": - valid = self.validateFields() - else: - break - - self.screen.popWindow() - return button - - def validateFields(self): - if self.org_group_select_list.getSelection() != None: - return 1 - else: - return 0 - - - def saveResults(self): - self.tui.other['org_id'] = self.org_group_select_list.getSelection() - log.log_debug('Set org_id as %s' % self.tui.other['org_id']) - return 1 - - class OSReleaseWindow:
def __init__(self, screen, tui): @@ -1403,11 +1324,6 @@ class Tui: log.log_debug("win.name is %s, hasMultipleOrgs is %s" % \ (win.name, self.hasMultipleOrgs))
- if win.name == 'OrgGroupWindow': - if not self.hasMultipleOrgs: - index = index + 1 - continue - if win.name == 'OSReleaseWindow': channels = rhnreg.getAvailableChannels(self.userName, self.password)
commit 3dbc1fb60047e850b2519e7c8e3c663f67a125f6 Author: Jan Pazdziora jpazdziora@redhat.com Date: Wed Mar 24 12:02:10 2010 +0100
Do not call getPossibleOrgs / registration.get_possible_orgs in TUI.
The get_possible_orgs on RHN hosted returns one org anyway, support of multiple orgs per user has been abandonded.
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 46b75e4..d776dda 100644 --- a/client/rhel/rhn-client-tools/src/up2date_client/tui.py +++ b/client/rhel/rhn-client-tools/src/up2date_client/tui.py @@ -418,27 +418,6 @@ class InfoWindow: if valid == 0: continue
- # Now that we have username, look up the groups for that user - # if we're going against hosted. - if self.tui.serverType == 'hosted': - orgs = rhnreg.PossibleOrgs() - orgs = tui_call_wrapper(self.screen, - rhnreg.getPossibleOrgs, - self.userNameEntry.value(), - self.passwordEntry.value()) - - if orgs == None or orgs == 0: - valid = 0 - continue - - self.tui.orgs = orgs.getOrgs() - self.tui.default_org = orgs.getDefaultOrg() - - if len(self.tui.orgs) > 1: - self.tui.hasMultipleOrgs = 1 - - self.tui.other['org_id'] = self.tui.default_org - else: break
spacewalk-commits@lists.fedorahosted.org