conga/luci/site/luci/Extensions homebase_adapt ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2006-07-25 17:45:51
Modified files:
luci/site/luci/Extensions: homebase_adapters.py
Log message:
refactored delete cluster / system page
luci/site/luci/Extensions/homebase_adapters.py +8 -14
@@ -410,10 +410,7 @@ break if len(sysData) == 2 and sysData[0] != '' and sysData[1] != '': - try: - csResult = createSystem(self, sysData[0], sysData[1]) - except: - pass + csResult = createSystem(self, sysData[0], sysData[1]) if csResult: errors.append(csResult)
@@ -862,9 +859,12 @@ except: return 'Unable to authenticate to the ricci agent on \"' + host + '\"' -# rhost = rc.system_name() -# if rhost and rhost != host: -# host = rhost + if i != True: + return 'Authentication for storage system \"' + host + '\" failed' + + rhost = rc.system_name() + if rhost and rhost != host and rhost[:9] != 'localhost' and rhost[:5] != '127.0': + host = str(rhost) try: exists = self.restrictedTraverse(PLONE_ROOT +'/systems/storage/' + host)
@@ -872,9 +872,6 @@ except: pass - if i != True: - return 'Authentication for storage system \"' + host + '\" failed' - try: ssystem = self.restrictedTraverse(PLONE_ROOT + '/systems/storage/') except:
@@ -891,6 +888,7 @@ newSystem.manage_role('View', ['Access contents information','View']) except: return 'Unable to set permissions on new system \"' + host + '\"' + return None def abortManageCluster(self): try:
@@ -1169,10 +1167,6 @@ for i in clusters: cSystems = map(zeroindex, getClusterSystems(self, i[0])) - for c in cSystems: - try: - del storageList[storageList.index(c)] - except ValueError: pass ret[0][i[0]] = cSystems if storageList: