use of com.emc.cloud.platform.ucs.in.model.ConfigConfig in project coprhd-controller by CoprHD.
the class UCSMServiceImpl method unbindServiceProfile.
@Override
public LsServer unbindServiceProfile(String ucsmURL, String username, String password, String spDn, StringBuilder errorMessage) throws ClientGeneralException {
ComputeSession computeSession = sessionManager.getSession(ucsmURL, username, password);
ConfigConfMo disAssocSPFromBladeMO = new ConfigConfMo();
disAssocSPFromBladeMO.setInHierarchical(Boolean.toString(true));
com.emc.cloud.platform.ucs.in.model.LsServer lsServer = new com.emc.cloud.platform.ucs.in.model.LsServer();
lsServer.setDn(spDn);
LsBinding lsBinding = new LsBinding();
lsBinding.setPnDn("");
lsBinding.setStatus(MO_DELETED_STATUS);
lsServer.getContent().add(factory.createLsBinding(lsBinding));
ConfigConfig configConfig = new ConfigConfig();
configConfig.setManagedObject(factory.createLsServer(lsServer));
disAssocSPFromBladeMO.getContent().add(factory.createConfigConfMoInConfig(configConfig));
LsServer updatedLsServer = pushLsServer(computeSession, factory, disAssocSPFromBladeMO, errorMessage);
log.info("The new Oper State of the Service Profile is : " + updatedLsServer.getOperState());
return updatedLsServer;
}
Aggregations