Revision 400f5126 src/vmm_mad/remotes/lib/vcenter_driver/datacenter.rb

View differences:

src/vmm_mad/remotes/lib/vcenter_driver/datacenter.rb
38 38
        @vi_client.vim.serviceContent.about.instanceUuid
39 39
    end
40 40

  
41
    def get_vcenter_api_version
42
        @vi_client.vim.serviceContent.about.apiVersion
43
    end
44

  
41 45
    def get_clusters
42 46

  
43 47
        clusters = {}
......
85 89

  
86 90
        vcenter_uuid = get_vcenter_instance_uuid
87 91

  
92
        vcenter_version = get_vcenter_api_version
93

  
88 94
        hpool = VCenterDriver::VIHelper.one_pool(OpenNebula::HostPool, false)
89 95

  
90 96
        if hpool.respond_to?(:message)
......
108 114
                                                               hpool)
109 115
                next if one_host #If the host has been already imported
110 116

  
111
                host_objects[dc_name] << host
117
                host_info = {}
118
                host_info[:cluster_name]     = host['name']
119
                host_info[:cluster_ref]      = host['_ref']
120
                host_info[:vcenter_uuid]     = vcenter_uuid
121
                host_info[:vcenter_version]  = vcenter_version
122

  
123
                host_objects[dc_name] << host_info
112 124
            end
113 125
        end
114 126

  

Also available in: Unified diff