Search in sources :

Example 16 with CimConnectionInfo

use of com.emc.storageos.cimadapter.connections.cim.CimConnectionInfo in project coprhd-controller by CoprHD.

the class IndicationTest method startListeningForIndications.

@Test
@PostConstruct
@DependsOn("connectionManager,cIMIndicationProcessor,dbclient")
public void startListeningForIndications() {
    try {
        _logger.info("Started Listening for CIM Indications....");
        // Create a CIM connection info and add the connection.
        CimConnectionInfo connectionInfo = new CimConnectionInfo();
        connectionInfo.setType(CimConstants.ECOM_CONNECTION_TYPE);
        // connectionInfo.setHost("10.247.87.240");
        connectionInfo.setHost(providerIP);
        connectionInfo.setPort(providerPort);
        connectionInfo.setUser(providerUser);
        connectionInfo.setPassword(providerPassword);
        connectionInfo.setInteropNS(providerInterOpNamespace);
        connectionInfo.setImplNS(providerNamespace);
        connectionInfo.setUseSSL(Boolean.parseBoolean(providerUseSsl));
        _logger.info("Adding Connection....");
    // _connectionManager.addConnection(connectionInfo);
    } catch (Exception e) {
        _logger.error("Exception adding connection.", e);
    }
}
Also used : CimConnectionInfo(com.emc.storageos.cimadapter.connections.cim.CimConnectionInfo) DependsOn(org.springframework.context.annotation.DependsOn) Test(org.junit.Test) PostConstruct(javax.annotation.PostConstruct)

Aggregations

CimConnectionInfo (com.emc.storageos.cimadapter.connections.cim.CimConnectionInfo)16 Test (org.junit.Test)9 ConnectionManagerException (com.emc.storageos.cimadapter.connections.ConnectionManagerException)3 CimConnection (com.emc.storageos.cimadapter.connections.cim.CimConnection)2 StorageProvider (com.emc.storageos.db.client.model.StorageProvider)1 DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)1 StorageMonitorException (com.emc.storageos.volumecontroller.StorageMonitorException)1 IOException (java.io.IOException)1 Timer (java.util.Timer)1 PostConstruct (javax.annotation.PostConstruct)1 WBEMException (javax.wbem.WBEMException)1 DependsOn (org.springframework.context.annotation.DependsOn)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1