use of com.cloud.legacymodel.communication.command.startup.StartupStorageCommand in project cosmic by MissionCriticalCloud.
the class DummySecondaryStorageResource method initialize.
@Override
public StartupCommand[] initialize() {
final StartupStorageCommand cmd = new StartupStorageCommand("dummy", StoragePoolType.NetworkFilesystem, 1024 * 1024 * 1024 * 100L, new HashMap<>());
cmd.setResourceType(StorageResourceType.SECONDARY_STORAGE);
cmd.setIqn(null);
cmd.setNfsShare(this._guid);
fillNetworkInformation(cmd);
cmd.setDataCenter(this._dc);
cmd.setPod(this._pod);
cmd.setGuid(this._guid);
cmd.setName(this._guid);
cmd.setVersion(DummySecondaryStorageResource.class.getPackage().getImplementationVersion());
/* gather TemplateInfo in second storage */
cmd.setTemplateInfo(getDefaultSystemVmTemplateInfo());
cmd.getHostDetails().put("mount.parent", "dummy");
cmd.getHostDetails().put("mount.path", "dummy");
cmd.getHostDetails().put("orig.url", this._guid);
final String[] tok = this._dummyPath.split(":");
cmd.setPrivateIpAddress(tok[0]);
return new StartupCommand[] { cmd };
}
Aggregations