Python 如何从<;绑定方法Server.diagnostics的<;服务器:ubuntu12_6>>;?

Python 如何从<;绑定方法Server.diagnostics的<;服务器:ubuntu12_6>>;?,python,openstack-nova,novaclient,Python,Openstack Nova,Novaclient,我正在使用novaclient.v1_1获取实例列表,并尝试提取每个服务器实例的诊断信息 我写的代码 instances = nova.servers.list() for i in instances: val_list = i.diagnostics print val_list 这里我得到了这样的输出 <bound method Server.diagnostics of <Server: ubuntu12_6>> <bound meth

我正在使用novaclient.v1_1获取实例列表,并尝试提取每个服务器实例的诊断信息

我写的代码

instances = nova.servers.list()
  for i in instances:
    val_list = i.diagnostics
    print val_list
这里我得到了这样的输出

<bound method Server.diagnostics of <Server: ubuntu12_6>>
<bound method Server.diagnostics of <Server: ubuntu12_4>>
<bound method Server.diagnostics of <Server: ubuntu12_3>>
<bound method Server.diagnostics of <Server: ubuntu12_1>>


那么,如何获得每个服务器实例的完整诊断信息??如何从该对象提取tap接口信息?

正如输出所述,
诊断是一种方法。这意味着你需要打电话给它

instances = nova.servers.list()
  for i in instances:
    val_list = i.diagnostics()     # <---- Add parenthesis here
    print val_list
instances=nova.servers.list()
就我而言,在下列情况下:
val_list=i.诊断()#