From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 26 Oct 2006 16:57:12 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions homebase_adapt ... Message-ID: <20061026165712.3237.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at sourceware.org 2006-10-26 16:57:12 Modified files: luci/site/luci/Extensions: homebase_adapters.py Log message: use the hostnames or IP addresses users enter to address systems and cluster nodes rather than the host ricci provides in rc.system_info() Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.35&r2=1.36 --- conga/luci/site/luci/Extensions/homebase_adapters.py 2006/10/18 23:12:31 1.35 +++ conga/luci/site/luci/Extensions/homebase_adapters.py 2006/10/26 16:57:12 1.36 @@ -971,9 +971,9 @@ 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) +# 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) @@ -1060,10 +1060,10 @@ pass # we were unable to set the OS property string on this cluster for i in nodeList: - if 'ricci_host' in i: - host = str(i['ricci_host']) - else: - host = str(i['host']) + #if 'ricci_host' in i: + # host = str(i['ricci_host']) + #else: + host = str(i['host']) try: newCluster.manage_addFolder(host, '__luci__:csystem:' + clusterName) @@ -1090,10 +1090,10 @@ # Only add storage systems if the cluster and cluster node DB # objects were added successfully. for i in nodeList: - if 'ricci_host' in i: - host = str(i['ricci_host']) - else: - host = str(i['host']) + #if 'ricci_host' in i: + # host = str(i['ricci_host']) + #else: + host = str(i['host']) try: # It's already there, as a storage system, no problem. @@ -1118,10 +1118,10 @@ return 'No cluster named \"' + clusterName + '\" is managed by Luci' for i in nodeList: - if 'ricci_host' in i: - host = str(i['ricci_host']) - else: - host = str(i['host']) + #if 'ricci_host' in i: + # host = str(i['ricci_host']) + #else: + host = str(i['host']) try: clusterObj.manage_addFolder(host, '__luci__:csystem:' + clusterName) @@ -1144,10 +1144,10 @@ # Only add storage systems if the and cluster node DB # objects were added successfully. for i in nodeList: - if 'ricci_host' in i: - host = str(i['ricci_host']) - else: - host = str(i['host']) + #if 'ricci_host' in i: + # host = str(i['ricci_host']) + #else: + host = str(i['host']) try: # It's already there, as a storage system, no problem. @@ -1189,7 +1189,7 @@ except: pass else: try: - newSystem = self.restrictedTraverse(PLONE_ROOT + '/systems/cluster/' + cluster_info[0] + '/' + rc.system_name()) + newSystem = self.restrictedTraverse(PLONE_ROOT + '/systems/cluster/' + cluster_info[0] + '/' + systemName) except: try: rc.unauth() except: pass