Revision 42e84185 src/vmm_mad/remotes/lib/vcenter_driver/datastore.rb

View differences:

src/vmm_mad/remotes/lib/vcenter_driver/datastore.rb
154 154
        return one
155 155
    end
156 156

  
157
    def to_one_template(one_clusters, ccr_ref, ccr_name, type, vcenter_uuid, vcenter_instance_name, dc_name)
157
    def to_one_template(one_clusters, name, ccr_ref, type, vcenter_uuid)
158 158

  
159 159
        one_cluster = one_clusters.select { |ccr| ccr[:ref] == ccr_ref }.first rescue nil
160 160

  
161 161
        return nil if one_cluster.nil?
162 162

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

  
165 163
        ds_name = ""
166 164

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

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

  

Also available in: Unified diff