Revision e6a57b0f src/vmm_mad/remotes/lib/vcenter_driver/datastore.rb

View differences:

src/vmm_mad/remotes/lib/vcenter_driver/datastore.rb
160 160

  
161 161
        return nil if one_cluster.nil?
162 162

  
163
        name, capacity, freeSpace = @item.collect("name","summary.capacity","summary.freeSpace")
164

  
163 165
        ds_name = ""
164 166

  
165 167
        if type == "IMAGE_DS"
166
            ds_name << "[#{vcenter_instance_name} - #{dc_name}] #{self['name']} - #{ccr_name} (IMG)"
168
            ds_name << "[#{vcenter_instance_name} - #{dc_name}] #{name} - #{ccr_name.tr(" ", "_")} (IMG)"
167 169
        else
168
            ds_name << "[#{vcenter_instance_name} - #{dc_name}] #{self['name']} - #{ccr_name} (SYS)"
170
            ds_name << "[#{vcenter_instance_name} - #{dc_name}] #{name} - #{ccr_name.tr(" ", "_")} (SYS)"
169 171
            ds_name << " [StorDRS]" if self.class == VCenterDriver::StoragePod
170 172
        end
171 173

  
172 174
        one_tmp = {
173 175
            :name     => ds_name,
174
            :total_mb => ((self['summary.capacity'].to_i / 1024) / 1024),
175
            :free_mb  => ((self['summary.freeSpace'].to_i / 1024) / 1024),
176
            :total_mb => ((capacity.to_i / 1024) / 1024),
177
            :free_mb  => ((freeSpace.to_i / 1024) / 1024),
176 178
            :cluster  => ccr_name,
177 179
            :one  => to_one(ds_name, vcenter_uuid, ccr_ref, one_cluster[:host_id])
178 180
        }

Also available in: Unified diff