added uuid to getallvms sample.
This commit is contained in:
parent
640519e373
commit
6a650ff123
@ -57,19 +57,22 @@ def PrintVmInfo(vm, depth=1):
|
|||||||
return
|
return
|
||||||
|
|
||||||
summary = vm.summary
|
summary = vm.summary
|
||||||
print "Name : ", summary.config.name
|
print "Name : ", summary.config.name
|
||||||
print "Path : ", summary.config.vmPathName
|
print "Path : ", summary.config.vmPathName
|
||||||
print "Guest : ", summary.config.guestFullName
|
print "Guest : ", summary.config.guestFullName
|
||||||
|
print "Instance UUID : ", vm.summary.config.instanceUuid
|
||||||
|
print "BIOS UUID : ", vm.summary.config.uuid
|
||||||
|
|
||||||
annotation = summary.config.annotation
|
annotation = summary.config.annotation
|
||||||
if annotation != None and annotation != "":
|
if annotation != None and annotation != "":
|
||||||
print "Annotation : ", annotation
|
print "Annotation : ", annotation
|
||||||
print "State : ", summary.runtime.powerState
|
print "State : ", summary.runtime.powerState
|
||||||
if summary.guest != None:
|
if summary.guest != None:
|
||||||
ip = summary.guest.ipAddress
|
ip = summary.guest.ipAddress
|
||||||
if ip != None and ip != "":
|
if ip != None and ip != "":
|
||||||
print "IP : ", ip
|
print "IP : ", ip
|
||||||
if summary.runtime.question != None:
|
if summary.runtime.question != None:
|
||||||
print "Question : ", summary.runtime.question.text
|
print "Question : ", summary.runtime.question.text
|
||||||
print ""
|
print ""
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user