if ((spec.getType() == null)
|| (spec.getType() != null && spec.isSpecFile())) {
return spec;
}
ClusterCreate newSpec =
createDefaultSpec(spec.getType(), spec.getDistroVendor(), spec.getDistroVersion(), appManagerType);
// --name
if (spec.getName() != null) {
newSpec.setName(spec.getName());
}
//--password
newSpec.setPassword(spec.getPassword());
// --appManager
if(!CommonUtil.isBlank(spec.getAppManager())) {
newSpec.setAppManager(spec.getAppManager());
}
// --locaRepoURL
if(!CommonUtil.isBlank(spec.getLocalRepoURL())) {
newSpec.setLocalRepoURL(spec.getLocalRepoURL());
}
// --distro
if (spec.getDistro() != null) {
newSpec.setDistro(spec.getDistro());
}
//vendor
if (spec.getDistroVendor() != null) {
newSpec.setDistroVendor(spec.getDistroVendor());
}
//version
if (spec.getDistroVersion() != null) {
newSpec.setDistroVersion(spec.getDistroVersion());
}
// --dsNames
if (spec.getDsNames() != null) {
newSpec.setDsNames(spec.getDsNames());
}
// --rpNames
if (spec.getRpNames() != null) {
newSpec.setRpNames(spec.getRpNames());
}
// --networkConfig
if (spec.getNetworkConfig() != null) {
newSpec.setNetworkConfig(spec.getNetworkConfig());
}
// --topology
if (spec.getTopologyPolicy() != null) {
newSpec.setTopologyPolicy(spec.getTopologyPolicy());
}
return newSpec;
}