use of com.emc.cloud.platform.ucs.in.model.LsbootDef in project coprhd-controller by CoprHD.
the class UCSMServiceImpl method createLsBootDef.
private LsbootDef createLsBootDef(BootType bootType, String spDN, String version, LsServer lsServerCurrent, Map<String, Map<String, Integer>> hbaToStoragePortMap) throws ClientGeneralException {
LsbootDef lsbootDef = new LsbootDef();
lsbootDef.setRn("boot-policy");
lsbootDef.setRebootOnUpdate("yes");
switch(bootType) {
case NONE:
lsbootDef.setStatus(MO_DELETED_STATUS);
return lsbootDef;
case EMPTY:
lsbootDef.setRebootOnUpdate("no");
return lsbootDef;
case LAN:
lsbootDef.getContent().add(factory.createLsbootLan(createLsbootLan(lsServerCurrent, "1")));
break;
case SAN:
if (UcsmVersionChecker.verifyVersionDetails("2.2", version) < 0) {
lsbootDef.getContent().add(factory.createLsbootStorage(createLsbootStorage(spDN, hbaToStoragePortMap, lsServerCurrent)));
} else {
lsbootDef.getContent().add(factory.createLsbootSan(createLsbootSan(spDN, hbaToStoragePortMap, lsServerCurrent)));
}
lsbootDef.getContent().add(factory.createLsbootLan(createLsbootLan(lsServerCurrent, "2")));
break;
}
return lsbootDef;
}
Aggregations