Changeset 10919 in genesis for tools/gformat.py
- Timestamp:
- May 19, 2012, 5:00:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r10907 r10919 1208 1208 1209 1209 1210 def pool_to_name(fqdn, pool_members):1211 """Convert the joined name to a usable pool name"""1212 1213 def isplit(item):1214 (prefix, name, number) = re.match('^(cnode|hybrid|proxy)([a-z]+)([0-9]*)$',item.lower()).group(1,2,3)1215 return (prefix, name, number)1216 1217 my_name = isplit(fqdn.split('.')[0])[1]1218 1219 short_names = defaultdict(list)1220 for node in sorted(pool_members):1221 (prefix, name, number) = isplit(node)1222 short_names[name].append((prefix,number))1223 1224 return '-'.join(sorted(short_names.keys()))1225 1226 1210 1227 1211 # WL uses an /29 to configure an interface. IP's are ordered like this: … … 1263 1247 for item in value: 1264 1248 (iface_name, fqdn, ip) = item 1265 pool_name = "2pool-" + pool_to_name(fqdn,pool_members) 1266 wleiden_zone["%s.%s" % (pool_name, fqdn)].append((ip, True)) 1249 wleiden_zone["2ring.%s" % (fqdn)].append((ip, True)) 1267 1250 1268 1251 # Include static DNS entries
Note:
See TracChangeset
for help on using the changeset viewer.