<repository>mvn:org.opendaylight.ovsdb/features-ovsdb/{{VERSION}}/xml/features</repository>
<repository>mvn:org.opendaylight.neutron/features-neutron/{{VERSION}}/xml/features</repository>
<repository>mvn:org.opendaylight.nic/features-nic/{{VERSION}}/xml/features</repository>
+ <repository>mvn:org.opendaylight.ovsdb/hwvtepsouthbound-features/{{VERSION}}/xml/features</repository>
<feature name='odl-vpnservice-api' version='${project.version}' description='OpenDaylight :: vpnservice :: api '>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<feature name='odl-vpnservice-impl' version='${project.version}' description='OpenDaylight :: vpnservice :: impl '>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<feature version="${ovsdb.version}">odl-ovsdb-southbound-impl-rest</feature>
+ <feature version='${ovsdb.version}'>odl-ovsdb-hwvtepsouthbound</feature>
<feature version='${project.version}'>odl-vpnservice-api</feature>
<feature version="${openflowplugin.version}">odl-openflowplugin-southbound</feature>
<feature version="${openflowplugin.version}">odl-openflowplugin-flow-services</feature>
<artifactId>alivenessmonitor-api</artifactId>
<version>${vpnservices.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-broker-impl</artifactId>
+ </dependency>
<dependency>
<groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>southbound-api</artifactId>
+ <artifactId>hwvtepsouthbound-api</artifactId>
<version>${vpns.ovsdb.version}</version>
</dependency>
<dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-broker-impl</artifactId>
+ <groupId>org.opendaylight.ovsdb</groupId>
+ <artifactId>southbound-api</artifactId>
+ <version>${vpns.ovsdb.version}</version>
</dependency>
</dependencies>
</project>
--- /dev/null
+/*
+ * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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
+ */
+package org.opendaylight.vpnservice.interfacemgr.listeners;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.vpnservice.datastoreutils.AsyncDataTreeChangeListenerBase;
+import org.opendaylight.vpnservice.datastoreutils.DataStoreJobCoordinator;
+import org.opendaylight.vpnservice.interfacemgr.renderer.hwvtep.confighelpers.HwVTEPConfigRemoveHelper;
+import org.opendaylight.vpnservice.interfacemgr.renderer.hwvtep.confighelpers.HwVTEPInterfaceConfigAddHelper;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.IfL2vlan;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.IfTunnel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.ParentRefs;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.TunnelTypeVxlan;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.interfaces._interface.NodeIdentifier;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+import java.util.concurrent.Callable;
+
+public class HwVTEPConfigListener extends AsyncDataTreeChangeListenerBase<Interface, HwVTEPConfigListener> {
+ private static final Logger LOG = LoggerFactory.getLogger(HwVTEPConfigListener.class);
+ private DataBroker dataBroker;
+
+ public HwVTEPConfigListener(final DataBroker dataBroker) {
+ super(Interface.class, HwVTEPConfigListener.class);
+ this.dataBroker = dataBroker;
+ }
+
+ @Override
+ protected InstanceIdentifier<Interface> getWildCardPath() {
+ return InstanceIdentifier.create(Interfaces.class).child(Interface.class);
+ }
+
+ @Override
+ protected void remove(InstanceIdentifier<Interface> key, Interface interfaceOld) {
+ // HwVTEPs support only vxlan
+ IfTunnel ifTunnel = interfaceOld.getAugmentation(IfTunnel.class);
+ if (ifTunnel != null && ifTunnel.getTunnelInterfaceType().isAssignableFrom(TunnelTypeVxlan.class)) {
+ ParentRefs parentRefs = interfaceOld.getAugmentation(ParentRefs.class);
+ if (parentRefs != null) {
+ for(NodeIdentifier nodeIdentifier : parentRefs.getNodeIdentifier()) {
+ if(nodeIdentifier.getNodeId().equals("hwvtep:1")) {
+ DataStoreJobCoordinator coordinator = DataStoreJobCoordinator.getInstance();
+ RendererConfigRemoveWorker configWorker = new RendererConfigRemoveWorker(key, interfaceOld, parentRefs);
+ coordinator.enqueueJob(interfaceOld.getName(), configWorker);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ protected void update(InstanceIdentifier<Interface> key, Interface interfaceOld, Interface interfaceNew) {
+ // TODO
+ }
+
+ @Override
+ protected void add(InstanceIdentifier<Interface> key, Interface interfaceNew) {
+ // HwVTEPs support only vxlan
+ IfTunnel ifTunnel = interfaceNew.getAugmentation(IfTunnel.class);
+ if (ifTunnel != null && ifTunnel.getTunnelInterfaceType().isAssignableFrom(TunnelTypeVxlan.class)) {
+ ParentRefs parentRefs = interfaceNew.getAugmentation(ParentRefs.class);
+ if (parentRefs != null) {
+ for(NodeIdentifier nodeIdentifier : parentRefs.getNodeIdentifier()) {
+ if(nodeIdentifier.getNodeId().equals("hwvtep:1")) {
+ DataStoreJobCoordinator coordinator = DataStoreJobCoordinator.getInstance();
+ RendererConfigAddWorker configWorker = new RendererConfigAddWorker(key, interfaceNew, parentRefs);
+ coordinator.enqueueJob(interfaceNew.getName(), configWorker);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ protected HwVTEPConfigListener getDataTreeChangeListener() {
+ return HwVTEPConfigListener.this;
+ }
+
+ private class RendererConfigAddWorker implements Callable<List<ListenableFuture<Void>>> {
+ InstanceIdentifier<Interface> key;
+ Interface interfaceNew;
+ IfL2vlan ifL2vlan;
+ ParentRefs parentRefs;
+
+ public RendererConfigAddWorker(InstanceIdentifier<Interface> key, Interface interfaceNew,
+ ParentRefs parentRefs) {
+ this.key = key;
+ this.interfaceNew = interfaceNew;
+ this.ifL2vlan = ifL2vlan;
+ this.parentRefs = parentRefs;
+ }
+
+ @Override
+ public List<ListenableFuture<Void>> call() throws Exception {
+ return HwVTEPInterfaceConfigAddHelper.addConfiguration(dataBroker, parentRefs, interfaceNew);
+ }
+ }
+
+ private class RendererConfigRemoveWorker implements Callable<List<ListenableFuture<Void>>> {
+ InstanceIdentifier<Interface> key;
+ Interface interfaceOld;
+ ParentRefs parentRefs;
+
+ public RendererConfigRemoveWorker(InstanceIdentifier<Interface> key, Interface interfaceOld,
+ ParentRefs parentRefs) {
+ this.key = key;
+ this.interfaceOld = interfaceOld;
+ this.parentRefs = parentRefs;
+ }
+
+ @Override
+ public List<ListenableFuture<Void>> call() throws Exception {
+ return HwVTEPConfigRemoveHelper.removeConfiguration(dataBroker, interfaceOld, parentRefs);
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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
+ */
+package org.opendaylight.vpnservice.interfacemgr.renderer.hwvtep.confighelpers;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.vpnservice.interfacemgr.IfmUtil;
+import org.opendaylight.vpnservice.interfacemgr.commons.InterfaceManagerCommonUtils;
+import org.opendaylight.vpnservice.interfacemgr.commons.InterfaceMetaUtils;
+import org.opendaylight.vpnservice.interfacemgr.renderer.ovs.utilities.SouthboundUtils;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface.OperStatus;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.idmanager.rev150403.IdManagerService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007._interface.child.info.InterfaceParentEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007._interface.child.info.InterfaceParentEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007._interface.child.info._interface.parent.entry.InterfaceChildEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007.bridge._interface.info.BridgeEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007.bridge._interface.info.BridgeEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007.bridge._interface.info.bridge.entry.BridgeInterfaceEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007.bridge._interface.info.bridge.entry.BridgeInterfaceEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007.bridge.ref.info.BridgeRefEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.meta.rev151007.bridge.ref.info.BridgeRefEntryKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.IfL2vlan;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.IfTunnel;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.ParentRefs;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+public class HwVTEPConfigRemoveHelper {
+ private static final Logger LOG = LoggerFactory.getLogger(HwVTEPConfigRemoveHelper.class);
+
+ public static List<ListenableFuture<Void>> removeConfiguration(DataBroker dataBroker, Interface interfaceOld,
+ ParentRefs parentRefs) {
+ List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ LOG.debug("removing hwvtep configuration for {}", interfaceOld.getName());
+
+ // TODO delete hwvtep through ovsdb plugin
+ return futures;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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
+ */
+package org.opendaylight.vpnservice.interfacemgr.renderer.hwvtep.confighelpers;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.ParentRefs;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+
+public class HwVTEPInterfaceConfigAddHelper {
+ private static final Logger LOG = LoggerFactory.getLogger(HwVTEPInterfaceConfigAddHelper.class);
+
+ public static List<ListenableFuture<Void>> addConfiguration(DataBroker dataBroker, ParentRefs parentRefs,
+ Interface interfaceNew) {
+ List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ LOG.debug("adding hwvtep configuration for {}", interfaceNew.getName());
+
+ // TODO create hwvtep through ovsdb plugin
+ return futures;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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
+ */
+package org.opendaylight.vpnservice.interfacemgr.renderer.hwvtep.statehelpers;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.idmanager.rev150403.IdManagerService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.ParentRefs;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class HwVTEPInterfaceStateAddHelper {
+ private static final Logger LOG = LoggerFactory.getLogger(HwVTEPInterfaceStateAddHelper.class);
+
+ public static List<ListenableFuture<Void>> addConfiguration(DataBroker dataBroker, ParentRefs parentRefs,
+ Interface interfaceNew, IdManagerService idManager) {
+ List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ LOG.debug("HwVTEP Interface State Add Helper");
+ return futures;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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
+ */
+package org.opendaylight.vpnservice.interfacemgr.renderer.hwvtep.statehelpers;
+
+import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.idmanager.rev150403.IdManagerService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.interfacemgr.rev150331.ParentRefs;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class HwVTEPInterfaceStateRemoveHelper {
+ private static final Logger LOG = LoggerFactory.getLogger(HwVTEPInterfaceStateRemoveHelper.class);
+
+ public static List<ListenableFuture<Void>> addConfiguration(DataBroker dataBroker, ParentRefs parentRefs,
+ Interface interfaceNew, IdManagerService idManager) {
+ List<ListenableFuture<Void>> futures = new ArrayList<ListenableFuture<Void>>();
+ LOG.debug("HWvTEP state remove helper");
+ return futures;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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
+ */
+package org.opendaylight.vpnservice.interfacemgr.renderer.hwvtep.utilities;
+
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Uri;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SouthboundUtils {
+ private static final Logger LOG = LoggerFactory.getLogger(SouthboundUtils.class);
+ public static final TopologyId HWVTEP_TOPOLOGY_ID = new TopologyId(new Uri("hwvtep:1"));
+}
\ No newline at end of file