-def show_site_spec (site):
- print '* ======== site',site['site_fields']['name']
- for (k,v) in site.iteritems():
- if k=='nodes':
- if v:
- print '* ','nodes : ',
- for node in v:
- print node['node_fields']['hostname'],'',
- print ''
- elif k=='users':
- if v:
- print '* users : ',
- for user in v:
- print user['name'],'',
- print ''
- elif k == 'site_fields':
- print '* login_base',':',v['login_base']
- elif k == 'address_fields':
- pass
- else:
- print '* ',k,
- PrettyPrinter(indent=8,depth=2).pprint(v)
-
-def show_initscript_spec (initscript):
- print '* ======== initscript',initscript['initscript_fields']['name']
-
-def show_key_spec (key):
- print '* ======== key',key['name']
-
-def show_slice_spec (slice):
- print '* ======== slice',slice['slice_fields']['name']
- for (k,v) in slice.iteritems():
- if k=='nodenames':
- if v:
- print '* nodes : ',
- for nodename in v:
- print nodename,'',
- print ''
- elif k=='usernames':
- if v:
- print '* users : ',
- for username in v:
- print username,'',
- print ''
- elif k=='slice_fields':
- print '* fields',':',
- print 'max_nodes=',v['max_nodes'],
- print ''
- else:
- print '* ',k,v
-
-def show_node_spec (node):
- print "* node",node['name'],"host_box=",node['host_box'],
- print "hostname=",node['node_fields']['hostname'],
- print "ip=",node['interface_fields']['ip']
-