import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
import org.opendaylight.yangtools.yang.common.Decimal64;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+@Component
public class OlmPowerServiceImpl implements OlmPowerService {
private static final Logger LOG = LoggerFactory.getLogger(OlmPowerServiceImpl.class);
private final MappingUtils mappingUtils;
private final DeviceTransactionManager deviceTransactionManager;
private final PortMapping portMapping;
- public OlmPowerServiceImpl(DataBroker dataBroker, PowerMgmt powerMgmt,
- DeviceTransactionManager deviceTransactionManager, PortMapping portMapping,
- MappingUtils mappingUtils, OpenRoadmInterfaces openRoadmInterfaces) {
+ @Activate
+ public OlmPowerServiceImpl(@Reference DataBroker dataBroker,
+ @Reference PowerMgmt powerMgmt,
+ @Reference DeviceTransactionManager deviceTransactionManager,
+ @Reference PortMapping portMapping,
+ @Reference MappingUtils mappingUtils,
+ @Reference OpenRoadmInterfaces openRoadmInterfaces) {
this.dataBroker = dataBroker;
this.powerMgmt = powerMgmt;
this.portMapping = portMapping;
this.deviceTransactionManager = deviceTransactionManager;
this.mappingUtils = mappingUtils;
this.openRoadmInterfaces = openRoadmInterfaces;
+ LOG.debug("OlmPowerServiceImpl Instantiated");
}
- public void init() {
- LOG.info("init ...");
- }
-
- public void close() {
- LOG.info("close ...");
- }
-
-
@Override
public GetPmOutput getPm(GetPmInput pmInput) {
GetPmOutputBuilder pmOutputBuilder = new GetPmOutputBuilder();
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
- <reference id="dataBroker" interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
<reference id="rpcProviderService" interface="org.opendaylight.mdsal.binding.api.RpcProviderService" />
- <reference id="openRoadmInterfaces" interface="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaces" />
- <reference id="deviceTransactionManager" interface="org.opendaylight.transportpce.common.device.DeviceTransactionManager" />
- <reference id="portMapping" interface="org.opendaylight.transportpce.common.mapping.PortMapping" />
- <reference id="mappingUtils" interface="org.opendaylight.transportpce.common.mapping.MappingUtils" />
- <reference id="powerMgmt" interface="org.opendaylight.transportpce.olm.power.PowerMgmt" />
-
- <bean id="olmPowerServiceImpl" class="org.opendaylight.transportpce.olm.service.OlmPowerServiceImpl">
- <argument ref="dataBroker" />
- <argument ref="powerMgmt" />
- <argument ref="deviceTransactionManager" />
- <argument ref="portMapping" />
- <argument ref="mappingUtils" />
- <argument ref="openRoadmInterfaces" />
- </bean>
+ <reference id="olmPowerServiceImpl" interface="org.opendaylight.transportpce.olm.service.OlmPowerService" />
<bean id="olmPowerServiceRpcImpl" class="org.opendaylight.transportpce.olm.OlmPowerServiceRpcImpl">
<argument ref="olmPowerServiceImpl" />