update CLI to use show instead of list for calls that do not return a list

This commit is contained in:
Dan Wendlandt 2011-08-09 09:15:04 -07:00
parent d44714c5d2
commit 9ad5564566

View File

@ -104,7 +104,7 @@ def detail_net(manager, *args):
def api_detail_net(client, *args):
tid, nid = args
try:
res = client.list_network_details(nid)["networks"]["network"]
res = client.show_network_details(nid)["networks"]["network"]
except Exception, e:
LOG.error("Failed to get network details: %s" % e)
return
@ -119,7 +119,7 @@ def api_detail_net(client, *args):
print "Remote Interfaces on Virtual Network:%s\n" % nid
for port in ports["ports"]:
pid = port["id"]
res = client.list_port_attachments(nid, pid)
res = client.show_port_attachment(nid, pid)
LOG.debug(res)
remote_iface = res["attachment"]
print "\tRemote interface:%s" % remote_iface
@ -214,7 +214,7 @@ def detail_port(manager, *args):
def api_detail_port(client, *args):
tid, nid, pid = args
try:
port = client.list_port_details(nid, pid)["ports"]["port"]
port = client.show_port_details(nid, pid)["ports"]["port"]
except Exception, e:
LOG.error("Failed to get port details: %s" % e)
return