mirror of
https://github.com/vmware/vsphere-automation-sdk-python.git
synced 2024-11-26 11:19:59 -05:00
Fixed indentation space and Tab format issues
This commit is contained in:
parent
e4309fae23
commit
3a3ec03834
@ -27,34 +27,31 @@ vCenter/ESX
|
|||||||
stub_config = None
|
stub_config = None
|
||||||
cleardata = False
|
cleardata = False
|
||||||
|
|
||||||
|
|
||||||
def setup(context=None):
|
def setup(context=None):
|
||||||
global stub_config, cleardata
|
global stub_config, cleardata
|
||||||
server, username, password, cleardata, skip_verification = \
|
server, username, password, cleardata, skip_verification = parse_cli_args()
|
||||||
parse_cli_args()
|
stub_config = vapiconnect.connect(server, username, password, skip_verification)
|
||||||
stub_config = vapiconnect.connect(server,
|
atexit.register(vapiconnect.logout, stub_config)
|
||||||
username,
|
|
||||||
password,
|
|
||||||
skip_verification)
|
|
||||||
atexit.register(vapiconnect.logout, stub_config)
|
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
"""
|
"""
|
||||||
List VMs present in server
|
List VMs present in server
|
||||||
"""
|
"""
|
||||||
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