mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8352: vcenter library for marvin which makes use of 'pyvmomi'
vmware sdk python binding to interact with vcenter server. Tested against vcenter 5.5
This commit is contained in:
parent
c6581c17bd
commit
c9fc7e65b7
|
|
@ -184,12 +184,11 @@ class Vcenter():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# vc_object = Vcenter("10.147.60.13", "Administrator", "password_123")
|
||||
vc_object = Vcenter("10.102.192.248", "administrator", "vCenter!9")
|
||||
vc_object = Vcenter("10.x.x.x", "username", "password")
|
||||
|
||||
|
||||
print '###get one dc########'
|
||||
print(vc_object.get_datacenters(name='Jayashree DC'))
|
||||
print(vc_object.get_datacenters(name='testDC'))
|
||||
|
||||
print '###get multiple dcs########'
|
||||
for i in vc_object.get_datacenters():
|
||||
|
|
@ -214,4 +213,4 @@ if __name__ == '__main__':
|
|||
for i in vc_object.get_dvportgroups():
|
||||
print(i)
|
||||
|
||||
print vc_object.get_vms(name='VM1')
|
||||
print vc_object.get_vms(name='VM1')
|
||||
|
|
|
|||
Loading…
Reference in New Issue