% (command, cmdargs[command]))
if command in ("nodes", "resources"):
parser.add_option("-f", "--format", dest="format",type="choice",
% (command, cmdargs[command]))
if command in ("nodes", "resources"):
parser.add_option("-f", "--format", dest="format",type="choice",
choices=("dns","ip","hrn","rspec"))
choices=("dns","ip","hrn","rspec"))
parser.add_option("-t", "--type", dest="type",type="choice",
help="type filter (user|slice|sa|ma|node|aggregate)",
choices=("user","slice","sa","ma","node","aggregate", "all"),
default="all")
parser.add_option("-t", "--type", dest="type",type="choice",
help="type filter (user|slice|sa|ma|node|aggregate)",
choices=("user","slice","sa","ma","node","aggregate", "all"),
default="all")
+ if command in ("show", "nodes", "resources"):
+ parser.add_option("-o", "--output", dest="file",
+ help="output XML to file", metavar="FILE", default=None)
user_cred = get_user_cred()
result = reg_chan.resolve(user_cred, args[0])
display_record(opts.type, results)
user_cred = get_user_cred()
result = reg_chan.resolve(user_cred, args[0])
display_record(opts.type, results)
context = args[0]
result = slicemgr.list_nodes(user_cred, context)
display_rspec(opts.format, result)
context = args[0]
result = slicemgr.list_nodes(user_cred, context)
display_rspec(opts.format, result)
slice_cred = get_slice_cred(args[0])
result = slicemgr.get_slice_resources(slice_cred, args[0])
display_rspec(opts.format, result)
slice_cred = get_slice_cred(args[0])
result = slicemgr.get_slice_resources(slice_cred, args[0])
display_rspec(opts.format, result)
def display_record(type, record):
rec = filter_record(type, record)
print "display record"
def display_record(type, record):
rec = filter_record(type, record)
print "display record"