Search in sources :

Example 1 with Namespace

use of com.emc.storageos.plugins.common.domainmodel.Namespace in project coprhd-controller by CoprHD.

the class HDSCommunicationInterface method collectStatisticsInformation.

@Override
public void collectStatisticsInformation(AccessProfile accessProfile) throws BaseCollectionException {
    try {
        _logger.info("Access Profile Details :" + accessProfile.toString());
        wbemClient = getCIMClient(accessProfile);
        initMap(accessProfile);
        Namespace namespace = (Namespace) namespaces.getNsList().get(METERING);
        _logger.info("HDS CIMClient initialized successfully");
        executor.setKeyMap(_keyMap);
        executor.execute(namespace);
        dumpStatRecords();
        injectStats();
        // if portMetricsProcesor was injected with metering, trigger pool matcher
        if (portMetricsProcessor != null) {
            // 
            // compute port metric to trigger if any port allocation qualification changed. If there is
            // changes, run vpool matcher
            // 
            _logger.info("checking to see if Vpool Matcher needs to be run");
            List<StoragePort> systemPorts = ControllerUtils.getSystemPortsOfSystem(_dbClient, accessProfile.getSystemId());
            portMetricsProcessor.triggerVpoolMatcherIfPortAllocationQualificationChanged(accessProfile.getSystemId(), systemPorts);
            // 
            // compute storage system's average of port metrics. Then, persist it into storage system object.
            // 
            portMetricsProcessor.computeStorageSystemAvgPortMetrics(accessProfile.getSystemId());
        }
    } catch (Exception e) {
        throw new HDSCollectionException(e.getMessage());
    } finally {
        releaseResources();
    }
}
Also used : HDSCollectionException(com.emc.storageos.volumecontroller.impl.hds.HDSCollectionException) StoragePort(com.emc.storageos.db.client.model.StoragePort) Namespace(com.emc.storageos.plugins.common.domainmodel.Namespace) HDSCollectionException(com.emc.storageos.volumecontroller.impl.hds.HDSCollectionException) DatabaseException(com.emc.storageos.db.exceptions.DatabaseException) BaseCollectionException(com.emc.storageos.plugins.BaseCollectionException) HDSException(com.emc.storageos.hds.HDSException) WBEMException(javax.wbem.WBEMException) IOException(java.io.IOException) SMIPluginException(com.emc.storageos.plugins.metering.smis.SMIPluginException)

Example 2 with Namespace

use of com.emc.storageos.plugins.common.domainmodel.Namespace in project coprhd-controller by CoprHD.

the class SMICommunicationInterface method collectStatisticsInformation.

/**
 * To-Do : Argument Changes, to accomodate ProSphere usage
 */
@Override
public void collectStatisticsInformation(AccessProfile accessProfile) throws BaseCollectionException {
    try {
        _logger.info("Access Profile Details :" + accessProfile.toString());
        _wbemClient = getCIMClient(accessProfile);
        initMap(accessProfile);
        StorageSystem storageSystem = queryStorageSystem(accessProfile);
        String providerVersion = getProviderVersionString(storageSystem);
        if (null != providerVersion) {
            _keyMap.put(Constants.VERSION, providerVersion);
            _keyMap.put(Constants.IS_NEW_SMIS_PROVIDER, isSMIS8XProvider(providerVersion));
        }
        Namespace _ns = null;
        _ns = (Namespace) namespaces.getNsList().get(METERING);
        _logger.info("CIMClient initialized successfully");
        executor.setKeyMap(_keyMap);
        executor.execute(_ns);
        dumpStatRecords();
        injectStats();
    } catch (Exception e) {
        throw new SMIPluginException(e.getMessage());
    } finally {
        releaseResources();
    }
}
Also used : SMIPluginException(com.emc.storageos.plugins.metering.smis.SMIPluginException) Namespace(com.emc.storageos.plugins.common.domainmodel.Namespace) WBEMException(javax.wbem.WBEMException) DatabaseException(com.emc.storageos.db.exceptions.DatabaseException) IOException(java.io.IOException) BaseCollectionException(com.emc.storageos.plugins.BaseCollectionException) SMIPluginException(com.emc.storageos.plugins.metering.smis.SMIPluginException) StorageSystem(com.emc.storageos.db.client.model.StorageSystem)

Aggregations

DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)2 BaseCollectionException (com.emc.storageos.plugins.BaseCollectionException)2 Namespace (com.emc.storageos.plugins.common.domainmodel.Namespace)2 SMIPluginException (com.emc.storageos.plugins.metering.smis.SMIPluginException)2 IOException (java.io.IOException)2 WBEMException (javax.wbem.WBEMException)2 StoragePort (com.emc.storageos.db.client.model.StoragePort)1 StorageSystem (com.emc.storageos.db.client.model.StorageSystem)1 HDSException (com.emc.storageos.hds.HDSException)1 HDSCollectionException (com.emc.storageos.volumecontroller.impl.hds.HDSCollectionException)1