private void initializeDiskGroup
(int diskId, VmdkInfo vmdkInfo, boolean isGzip)
{
String iStr = Integer.toString(diskId);
Group diskGroup = generateDiskGroup(diskId);
cfg_.put(diskGroup, "remote_path", vmdkInfo.name_);
cfg_.put(diskGroup, "uuid", vmdkInfo.uuid_);
cfg_.put(diskGroup, "capacity", Long.toString(vmdkInfo.capacityInKB_) + "K");
if (vmdkInfo.changeId_ != null) {
cfg_.put(diskGroup, "change_id", vmdkInfo.changeId_);
} else {
cfg_.put(diskGroup, "change_id", "*");
}
String gzipExt = ""; if (isGzip) { gzipExt = ".gz"; }
cfg_.put(diskGroup, "adapter_type", vmdkInfo.type_.toString());
cfg_.put(diskGroup, "controller_key", Integer.toString(vmdkInfo.ckey_));
cfg_.put(diskGroup, "device_key", Integer.toString(vmdkInfo.key_));
cfg_.put(diskGroup, "bus_number", Integer.toString(vmdkInfo.busNumber_));
cfg_.put(diskGroup, "unit_number", Integer.toString(vmdkInfo.unitNumber_));
cfg_.put(diskGroup, "backup_mode", "unknown"); /* must be set later. */
cfg_.put(diskGroup, "disk_mode", vmdkInfo.diskMode_);
cfg_.put(diskGroup, "rdiff_timestamp_ms", "-1");
cfg_.put(diskGroup, "filename_dump", iStr + ".dump" + gzipExt);
cfg_.put(diskGroup, "filename_digest", iStr + ".digest" + gzipExt);
cfg_.put(diskGroup, "filename_rdiff", iStr + ".rdiff" + gzipExt);
cfg_.put(diskGroup, "filename_bmp", iStr + ".bmp");
cfg_.put(diskGroup, "is_deleted_previous_dump", "false");
cfg_.put(diskGroup, "is_changed", "undefined"); /* must be set later. */
cfg_.put(diskGroup, "dump_begin_timestamp_ms", "-1");
cfg_.put(diskGroup, "dump_end_timestamp_ms", "-1");
cfg_.put(diskGroup, "status", "failed");
/* index (uuid -> diskId) */
Group diskIndexGroup = this.generateDiskIndexGroup();
cfg_.put(diskIndexGroup, vmdkInfo.uuid_, iStr);
/* make controller group and entries. */
Group controllerGroup = this.generateControllerGroup(vmdkInfo.ckey_);
cfg_.put(controllerGroup, "adapter_type", vmdkInfo.type_.toString());
cfg_.put(controllerGroup, "bus_number", Integer.toString(vmdkInfo.busNumber_));
/* index (uuid -> controller_key) */
Group controllerIndexGroup = this.generateControllerIndexGroup();
cfg_.put(controllerIndexGroup, vmdkInfo.uuid_,
Integer.toString(vmdkInfo.ckey_));
}