Search in sources :

Example 11 with ConfigConfig

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;
}
Also used : LsBinding(com.emc.cloud.platform.ucs.in.model.LsBinding) LsServer(com.emc.cloud.platform.ucs.out.model.LsServer) ConfigConfMo(com.emc.cloud.platform.ucs.in.model.ConfigConfMo) ConfigConfig(com.emc.cloud.platform.ucs.in.model.ConfigConfig)

Aggregations

ConfigConfig (com.emc.cloud.platform.ucs.in.model.ConfigConfig)11 ConfigConfMo (com.emc.cloud.platform.ucs.in.model.ConfigConfMo)10 LsServer (com.emc.cloud.platform.ucs.out.model.LsServer)9 ClientGeneralException (com.emc.cloud.platform.clientlib.ClientGeneralException)7 LsBinding (com.emc.cloud.platform.ucs.in.model.LsBinding)2 LsPower (com.emc.cloud.platform.ucs.in.model.LsPower)2 VnicEther (com.emc.cloud.platform.ucs.in.model.VnicEther)2 VnicEtherIf (com.emc.cloud.platform.ucs.in.model.VnicEtherIf)2 FabricVlan (com.emc.cloud.platform.ucs.out.model.FabricVlan)2 ConfigResolveDn (com.emc.cloud.platform.ucs.in.model.ConfigResolveDn)1 LsbootDef (com.emc.cloud.platform.ucs.in.model.LsbootDef)1 LsbootLan (com.emc.cloud.platform.ucs.in.model.LsbootLan)1 LsbootSan (com.emc.cloud.platform.ucs.in.model.LsbootSan)1 LsbootStorage (com.emc.cloud.platform.ucs.in.model.LsbootStorage)1 StringWriter (java.io.StringWriter)1 JAXBElement (javax.xml.bind.JAXBElement)1 Marshaller (javax.xml.bind.Marshaller)1 Test (org.testng.annotations.Test)1