In my Python code, I have this call inside a bounded method:
instances = instance_objects.InstanceList().get_by_host(ctxt, self.host)
When I debug with the Python debugger (pdb) and I issue p instances i get this output:
InstanceList(objects=[Instance(bdfbf658-da32-445d-9560-56d496abcb9d)])
When I issue p instances.objects i get this output:
[Instance(
access_ip_v4=None,
access_ip_v6=None,
architecture=None,
auto_disk_config=False,
availability_zone=None,
cell_name=None,
cleaned=False,
vcpus=1,
)]
How can I print out the value of vcpus in pdb?
p instances.objectsInstanceis much longer than what I actually listed. What you see is only a small part of it.p instances.objects[0].vcpus?