netvirt.git
7 years agoBug 7839: ACL: ACL flows are not deleted from source host during VM 75/52175/5
Shashidhar Raja [Wed, 22 Feb 2017 13:29:52 +0000 (18:59 +0530)]
Bug 7839: ACL: ACL flows are not deleted from source host during VM
migration

    - In the current code, ACL flows are being added in Interface state
      listener and deleted from Interface config listener. As during
      migration, only interface state listener gets triggered, Config
      Interface and Interface state listeners are re-formatted slightly as
      explained below to fix this issue and also to support delete VM
      without any problems.
      Details of changes are as below:
      (a) bind/unbind moved to Config interface listener
      (b) All other ACL flows programming (add/delete) now being done from
      Interface state listener

    - Also, bind/unbind service code is updated to use
      DataStoreJobCoordinator to avoid ConflictingModificationExceptions

Change-Id: I4cf0c0d58eecbceafbed740f0201e128c196f555
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
7 years agoreleasing dcn thread once tunnel interface state dcn delivered 81/51781/10
Periyasamy Palanisamy [Mon, 13 Feb 2017 10:39:38 +0000 (16:09 +0530)]
releasing dcn thread once tunnel interface state dcn delivered

* This change is about releasing dataTreeChangeHandlerExecutor's thread
immediately after DCN is delivered to service module. This allows to
improve DataTreeChangeListener notification time when there are multiple
listerners listening to same data tree path.
* For ELAN, DJC is used to run tunnel interface state DCN related tasks in async
way using ElanUtils#getElanInterfaceJobKey

Change-Id: If3128e623ac3eae81fbec17320bf54d425b7f6f5
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
7 years agoCreating default FIB router flows for external subnets. 05/51305/20
yair [Wed, 1 Feb 2017 15:25:27 +0000 (17:25 +0200)]
Creating default FIB router flows for external subnets.

This is part of the Hairpinning tasks.
It will install on the FIB table (21) default flow for every external subnet.
The flow match is based on the VPN ID for the external subnet.

Change-Id: I870696a3cbe186bb43a6997b6c8c6a577b2c008d
Signed-off-by: yair <yair.zinger@hpe.com>
7 years agoBug 7843 - Missing buckets in ELAN BC group installation during OVS restart 11/52211/2
Tali [Thu, 23 Feb 2017 13:35:25 +0000 (15:35 +0200)]
Bug 7843 - Missing buckets in ELAN BC group installation during OVS restart

L2 pipeline can contain malformed flows/groups if OVS restart occurs in parallel
due to oper DS temp delete during restart
Possible solution would be to check for config DS inventory node instead of oper DS
so flows would be restored with correct content after the OVS is up again

Change-Id: I5aee6c2af85bca1beb98dab52bfa9181975192b1
Signed-off-by: Tali <tali.ben-meir@hpe.com>
7 years agoSupport for multiple route paths 10/49010/29
Kency Kurian [Wed, 8 Feb 2017 06:03:02 +0000 (11:33 +0530)]
Support for multiple route paths

- Modified odl-fib.yang to support multiple route-paths for the same
  destination prefix.
- Added a FibHelper which provides util methods to construct VrfEntry.

Change-Id: I7bcd3b77ac452476b4190286c1f3e8815a1b8819
Signed-off-by: Kency Kurian <kency.kurian@ericsson.com>
7 years agoBug 7773: Objects should be compared with "equals()". 95/51995/2
Hideyuki Tai [Thu, 26 Jan 2017 01:56:17 +0000 (01:56 +0000)]
Bug 7773: Objects should be compared with "equals()".

Additional changes:
 * Removed unnecessary repetitive calls.

Change-Id: I607ce073ee9ec4289c80dccd96a4b5222e4d9772
Signed-off-by: Hideyuki Tai <Hideyuki.Tai@necam.com>
Signed-off-by: arthi.b <arthi.b@hcl.com>
7 years agoUse OFtunnels when configuring automatic tunnels 08/48708/4
Vishal Thapar [Fri, 25 Nov 2016 16:36:22 +0000 (22:06 +0530)]
Use OFtunnels when configuring automatic tunnels

Refer: https://git.opendaylight.org/gerrit/48694

Change-Id: I12b38946d779e267729ae6e6d1713529a86060cb
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
7 years agoCheckstyle: fix new ParenPad violations 60/52160/2
Lorand Jakab [Wed, 22 Feb 2017 10:23:23 +0000 (12:23 +0200)]
Checkstyle: fix new ParenPad violations

Enforcing no space(s) after a left parenthesis and before a right
parenthesis is a proposed change [0] which can only be merged when all
violations are fixed in projects enforcing checkstyle. This patch fixes
new violations since [1] was merged.

[0] https://git.opendaylight.org/gerrit/#/c/51316/
[1] https://git.opendaylight.org/gerrit/#/c/51704/

Change-Id: Id1bcbad79a5db7ffd8ce1eafae020f2895034c68
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
7 years agoBug 7786 Delete and re add of access port handling 95/51795/5
Akash [Mon, 13 Feb 2017 15:39:44 +0000 (21:09 +0530)]
Bug 7786 Delete and re add of access port handling

After deleting access port in l2gw device and upon readding , vlan
bindings were missing .
Fix is to resync upon such case from config topology.

Change-Id: I993616f6ea90312af2ae5830e444c1918f8b48bb
Signed-off-by: Akash <a.k.sahu@ericsson.com>
7 years agoBug 7772 - Service Chaining is not being applied to VMs in the L3VPN 80/51680/7
Miguel Perez [Mon, 16 Jan 2017 17:30:16 +0000 (18:30 +0100)]
Bug 7772 - Service Chaining is not being applied to VMs in the L3VPN

 + Problem: Ping from outside DC-GW to a VM located inside DC-GW
   works well in the Uplink, that is, packets going from outside
   DC-GW towards the VM are hijacked by SCF Pipeline and delivered
   to VM. However, when VM responds (Downlink), the packets are sent
   to DC-GW right away via L3VPN pipeline. Service Chaining is not
   applied for the return path.

 + Solution: try to divert to SCF Pipeline the packets that come from
   the VM too, not only the packets coming from the external Tunnel
   port.

 + How: by adding a listener on VpnInterface on CONFIG DS.
   When a VpnInterface is added, the listener checks if its VPN is
   involved in a ServiceChain or not. If so, the interface is bound
   to SCF too.

 + This commit is requiered in stable/boron SR3. The Gerrit change URL:
   https://git.opendaylight.org/gerrit/51681

Change-Id: Id1051bc8ec180589583a76524c0b2d456ba7b85a
Signed-off-by: Marcos López Samaniego <marcos.lopez.samaniego@ericsson.com>
7 years agoAdd ability to punt LLDP packets to controller 21/50521/9
Yakir Dorani [Mon, 16 Jan 2017 18:19:05 +0000 (20:19 +0200)]
Add ability to punt LLDP packets to controller

Change-Id: Ib6bdd0377e055def3ab7c18f45ef2bf0905b9eb3
Signed-off-by: Yakir Dorani <yakir.dorani@hpe.com>
7 years agoCleanup ivpnLink unused code + small modifications 81/49881/9
Miguel Perez [Fri, 30 Dec 2016 18:59:06 +0000 (19:59 +0100)]
Cleanup ivpnLink unused code + small modifications

 + This is the 1st change to cleanup/refactor InterVpnLink code

 + 3 new utility methods in InterVpnLinkDataComposite
 + add.getName() replaced by IvpnLinkName in InterVpnLinkListener

Change-Id: Icf7e29d9f77f53cc3d06620f60e8fab7efd464da
Signed-off-by: Miguel Perez <francisco.miguel.perez@ericsson.com>
7 years agoAdding debug statements to track caching of Operational Vpn Instances 18/52118/3
eupakir [Tue, 21 Feb 2017 15:35:21 +0000 (21:05 +0530)]
Adding debug statements to track caching of Operational Vpn Instances

Change-Id: I0bb17dec5714e8f68085bf1b70e2b2fa1f2f16ae
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
7 years agoAdd Trunks support 76/50676/14
Vishal Thapar [Mon, 16 Jan 2017 15:55:29 +0000 (21:25 +0530)]
Add Trunks support

This adds hooks to bring Neutron Trunk configuration into netvirt.
Genius/IFM already has required parameters to support this.

Change-Id: Ic087c0b9a7d1c27d880533331164ae3af0a1fabb
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
7 years agoFixed NodeConnectedHandlerTest with AbstractConcurrentDataBrokerTest 90/51490/4
Michael Vorburger [Mon, 6 Feb 2017 23:56:15 +0000 (00:56 +0100)]
Fixed NodeConnectedHandlerTest with AbstractConcurrentDataBrokerTest

use new AbstractConcurrentDataBrokerTest instead of @deprecated
AbstractDataBrokerTest, and manage the impacts this had in
NodeConnectedHandlerTest (which was a bit of a mess; e.g. we typically
shouldn't mix a Mockito mocked transaction with a real one... and we
need to wait for DataBroker submit() to process via a get() before
asserting something)

Bug: 7538
Change-Id: I15ed9908b03d56bd84c4f637fc83fc62328f6f11
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBug 7780 : NAT RPC's for getting SNAT/DNAT translation information. 71/51771/13
cgowdru [Mon, 13 Feb 2017 08:07:38 +0000 (13:37 +0530)]
Bug 7780 : NAT RPC's for getting SNAT/DNAT translation information.

Description : With the Current DS structure, it's is bit difficult to
identify information about what is the current DNAT/SNAT configuration
done fo the given router-uuid/vpn-uuid.

It would be good if we have a RPC's which can provide a information as
below.

input- router-uuid/vpn-uuid

SNAT output - router-name, internal-ip/port, external-ip/port,protocol
DNAT output - router-name,internal-ip,floating-ip

Change-Id: I00b6576d2a752b53e94ad28c611a06794c65456c
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
7 years agoFix several NPEs showing up in CSIT 65/51765/5
Alon Kochba [Sun, 12 Feb 2017 16:29:05 +0000 (18:29 +0200)]
Fix several NPEs showing up in CSIT

1. ElanUtils - an ELAN instance can have no segments
2. TEPChangeListener - TEP could be missing in interfaces-state
3. VpnInterfaceManager - gateway IP/MAC could be missing when creating
ARP responder flows.
4. BgpConfigurationManager - NextHop in list could be null
5. TransportZoneNoticationUtil - not all interfaces have a neutron port

Change-Id: Ibbf6e5834cd01389e29e36736073927cdd3dbb1a
Signed-off-by: Alon Kochba <alonko@hpe.com>
7 years agoAdding missing <name> to poms 23/52023/3
Jamo Luhrsen [Sat, 18 Feb 2017 02:05:17 +0000 (18:05 -0800)]
Adding missing <name> to poms

looking at the output of a build, it seems we missed a few of these. I think this
might catch the rest of them.

Change-Id: I6311c42f71f1a63bf61a4215a8325b5929c04ce0
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
7 years agoBug 7392: L2 Forwarding Table=110 Flows Missing 53/51653/2
hari.pr [Fri, 3 Feb 2017 18:07:56 +0000 (23:37 +0530)]
Bug 7392: L2 Forwarding Table=110 Flows Missing

 * Problem:  While creation of very first subnet or Vm in CSIT environment,
              respective 110 flow is missing in openstack nodes.
 * Solution: Installed missing table#110 flows as part of Vxlan interface request.

Change-Id: Ie7eb35b50aaaafa79fd8ed0f0893ab37156f431e
Signed-off-by: hari.pr <hari.pr@hcl.com>
(cherry picked from commit afdb2934eeea67006631cd313c6581772ed4230d)

7 years agoFix priority in IntervpnLink flows installed in LFIB 06/51906/3
Miguel Perez [Wed, 15 Feb 2017 14:08:55 +0000 (15:08 +0100)]
Fix priority in IntervpnLink flows installed in LFIB

 + InterVpnLink flows installed in LFIB must have higher priority than
   regular ones (which is typically 1 or 10)

Change-Id: Ifb6a6e8d91f83b65ffda356cd16ad878a1ae11ee
Signed-off-by: Miguel Perez <francisco.miguel.perez@ericsson.com>
7 years agoSpec template cleanup 15/52015/2
Sam Hague [Fri, 17 Feb 2017 21:35:11 +0000 (16:35 -0500)]
Spec template cleanup

Change-Id: I330e46f82deea26bd24a73ca2d08a337b0d7fc12
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoEVPN spec changes to address few extra use-cases for NAT 77/51377/8
karthikeyan [Fri, 3 Feb 2017 06:54:21 +0000 (12:24 +0530)]
EVPN spec changes to address few extra use-cases for NAT

Updated NAT Section for following Use Cases to Support EVPN_RT5
1) DNAT to DNAT Traffic (Intra DC)
2) SNAT to DNAT Traffic (Intra DC)
3) Non-NAPT to NAPT Forward and Reverse Traffic

Change-Id: I6d88f4e2f6df465475f806429b35bf9480366701
Signed-off-by: karthikeyan <karthikeyan.k@altencalsoftlabs.com>
7 years agoBug: 7483 Implement IPv6 component tests in ACLService 44/50044/12
Janki [Thu, 2 Feb 2017 14:53:48 +0000 (20:23 +0530)]
Bug: 7483 Implement IPv6 component tests in ACLService

This is based on and inspired by the similar IPv4 tests

Change-Id: I2a5416992d178c8bfd99c5822005462f0536e44f
Signed-off-by: Janki <jchhatba@redhat.com>
7 years agoFix potential NPEs in ELAN tunnel handling 55/51955/5
Alon Kochba [Wed, 15 Feb 2017 19:16:03 +0000 (21:16 +0200)]
Fix potential NPEs in ELAN tunnel handling

We encountered null ElanInfos in CSIT after deletion
of all the interfaces via REST in BFD Monitoring suite,
this should not prevent other elanDpns from processing.

Change-Id: I465b62cb5133e6aea5326eb4219fc82a70eab70e
Signed-off-by: Alon Kochba <alonko@hpe.com>
7 years agoadding lport tag for temporary mac learning 94/51894/5
Periyasamy Palanisamy [Wed, 15 Feb 2017 09:48:15 +0000 (15:18 +0530)]
adding lport tag for temporary mac learning

* loading lport tag into NxmNxReg1 while binding elan service
to the interface.
* adding NxmNxReg1 match for table 49 using relearn action

Change-Id: I2914c08157bf33fdb033b7656f1692b6be3ea690
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
7 years agoImprove log messages. 16/51916/2
Hideyuki Tai [Wed, 25 Jan 2017 21:43:00 +0000 (21:43 +0000)]
Improve log messages.

* Correct wrong messages.
* Change the log level of some messages into the appropriate level.

Change-Id: I3e238611ebc9c9fc42aa800caa2a44621880c9aa
Signed-off-by: Hideyuki Tai <Hideyuki.Tai@necam.com>
7 years agoBUG 7717 Fix OOM when defining large number of networks 56/51356/3
Vinh Nguyen [Wed, 1 Feb 2017 01:06:50 +0000 (17:06 -0800)]
BUG 7717 Fix OOM when defining large number of networks

Use NodeId instead of Node as key for the cache
ProviderNetworkManagerImpl::nodeToProviderMapping
The size bridge Node object is huge when there are
large number of network/subnets on the bridge.

Change-Id: I6956318477dfa524ce20680d12bba3c7818540ec
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
7 years agoUpdate netvirt guide - correct DB DROP procedure 04/51904/2
Alon Kochba [Wed, 15 Feb 2017 13:28:30 +0000 (15:28 +0200)]
Update netvirt guide - correct DB DROP procedure

Change-Id: I99d19c118d05ade5a9c77f6a98f75abb1b8c7ddc
Signed-off-by: Alon Kochba <alonko@hpe.com>
7 years agoBug 7790 - Attempting to install RNH on local DPN for FIB with custom instructions 46/51846/11
Tali [Thu, 16 Feb 2017 13:27:24 +0000 (15:27 +0200)]
Bug 7790 - Attempting to install RNH on local DPN for FIB with custom instructions

On VxLAN network there is no severe side affect other than trashing the log
For VLAN/flat networks this is a major issue since VrfEntryListener is not able to
find any local DPN hence all FIB entries are considered RNH and the actual local
FIB entry created using FibRpcService.createFibEntry() will be overridden by the
faulty RNH on the local DPN.

Change-Id: If703d71a6d92c1fb5bff2d0c5fec28f3519649c9
Signed-off-by: Tali <tali.ben-meir@hpe.com>
7 years agoECMP: L3VPN Yang changes and extra route rd selection. 67/48967/23
eceghkl [Mon, 5 Dec 2016 07:17:34 +0000 (12:47 +0530)]
ECMP: L3VPN Yang changes and extra route rd selection.

* This change contains selection of rd for an extra route from
  the list of configred rds. A new rd is allocated for an extra
  route if the new extra route is behind a different CSS.
* The selected rd for an extra route is advertised to quagga
* Vpn-to-extraroute container is modifed to include vrf-id
* New yang container is added for storing rds used for an
  extra-route

Change-Id: I4d427d8308d047a9667cd4247e53742df473b53a
Signed-off-by: eceghkl <manu.b@ericsson.com>
7 years agoFix BFD regression 17/51917/5
Tali [Wed, 15 Feb 2017 16:26:15 +0000 (18:26 +0200)]
Fix BFD regression

When tunnel and elan-interface goes up in parallel, there is a race in writing
DMAC flows. The result could be DMAC flow with drop action for the affected interface

Change-Id: I080e222025d59f0b482cd6c07563c168646afc76
Signed-off-by: Tali <tali.ben-meir@hpe.com>
7 years agoUse Objects equals instead of == where necessary 80/51480/6
Alon Kochba [Mon, 6 Feb 2017 19:24:16 +0000 (21:24 +0200)]
Use Objects equals instead of == where necessary

This might actually fix bugs and change behavior,
there were places where Java objects were compared
using == instead of equals(), this patch corrects
those cases.

Change-Id: I6996e168966fb660d62cca3e4c81635a6c1f6b06
Signed-off-by: Alon Kochba <alonko@hpe.com>
7 years agoBug 7775: Using DJC for NAT Interface-state Listeners 83/51783/12
cgowdru [Mon, 13 Feb 2017 12:34:47 +0000 (18:04 +0530)]
Bug 7775: Using DJC for NAT Interface-state Listeners

Description : With mdsalutil is having a THREAD_POOL_SIZE=1, all the
add(), update(), and remove() methods handling the application logic were
on the same thread. This in turn was delaying all the interface-state
listeners.

Changes are done to make use of DataJobCordinator so that all the NAT
application logic get executed by a seperate thread so that the main
thread is freed-up for other listener execution.

Change-Id: I0c7f3f70715b01a2dcb54d251a36a2f9ff21357e
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
7 years agoSpec for VNI based L2 switching, L3 forwarding and NATing 40/48640/30
Abhinav Gupta [Wed, 23 Nov 2016 13:27:24 +0000 (18:57 +0530)]
Spec for VNI based L2 switching, L3 forwarding and NATing

1. Added specification document for VNI based L2 switching, L3
forwarding and NATing
2. Linked spec to specs/index

This spec is a first step in the direction of enforcing datapath
semantics that uses tenant supplied VNI values on VXLAN Type networks
created by tenants in Openstack Neutron.

Earlier the datapath semantics for VXLAN traffic from tenants were
realized by using either LportTags (or) MPLS Labels being carried as
VNI values, even though the networks created by the tenant were of
type VXLAN.

Please note that implementation of Spec DOES NOT COMPLETELY remove
usage of LPortTags (or) ElanTags (or) MPLS Labels.

It retains the use of MPLSLabels for realizing an L3 BGPVPN
(regardless of type of networks put into such BGPVPN that may include
networks of type VXLAN) both on the wire and within the OVS Datapaths.

It also retains the use of LPortTags within the OVS Datapath of a
hypervisor, for streaming traffic to the right virtual endpoint on that
hypervisor (note: not on the wire).

It retains the use of ELANTags within the OVS Datapath to handle
local/remote L2 broadcasts (note: not on the wire)

On the cloud data network wire, all the VXLAN traffic for basic L2
Switching within a VXLAN network and L3 Forwarding across VXLAN-type
networks using Routers will use tenant supplied VNI values for such
VXLAN networks.

Complete removal of use of LPortTags and MPLS Labels for VXLAN-type
networks has large scale design/pipeline implications and thus need to
be attempted as future initiatives via respective specs.

Change-Id: I708243b75fb83ce94064b7214af2709ee82914f4
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
Signed-off-by: cgowdru <chetan.arakere@altencalsoftlabs.com>
7 years agoCreating vpn-instance for external subnets for flat/vlan. 36/50136/22
yair [Mon, 9 Jan 2017 15:47:04 +0000 (17:47 +0200)]
Creating vpn-instance for external subnets for flat/vlan.

This is the first task for the Hairpinning issue.
Added new model to odl-nat for external-subnets.
For each subnet of flat/vlan external network will create vpn-instance.

Change-Id: Ie3cb34f0746c9a06d0b2fda009fb69da3522c8e6
Signed-off-by: yair <yair.zinger@hpe.com>
7 years agoBUG 7729: Remove redundant tunnel drop flow in table 110 52/51652/2
Vinh Nguyen [Sat, 4 Feb 2017 01:30:47 +0000 (17:30 -0800)]
BUG 7729: Remove redundant tunnel drop flow in table 110

- Remove methods: L2ForwardingService::programLocalTableMiss
  and L2ForwardingService::programTunnelMiss. Both methods
  generate the same tunnel drop flows in table 110.
  The drop flows for individual tunnels are not needed
  since there is a default drop flow in the same table.

- Remove the method L2ForwardingService::programVlanFloodOut
  which is not used.

Change-Id: I0fb826094b6c03e58fb89c95600e7b84bc2c774f
Signed-off-by: Vinh Nguyen <vinh.nguyen@hcl.com>
(cherry picked from commit a3a91c1c01d294a8e36662284c4cc82a2749c2e1)

7 years agoSpec to support IPv6 North-South support for Flat/VLAN Provider Network 09/49909/5
Sridhar Gaddam [Sun, 1 Jan 2017 17:01:40 +0000 (22:31 +0530)]
Spec to support IPv6 North-South support for Flat/VLAN Provider Network

Change-Id: Idd84aad01afa7d599e69ca3663f1d49a865a27b6
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
7 years agoFix regression in auto tunnels - listen on Interface 77/51777/5
Alon Kochba [Mon, 13 Feb 2017 09:55:01 +0000 (11:55 +0200)]
Fix regression in auto tunnels - listen on Interface

This patch https://git.opendaylight.org/gerrit/49908
introduced a behavior change in how parentRefs are used.
Refactor the auto-tunnel behavior to listen on Interface
from config instead of Interface State, to take into
account any change in parentRefs and in any order.

Change-Id: Iee459634fab97eba5f76dbe7ae70caa00a48f3b4
Signed-off-by: Alon Kochba <alonko@hpe.com>
7 years agoCheckstyle: fix new ParenPad violations 04/51704/1
Lorand Jakab [Fri, 10 Feb 2017 23:39:51 +0000 (01:39 +0200)]
Checkstyle: fix new ParenPad violations

Enforcing no space(s) after a left parenthesis and before a right
parenthesis is a proposed change [0] which can only be merged when all
violations are fixed in projects enforcing checkstyle. This patch fixes
new violations since [1] was merged.

[0] https://git.opendaylight.org/gerrit/#/c/51316/
[1] https://git.opendaylight.org/gerrit/#/c/51414/

Change-Id: Id68cac28db2911f552fd9951a027bbcfd99faf76
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
7 years agoEnhancement to support list of rds for l3vpn 07/51507/8
eceghkl [Tue, 7 Feb 2017 10:05:57 +0000 (15:35 +0530)]
Enhancement to support list of rds for l3vpn

* This review contains enhancement to support list of rds while
    creating l3vpn instances.
* Primary rd is obtained from the list of rds which will be used
  as route distinguisher for primary adjacencies.

Change-Id: Ib8d0dd41712c734b5868c5dc87ee0e54e547ff34
Signed-off-by: eceghkl <manu.b@ericsson.com>
7 years agoFixing checkstyle changes in BgpManager. 19/51619/2
Kency Kurian [Thu, 9 Feb 2017 12:02:00 +0000 (17:32 +0530)]
Fixing checkstyle changes in BgpManager.

After the checkstyle fixes, if stale path is not passed NPE is thrown.
Fixed that by adding a variable which defaults to 0 if stale path is not
provided.

Change-Id: Ia84ec51913dcb2465b9fa408b1a37be08ea33b3c
Signed-off-by: Kency Kurian <kency.kurian@ericsson.com>
7 years agoBUG7748: Subnet-op-data empty after cluster reboot 74/51474/7
Suraj Ranjan [Mon, 6 Feb 2017 16:06:37 +0000 (21:36 +0530)]
BUG7748: Subnet-op-data empty after cluster reboot

SubnetAddToVpn notification is fired from add() of SubnetMapListener
also instead of firing from update() only.The reason for doing this is
after reboot this event comes in subnetmap add().

Change-Id: I766e3836cbe8b0eafbf5fbb52791ca96eb6ccfa9
Signed-off-by: Suraj Ranjan <suraj.ranjan@ericsson.com>
7 years agoBug 7680: Fix Nexthop when advertising to DCGW 73/51573/3
Miguel Perez [Wed, 8 Feb 2017 17:24:13 +0000 (18:24 +0100)]
Bug 7680: Fix Nexthop when advertising to DCGW

 + for static routes whose nexthop is a VM, the leaked route to the other
   VPN was being advertised to DCGW with the DPN where VM is located as
   the nexthop of the route. However, the nexthop must be the DPN where
   the InterVpnLink has been placed.

Change-Id: I1097e9c992c66053f499807fd411334a7113b509
Signed-off-by: Miguel Perez <francisco.miguel.perez@ericsson.com>
7 years agoFixed Netvirt Build Breakage 66/51566/1
eupakir [Wed, 8 Feb 2017 16:16:31 +0000 (21:46 +0530)]
Fixed Netvirt Build Breakage

Change-Id: I7b9523a849b61071acb1c712d50e4fa2f8d6180e
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
7 years agobug 7599 hwvtep ucast mac add performance improv 08/51508/5
Akash [Tue, 7 Feb 2017 09:37:21 +0000 (15:07 +0530)]
bug 7599  hwvtep ucast mac add performance improv

Introduced new listners to listn at subtree of Node
Listens for the node children data updates and propagates the updates
between ha child and parent nodes.
When an operational child node data is updated, it is copied to parent
When a config parent node data is updated , it is copied to all its
children.
Introduced Manager listners , which execute HA operations when non-ha node
becomes HA node.

Change-Id: I11f7aec8c9b9006ee3d71f72129383d27f5a5e47
Signed-off-by: Akash <a.k.sahu@ericsson.com>
7 years agoEthernet VPN Enhancement in BGP and FIB APIs 56/46956/30
eupakir [Fri, 14 Oct 2016 13:38:34 +0000 (19:08 +0530)]
Ethernet VPN Enhancement in BGP and FIB APIs

This review brings in API changes in FIB and BGP manager to support BGP
Ethernet VPN feature in OpenDaylight. This is the fifth in a series of
reviews with 'EVPN_RT5' as the topic.

This review brings in the following things :
1) FIB manager API changes to supply additional parameters for VPN to BGP,
when an L3VPN over VxLAN is created.
2) BGP manager API changes to confirm to thrift API changes and to supply
routes to FIB when BGP gets routes belonging to IP-VRF table of an EVPN.

Change-Id: I72efaa7f079b5aff31774167f10e867a3deea4bc
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
7 years agoBug 7680: leaked routes not advertised to DC-GW 68/50968/13
Miguel Perez [Tue, 24 Jan 2017 17:01:29 +0000 (18:01 +0100)]
Bug 7680: leaked routes not advertised to DC-GW

 + It's been found that the routes that are leaked to DC-GW
   at InterVpnLink creation time (well, at InterVpnLink added
   callback) are correctly advertised to DC-GW. However, the
   routes that are leaked after the InterVpnLink has been
   created are not being advertised to DC-GW.

 + These second type of leaked routes are handled on fibmanager,
   but fibmanager does not have access to BgpManager. So the
   solution consists in moving part of the logic from fibmanager
   to vpnmanager where the BgpManager is accessible.

 + InterVpnLinkService class, which was just an internal class in
   vpnmanager-impl, is renamed to InterVpnLinkLocator whose only
   responsibility is to search for the most suitable DPNs to
   place new InterVpnLinks. The name change is to avoid confusion
   with IVpnLinkServiceImpl which is the implementation of the
   public interface 'IVpnLinkServce'.

 + Besides the renaming of InterVpnLinkService, most of its code
   is moved to IVpnLinkServiceImpl, and that's why this change
   may llok big.

 + Note: there is a <wip> [1] for taking the route leaking out
   of the fibmanager completely.

 [1] https://git.opendaylight.org/gerrit/#/c/48599/

Change-Id: I1a7311345307716ef223c707b22c6ecec66d97a2
Signed-off-by: Miguel Perez <francisco.miguel.perez@ericsson.com>
7 years agoUse OVSDB external-id for Neutron port parent ref 08/49908/30
Alon Kochba [Sun, 1 Jan 2017 16:23:17 +0000 (18:23 +0200)]
Use OVSDB external-id for Neutron port parent ref

This patch removes the logic when a neutron port is added,
to link it to the OVSDB termination point via parentRef.
Filling in this parentRef will be handled by Genius in both orders.

We no longer do the previous behavior of trying to guess the parentRef
by the VIF type - the parentRef will be left empty until such a
termination point is added.

Depends-On: https://git.opendaylight.org/gerrit/49906
Depends-On: https://git.opendaylight.org/gerrit/49907
Change-Id: I86f1f964c363af982c2460d40ef6b7afb7f56e59
Signed-off-by: Alon Kochba <alonko@hpe.com>
7 years agoAdd project info to name in pom files 42/51042/7
Jamo Luhrsen [Wed, 25 Jan 2017 22:46:39 +0000 (14:46 -0800)]
Add project info to name in pom files

Refer to for details on this activity:
https://trello.com/c/EGYoCYXX/11-automated-autorelease-build-failure-notification

Change-Id: I3f6c171fb6f30383a2b5bbe5eda4f02cc1b99a7b
Signed-off-by: Jamo Luhrsen <jluhrsen@redhat.com>
7 years agoBug 7544: L2 control packets that should not be forwarded are forwarded 81/50481/14
Yakir Dorani [Sun, 15 Jan 2017 13:20:15 +0000 (15:20 +0200)]
Bug 7544: L2 control packets that should not be forwarded are forwarded

Currently L2 service is flooding L2 control protocols, which shouldn't be forwarded.
This change installs drop rules for them.

Depends-On: https://git.opendaylight.org/gerrit/#/c/50489
Change-Id: Ifb363f7a641b25ec90e15b649ee0dc720ffd1dc4
Signed-off-by: Yakir Dorani <yakir.dorani@hpe.com>
7 years agobug 7599 added l2gw validate cli 28/51428/7
K.V Suneelu Verma [Sun, 5 Feb 2017 09:14:56 +0000 (14:44 +0530)]
bug 7599 added l2gw validate cli

Added a helper cli to validate various config and operational
data models.
Checks if the config and operational datastore differ
Checks if the ha parent node and child nodes differ
Checks if the logical switches/ mcast macs and vlan bindings
are created for the configured l2gw connection

Change-Id: I96924a520d30985b98508afdaccbe379ef54d76e
Signed-off-by: K.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
7 years agoRevert "bug 7538 fix broken netvirt build" 91/51491/2
Michael Vorburger [Tue, 7 Feb 2017 00:04:31 +0000 (01:04 +0100)]
Revert "bug 7538 fix broken netvirt build"

This reverts commit 76e234c0c44b5449dd0aef8f9cffc195fff0ee3b.

Bug: 7538
Change-Id: Iec202afc77161ffab9459efb391f6bbef23ed1c7
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoEthernet VPN Enhancement to Vpn Engine and FIB. 56/46256/58
eupakir [Mon, 30 Jan 2017 20:14:05 +0000 (01:44 +0530)]
Ethernet VPN Enhancement to Vpn Engine and FIB.

This review brings in code changes in VPN Engine and FIB to support
BGP Ethernet VPN feature in OpenDaylight. This is the third review
with 'EVPN_RT5' topic branch.

This review brings in the following :
1) Code changes to add FIB entries and advertising routes to BGP,
appropriate to the type of VPN being processed.

Change-Id: I92ec69843151b93720a53c17436878707aa0a2b4
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
7 years agoBug 7372 - Supress error of NAPT switch selection failure before router-dpn association 10/49410/7
Tali [Thu, 15 Dec 2016 09:15:07 +0000 (11:15 +0200)]
Bug 7372 - Supress error of NAPT switch selection failure before router-dpn association

NAPT switch selection will take place once the router-dpn association is made
All missing NAPT/non-NAPT flows will be recovered as the result of selection

This review fixes only the log levels.
There can still be some missing NAPT flows in this scenario
The resolution for this is still WIP and covered by
https://bugs.opendaylight.org/show_bug.cgi?id=6866

Change-Id: I494cca69aceb8cc4d564e9bc4d1419894a224de6
Signed-off-by: Tali <tali.ben-meir@hpe.com>
7 years agoSetup SMAC on routed packets destined to virtual endpoints 73/50373/21
karthik.prasad [Thu, 12 Jan 2017 15:27:25 +0000 (20:57 +0530)]
Setup SMAC on routed packets destined to virtual endpoints

All L3 Routed packets destined to virtual endpoints in the datacenter
managed by ODL do not carry a proper source-mac address in such frames
put out to virtual endpoints. With the fix all the packets destined to
virtual endpoints shall have gateway mac as source mac. If gateway mac
is not recoverable for the subnet on which the virtual endpoint resides,
then the connected mac address of that virtual endpoint will be used as
the source mac address.  Here the connected mac address represents the
mac-address on the tapxxx (or) the vhuxxx port on OVS Datapath for that
virtual endpoint.

Use VrfEntry yang model to represent the source mac.

Sample Group Entry:
group_id=150001,type=all,bucket=actions=set_field:fa:16:3e:a1:4b:61->eth_src,set_field:fa:16:3e:21:b8:d3->eth_dst,load:0x300->NXM_NX_REG6[],resubmit(,220)

Spec Reference link:
https://git.opendaylight.org/gerrit/#/c/49807

Change-Id: I2e75215fd75f051135d702ab63cb792b6cf4cb55
Signed-off-by: karthik.prasad <karthik.p@altencalsoftlabs.com>
Signed-off-by: Achuth Maniyedath <achuth.m@altencalsoftlabs.com>
7 years agobug 6589 l2gw cluster reboot fixes 54/49954/18
K.V Suneelu Verma [Tue, 3 Jan 2017 06:43:10 +0000 (12:13 +0530)]
bug 6589 l2gw cluster reboot fixes

registerd the group listener
created the l2gw cache upfront
fixed npe in terminationPoint command

Change-Id: I5e4e4d68e650a2c68d3c7b4bf464dc29815e0d48
Signed-off-by: K.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
7 years agoCheckstyle: fix ParenPad violations 14/51414/2
Lorand Jakab [Fri, 3 Feb 2017 15:45:28 +0000 (17:45 +0200)]
Checkstyle: fix ParenPad violations

Enforcing no space(s) after a left parenthesis and before a right
parenthesis is a proposed change [0] which can only be merged when all
violations are fixed in projects enforcing checkstyle. This patch fixes
those violations.

[0] https://git.opendaylight.org/gerrit/#/c/51316/

Change-Id: I8266ea1698dae071b1ce42128f534eb2ff5e266e
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
7 years agoNeutronVPN: Error out if VxLAN/VLAN network configured without seg-id 04/50604/12
Abhinav Gupta [Thu, 12 Jan 2017 11:10:02 +0000 (16:40 +0530)]
NeutronVPN: Error out if VxLAN/VLAN network configured without seg-id

This adds an error log based on the presence of segmentation-id when VxLAN
or VLAN based neutron networks are configured via Neutron.

Additionally, some cleanup done:
1. Moved some impl specific utils to NeutronVpnUtils
2. Moved constants to NeutronConstants
3. Renamed SubnetMapListener class to SubnetMapChangeListener
4. Removed  unused xml dependency from QosListener

Change-Id: I2d22773e4e7bdfa927c01d679542fa36146e625a
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
7 years agoBug 7714 - Vpn Interface not deleted from oper DS 24/51224/7
Olga Schukin [Tue, 31 Jan 2017 10:35:55 +0000 (12:35 +0200)]
Bug 7714 - Vpn Interface not deleted from oper DS

sometimes Vpn Interface not deleted from operational/l3vpn:vpn-interfaces model,
if there is more than one adjacency to this vpn interface.

Change-Id: I45e4ca20db6c5aa9f5c280fea8726a5ed8aa654b
Signed-off-by: Olga Schukin <olga.schukin@hpe.com>
7 years agoCheckstyle: fix vpnmanager-shell and enforce 12/51312/4
Stephen Kitt [Wed, 1 Feb 2017 17:11:39 +0000 (18:11 +0100)]
Checkstyle: fix vpnmanager-shell and enforce

Change-Id: I0633b725a83f65052fa1d148ff950a1fda3fbf39
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agobug 7538 fix broken netvirt build 51/51451/2
K.V Suneelu Verma [Mon, 6 Feb 2017 07:01:46 +0000 (12:31 +0530)]
bug 7538 fix broken netvirt build

using the same thread executor

Change-Id: Icd5eb4c57c413a307b52b27b961c7b5ffa926e7d
Signed-off-by: K.V Suneelu Verma <k.v.suneelu.verma@ericsson.com>
7 years agoBug 7669: Add multi-provider network support to NetVirt for L2 Gateway. 23/51023/6
Victor Pickard [Tue, 24 Jan 2017 12:10:09 +0000 (07:10 -0500)]
Bug 7669: Add multi-provider network support to NetVirt for L2 Gateway.

Multi-provider network support is needed to be able to support
connecting VLAN based networks to VXLAN based networks,
using L2GW/HWVTEP.

Slides describing the network, and use cases, can be
found here:

https://docs.google.com/presentation/d/13OqyCHwGQABlcno9lVVY2KHVZdNMYz3JiiTRrQj-n98/edit?usp=sharing

Testing
-------
Setup and successfully tested use cases 1-3, as described in
slides above.

Note: There is a corresponding Nova bug that must be fixed
for this to work. Basically, Nova needs to add support
for multi-provider networks. This work is in progress.

Change-Id: Iba4e52210e8c27e0ec35fe68b1fba3970b3a66c8
Signed-off-by: Victor Pickard <vpickard@redhat.com>
7 years agoClean-up: simplify some if statements 12/51412/2
Stephen Kitt [Fri, 3 Feb 2017 16:04:17 +0000 (17:04 +0100)]
Clean-up: simplify some if statements

Generally speaking, reduce

    if (condition) { return true; } else { return false; }

to

    return condition;

Change-Id: I4eb49022c07e5c7af95c21442686dea37ff5eee1
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoReplace mockito-all by mockito-core (see Bug 7662) 74/50874/2
Michael Vorburger [Mon, 23 Jan 2017 18:58:43 +0000 (19:58 +0100)]
Replace mockito-all by mockito-core (see Bug 7662)

Change-Id: I3fbf5b3b1eacc5c5e16d9fdb905525de4f75d877
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBug 7720: create/delete VPN CLI handling addition/removal of subnets 41/51341/5
Abhinav Gupta [Wed, 1 Feb 2017 13:09:40 +0000 (18:39 +0530)]
Bug 7720: create/delete VPN CLI handling addition/removal of subnets

Following changes have been done as part of the bug fix:

1. Addition of subnets to VPN done via associateNetworks RPC
2. Deletion of subnets from VPN done via dissociateNetworks RPC
3. (1) is done only if createVPN succeeds
4. Deletion of VPN is done only if (2) succeeds

Change-Id: I21d25afa6b3ba56dae56abe2536afcfe5f0476b4
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
7 years agospec for providing ECMP over BGP VPN 15/48915/11
Periyasamy Palanisamy [Fri, 2 Dec 2016 09:09:26 +0000 (14:39 +0530)]
spec for providing ECMP over BGP VPN

Change-Id: I08b3376b29882d00efd27be3cd4887a3c8b8e349
Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
7 years agoRemove unused utils.config from neutronvpn 66/51366/3
Sam Hague [Thu, 2 Feb 2017 20:31:13 +0000 (15:31 -0500)]
Remove unused utils.config from neutronvpn

Change-Id: I8c42dc22036af45f4f3e90780e9ef72081eb3914
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoRemove unused utils.config from aclservice 61/51361/2
Sam Hague [Thu, 2 Feb 2017 20:12:11 +0000 (15:12 -0500)]
Remove unused utils.config from aclservice

Change-Id: I9eee035d6b9ff614d476d66fe9f100f5e7fe1fec
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoset it version to match other netvirt versions 62/51362/2
Sam Hague [Thu, 2 Feb 2017 20:21:26 +0000 (15:21 -0500)]
set it version to match other netvirt versions

Change-Id: Iaddb3535bf8e434ad00e970b0e0a037299e479aa
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoUse binding-parent rather than config-parent for api bundles 59/51359/2
Sam Hague [Thu, 2 Feb 2017 19:42:58 +0000 (14:42 -0500)]
Use binding-parent rather than config-parent for api bundles

Change-Id: I76ed9bc8eb5ae8e6aeb1b24d77f9f97adaa18c08
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoPull checkstyle enforcement from parent poms 58/51358/2
Sam Hague [Thu, 2 Feb 2017 18:41:53 +0000 (13:41 -0500)]
Pull checkstyle enforcement from parent poms

vpnmanager-shell defines the severity at warning because it has
not been updated for checkstyle yet. This will be removed once
it is ready.

Change-Id: Idc2d1e3e346e314e2894d6c7554ba5aa713eeca4
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoRemove duplicate lockmanager-api in pom 60/51360/1
Sam Hague [Thu, 2 Feb 2017 19:53:50 +0000 (14:53 -0500)]
Remove duplicate lockmanager-api in pom

Change-Id: I81cb880a99725650cdbc05d1064a6869fd788de8
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoSpec for Conntrack Based SNAT in netvirt 29/49029/30
Aswin Suryanarayanan [Tue, 6 Dec 2016 12:31:11 +0000 (18:01 +0530)]
Spec for Conntrack Based SNAT in netvirt

Change-Id: I1918a5309d7cb26cf9aba5760f5f24f2238869f6
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
7 years agoEthernet VPN Enhancement to NeutronVpn. 53/46253/57
eupakir [Wed, 28 Sep 2016 12:35:53 +0000 (18:05 +0530)]
Ethernet VPN Enhancement to NeutronVpn.

This review brings in code changes in neutronvpn to support
BGP L3VPN support over VxLAN in OpenDaylight. This is the second review
with 'EVPN_RT5' as the topic.

This review bring in the following things :
1) Code changes to service instance and interface creation for L3VPN over
VxLAN in addition to the existing L3VPN over MPLSoGRE.
2) Minor yang change to use a generic VpnInstance data-model in
NeutronVpn, when handling vpn instances through RPC

Change-Id: Ic46cfb8886eb429172151f8f0239a0166468e3ca
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
Signed-off-by: HANAMANTAGOUD V Kandagal <hanamantagoud.v.kandagal@ericsson.com>
7 years agoThrift interface changes to support BGP EVPN. 54/47654/38
Sumanth MS [Thu, 27 Oct 2016 07:15:16 +0000 (12:45 +0530)]
Thrift interface changes to support BGP EVPN.

Thrift interface changes to include information on
protocol type, encapsulation type and the layer type
in the method APIs is incorporated. APIs now include
arguments to support ethernet specific arguments
relevant to evpn feature. OnUpdatePushRoute() and
OnUpdateWithdrawRoute() also changed to support above
mentioned arguments.

Change-Id: I07ce11319dd57de98dfd0776f11628e03e55209a
Signed-off-by: Sumanth MS <sumanth.ms@ericsson.com>
7 years agoFixed compilation issues related to "throws Exception". 40/51340/1
Somashekar Byrappa [Thu, 2 Feb 2017 11:30:20 +0000 (17:00 +0530)]
Fixed compilation issues related to "throws Exception".

Compilation issues due to https://git.opendaylight.org/gerrit/#/c/51073/

Change-Id: I51f2d7c95146c1fe119589fb76699163971aa40c
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
7 years agoYang Model Changes for Ethernet VPN. 47/50347/18
eupakir [Thu, 12 Jan 2017 10:44:37 +0000 (16:14 +0530)]
Yang Model Changes for Ethernet VPN.

This review brings in all the yang model changes required to support BGP
L3VPN support over VxLAN in OpenDaylight. This is a first in a series of
review that will have 'EVPN_RT5' as the topic.

This review has yang model changes in the following modules:
1) NeutronVpn
2) Vpn
3) FIB
4) Model-BGP

Change-Id: Ieb5d1df25aa4ccdce4b05b9ca92569286fc84806
Signed-off-by: eupakir <kiran.n.upadhyaya@ericsson.com>
7 years agoACL: Operation Improvements 32/49432/13
Shashidhar Raja [Thu, 15 Dec 2016 13:58:10 +0000 (19:28 +0530)]
ACL: Operation Improvements

Updated ACL to program "+trk+new" and "+trk+inv" DROP flows with lport tag
as metadata for each of the VM (Neutron port) being added to support drop
packet stats at port level.

Spec reference: https://git.opendaylight.org/gerrit/#/c/49086/

Change-Id: I9cf4934c7334d943c14c52d16a4b3d689c39e62d
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
7 years agoCheckstyle: fix vpnmanager-api and enforce 10/51310/2
Stephen Kitt [Wed, 1 Feb 2017 16:48:04 +0000 (17:48 +0100)]
Checkstyle: fix vpnmanager-api and enforce

Change-Id: I72a0dac453115aa6498c8d62cbd534b57c45c714
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoCheckstyle: fix dhcpservice-api and enforce 09/51309/2
Stephen Kitt [Wed, 1 Feb 2017 16:19:16 +0000 (17:19 +0100)]
Checkstyle: fix dhcpservice-api and enforce

Change-Id: I4548b192a0d7876a6ed330a52be92af1b0a2c5fd
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoCheckstyle: fix bgpmanager-api and enforce 08/51308/2
Stephen Kitt [Wed, 1 Feb 2017 15:45:58 +0000 (16:45 +0100)]
Checkstyle: fix bgpmanager-api and enforce

Change-Id: I7e307fcf0ff508717103776cb32f84801930abb6
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoBug 7674 Update of DHCP flag support for subnet-update configuration 00/51000/3
Vijayalakshmi Chickkamenahalli Nagaraju [Wed, 25 Jan 2017 11:12:30 +0000 (16:42 +0530)]
Bug 7674 Update of DHCP flag support for subnet-update configuration

Change-Id: Ibe318e207dfeb4ea95ac99df733fd31c0f8d1dd6
Signed-off-by: Vijayalakshmi Chickkamenahalli Nagaraju <vijayalakshmi.c@altencalsoftlabs.com>
7 years agobgpmanager Checkstyle, enforcing 20/51120/6
Stephen Kitt [Thu, 26 Jan 2017 19:33:15 +0000 (20:33 +0100)]
bgpmanager Checkstyle, enforcing

Passing the PrintStream to Commands is rather inelegant but it feels
like the most straightforward fix.

Change-Id: I079a35083a78b7d9c18a5981456b1a02212a8b82
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoACL: Support for statistical counters 49/49349/6
Somashekar Byrappa [Wed, 14 Dec 2016 13:01:46 +0000 (18:31 +0530)]
ACL: Support for statistical counters

This feature provides statistics related to drop packets due to ACL for
the specified ports.

+ Provided new RPC: acl-live-statistics:get-acl-port-statistics
+ Uses OFplugin's RPC (opendaylight-direct-statistics:get-flow-statistics)
to get flow statistics.
+ This is currently supported for ACL stateful mode only.

Spec reference:
https://git.opendaylight.org/gerrit/#/c/49086/

Change-Id: Id99e0b35878126ef2238d2b76203926943b6cd41
Signed-off-by: Somashekar Byrappa <somashekar.b@altencalsoftlabs.com>
7 years agoBgpCounters re-write 19/51119/4
Stephen Kitt [Fri, 27 Jan 2017 13:07:09 +0000 (14:07 +0100)]
BgpCounters re-write

This reworks BgpCounters using slightly more idiomatic approaches
(without re-designing it though).

Change-Id: Iae154bfbfe2c8c93335084d08909b89b314d440e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agode-static-ify Timer field in ElanL2GatewayUtils 41/50541/4
Michael Vorburger [Tue, 17 Jan 2017 12:17:31 +0000 (13:17 +0100)]
de-static-ify Timer field in ElanL2GatewayUtils

I don't see any reason why this needs to be static?

On the contrary, it will only lead to problems in tests.

Also introducing close() and Timer cancel() & purge(), just to be safe.

Change-Id: I83cf067957bafe5a6977e41d1c403c1c85634012
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBug 7601: Cleanup Elan instances when a network is deleted 73/50673/4
Sridhar Gaddam [Thu, 19 Jan 2017 14:45:14 +0000 (20:15 +0530)]
Bug 7601: Cleanup Elan instances when a network is deleted

The following patch in Neutron[1] modifies the Network delete sequence.
Prior to a network delete event, we now see an update event that removes
the networkType. So, in delete event, when we try to check for the
networkType, it would be empty and there is an exception. Because of this,
elanInstances are not getting deleted. In this patch, we avoid the check
for networkType since the network itself would not be created in the first
place if its not a supported networkType.

[1] https://review.openstack.org/#/c/317358/

Change-Id: I349a51f4df666ef2c2912ee552f159b6af16de76
Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
7 years agoBUG 7488 Add option to disable auto bridge creation 75/51175/3
Vishal Thapar [Mon, 30 Jan 2017 07:08:12 +0000 (12:38 +0530)]
BUG 7488 Add option to disable auto bridge creation

This adds a new param to elan-config, auto-create-bridge that defaults to
true. When false, netvirt will neither try to create br-int if it doesn't
exist, nor add any configuration if it exists. This is to be used in
scenarios where br-int is already created and configured.

Change-Id: I39c2770a0c0351d9e1b1fecd2642f473650e6c52
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
7 years agoBug 7667: SNAT table 46&44 are not getting programmed when private BGPVPN 94/50994/4
karthikeyan [Wed, 25 Jan 2017 08:05:05 +0000 (13:35 +0530)]
Bug 7667: SNAT table 46&44 are not getting programmed when private BGPVPN

Problem Description:
=====================
SNAT: Table 46(OUTBOUND_NAPT) and table 44 (INBOUND_NAPT) are not getting
programmed (SNAT Forward Traffic and SNAT Reverse Traffic) with NAT
translation when router is
associated with Private/Internal BGP-VPN.Due to this issue, SNAT traffic
is getting failed when interval bgp-vpn is configured.

Root Cause of the Problem:
==========================
As part of bug (Bug 7478) fix SNAT traffic is used to send router-gw mac
address instead of VM mac. With this code changes router gw-mac was
getting from external-router Yang Model using router name as key.

When private/internal bgp-vpn is configured router-id (Internal Private
VPN ID) should be replaced with created private/internal bgp-vpn id. With
this approach when querying external-router Yang model for getting
router-gw mac address using new router-id (bgp-vpn id) will not match with
router-name.

Solution:
===========
When querying external-router yang model for getting router-gw mac address
it should use old router-id instead of bgp-vpn id. For doing this change
in NAPTEventHandler re-aligned the router-gw mac address code to
appropriate place to be working as expected.

Change-Id: Ieefd799d6b2349464bfb737e3fcc8101036c3619
Signed-off-by: karthikeyan <karthikeyan.k@altencalsoftlabs.com>
7 years agoBug 7700: create-l3vpn (REST/CLI) should not allow another VPN to use the same VPNID 68/51168/4
Abhinav Gupta [Mon, 30 Jan 2017 07:51:10 +0000 (13:21 +0530)]
Bug 7700: create-l3vpn (REST/CLI) should not allow another VPN to use the same VPNID

Change-Id: I4481db51b17e92b2df7afab18b41bcb4e1a23df0
Signed-off-by: Abhinav Gupta <abhinav.gupta@ericsson.com>
7 years agoSystem Configurable Parameters for EVPN 63/48463/5
Suraj Ranjan [Fri, 18 Nov 2016 06:52:21 +0000 (12:22 +0530)]
System Configurable Parameters for EVPN

The following parameters have been initially made available as
configurable for EVPN.These configurations can be made via the
RESTful interface:

1> Multi-homing-mode
2> Irb-mode

Change-Id: I09b55b1e021741d46f2d9bb1d2a0877cbbc81572
Signed-off-by: Suraj Ranjan <suraj.ranjan@ericsson.com>
7 years agoString handling cleanup 39/50439/9
Stephen Kitt [Fri, 13 Jan 2017 14:23:22 +0000 (15:23 +0100)]
String handling cleanup

* Remove redundant toString() calls
* Remove explicit String constructor calls
* Use string concatenation where appropriate

Change-Id: Ic709268d658176a5b12d1870e265f1488238b10e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoCleanup: replace Arrays.asList() where appropriate 38/50438/9
Stephen Kitt [Fri, 13 Jan 2017 13:49:41 +0000 (14:49 +0100)]
Cleanup: replace Arrays.asList() where appropriate

... with Collections.singletonList (when a single argument is given).

Change-Id: Ic63d65a51f24c4e022cf540d225e31c11264771e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoBoxing cleanup 00/50400/10
Stephen Kitt [Fri, 13 Jan 2017 09:20:23 +0000 (10:20 +0100)]
Boxing cleanup

Change-Id: I669ea231b2cd2f23bd4a6b8ab3122b91172ca20f
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoGeneral clean-ups 99/50399/10
Stephen Kitt [Fri, 13 Jan 2017 09:09:25 +0000 (10:09 +0100)]
General clean-ups

Automated refactors:
* use List::sort instead of Collections::sort
* use foreach loops
* use switch statements instead of if/else if constructs
* use contains() instead of comparing indexOf()
* use Collection::removeIf instead of looping explicitly
* use Optional::ifPresent where possible
* use Map::computeIfAbsent instead of conditional puts
* use try with resources

Change-Id: I1f6c2986abb0f151bb4ff1bc262b1c1ae11c523f
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoClean up lambdas 37/47537/23
Stephen Kitt [Tue, 25 Oct 2016 14:50:50 +0000 (16:50 +0200)]
Clean up lambdas

Use lambdas instead of functional interfaces, and use method
references instead of lambdas where possible.

Change-Id: I34a30b81ec5ceae94cbe10524cf8b147475de28c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoRemove unnecessary generic types 18/47518/22
Stephen Kitt [Tue, 25 Oct 2016 13:08:30 +0000 (15:08 +0200)]
Remove unnecessary generic types

Change-Id: I9e5f1a66fed243035ca5088df2331980182707b2
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoUse Java declarations instead of Google Collections 25/47425/21
Stephen Kitt [Mon, 24 Oct 2016 10:21:17 +0000 (12:21 +0200)]
Use Java declarations instead of Google Collections

Where appropriate, replace:
* Maps.newHashMap() with new HashMap<>()
* Lists.newArrayList() with new ArrayList<>() or
  Collections.singletonList()
* Sets.newHashSet() with new HashSet<>()
* Sets.difference() with explicit .removeAll() constructs (usually
  avoiding some collection instantiation too)
* Lists.newLinkedList() with new LinkedList<>()
* Maps.newConcurrentMap() with new ConcurrentHashMap<>()

Also
* replace some Guava filters/transforms with Java 8 streams
* replace some Guava predicates with Java 8 predicates
* remove unnecessary generic type qualifiers in affected classes
* clean up some Optional uses (.orNull(), direct Optional returns where
  appropriate)
* remove some String() constructors

Change-Id: Ie9a9ba5127120f8f72f60e662cc1b75c11a406a0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoAdd missing UDP matches for SNAT 88/51188/1
Alon Kochba [Mon, 30 Jan 2017 15:27:27 +0000 (17:27 +0200)]
Add missing UDP matches for SNAT

Fix regression introduced by MatchInfo refactoring,
part of https://git.opendaylight.org/gerrit/#/c/50518

Related fix for null MatchInfo here:
https://git.opendaylight.org/gerrit/#/c/51182/

Change-Id: I26aaf01648cbb27b703eb51b569be957803dc9df
Signed-off-by: Alon Kochba <alonko@hpe.com>
7 years agoFix and re-enable aclservice tests 57/51157/2
Stephen Kitt [Fri, 27 Jan 2017 23:59:27 +0000 (00:59 +0100)]
Fix and re-enable aclservice tests

This requires https://git.opendaylight.org/gerrit/51156 in Genius.

Change-Id: I4dfa128f1fe3d1d3268b2e71aa3fb323a61b5d04
Signed-off-by: Stephen Kitt <skitt@redhat.com>