[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajani Karuturi resolved CLOUDSTACK-8352.
-----------------------------------------
    Resolution: Fixed

> [marvin] Integrate  vcenter communication through  marvin
> ---------------------------------------------------------
>
>                 Key: CLOUDSTACK-8352
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8352
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: marvin
>    Affects Versions: 4.6.0
>            Reporter: Srikanteswararao Talluri
>            Assignee: Srikanteswararao Talluri
>             Fix For: 4.6.0
>
>
> Marvin should be able to get details of host, vm, dvswitch etc., from vcenter.
> This is going to be implemented using vmware sdk for python pyvmomi.
> Usage:
> vc_object = Vcenter("x.x.x.x", "username", "password")
> print '###get one dc########'
> print(vc_object.get_datacenters(name='testDC'))
> print '###get multiple dcs########'
> for i in vc_object.get_datacenters():
> print
> print '###get one dv########'
> print vc_object.get_dvswitches(name='dvSwitch')
> print '###get multiple dvs########'
> for i in vc_object.get_dvswitches():
> print
> print '###get one dvportgroup########'
> print(vc_object.get_dvportgroups(name='cloud.guest.207.200.1-dvSwitch'))
> print "###get one dvportgroup and the vms associated with it########"
> for vm in 
> vc_object.get_dvportgroups(name='cloud.guest.207.200.1-dvSwitch')[0]['dvportgroup']['vmlist']:
> print(vm.name)
> print(vm.network)
> print '###get multiple dvportgroups########'
> for i in vc_object.get_dvportgroups():
> print
> print vc_object.get_vms(name='VM1')



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to