Changeset 3532
- Timestamp:
- 10/08/2009 10:28:23 AM (2 months ago)
- Files:
-
- gip/trunk/gip/plugins/downtime.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gip/trunk/gip/plugins/downtime.py
r3529 r3532 20 20 default_url = "https://myosg.grid.iu.edu/rgdowntime/xml?datasource=downtime" \ 21 21 "&all_resources=on" 22 23 # If the GlueDowntime template is not available, we will fall back to these 24 # entries. This is done so downtime.py can be a standalone plugin on existing 25 # GIP installs 26 ce_template = """\ 27 dn: GlueCEUniqueID=%(ceUniqueID)s,mds-vo-name=local,o=grid 28 GlueCEStateStatus: %(status)s 29 """ 30 31 se_template = """\ 32 dn: GlueSEUniqueID=%(seUniqueID)s,mds-vo-name=local,o=grid 33 GlueSEStatus: %(status)s 34 """ 22 35 23 36 class Downtime(object): … … 189 202 190 203 def publishCEList(self): 191 template = getTemplate("GlueDowntime", "GlueCEUniqueID") 204 try: 205 template = getTemplate("GlueDowntime", "GlueCEUniqueID") 206 except: 207 template = ce_template 192 208 for downtime in self.downtimes: 193 209 if not downtime.isActive(): … … 200 216 201 217 def publishSEList(self): 202 template = getTemplate("GlueDowntime", "GlueSEUniqueID") 218 try: 219 template = getTemplate("GlueDowntime", "GlueSEUniqueID") 220 except: 221 template = se_template 203 222 for downtime in self.downtimes: 204 223 if not downtime.isActive(): … … 209 228 test_name = se[:-10] 210 229 hostname = test_name.split(':')[0].split("/")[0] 211 log.info("Checking SE %s, host %s" % (se, hostname))212 230 if downtime.matchCE(hostname) or \ 213 231 downtime.matchResource(hostname):
