netvirt.git
8 years agoRemove unused northbound
Sam Hague [Fri, 25 Sep 2015 15:27:44 +0000 (11:27 -0400)]
Remove unused northbound

Change-Id: I8ac5ae92315d2558a7563a35bdd67c0d816ccc68
Signed-off-by: Sam Hague <shague@redhat.com>
8 years agoMerge "Initial pass at netvirt model"
Anil Vishnoi [Thu, 24 Sep 2015 16:32:26 +0000 (16:32 +0000)]
Merge "Initial pass at netvirt model"

8 years agoMerge "Added UT for OvsdbDataChangeListener.java"
Sam Hague [Thu, 24 Sep 2015 14:32:05 +0000 (14:32 +0000)]
Merge "Added UT for OvsdbDataChangeListener.java"

8 years agoAdded UT for OvsdbDataChangeListener.java
rpujar [Wed, 23 Sep 2015 15:39:48 +0000 (11:39 -0400)]
Added UT for OvsdbDataChangeListener.java

Also added code to test new method in OvsdbConnectionManager.java

Change-Id: I75faec2f20305c9ac806087042136d09d1048d49
Signed-off-by: rpujar <rpujar@inocybe.com>
8 years agoInitial pass at netvirt model
Sam Hague [Mon, 21 Sep 2015 01:43:59 +0000 (21:43 -0400)]
Initial pass at netvirt model

Patch set 2: Renamed netvirtmodel to net-virt-sfc.
Patch set 3: Add net-virt-sfc to the root pom so it is built

Change-Id: Ia8b21b538e38463e860148abb4bf055ae3020761
Signed-off-by: Sam Hague <shague@redhat.com>
8 years agoClean up dependencies and features
Stephen Kitt [Wed, 23 Sep 2015 16:24:32 +0000 (18:24 +0200)]
Clean up dependencies and features

Remove more plugin-related code.
Correct a couple of netconf dependencies.
Remove obsolete dependencies on controller features which are no
longer provided upstream.

Change-Id: Ia8f68200e997c11375414cd3071fe605b9025cd4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoAdd YangInstanceIdentifer to InstanceIdentifier converter method
Anil Vishnoi [Wed, 23 Sep 2015 15:37:41 +0000 (21:07 +0530)]
Add YangInstanceIdentifer to InstanceIdentifier converter method

Change-Id: I540772d6461ccf9a281b738a3ba8d6601abffafb
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
8 years agoFixed unit test testDisconnect in OvsdbConnectionmanagerTest
Anil Vishnoi [Wed, 23 Sep 2015 18:49:12 +0000 (00:19 +0530)]
Fixed unit test testDisconnect in OvsdbConnectionmanagerTest

Change-Id: I2b2eca244036dc7567c24e85a71bd968f04ac587
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
8 years agoMerge "hwvtepsb: Fixed restconf migration build issues"
Anil Vishnoi [Wed, 23 Sep 2015 14:02:48 +0000 (14:02 +0000)]
Merge "hwvtepsb: Fixed restconf migration build issues"

8 years agohwvtepsb: Fixed restconf migration build issues
Vishal Thapar [Wed, 23 Sep 2015 12:34:51 +0000 (18:04 +0530)]
hwvtepsb: Fixed restconf migration build issues

restconf migration from controller to netconf was done while
hwvtep bundle creation was in progress, so those were not done
for hwvtepsouthbound which is causing build failure.

Change-Id: Ib32c591e0dd197730f1bc50d7e92b38018c0fd7f
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
8 years agoMerge "Unit Test for ovsdb southbound OvsdbConnectionManager.java"
Flavio Fernandes [Wed, 23 Sep 2015 12:15:39 +0000 (12:15 +0000)]
Merge "Unit Test for ovsdb southbound OvsdbConnectionManager.java"

8 years agoMerge "Added manager list to Ovsdb Node. For application southbound plugin only give...
Flavio Fernandes [Wed, 23 Sep 2015 12:15:07 +0000 (12:15 +0000)]
Merge "Added manager list to Ovsdb Node. For application southbound plugin only give a device level view and not a connection level view. To make net-virt cluster aware, it needs to the managers of the ovsdb server, so that when it creates ovs bridges, it can connect them to the same controllers through OF plugin"

8 years agoAdded manager list to Ovsdb Node.
Anil Vishnoi [Tue, 22 Sep 2015 22:06:50 +0000 (03:36 +0530)]
Added manager list to Ovsdb Node.
For application southbound plugin only give a device level view and not a connection level view.
To make net-virt cluster aware, it needs to the managers of the ovsdb server, so that
when it creates ovs bridges, it can connect them to the same controllers through OF plugin

Tests:
ovs-vsctl set-manager tcp:ip:6640
ovs-vsctl set-manager tcp:ip:6640 tcp:ip2:6640
ovs-vsctl set-manager tcp:ip:6640
ovs-vsctl del-manager

Change-Id: I8b68fef9583f4fbcc330a0e9fc239015851b3f7c
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
8 years agoRemoving the old unused plugin and ovsdb-plugin-compatibility-layer
Anil Vishnoi [Wed, 19 Aug 2015 12:22:17 +0000 (17:52 +0530)]
Removing the old unused plugin and ovsdb-plugin-compatibility-layer
OVSDB stopped using these module in Lithium release. These modules were kept for VTN project, because they didn't had time to migrate
VTN component that relies on these module to MD-SAL.
We will merge this patch after one month on 19th Sep.

Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
8 years agoFixed binding-parent groupId. It was causing build failure
Anil Vishnoi [Wed, 23 Sep 2015 01:40:21 +0000 (07:10 +0530)]
Fixed binding-parent groupId. It was causing build failure

Patch2: Fix library module to use odl-mdsal-models feature rather then deprecated odl-yangtools-models
Patch3: Fix hwvtep southbound module to use odl-mdsal-models feature as well. Also disable hwvtepsouthbound-karaf
 and hwvtepsouthbound-it features. They are causing the build break.

Change-Id: Ia2261af7f21fb4dbff2958a5e3a01283c4c43f23
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
8 years agoMerge "Revert "Use the library config bundle in southbound""
Flavio Fernandes [Tue, 22 Sep 2015 17:09:02 +0000 (17:09 +0000)]
Merge "Revert "Use the library config bundle in southbound""

8 years agoRevert "Use the library config bundle in southbound"
Stephen Kitt [Tue, 22 Sep 2015 15:07:25 +0000 (15:07 +0000)]
Revert "Use the library config bundle in southbound"

This reverts commit c031f4be42abdbee58417a0c0af3ea14f74b2e95, which fails IT currently.

Change-Id: Ib1dd8daf9005fccc886ebaa6b831aa89cfa78597
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoMerge "Use the library config bundle in southbound"
Sam Hague [Tue, 22 Sep 2015 11:36:53 +0000 (11:36 +0000)]
Merge "Use the library config bundle in southbound"

8 years agoUnit Test for ovsdb southbound OvsdbConnectionManager.java
rpujar [Wed, 16 Sep 2015 13:07:53 +0000 (09:07 -0400)]
Unit Test for ovsdb southbound OvsdbConnectionManager.java

Change-Id: I272d716e3d8b3df9bdaea5fc0009c809c8e25933
Signed-off-by: rpujar <rpujar@inocybe.com>
8 years agoMerge "SecGroup: Handle cases when security group has empty rules"
Sam Hague [Thu, 17 Sep 2015 11:51:13 +0000 (11:51 +0000)]
Merge "SecGroup: Handle cases when security group has empty rules"

8 years agoBug 3989: clear the connection info
Stephen Kitt [Thu, 17 Sep 2015 10:01:38 +0000 (12:01 +0200)]
Bug 3989: clear the connection info

When disconnecting, we need to clear the connection info to avoid
thinking we're still connected later.

Add assertions in the southbound IT tests to make sure we don't
connect twice.

Change-Id: I778a2cb9ab957db02146f5a2b3a6658129ba7219
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoSecGroup: Handle cases when security group has empty rules
Flavio Fernandes [Thu, 17 Sep 2015 05:13:45 +0000 (01:13 -0400)]
SecGroup: Handle cases when security group has empty rules

Change-Id: I54ef43f6a4afd9fc571c8dcf9bf843007452c968
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
8 years agoMerge "Initial bundle creation for HWTEP SB"
Anil Vishnoi [Wed, 16 Sep 2015 17:11:06 +0000 (17:11 +0000)]
Merge "Initial bundle creation for HWTEP SB"

8 years agoMerge "A few cleanups"
Anil Vishnoi [Wed, 16 Sep 2015 12:57:31 +0000 (12:57 +0000)]
Merge "A few cleanups"

8 years agoDocument how to use Docker Compose
Stephen Kitt [Wed, 16 Sep 2015 09:14:03 +0000 (11:14 +0200)]
Document how to use Docker Compose

Fig has been obsoleted by Docker Compose. Some distributions have now
replaced Fig entirely (e.g. Fedora 22); this patch documents Docker
Compose as an alternative to Fig.

Change-Id: Ia33bb8633e7c2f039857b98ba96e9b8b343d0394
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoA few cleanups
Flavio Fernandes [Wed, 16 Sep 2015 06:19:35 +0000 (02:19 -0400)]
A few cleanups

* use plain String concatenation instead of StringBuilder where appropriate
* simplify single-use return variables
* <> operator
* avoid calling new String()

Change-Id: I56e99426daeda620a37059417588e5ee4fb99c76
Also-By: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
8 years agoMerge "Revert "Use single-argument form of firstKeyOf()""
Flavio Fernandes [Wed, 16 Sep 2015 05:44:10 +0000 (05:44 +0000)]
Merge "Revert "Use single-argument form of firstKeyOf()""

8 years agoRevert "Use single-argument form of firstKeyOf()"
Anil Vishnoi [Tue, 15 Sep 2015 22:58:34 +0000 (22:58 +0000)]
Revert "Use single-argument form of firstKeyOf()"

This reverts commit e19e4e3f10f65054aba16a94c082180f24b9beb6.

This is breaking the net-virt code. Bridges are not getting created when OVSDB server connects to the controller. Probably happening because of single argument firstKeyOf() method.

Change-Id: I76ab5f86f7329f741e30fd21eaed436391f793b8
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
8 years agoInitial bundle creation for HWTEP SB
Vishal Thapar [Tue, 1 Sep 2015 09:32:08 +0000 (15:02 +0530)]
Initial bundle creation for HWTEP SB

1. Creating initial bundles for hwvtep southbound using Startup Project
archetype.
2. Adds hwvtepsouthbound bundle and entry in ovsdb/pom.xml

PatchSet2:
1. Addressed review comments and added hwvtepsouthbound-it

PatchSet3:
1. Fixed IT failure.

PatchSet4:
Fixed minor issue in southbound/default-config.xml

Change-Id: Ib185c1a9a90b08dc84f64231b8fee414d1e209a0
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
8 years agoMerge "Use single-argument form of firstKeyOf()"
Flavio Fernandes [Tue, 15 Sep 2015 11:49:11 +0000 (11:49 +0000)]
Merge "Use single-argument form of firstKeyOf()"

8 years agoUse single-argument form of firstKeyOf()
Stephen Kitt [Tue, 15 Sep 2015 09:55:29 +0000 (11:55 +0200)]
Use single-argument form of firstKeyOf()

A few other clean-ups in the affected files:
* use plain String concatenation instead of StringBuilder where appropriate
* simplify single-use return variables
* <> operator
* avoid calling new String()

Change-Id: I3e1891509f21211c489cabb64868d78e4dddec10
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoDrop obsolete dependencies
Stephen Kitt [Mon, 14 Sep 2015 15:47:42 +0000 (17:47 +0200)]
Drop obsolete dependencies

commons.httpclient, containermanager.it.implementation and
protocol_plugins.stub are no longer built by controller, and
don't appear to be used in ovsdb.

Change-Id: I49f0afc0333368a1e660942e2cabd501c89126db
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoMerge "Migration to use MD-SAL Project"
Sam Hague [Thu, 10 Sep 2015 17:51:38 +0000 (17:51 +0000)]
Merge "Migration to use MD-SAL Project"

8 years agoMerge "Sonar clean-ups"
Sam Hague [Thu, 10 Sep 2015 16:04:04 +0000 (16:04 +0000)]
Merge "Sonar clean-ups"

8 years agoMigration to use MD-SAL Project
Tony Tkacik [Wed, 2 Sep 2015 14:13:30 +0000 (16:13 +0200)]
Migration to use MD-SAL Project

Change-Id: Id34e216f57308f96139e95483b92df0e16e8c60a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMerge "getDHCPServerPort is modified to address Bug 4206"
Sam Hague [Thu, 10 Sep 2015 15:30:17 +0000 (15:30 +0000)]
Merge "getDHCPServerPort is modified to address Bug 4206"

8 years agoSonar clean-ups
Stephen Kitt [Thu, 10 Sep 2015 12:40:14 +0000 (14:40 +0200)]
Sonar clean-ups

Starting from source files containing collapsible ifs:
* merge collapsible ifs;
* remove unused parameters;
* remove unused exceptions;
* remove unused fields;
* rename shadowing variables;
* add private constructors for utility classes;
* use more specific exceptions than RuntimeException;
* clean up "if () return true; else return false;";
* some Java 7 <> operators;
* add missing "static" for constants;
* remove unused private methods (except in OF13Provider);
* move some inline comments above the corresponding source line;
* used boolean instead of Boolean for Map::contains();
* replace foreach-style constructs examining the first element only
  with explicit "if (...hasNext()) ... = ... next()";
* prohibit overriding methods called from constructors;
* remove useless casts.

Reverse the order of node augmentation handling in SouthboundUtil so
that the augmentation case can actually trigger.

Change-Id: Ie4fc662bdcc0e2133fdd4f57b783723466b1f2a9
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoUse the library config bundle in southbound
Stephen Kitt [Wed, 9 Sep 2015 15:21:52 +0000 (17:21 +0200)]
Use the library config bundle in southbound

Change-Id: I07d5c24e3052716018dacffab35f96828a5d6223
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agogetDHCPServerPort is modified to address Bug 4206
Aswin Suryanarayanan [Thu, 10 Sep 2015 02:28:43 +0000 (07:58 +0530)]
getDHCPServerPort is modified to address Bug 4206

Change-Id: I121f91dadb370543664f4a235cf5d0eef6f8b932
Signed-off-by: Aswin Suryanarayanan <aswin.suryanarayanan@hp.com>
8 years agoMerge "Migrate restconf dependencies"
Sam Hague [Wed, 9 Sep 2015 21:05:26 +0000 (21:05 +0000)]
Merge "Migrate restconf dependencies"

8 years agoMerge "Updating fix for bug 3989 based on discussion in OVSDB meeting"
Sam Hague [Wed, 9 Sep 2015 20:54:57 +0000 (20:54 +0000)]
Merge "Updating fix for bug 3989 based on discussion in OVSDB meeting"

8 years agoMerge "Drop the #1997-related sleep"
Sam Hague [Wed, 9 Sep 2015 19:38:23 +0000 (19:38 +0000)]
Merge "Drop the #1997-related sleep"

8 years agoMigrate restconf dependencies
Tomas Cere [Fri, 4 Sep 2015 12:29:26 +0000 (14:29 +0200)]
Migrate restconf dependencies

Change-Id: I15dca264d53a6af9c80e46bc02c8cfab4709e0ee
Signed-off-by: Tomas Cere <tcere@cisco.com>
8 years agoUpdating fix for bug 3989 based on discussion in OVSDB meeting
Raksha Madhava Bangera [Thu, 27 Aug 2015 20:40:11 +0000 (13:40 -0700)]
Updating fix for bug 3989 based on discussion in OVSDB meeting

Signed-off-by: Raksha Madhava Bangera <raksha.madhava.bangera@intel.com>
Updating the patch as per review comments

Signed-off-by: Raksha Madhava Bangera <raksha.madhava.bangera@intel.com>
Removing whitespace

Signed-off-by: Raksha Madhava Bangera <raksha.madhava.bangera@intel.com>
8 years agoAdded missing dependency on library-features.
Shigeru Yasuda [Mon, 7 Sep 2015 09:03:27 +0000 (18:03 +0900)]
Added missing dependency on library-features.

features-ovsdb needs to have a dependency on library-features for
feature repository reference.

Change-Id: I52c741fb7a1dda6bf0f33b1717da9b05677ff1bb
Signed-off-by: Shigeru Yasuda <s-yasuda@da.jp.nec.com>
8 years agoClean up plugin management
Stephen Kitt [Fri, 4 Sep 2015 16:38:20 +0000 (18:38 +0200)]
Clean up plugin management

A number of plugins are managed by odlparent, so use that instead of
variables (even inherited) and remove unnecessary entries (i.e.
specified identically in odlparent).

Change-Id: I1d6d4072cfdfa59e6891b8bee29a9cb562f93335
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoMerge "Switch from Felix to config-driven dependencies"
Flavio Fernandes [Thu, 3 Sep 2015 20:26:09 +0000 (20:26 +0000)]
Merge "Switch from Felix to config-driven dependencies"

8 years agoSwitch from Felix to config-driven dependencies
Stephen Kitt [Thu, 20 Aug 2015 12:04:01 +0000 (14:04 +0200)]
Switch from Felix to config-driven dependencies

The library module was regenerated using
opendaylight-startup-archetype 1.1.0-SNAPSHOT.

The ovsdb version is now 1.2.1-SNAPSHOT to make sure none of the
old 1.2.0-SNAPSHOT artefacts are used.

The library-dependent integration tests (at an OSGi level) are now in
library-it, apart from the plugin tests which are just ignored since
they're going away.

Change-Id: Ic6fb1c14f98b1557b9c87a702b20ef8a3173daf7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoMerge "Use mdsal's base IT classes"
Flavio Fernandes [Wed, 2 Sep 2015 13:09:12 +0000 (13:09 +0000)]
Merge "Use mdsal's base IT classes"

8 years agoBug 4045 - ipv6 work around
Isaku Yamahata [Tue, 25 Aug 2015 22:45:28 +0000 (15:45 -0700)]
Bug 4045 - ipv6 work around

When running tempest, the following exceptions occurs because
ipv6 is not supported yet. This patch is work around for now.
TODO: support IPv6 and remove this work around

> 2015-08-25 15:00:12,428 | ERROR | ntDispatcherImpl | EventDispatcher                  | 400 - org.opendaylight.ovsdb.openstack.net-virt - 1.2.0.SNAPSHOT | Exception in dispatching event NorthboundEvent [handler=NEUTRON_ROUTER, action=DELETE, port=null, subnet=null, router=NeutronRouter [id=55dc4fd2-0e5f-4ec8-b589-18616dfaa6a1, name=tempest-router--44999886, adminStateUp=false, status=ACTIVE, tenantID=86d8df7573f24bc68e0a75846812839d, external_gateway_info=NeutronRouterNetworkReference [networkID=7d526ede-cfd0-45ec-897f-607471dd801e enableSNAT=true externalFixedIPs=[Neutron_IPs{ipAddress='172.24.4.62', subnetUUID='9a799aec-5f1f-4a2d-b3ed-a109f6c89bcb'}, Neutron_IPs{ipAddress='2001:db8::3e', subnetUUID='5178fb71-6683-4cf6-a1e7-095da5b9962a'}]], distributed=false, gw_port_id=2419ec70-21e8-4a3b-aa52-82ec9dd7f698, routes=[], interfaces={}], routerInterface=NeutronRouterInterface [subnetUUID=009ab797-30df-4c55-87f4-5142a9f8b444, portUUID=900abbc5-4db9-4bec-8777-0018f2950751, id=55dc4fd2-0e5f-4ec8-b589-18616dfaa6a1, tenantID=86d8df7573f24bc68e0a75846812839d], floatingIP=null, network=null, loadBalancer=null, loadBalancerPool=null, loadBalancerPoolMember=null]
> java.lang.IllegalArgumentException: Supplied value "fdfd:7da6:14e6:0:f816:3eff:fe43:c114/32" does not match required pattern "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))$"
>         at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)[39:com.google.guava:18.0.0]
>         at org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix.<init>(Ipv4Prefix.java:49)[49:org.opendaylight.yangtools.model.ietf-inet-types:2010.9.24.8-SNAPSHOT]
>         at org.opendaylight.ovsdb.utils.mdsal.openflow.MatchUtils.iPv4PrefixFromIPv4Address(MatchUtils.java:1133)[401:org.opendaylight.ovsdb.openstack.net-virt-providers:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.L3ForwardingService.programForwardingTableEntry(L3ForwardingService.java:64)[401:org.opendaylight.ovsdb.openstack.net-virt-providers:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.programL3ForwardingStage2(NeutronL3Adapter.java:689)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.programL3ForwardingStage1(NeutronL3Adapter.java:670)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.updateL3ForNeutronPort(NeutronL3Adapter.java:640)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.handleNeutronRouterInterfaceEvent(NeutronL3Adapter.java:310)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.RouterHandler.processEvent(RouterHandler.java:208)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:95)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.access$200(EventDispatcherImpl.java:28)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl$1.run(EventDispatcherImpl.java:57)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
>         at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]

Change-Id: If886c3867665660c8f90a72f567420f48f3fd6ad
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agoMerge "Added unit tests for ovsdb/southbound"
Flavio Fernandes [Mon, 31 Aug 2015 15:00:42 +0000 (15:00 +0000)]
Merge "Added unit tests for ovsdb/southbound"

8 years agoMerge "Fix for defect 4135"
Anil Vishnoi [Fri, 28 Aug 2015 17:02:22 +0000 (17:02 +0000)]
Merge "Fix for defect 4135"

8 years agoAdded unit tests for ovsdb/southbound
rpujar [Fri, 28 Aug 2015 14:32:15 +0000 (10:32 -0400)]
Added unit tests for ovsdb/southbound

Change-Id: Iab67bab14a90ef39678756e7bd9c8852bf111f40
Signed-off-by: rpujar <rpujar@inocybe.com>
8 years agoMerge "Added Unit Tests for ovsdb/southbound"
Flavio Fernandes [Thu, 27 Aug 2015 12:40:16 +0000 (12:40 +0000)]
Merge "Added Unit Tests for ovsdb/southbound"

8 years agoBug 4160 - null pointer exception in getDHCPServerPort() (cont)
Flavio Fernandes [Wed, 26 Aug 2015 15:09:55 +0000 (11:09 -0400)]
Bug 4160 - null pointer exception in getDHCPServerPort() (cont)

Avoid null pointer exception in when neutronPortCache.getPort() returns null.

Patch set 2..4: Add logs to make code same as what is in stable/lithium

Co-Authored-By: Isaku Yamahata <isaku.yamahata@intel.com>
Change-Id: I41630cd978e68cbd135634646f3e3155f14715c7
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
8 years agoBug 4160 - null pointer exception in getDHCPServerPort() (re-do)
Flavio Fernandes [Wed, 26 Aug 2015 14:46:35 +0000 (10:46 -0400)]
Bug 4160 - null pointer exception in getDHCPServerPort() (re-do)

null pointer exception in SecurityServicesImpl.getDHCPServerPort()
because neutronPortCache.getPort() may return null. It needs null check.
NOTE: the order of neutron port creation/deletion via neutron northbound
api and ovs port creation/deletion is not deterministic. Either order can
happen. SecurityServicesImpl seems to be fixed to be aware of it.
it's another story. This patch addresses only null pointer exception
for now.

This is a redo, to fix a merge mistake introduced in
https://git.opendaylight.org/gerrit/#/c/24579/8..9

Original-Change-Id: I40f78b1477f1c2a6ad3e23b2e60e21be6d9abc23
Change-Id: Ib929bf774426d6240934ea406189e25be1ecf536
Co-Authored-By: Isaku Yamahata <isaku.yamahata@intel.com>
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
8 years agoReplace StringBuilder with more efficient String concatenation (re-do)
Flavio Fernandes [Wed, 26 Aug 2015 14:32:15 +0000 (10:32 -0400)]
Replace StringBuilder with more efficient String concatenation (re-do)

Just replaces the StringBuilder with a more efficient/readable
String concatenation operation.

This is a redo, to fix a merge mistake introduced in
https://git.opendaylight.org/gerrit/#/c/24579/8..9

Original-Change-Id: Idce8fed3d4e207ff1a95cf24267a41fa8682a08a
Change-Id: I9aa8d648398e532ad9eacd9a07b99b672ebfebd6
Signed-off-by: Flavio Fernandes <ffernand@redhat.com
Co-Authored-By: Ryan Goulding <ryandgoulding@gmail.com>
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
8 years agofix up of 474eb2a9d61bb1f2f4664d12c23042ab3699260b
Isaku Yamahata [Thu, 20 Aug 2015 21:25:09 +0000 (14:25 -0700)]
fix up of 474eb2a9d61bb1f2f4664d12c23042ab3699260b

The changeset of 474eb2a9d61bb1f2f4664d12c23042ab3699260b
Change-Id: I442745135b5ccb778b1f0b11962f50b1f2d5ff5b
silently reverted the patch of d3d11112b0496535a85ba9dee3831c341c5e4054
Change-Id: I900e3ab959917fda35dd5f073b0cf89b32edc031
This patch introduce the fix again.

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agoFix for defect 4135
Sharad Mishra [Wed, 12 Aug 2015 17:53:14 +0000 (13:53 -0400)]
Fix for defect 4135

https://bugs.opendaylight.org/show_bug.cgi?id=4135

If integration bridge or external bridge exist prior to
connecting to ODL, then the pre-existing bridge is not added.
But the side effect is that the controller is not set on
this bridge.
Current code checks to see if the bridge already exists on the node. This
patch adds a check to see if the bridge exists on CONFIG datastore. If the
bridge does not exist on config, it indicates that the bridge existed prior
to ODL connection, and it adds the bridge.

Signed-off-by: Sharad Mishra <sharad.d.mishra@intel.com>
8 years agoAdded Unit Tests for ovsdb/southbound
rpujar [Tue, 25 Aug 2015 15:57:49 +0000 (11:57 -0400)]
Added Unit Tests for ovsdb/southbound

InstanceIdentifierCodecTest.java and OvsdbSchemaContantsTest.java

Change-Id: I91e356dfc6bfc41bac081b9792ff99bfc931c3ae
Signed-off-by: rpujar <rpujar@inocybe.com>
8 years agoUse mdsal's base IT classes
Stephen Kitt [Tue, 25 Aug 2015 14:45:45 +0000 (16:45 +0200)]
Use mdsal's base IT classes

Change-Id: I25138bbe1565cf6e33ab67e847ef878b39a624f7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoAdded IPV4, Custom TCP and UDP SG rules.
Aswin Suryanarayanan [Tue, 28 Jul 2015 20:55:53 +0000 (02:25 +0530)]
Added IPV4, Custom TCP and UDP SG rules.

Patch set 9: undo mess in patch set 8, making it the same as patch set 7

Change-Id: I442745135b5ccb778b1f0b11962f50b1f2d5ff5b
Signed-off-by: Aswin Suryanarayanan <aswin.suryanarayanan@hp.com>
8 years agoMerge "Bug 4163 - null pointer exception NeutronL3Adapter.getExternalNetworkSubnet"
Flavio Fernandes [Mon, 24 Aug 2015 14:44:41 +0000 (14:44 +0000)]
Merge "Bug 4163 - null pointer exception NeutronL3Adapter.getExternalNetworkSubnet"

8 years agoMerge "Replace StringBuilder with more efficient String concatenation"
Flavio Fernandes [Mon, 24 Aug 2015 14:27:18 +0000 (14:27 +0000)]
Merge "Replace StringBuilder with more efficient String concatenation"

8 years agoMerge "Bug 4160 - null pointer exception in getDHCPServerPort()"
Flavio Fernandes [Mon, 24 Aug 2015 14:02:45 +0000 (14:02 +0000)]
Merge "Bug 4160 - null pointer exception in getDHCPServerPort()"

8 years agoReplace StringBuilder with more efficient String concatenation
Ryan Goulding [Sat, 22 Aug 2015 18:31:33 +0000 (14:31 -0400)]
Replace StringBuilder with more efficient String concatenation

Just replaces the StringBuilder with a more efficient/readable
String concatenation operation.

Change-Id: Idce8fed3d4e207ff1a95cf24267a41fa8682a08a
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
8 years agoBug 4163 - null pointer exception NeutronL3Adapter.getExternalNetworkSubnet
Isaku Yamahata [Thu, 20 Aug 2015 21:25:09 +0000 (14:25 -0700)]
Bug 4163 - null pointer exception NeutronL3Adapter.getExternalNetworkSubnet

INuetronXXXCache may return null. So null pointer check is necessary.
In fact in NeutronL3Adapter there are null pointer checks in other place.
This is the only place missing the check.

> 2015-08-20 14:10:06,140 | ERROR | ntDispatcherImpl | EventDispatcher                  | 400 - org.opendaylight.ovsdb.openstack.net-virt - 1.2.0.SNAPSHOT | Exception in dispatching event NorthboundEvent [handler=NEUTRON_PORT, action=ADD, port=NeutronPort [portUUID=1f781e25-ae88-4210-a296-096a3c04adb4, networkUUID=7d526ede-cfd0-45ec-897f-607471dd801e, name=, adminStateUp=true, status=null, macAddress=FA:16:3E:62:5A:34, fixedIPs=[Neutron_IPs{ipAddress='172.24.4.55', subnetUUID='9a799aec-5f1f-4a2d-b3ed-a109f6c89bcb'}, Neutron_IPs{ipAddress='2001:db8::37', subnetUUID='5178fb71-6683-4cf6-a1e7-095da5b9962a'}], deviceID=3fb41370-be5a-4ba4-8141-e8392d9eb878, deviceOwner=network:router_gateway, tenantID=c079de68c26e4dec9b1867f4af272fb9, securityGroups=[], bindinghostID=, bindingvnicType=normal, bindingvnicType=normal], subnet=null, router=null, routerInterface=null, floatingIP=null, network=null, loadBalancer=null, loadBalancerPool=null, loadBalancerPoolMember=null]
> java.lang.NullPointerException
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.getExternalNetworkSubnet(NeutronL3Adapter.java:1262)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.triggerGatewayMacResolver(NeutronL3Adapter.java:1278)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.handleNeutronPortEvent(NeutronL3Adapter.java:208)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.PortHandler.doNeutronPortCreated(PortHandler.java:66)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.PortHandler.processEvent(PortHandler.java:161)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:95)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.access$200(EventDispatcherImpl.java:28)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl$1.run(EventDispatcherImpl.java:57)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
>         at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]

Change-Id: I900e3ab959917fda35dd5f073b0cf89b32edc031
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agoMerge "Use org.junit instead of junit.framework"
Flavio Fernandes [Fri, 21 Aug 2015 16:12:31 +0000 (16:12 +0000)]
Merge "Use org.junit instead of junit.framework"

8 years agoUse org.junit instead of junit.framework
Stephen Kitt [Fri, 21 Aug 2015 12:57:36 +0000 (14:57 +0200)]
Use org.junit instead of junit.framework

Change-Id: I980d4a6da5e181266214c124959d84d3f5e34f9e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoFix Java 8 javadoc compatibility in ovsdb project to make sure we pass compliation
rpujar [Thu, 20 Aug 2015 19:15:07 +0000 (15:15 -0400)]
Fix Java 8 javadoc compatibility in ovsdb project to make sure we pass compliation

The build was failing due to these errors:
[ERROR] ovsdb/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/GatewayMacResolver.java:34: error: @param name not found
 --> periodicRefresh instead of periodicReferesh
[ERROR] /Users/rashmi/UnitTests/ovsdb/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/GatewayMacResolver.java:27: error: bad HTML entity
--> and instead of &
[ERROR] ovsdb/openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/arp/GatewayMacResolverService.java:187: error: unknown tag: MacAddress
--> Removed Future<MacAddress> from @return
[ERROR] ovsdb/library/src/main/java/org/opendaylight/ovsdb/lib/OvsdbClient.java:74: error: @param name not found
--> monitorHandle instead of monitorHandler

Java version "1.8.0_40"

Change-Id: Ida0babd4e33b0906c5ce96234d07fef660fa8c4c
Signed-off-by: rpujar <rpujar@inocybe.com>
8 years agoFix for BUG 4067 (LBaaS flows don't get installed in the switch.)
Arun S. Yerra [Thu, 30 Jul 2015 07:03:10 +0000 (00:03 -0700)]
Fix for BUG 4067 (LBaaS flows don't get installed in the switch.)

LbaaS is installing the OF Flows in opendaylight-inventory CONFIG data store with NodeId stored in OVSDB topology data tree, but openflow plugin doesn't have any node with this node Id as they are based on DPID.

Other NetVirt Provider Services map the OVSDB node Id to Southbound DPID, but LBaaS is not doing the mapping.

Fix is to get the corresponding DPID and create the Node Id that can be understood by the Openflow plugin and install the flow.

Patch set 2: Fix LOGGER
Patch set 3: Fix UT

Change-Id: I485963b06da82c657f098d59e3e230fb6d381983
Signed-off-by: Arun S. Yerra <arunsarat@yahoo.com>
(cherry picked from commit da9d53773f1d0a66aaea417c242516de7a24beaa)

8 years agoMerge "OVSDB netvirt southbound - set correct datapath type for OVS with DPDK"
Sam Hague [Thu, 20 Aug 2015 12:48:57 +0000 (12:48 +0000)]
Merge "OVSDB netvirt southbound - set correct datapath type for OVS with DPDK"

8 years agoBug 4160 - null pointer exception in getDHCPServerPort()
Isaku Yamahata [Thu, 20 Aug 2015 01:47:11 +0000 (18:47 -0700)]
Bug 4160 - null pointer exception in getDHCPServerPort()

null pointer exception in SecurityServicesImpl.getDHCPServerPort()
because neutronPortCache.getPort() may return null. It needs null check.
NOTE: the order of neutron port creation/deletion via neutron northbound
api and ovs port creation/deletion is not deterministic. Either order can
happen. SecurityServicesImpl seems to be fixed to be aware of it.
it's another story. This patch addresses only null pointer exception
for now.

> java.lang.NullPointerException
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.SecurityServicesImpl.getDHCPServerPort(SecurityServicesImpl.java:121)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.OF13Provider.removeLocalRules(OF13Provider.java:845)[401:org.opendaylight.ovsdb.openstack.net-virt-providers:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.OF13Provider.handleInterfaceDelete(OF13Provider.java:1148)[401:org.opendaylight.ovsdb.openstack.net-virt-providers:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.SouthboundHandler.handleInterfaceDelete(SouthboundHandler.java:113)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.SouthboundHandler.processPortDelete(SouthboundHandler.java:166)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.SouthboundHandler.processPortEvent(SouthboundHandler.java:290)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.SouthboundHandler.processEvent(SouthboundHandler.java:233)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:95)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.access$200(EventDispatcherImpl.java:28)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl$1.run(EventDispatcherImpl.java:57)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
>         at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]

Change-Id: I40f78b1477f1c2a6ad3e23b2e60e21be6d9abc23
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agoMerge "Enable SLF4J logging in tests"
Sam Hague [Tue, 18 Aug 2015 16:08:28 +0000 (16:08 +0000)]
Merge "Enable SLF4J logging in tests"

8 years agoOVSDB netvirt southbound - set correct datapath type for OVS with DPDK
Eric Multanen [Mon, 17 Aug 2015 21:25:31 +0000 (14:25 -0700)]
OVSDB netvirt southbound - set correct datapath type for OVS with DPDK

When creating bridges from netvirt, check if the OVSDB node supports
'dpdk' interfaces.  If it does, then specify the datapath type
so that the bridge will be created with the 'netdev' datapath type.

Change-Id: Ida76d51906238339255f8e02424328de62a420d7
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
(cherry picked from commit 6989a273149b5908fb2c2ae56d8f9fdb01cd05e0)

8 years agoMerge "Mention "fig up" and sudo for integration tests"
Sam Hague [Tue, 18 Aug 2015 16:05:35 +0000 (16:05 +0000)]
Merge "Mention "fig up" and sudo for integration tests"

8 years agoSlight improvements to our UTs
Stephen Kitt [Tue, 18 Aug 2015 14:06:30 +0000 (16:06 +0200)]
Slight improvements to our UTs

NetworkHandlerTest: explicitly split shared/non-shared testing instead
of relying on successive calls to isShared() (this avoids the test
being too closely linked to the implementation: the test only works if
the code calls isShared() in the way the test expects). Likewise for
isTunnel().

EventDispatcherImplTest:
* the event dispatcher is started by its constructor, no need to start
  it explicitly;
* specify a handler type in the mock event to avoid crashing the event
  handler;
* instead of "assuming" the event size (which was always wrong since
  the events were consumed before we got to the end of the test),
  check that the events were dispatched as appropriate.

ServiceHelper:
* in getGlobalInstance(), avoid an ArrayIndexOutOfBoundsException
* check for a null bundle explicitly; this avoids the tests causing a
  NullPointerException and producing error logs (and it also means we
  can log actual errors with more detail).

ServiceHelperTest: split the null/non-null tests so that we don't rely
on the implementation's calling pattern to getBundle().

Change-Id: Ib1b90fecf286588bc92a4c88f3b89d85c26c53f0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoDrop the #1997-related sleep
Stephen Kitt [Tue, 18 Aug 2015 14:12:34 +0000 (16:12 +0200)]
Drop the #1997-related sleep

Now that bug 1997 is fixed, it should be safe to remove the 1s sleep
before processing events.

(This passes the full integration tests, but I can't reproduce the
original bug so I don't know if this is appropriate.)

Change-Id: I9864332faaab3d7bc3a345555e01c06d84817a02
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoMerge "Clean up ConfigActivator"
Sam Hague [Tue, 18 Aug 2015 13:58:16 +0000 (13:58 +0000)]
Merge "Clean up ConfigActivator"

8 years agoEnable SLF4J logging in tests
Stephen Kitt [Tue, 18 Aug 2015 08:05:14 +0000 (10:05 +0200)]
Enable SLF4J logging in tests

Change-Id: Icd79adb80e77ce3f4ac089e48386538181b219b9
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoMerge "Enable cancel monitoring"
Sam Hague [Mon, 17 Aug 2015 17:53:58 +0000 (17:53 +0000)]
Merge "Enable cancel monitoring"

8 years agoMention "fig up" and sudo for integration tests
Stephen Kitt [Mon, 17 Aug 2015 10:01:51 +0000 (12:01 +0200)]
Mention "fig up" and sudo for integration tests

Change-Id: Idbf3c46bf8a782a4668d67ad34f5982762c865a4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoMerge "Fix description for OUTBOUND_NAT Table: "DNAT for outbound floating-ip traffic""
Flavio Fernandes [Sun, 16 Aug 2015 23:15:20 +0000 (23:15 +0000)]
Merge "Fix description for OUTBOUND_NAT Table: "DNAT for outbound floating-ip traffic""

8 years agoMerge "BUG #4029 : null pointer exception at NeutronL3Adapter.java:251"
Flavio Fernandes [Sun, 16 Aug 2015 23:02:47 +0000 (23:02 +0000)]
Merge "BUG #4029 : null pointer exception at NeutronL3Adapter.java:251"

8 years agoMerge "netvirt: use setID/getID to catch up neutron northbound change"
Flavio Fernandes [Sun, 16 Aug 2015 23:00:55 +0000 (23:00 +0000)]
Merge "netvirt: use setID/getID to catch up neutron northbound change"

8 years agoFix description for OUTBOUND_NAT Table: "DNAT for outbound floating-ip traffic"
Flavio Fernandes [Sun, 16 Aug 2015 22:46:32 +0000 (18:46 -0400)]
Fix description for OUTBOUND_NAT Table: "DNAT for outbound floating-ip traffic"

Change-Id: I9871de8f1bfc6dfa47fb3ea22aef2ea22ef2eb2c
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
8 years agoBUG #4029 : null pointer exception at NeutronL3Adapter.java:251
Isaku Yamahata [Fri, 14 Aug 2015 23:13:19 +0000 (16:13 -0700)]
BUG #4029 : null pointer exception at NeutronL3Adapter.java:251

port update event doesn't always include fixed ips.
Thus NeutronPort.getFixedIPs() may return null.
This patch adds null check.

reproduce procedure:
- create network
- create subnet
- create port
- update port without fixed ip

Example requests are follows

---
POST /controller/nb/v2/neutron/networks HTTP/1.1

{
  "network": {
    "name": "tempest-test-network--1116013201",
    "provider:physical_network": null,
    "admin_state_up": true,
    "tenant_id": "0dde8d3f09764e849d19f0550ef11b26",
    "mtu": 0,
    "router:external": false,
    "shared": false,
    "vlan_transparent": null,
    "port_security_enabled": true,
    "provider:network_type": "vxlan",
    "id": "82953a35-0554-48e4-9ace-200a93ad88df",
    "provider:segmentation_id": 1092
  }
}

---

POST /controller/nb/v2/neutron/subnets HTTP/1.1

{
  "subnet": {
    "name": "",
    "enable_dhcp": true,
    "network_id": "82953a35-0554-48e4-9ace-200a93ad88df",
    "tenant_id": "0dde8d3f09764e849d19f0550ef11b26",
    "dns_nameservers": [],
    "gateway_ip": "10.100.0.1",
    "ipv6_ra_mode": null,
    "allocation_pools": [
      {
        "start": "10.100.0.2",
        "end": "10.100.0.14"
      }
    ],
    "host_routes": [],
    "shared": false,
    "ip_version": 4,
    "ipv6_address_mode": null,
    "cidr": "10.100.0.0/28",
    "id": "cfb6c8b5-d94d-4788-b1b6-769ab403df4a",
    "subnetpool_id": null
  }
}

---

POST /controller/nb/v2/neutron/ports HTTP/1.1

{
  "port": {
    "binding:host_id": "ls",
    "allowed_address_pairs": [],
    "device_owner": "network:dhcp",
    "port_security_enabled": false,
    "binding:profile": {},
    "fixed_ips": [
      {
        "subnet_id": "cfb6c8b5-d94d-4788-b1b6-769ab403df4a",
        "ip_address": "10.100.0.2"
      }
    ],
    "id": "e3232392-b752-4f20-869e-2186ac76edba",
    "security_groups": [],
    "device_id": "dhcpf7a98173-37b1-5e61-9aec-e3057d825ed1-82953a35-0554-48e4-9ace-200a93ad88df",
    "name": "",
    "admin_state_up": true,
    "network_id": "82953a35-0554-48e4-9ace-200a93ad88df",
    "tenant_id": "0dde8d3f09764e849d19f0550ef11b26",
    "binding:vif_details": {},
    "binding:vnic_type": "normal",
    "binding:vif_type": "unbound",
    "mac_address": "FA:16:3E:9F:09:48"
  }
}

---
PUT /controller/nb/v2/neutron/ports/e3232392-b752-4f20-869e-2186ac76edba HTTP/1.1

{
  "port": {
    "binding:host_id": "ls",
    "allowed_address_pairs": [],
    "extra_dhcp_opts": [],
    "device_owner": "network:dhcp",
    "binding:profile": {},
    "port_security_enabled": false,
    "security_groups": [],
    "device_id": "dhcpf7a98173-37b1-5e61-9aec-e3057d825ed1-82953a35-0554-48e4-9ace-200a93ad88df",
    "name": "",
    "admin_state_up": true,
    "binding:vif_details": {
      "port_filter": true
    },
    "binding:vnic_type": "normal",
    "binding:vif_type": "ovs"
  }
}

Change-Id: Ie9b9baeea800955413ab71ebf9fa3f258f8df97c
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agonetvirt: use setID/getID to catch up neutron northbound change
Isaku Yamahata [Fri, 14 Aug 2015 23:10:12 +0000 (16:10 -0700)]
netvirt: use setID/getID to catch up neutron northbound change

Neutron northbound introduced setID/getID method and deprecated
set<ResourceUUID>/get<ResrouceUUID> by
changeset of 235320f1eef27f7b9a9ad85043fc26f98816f982
change id of I00f473e1da31bb14bbdc27b1ccb1c8026b4343d9
This patch update ovsdb/netvirt to use new method and stop to use
deprecated method.

Change-Id: Ic2f97ddc9a03ef62eb1a66d56598d4b078125d2f
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agoClean up ConfigActivator
Stephen Kitt [Fri, 14 Aug 2015 16:20:18 +0000 (18:20 +0200)]
Clean up ConfigActivator

Method refactor to greatly reduce duplicated code.

Change-Id: I3f52d0c4a6a8ade3d87c8a1bd1a94d702f280c1a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoworkaround: external arp resolver doesn't know IPv6
Isaku Yamahata [Fri, 24 Jul 2015 02:18:11 +0000 (19:18 -0700)]
workaround: external arp resolver doesn't know IPv6

ovsdb net-virt doesn't support IPv6 yet. On the other hand opensatck
neutron Kilo release supports IPv6.
So as work around, ignore subnet of IPv6 in external arp resolver.
Otherwise the following exception occurs.

> 2015-07-22 15:23:31,185 | ERROR | ntDispatcherImpl | EventDispatcher                  | 400 - org.opendaylight.ovsdb.openstack.net-virt - 1.2.0.SNAPSHOT | Exception in dispatching event NorthboundEvent [handler=NEUTRON_PORT, action=ADD, port=NeutronPort [portUUID=02b4a96c-e117-47e6-8af6-174edaf49c66, networkUUID=15f6f0f3-233a-4e8e-9efa-5ed092aca8b4, name=, adminStateUp=true, status=null, macAddress=FA:16:3E:57:87:DB, fixedIPs=[Neutron_IPs{ipAddress='172.24.4.3', subnetUUID='39cc05f6-dd5e-488a-b13e-b954fb2e0a9d'}, Neutron_IPs{ipAddress='2001:db8::3', subnetUUID='67ba5967-ff6a-4dc0-aea3-cd59d7bd12ef'}], deviceID=076e7e06-8d4f-42a5-9a1a-e8f41a0993d4, deviceOwner=network:router_gateway, tenantID=d41ad324d7a740b685895f6054dc41d7, floatingIPMap={}, securityGroups=[], bindinghostID=, bindingvnicType=normal, bindingvnicType=normal], subnet=null, router=null, routerInterface=null, floatingIP=null, network=null, loadBalancer=null, loadBalancerPool=null, loadBalancerPoolMember=null]
> java.lang.IllegalArgumentException: Supplied value "2001:db8::2" does not match required pattern "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?$"
>         at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)[39:com.google.guava:18.0.0]
>         at org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address.<init>(Ipv4Address.java:50)[49:org.opendaylight.yangtools.model.ietf-inet-types:2010.9.24.8-SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.triggerGatewayMacResolver(NeutronL3Adapter.java:1289)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.handleNeutronPortEvent(NeutronL3Adapter.java:212)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.PortHandler.doNeutronPortCreated(PortHandler.java:68)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.PortHandler.processEvent(PortHandler.java:164)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:97)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.access$100(EventDispatcherImpl.java:30)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl$1.run(EventDispatcherImpl.java:59)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
>         at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]

Change-Id: Ia98dffa1b783e5f9d6d1c7e9b8f263213318789b
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agoBUG #4045 net-virt-provider: workaround: ipv6 is not supported yet
Isaku Yamahata [Fri, 24 Jul 2015 02:15:53 +0000 (19:15 -0700)]
BUG #4045 net-virt-provider: workaround: ipv6 is not supported yet

At this point, ipv6 is not supported yet. But openstack neutron does.
Ignore ipv6 address for now. Otherwise exception as blow is thrown.
This patches works around BUG #4045.
TODO: implement ipv6 and then remove this work around

> 2015-07-21 17:22:14,077 | ERROR | ntDispatcherImpl | EventDispatcher                  | 400 - org.opendaylight.ovsdb.openstack.net-virt - 1.2.0.SNAPSHOT | Exception in dispatching event NorthboundEvent [handler=NEUTRON_PORT, action=ADD, port=NeutronPort [portUUID=c625a77a-4720-4115-beb4-fd48bcd36727, networkUUID=dbe6f7d4-695f-45cc-a71c-1454057a4928, name=, adminStateUp=true, status=null, macAddress=FA:16:3E:39:9C:53, fixedIPs=[Neutron_IPs{ipAddress='fdbe:bc75:a195::1', subnetUUID='9a1077b9-a35f-46fe-a2d7-1536301979e8'}], deviceID=76751b66-0e7c-402d-9196-fac1d8c34627, deviceOwner=network:router_interface, tenantID=be9da0d68e28424db03bfb32574c78e5, floatingIPMap={}, securityGroups=[], bindinghostID=, bindingvnicType=normal, bindingvnicType=normal], subnet=null, router=null, routerInterface=null, floatingIP=null, network=null, loadBalancer=null, loadBalancerPool=null, loadBalancerPoolMember=null]
> java.lang.IllegalArgumentException: Supplied value "fdbe:bc75:a195:0:0:0:0:1/64" does not match required pattern "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))$"
>         at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)[39:com.google.guava:18.0.0]
>         at org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Prefix.<init>(Ipv4Prefix.java:49)[49:org.opendaylight.yangtools.model.ietf-inet-types:2010.9.24.8-SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.services.RoutingService.programRouterInterface(RoutingService.java:85)[401:org.opendaylight.ovsdb.openstack.net-virt-providers:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.programRouterInterfaceStage2(NeutronL3Adapter.java:855)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.programRouterInterfaceStage1(NeutronL3Adapter.java:833)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.programFlowForNetworkFromExternal(NeutronL3Adapter.java:720)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.programFlowsForNeutronRouterInterface(NeutronL3Adapter.java:688)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.handleNeutronRouterInterfaceEvent(NeutronL3Adapter.java:227)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.NeutronL3Adapter.handleNeutronPortEvent(NeutronL3Adapter.java:186)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.PortHandler.doNeutronPortCreated(PortHandler.java:68)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.PortHandler.processEvent(PortHandler.java:164)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:96)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl.access$100(EventDispatcherImpl.java:30)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at org.opendaylight.ovsdb.openstack.netvirt.impl.EventDispatcherImpl$1.run(EventDispatcherImpl.java:59)[400:org.opendaylight.ovsdb.openstack.net-virt:1.2.0.SNAPSHOT]
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
>         at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]

Change-Id: I5db1bc9ad9f008c984c4ab4fa34569a3baffe310
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agocatch up for ODL neutron northbound change
Isaku Yamahata [Fri, 24 Jul 2015 02:08:54 +0000 (19:08 -0700)]
catch up for ODL neutron northbound change

The change set of 062fa890fb918daa62114eddac75d7956c83e5f7,
Change-Id of I9c4041f334d65f7007b68eb7a14eb57a0c08bb9e
in ODL neutron project
eliminates NeutronSubnet.getPortInSubnets().
This causes compilation error with symbol not found.
This patch fixes it by avoiding eliminated method.

Change-Id: I2320e62dd7eb3e7da8218ff9701550bde96d820f
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
8 years agoBug 3378 - ovsdb netvirt needs help in getting mac for a given ip in br-ex
Anil Vishnoi [Sun, 19 Jul 2015 01:58:31 +0000 (18:58 -0700)]
Bug 3378 - ovsdb netvirt needs help in getting mac for a given ip in br-ex

Added periodic refresh of gateway mac address
Fixed packet deserialization exception

Change-Id: Ib898347770cee213883c5222649b267efb4c701a
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
8 years agoEnable cancel monitoring
Hsin-Yi Shen [Fri, 7 Aug 2015 18:58:20 +0000 (11:58 -0700)]
Enable cancel monitoring

Enable monitor cancellation rpc method.
Also rewrite code of handle new ssl connection to remove thread sleep
and improve performance.

Signed-off-by: Hsin-Yi Shen <syshen66@gmail.com>
Change-Id: Ic5982e28192ed0db1a363889a9eaf3b0817f17b8

8 years agoMerge "Revert "Remove incorrect or unnecessary relativePaths""
Anil Vishnoi [Tue, 11 Aug 2015 17:05:26 +0000 (17:05 +0000)]
Merge "Revert "Remove incorrect or unnecessary relativePaths""

8 years agoRevert "Remove incorrect or unnecessary relativePaths"
Flavio Fernandes [Tue, 11 Aug 2015 16:47:45 +0000 (16:47 +0000)]
Revert "Remove incorrect or unnecessary relativePaths"

[12:45:12]  <zxiiro> flaviof: we need ot revert that last one it breaks autorelease

This reverts commit f9e874496792523a80586bdbade89b1a5c4f1bb9.

Change-Id: Id6efe3dc5466d529174ea8f5214ad0ea93f74f97
Signed-off-by: Flavio Fernandes <ffernand@redhat.com>
8 years agoMerge "Remove incorrect or unnecessary relativePaths"
Flavio Fernandes [Tue, 11 Aug 2015 16:44:33 +0000 (16:44 +0000)]
Merge "Remove incorrect or unnecessary relativePaths"

8 years agoRemove incorrect or unnecessary relativePaths
Stephen Kitt [Tue, 11 Aug 2015 15:34:15 +0000 (17:34 +0200)]
Remove incorrect or unnecessary relativePaths

For external modules, relativePath doesn't make much sense.
For internal modules, an empty relativePath can be safely deleted.

Change-Id: Ib67b950d1821797be677cc6524e5d387f415479e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoFix license header violations in ovs-sfc
Thanh Ha [Sun, 9 Aug 2015 16:07:55 +0000 (12:07 -0400)]
Fix license header violations in ovs-sfc

Change-Id: Ic9d46b75c5dceeb841a1aa8c3b879ee01ef05fee
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in plugin-mdsal-adapter
Thanh Ha [Sun, 9 Aug 2015 16:05:43 +0000 (12:05 -0400)]
Fix license header violations in plugin-mdsal-adapter

Change-Id: Ibd122f1560d5dd60adb7d4cfa8b1e6840aac1bc9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>