import java.util.Optional;
import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
import org.opendaylight.transportpce.common.mapping.MappingUtils;
+import org.opendaylight.transportpce.common.mapping.PortMapping;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
+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 OpenRoadmInterfacesImpl implements OpenRoadmInterfaces {
private static final Logger LOG = LoggerFactory.getLogger(OpenRoadmInterfacesImpl.class);
OpenRoadmInterfacesImpl710 openRoadmInterfacesImpl710;
MappingUtils mappingUtils;
+ @Activate
+ public OpenRoadmInterfacesImpl(@Reference DeviceTransactionManager deviceTransactionManager,
+ @Reference MappingUtils mappingUtils, @Reference PortMapping portMapping) {
+ this(deviceTransactionManager, mappingUtils,
+ new OpenRoadmInterfacesImpl121(deviceTransactionManager),
+ new OpenRoadmInterfacesImpl221(deviceTransactionManager, portMapping),
+ new OpenRoadmInterfacesImpl710(deviceTransactionManager, portMapping));
+ }
+
public OpenRoadmInterfacesImpl(DeviceTransactionManager deviceTransactionManager, MappingUtils mappingUtils,
OpenRoadmInterfacesImpl121 openRoadmInterfacesImpl121,
OpenRoadmInterfacesImpl221 openRoadmInterfacesImpl221,
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright © 2016 Orange and others. All rights reserved.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-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="deviceTransactionManager" interface="org.opendaylight.transportpce.common.device.DeviceTransactionManager" />
- <reference id="mappingUtils" interface="org.opendaylight.transportpce.common.mapping.MappingUtils" />
- <reference id="portMapping" interface="org.opendaylight.transportpce.common.mapping.PortMapping" />
-
- <bean id="openRoadmInterfaces121" class="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl121" >
- <argument ref="deviceTransactionManager" />
- </bean>
-
- <bean id="openRoadmInterfaces221" class="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl221" >
- <argument ref="deviceTransactionManager" />
- <argument ref="portMapping" />
- </bean>
-
- <bean id="openRoadmInterfaces710" class="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl710" >
- <argument ref="deviceTransactionManager" />
- <argument ref="portMapping" />
- </bean>
-
- <bean id="openRoadmInterfaces" class="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl" >
- <argument ref="deviceTransactionManager" />
- <argument ref="mappingUtils" />
- <argument ref="openRoadmInterfaces121" />
- <argument ref="openRoadmInterfaces221" />
- <argument ref="openRoadmInterfaces710" />
- </bean>
-
- <service ref="openRoadmInterfaces" interface="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaces" />
-
-</blueprint>