mirror of
https://github.com/vmware/vsphere-automation-sdk-python.git
synced 2024-11-23 01:49:59 -05:00
fix format
This commit is contained in:
parent
9a5d455c62
commit
7495657587
@ -122,5 +122,6 @@ def main():
|
|||||||
if cleardata:
|
if cleardata:
|
||||||
cleanup()
|
cleanup()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -251,5 +251,6 @@ def main():
|
|||||||
if cleardata:
|
if cleardata:
|
||||||
cleanup()
|
cleanup()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -59,7 +59,6 @@ def setup(context=None):
|
|||||||
atexit.register(vapiconnect.logout, stub_config)
|
atexit.register(vapiconnect.logout, stub_config)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
global vm
|
global vm
|
||||||
vm = get_vm(stub_config, vm_name)
|
vm = get_vm(stub_config, vm_name)
|
||||||
@ -145,5 +144,6 @@ def main():
|
|||||||
if cleardata:
|
if cleardata:
|
||||||
cleanup()
|
cleanup()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -58,7 +58,6 @@ def setup(context=None):
|
|||||||
atexit.register(vapiconnect.logout, stub_config)
|
atexit.register(vapiconnect.logout, stub_config)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
global vm
|
global vm
|
||||||
vm = get_vm(stub_config, vm_name)
|
vm = get_vm(stub_config, vm_name)
|
||||||
|
@ -235,6 +235,7 @@ def cleanup_backends():
|
|||||||
datacenter_name,
|
datacenter_name,
|
||||||
datastore_path)
|
datastore_path)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
setup()
|
setup()
|
||||||
cleanup_backends()
|
cleanup_backends()
|
||||||
@ -242,5 +243,6 @@ def main():
|
|||||||
if cleardata:
|
if cleardata:
|
||||||
cleanup()
|
cleanup()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -31,7 +31,8 @@ cleardata = False
|
|||||||
def setup(context=None):
|
def setup(context=None):
|
||||||
global stub_config, cleardata
|
global stub_config, cleardata
|
||||||
server, username, password, cleardata, skip_verification = parse_cli_args()
|
server, username, password, cleardata, skip_verification = parse_cli_args()
|
||||||
stub_config = vapiconnect.connect(server, username, password, skip_verification)
|
stub_config = vapiconnect.connect(server, username, password,
|
||||||
|
skip_verification)
|
||||||
atexit.register(vapiconnect.logout, stub_config)
|
atexit.register(vapiconnect.logout, stub_config)
|
||||||
|
|
||||||
|
|
||||||
@ -41,17 +42,18 @@ def run():
|
|||||||
"""
|
"""
|
||||||
vm_svc = VM(stub_config)
|
vm_svc = VM(stub_config)
|
||||||
list_of_vms = vm_svc.list()
|
list_of_vms = vm_svc.list()
|
||||||
print ("----------------------------")
|
print("----------------------------")
|
||||||
print ("List Of VMs")
|
print("List Of VMs")
|
||||||
print ("----------------------------")
|
print("----------------------------")
|
||||||
for vm in list_of_vms:
|
for vm in list_of_vms:
|
||||||
print ('{}'.format(vm))
|
print('{}'.format(vm))
|
||||||
print ("----------------------------")
|
print("----------------------------")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
setup()
|
setup()
|
||||||
run()
|
run()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user