Merge "Bug 4911 - unbreak a55db97e8ce43aec9e2f3a3fe70f6bec3272195b"
authorSam Hague <shague@redhat.com>
Sun, 10 Jan 2016 13:06:26 +0000 (13:06 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Sun, 10 Jan 2016 13:06:26 +0000 (13:06 +0000)
54 files changed:
features/pom.xml
features/src/main/features/features.xml
netvirt/api/src/main/yang/netvirt.yang
netvirt/artifacts/pom.xml [deleted file]
netvirt/features/pom.xml [deleted file]
netvirt/features/src/main/features/features.xml [deleted file]
netvirt/impl/pom.xml [deleted file]
netvirt/impl/src/main/config/default-config.xml [deleted file]
netvirt/impl/src/main/java/org/opendaylight/ovsdb/netvirt/impl/NetvirtProvider.java [deleted file]
netvirt/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModule.java [deleted file]
netvirt/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleFactory.java [deleted file]
netvirt/impl/src/main/yang/netvirt-impl.yang [deleted file]
netvirt/impl/src/test/java/org/opendaylight/ovsdb/netvirt/impl/NetvirtProviderTest.java [deleted file]
netvirt/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleFactoryTest.java [deleted file]
netvirt/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleTest.java [deleted file]
netvirt/karaf/pom.xml [deleted file]
netvirt/pom.xml
netvirt/renderers/hwgw/src/main/config/default-config.xml
netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev141210/HwgwModule.java [deleted file]
netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev141210/HwgwModuleFactory.java [deleted file]
netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev151227/HwgwModule.java [moved from netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/hwgw/rev141210/HwgwModule.java with 85% similarity]
netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev151227/HwgwModuleFactory.java [moved from netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/hwgw/rev141210/HwgwModuleFactory.java with 88% similarity]
netvirt/renderers/hwgw/src/main/yang/hwgw.yang
netvirt/renderers/hwgw/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev151227/HwgwModuleFactoryTest.java [moved from netvirt/renderers/hwgw/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/hwgw/rev141210/HwgwModuleFactoryTest.java with 94% similarity]
netvirt/renderers/hwgw/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev151227/HwgwModuleTest.java [moved from netvirt/renderers/hwgw/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/hwgw/rev141210/HwgwModuleTest.java with 98% similarity]
openstack/net-virt-providers/src/main/config/default-config.xml
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/NetvirtProvidersProvider.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/AbstractServiceInstance.java
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/OF13Provider.java
openstack/net-virt-providers/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/providers/impl/rev150513/NetvirtProvidersImplModule.java
openstack/net-virt-providers/src/main/yang/netvirt-providers-impl.yang
openstack/net-virt-providers/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/AbstractServiceInstanceTest.java
openstack/net-virt-providers/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/ArpResponderServiceTest.java
openstack/net-virt-providers/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/EgressAclServiceTest.java
openstack/net-virt-providers/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/InboundNatServiceTest.java
openstack/net-virt-providers/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/L2FowardingServiceTest.java
openstack/net-virt-providers/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/services/L3FowardingServiceTest.java
openstack/net-virt/src/main/config/default-config.xml
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/NetvirtProvider.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/api/Constants.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/OvsdbDataChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImpl.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronFloatingIPChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronLoadBalancerPoolChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronLoadBalancerPoolMemberChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronNetworkChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronPortChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronRouterChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronSecurityGroupDataChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronSecurityRuleDataChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/translator/iaware/impl/NeutronSubnetChangeListener.java
openstack/net-virt/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev150513/NetvirtImplModule.java
openstack/net-virt/src/main/yang/netvirt-impl.yang
openstack/net-virt/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/impl/TenantNetworkManagerImplTest.java

index d5ee2402e6698266098fd8ef029a2d90b80297a2..e85dcea5750b73a3b8050142460d2d164bb59edd 100644 (file)
@@ -47,6 +47,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <properties>
     <odl.karaf.base.version>1.6.0-SNAPSHOT</odl.karaf.base.version>
     <mdsal.version>1.3.0-SNAPSHOT</mdsal.version>
+    <mdsal.model.version>0.8.0-SNAPSHOT</mdsal.model.version>
+    <restconf.version>1.3.0-SNAPSHOT</restconf.version>
     <neutron.version>0.6.0-SNAPSHOT</neutron.version>
     <openflowplugin.version>0.2.0-SNAPSHOT</openflowplugin.version>
     <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
@@ -79,6 +81,22 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <type>xml</type>
       <classifier>features</classifier>
     </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>features-mdsal-model</artifactId>
+      <version>${mdsal.model.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>features-restconf</artifactId>
+      <version>${restconf.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
     <!-- external dependencies -->
     <!-- TODO clean up based on what is provided by odlparent -->
     <dependency>
@@ -283,6 +301,23 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <type>xml</type>
       <classifier>features</classifier>
     </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>netvirt-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>hwgw</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>hwvtepsouthbound-features</artifactId>
+      <version>${project.version}</version>
+      <type>xml</type>
+      <classifier>features</classifier>
+    </dependency>
     <!-- DLUX dependency for the UI -->
     <dependency>
       <groupId>org.opendaylight.dlux</groupId>
index f8949f542f45a26345dce7111e2fc7701eef39f4..466fecd57822e921e09aa6d77fed6209bddc4772 100644 (file)
@@ -9,6 +9,9 @@
   <repository>mvn:org.opendaylight.controller/features-mdsal/{{VERSION}}/xml/features</repository>
   <repository>mvn:org.opendaylight.ovsdb/library-features/{{VERSION}}/xml/features</repository>
   <repository>mvn:org.opendaylight.dlux/features-dlux/{{VERSION}}/xml/features</repository>
+  <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features</repository>
+  <repository>mvn:org.opendaylight.netconf/features-restconf/{{VERSION}}/xml/features</repository>
+  <repository>mvn:org.opendaylight.ovsdb/hwvtepsouthbound-features/{{VERSION}}/xml/features</repository>
 
   <feature name="odl-ovsdb-all" description="OpenDaylight :: OVSDB :: all"
            version='${project.version}'>
     <feature version="${dlux.version}">odl-dlux-core</feature>
     <bundle>mvn:org.opendaylight.ovsdb/ovsdb-ui-bundle/{{VERSION}}</bundle>
   </feature>
+  <feature name='odl-netvirt-api' version='${project.version}' description='OpenDaylight :: netvirt :: api'>
+    <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
+    <bundle>mvn:org.opendaylight.ovsdb/netvirt-api/{{VERSION}}</bundle>
+  </feature>
+  <feature name='odl-netvirt-rest' version='${project.version}' description='OpenDaylight :: netvirt :: REST'>
+    <feature version="${project.version}">odl-netvirt-api</feature>
+    <feature version="${restconf.version}">odl-restconf</feature>
+  </feature>
+  <feature name='odl-netvirt-ui' version='${project.version}' description='OpenDaylight :: netvirt :: UI'>
+    <feature version="${project.version}">odl-netvirt-rest</feature>
+    <feature version="${restconf.version}">odl-mdsal-apidocs</feature>
+    <feature version="${mdsal.version}">odl-mdsal-xsql</feature>
+  </feature>
+  <feature name='odl-netvirt-hwgw' version='${project.version}' description='OpenDaylight :: netvirt :: Hardware Gateway'>
+    <feature version="${project.version}">odl-netvirt-api</feature>
+    <feature version='${project.version}'>odl-ovsdb-hwvtepsouthbound</feature>
+    <bundle>mvn:org.opendaylight.ovsdb/hwgw/{{VERSION}}</bundle>
+  </feature>
+
 </features>
index df521428998fcf26f3d4084551c4489e9c021ec4..1571d6f761a5e850ab7ed3afeef78143965af065 100644 (file)
@@ -3,7 +3,7 @@ module netvirt {
     namespace "urn:opendaylight:params:xml:ns:yang:netvirt";
     prefix "netvirt";
 
-    revision "2015-01-05" {
+    revision "2015-12-27" {
         description "Initial revision of netvirt model";
     }
 }
diff --git a/netvirt/artifacts/pom.xml b/netvirt/artifacts/pom.xml
deleted file mode 100644 (file)
index 6017493..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2015 Red Hat, Inc. and others.  All rights reserved.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>odlparent-lite</artifactId>
-    <version>1.6.0-SNAPSHOT</version>
-    <relativePath/>
-  </parent>
-
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.opendaylight.ovsdb</groupId>
-  <artifactId>netvirt-artifacts</artifactId>
-  <version>1.2.1-SNAPSHOT</version>
-  <packaging>pom</packaging>
-
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>${project.groupId}</groupId>
-        <artifactId>netvirt-api</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>${project.groupId}</groupId>
-        <artifactId>netvirt-impl</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>${project.groupId}</groupId>
-        <artifactId>netvirt-features</artifactId>
-        <version>${project.version}</version>
-        <classifier>features</classifier>
-        <type>xml</type>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-</project>
diff --git a/netvirt/features/pom.xml b/netvirt/features/pom.xml
deleted file mode 100644 (file)
index 1e2f861..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2015 Red Hat, Inc. and others. All rights reserved.
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>features-parent</artifactId>
-    <version>1.6.0-SNAPSHOT</version>
-    <relativePath/>
-  </parent>
-
-  <groupId>org.opendaylight.ovsdb</groupId>
-  <artifactId>netvirt-features</artifactId>
-  <version>1.2.1-SNAPSHOT</version>
-  <name>${project.artifactId}</name>
-  <modelVersion>4.0.0</modelVersion>
-  <prerequisites>
-    <maven>3.1.1</maven>
-  </prerequisites>
-
-  <properties>
-    <configfile.directory>etc/opendaylight/karaf</configfile.directory>
-    <mdsal.version>1.3.0-SNAPSHOT</mdsal.version>
-    <mdsal.model.version>0.8.0-SNAPSHOT</mdsal.model.version>
-    <restconf.version>1.3.0-SNAPSHOT</restconf.version>
-    <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
-  </properties>
-  <dependencyManagement>
-    <dependencies>
-      <!-- project specific dependencies -->
-      <dependency>
-        <groupId>org.opendaylight.yangtools</groupId>
-        <artifactId>yangtools-artifacts</artifactId>
-        <version>${yangtools.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>mdsal-artifacts</artifactId>
-        <version>${mdsal.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.netconf</groupId>
-        <artifactId>restconf-artifacts</artifactId>
-        <version>${restconf.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-  <dependencies>
-    <dependency>
-      <groupId>org.opendaylight.yangtools</groupId>
-      <artifactId>features-yangtools</artifactId>
-      <classifier>features</classifier>
-      <version>${yangtools.version}</version>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>features-mdsal-model</artifactId>
-      <version>${mdsal.model.version}</version>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.netconf</groupId>
-      <artifactId>features-restconf</artifactId>
-      <classifier>features</classifier>
-      <version>${restconf.version}</version>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>features-mdsal</artifactId>
-      <classifier>features</classifier>
-      <type>xml</type>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>netvirt-impl</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>netvirt-impl</artifactId>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <classifier>config</classifier>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>netvirt-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
-</project>
diff --git a/netvirt/features/src/main/features/features.xml b/netvirt/features/src/main/features/features.xml
deleted file mode 100644 (file)
index 2d095e8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright (c) 2015 Red Hat, Inc.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<features name="odl-netvirt-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
-  <repository>mvn:org.opendaylight.controller/features-mdsal/{{VERSION}}/xml/features</repository>
-  <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features</repository>
-  <repository>mvn:org.opendaylight.netconf/features-restconf/{{VERSION}}/xml/features</repository>
-  <feature name='odl-netvirt-api' version='${project.version}' description='OpenDaylight :: netvirt :: api'>
-    <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
-    <bundle>mvn:org.opendaylight.ovsdb/netvirt-api/{{VERSION}}</bundle>
-  </feature>
-  <feature name='odl-netvirt' version='${project.version}' description='OpenDaylight :: netvirt'>
-    <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
-    <feature version='${project.version}'>odl-netvirt-api</feature>
-    <bundle>mvn:org.opendaylight.ovsdb/netvirt-impl/{{VERSION}}</bundle>
-    <configfile finalname="${configfile.directory}/netvirt.xml">mvn:org.opendaylight.ovsdb/netvirt-impl/{{VERSION}}/xml/config</configfile>
-  </feature>
-  <feature name='odl-netvirt-rest' version='${project.version}' description='OpenDaylight :: netvirt :: REST'>
-    <feature version="${project.version}">odl-netvirt</feature>
-    <feature version="${restconf.version}">odl-restconf</feature>
-  </feature>
-  <feature name='odl-netvirt-ui' version='${project.version}' description='OpenDaylight :: netvirt :: UI'>
-    <feature version="${project.version}">odl-netvirt-rest</feature>
-    <feature version="${restconf.version}">odl-mdsal-apidocs</feature>
-    <feature version="${mdsal.version}">odl-mdsal-xsql</feature>
-  </feature>
-
-</features>
diff --git a/netvirt/impl/pom.xml b/netvirt/impl/pom.xml
deleted file mode 100644 (file)
index 34376ba..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: --><!--
-Copyright (c) 2015 Red Hat, Inc. and others. All rights reserved.
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-  <parent>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>config-parent</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-    <relativePath/>
-  </parent>
-
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.opendaylight.ovsdb</groupId>
-  <artifactId>netvirt-impl</artifactId>
-  <version>1.2.1-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-  <dependencies>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>netvirt-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <!-- Testing Dependencies -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>
diff --git a/netvirt/impl/src/main/config/default-config.xml b/netvirt/impl/src/main/config/default-config.xml
deleted file mode 100644 (file)
index 530a184..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright (c) 2015 Red Hat, Inc. and others.  All rights reserved.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<snapshot>
-  <required-capabilities>
-      <capability>urn:opendaylight:params:xml:ns:yang:netvirt:impl?module=netvirt-impl&amp;revision=2014-12-10</capability>
-      <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
-  </required-capabilities>
-  <configuration>
-
-    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-        <module>
-          <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:netvirt:impl">prefix:netvirt</type>
-          <name>netvirt-default</name>
-          <broker>
-            <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
-            <name>binding-osgi-broker</name>
-          </broker>
-        </module>
-      </modules>
-    </data>
-  </configuration>
-</snapshot>
diff --git a/netvirt/impl/src/main/java/org/opendaylight/ovsdb/netvirt/impl/NetvirtProvider.java b/netvirt/impl/src/main/java/org/opendaylight/ovsdb/netvirt/impl/NetvirtProvider.java
deleted file mode 100644 (file)
index 33dffcd..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2015 Red Hat, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.ovsdb.netvirt.impl;
-
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NetvirtProvider implements BindingAwareProvider, AutoCloseable {
-
-    private static final Logger LOG = LoggerFactory.getLogger(NetvirtProvider.class);
-
-    @Override
-    public void onSessionInitiated(ProviderContext session) {
-        LOG.info("NetvirtProvider Session Initiated");
-    }
-
-    @Override
-    public void close() throws Exception {
-        LOG.info("NetvirtProvider Closed");
-    }
-
-}
diff --git a/netvirt/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModule.java b/netvirt/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModule.java
deleted file mode 100644 (file)
index ba8e18e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2015 Red Hat, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.impl.rev141210;
-
-import org.opendaylight.ovsdb.netvirt.impl.NetvirtProvider;
-
-public class NetvirtModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.impl.rev141210.AbstractNetvirtModule {
-    public NetvirtModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public NetvirtModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.impl.rev141210.NetvirtModule oldModule, java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void customValidation() {
-        // add custom validation form module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        NetvirtProvider provider = new NetvirtProvider();
-        getBrokerDependency().registerProvider(provider);
-        return provider;
-    }
-
-}
diff --git a/netvirt/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleFactory.java b/netvirt/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleFactory.java
deleted file mode 100644 (file)
index af411a1..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2015 Red Hat, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-/*
-* Generated file
-*
-* Generated from: yang module name: netvirt yang module local name: netvirt
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri Jan 02 13:49:24 CST 2015
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.impl.rev141210;
-public class NetvirtModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.impl.rev141210.AbstractNetvirtModuleFactory {
-
-}
diff --git a/netvirt/impl/src/main/yang/netvirt-impl.yang b/netvirt/impl/src/main/yang/netvirt-impl.yang
deleted file mode 100644 (file)
index 7fc17ae..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-module netvirt-impl {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:netvirt:impl";
-    prefix "netvirt-impl";
-
-    import config { prefix config; revision-date 2013-04-05; }
-    import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
-
-    description
-        "Service definition for netvirt project";
-
-    revision "2014-12-10" {
-        description
-            "Initial revision";
-    }
-
-    identity netvirt {
-        base config:module-type;
-        config:java-name-prefix Netvirt;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case netvirt {
-            when "/config:modules/config:module/config:type = 'netvirt'";
-            container broker {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity md-sal-binding:binding-broker-osgi-registry;
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/netvirt/impl/src/test/java/org/opendaylight/ovsdb/netvirt/impl/NetvirtProviderTest.java b/netvirt/impl/src/test/java/org/opendaylight/ovsdb/netvirt/impl/NetvirtProviderTest.java
deleted file mode 100644 (file)
index 0d2be07..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2015 Red Hat, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.ovsdb.netvirt.impl;
-
-import org.junit.Test;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-
-import static org.mockito.Mockito.mock;
-
-public class NetvirtProviderTest {
-    @Test
-    public void testOnSessionInitiated() {
-        NetvirtProvider provider = new NetvirtProvider();
-
-        // ensure no exceptions
-        // currently this method is empty
-        provider.onSessionInitiated(mock(BindingAwareBroker.ProviderContext.class));
-    }
-
-    @Test
-    public void testClose() throws Exception {
-        NetvirtProvider provider = new NetvirtProvider();
-
-        // ensure no exceptions
-        // currently this method is empty
-        provider.close();
-    }
-}
diff --git a/netvirt/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleFactoryTest.java b/netvirt/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleFactoryTest.java
deleted file mode 100644 (file)
index c46ffdf..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (c) 2015 Red Hat, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.impl.rev141210;
-
-import org.junit.Test;
-
-public class NetvirtModuleFactoryTest {
-    @Test
-    public void testFactoryConstructor() {
-        // ensure no exceptions on construction
-        new NetvirtModuleFactory();
-    }
-}
diff --git a/netvirt/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleTest.java b/netvirt/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/impl/rev141210/NetvirtModuleTest.java
deleted file mode 100644 (file)
index cec1710..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2015 Red Hat, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.impl.rev141210;
-
-import org.junit.Test;
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.opendaylight.controller.config.api.JmxAttribute;
-import org.opendaylight.controller.config.api.ModuleIdentifier;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.ovsdb.netvirt.impl.NetvirtProvider;
-
-import javax.management.ObjectName;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class NetvirtModuleTest {
-    @Test
-    public void testCustomValidation() {
-        NetvirtModule module = new NetvirtModule(mock(ModuleIdentifier.class), mock(DependencyResolver.class));
-
-        // ensure no exceptions on validation
-        // currently this method is empty
-        module.customValidation();
-    }
-
-    @Test
-    public void testCreateInstance() throws Exception {
-        // configure mocks
-        DependencyResolver dependencyResolver = mock(DependencyResolver.class);
-        BindingAwareBroker broker = mock(BindingAwareBroker.class);
-        when(dependencyResolver.resolveInstance(eq(BindingAwareBroker.class), any(ObjectName.class), any(JmxAttribute.class))).thenReturn(broker);
-
-        // create instance of module with injected mocks
-        NetvirtModule module = new NetvirtModule(mock(ModuleIdentifier.class), dependencyResolver);
-
-        // getInstance calls resolveInstance to get the broker dependency and then calls createInstance
-        AutoCloseable closeable = module.getInstance();
-
-        // verify that the module registered the returned provider with the broker
-        verify(broker).registerProvider((NetvirtProvider)closeable);
-
-        // ensure no exceptions on close
-        closeable.close();
-    }
-}
diff --git a/netvirt/karaf/pom.xml b/netvirt/karaf/pom.xml
deleted file mode 100644 (file)
index f5d90d4..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2015 Red Hat, Inc. and others. All rights reserved.
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.opendaylight.controller</groupId>
-    <artifactId>karaf-parent</artifactId>
-    <version>1.6.0-SNAPSHOT</version>
-    <relativePath/>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.opendaylight.ovsdb</groupId>
-  <artifactId>netvirt-karaf</artifactId>
-  <version>1.2.1-SNAPSHOT</version>
-  <name>${project.artifactId}</name>
-  <prerequisites>
-    <maven>3.1.1</maven>
-  </prerequisites>
-  <properties>
-    <karaf.localFeature>odl-netvirt-ui</karaf.localFeature>
-  </properties>
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>${project.groupId}</groupId>
-        <artifactId>netvirt-artifacts</artifactId>
-        <version>${project.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-  <dependencies>
-    <dependency>
-      <!-- scope is compile so all features (there is only one) are installed
-      into startup.properties and the feature repo itself is not installed -->
-      <groupId>org.apache.karaf.features</groupId>
-      <artifactId>framework</artifactId>
-      <type>kar</type>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>netvirt-features</artifactId>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-  </dependencies>
-  <!-- DO NOT install or deploy the karaf artifact -->
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
index d0c5e1cb63cee84759be48a1fe28aa921b2ad5bb..b3411fc7aa1f9d0d6e4ef4afc4e218a3297b3089 100644 (file)
@@ -25,10 +25,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   </prerequisites>
   <modules>
     <module>api</module>
-    <module>impl</module>
-    <module>karaf</module>
-    <module>features</module>
-    <module>artifacts</module>
     <module>renderers</module>
   </modules>
   <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
index daf2badb71fe140ba10b6480091b883cac3e944f..09926d96a8c096737130540577feaf9fa17627cd 100644 (file)
@@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 -->
 <snapshot>
   <required-capabilities>
-      <capability>urn:opendaylight:params:xml:ns:yang:hwgw?module=hwgw&amp;revision=2014-12-10</capability>
+      <capability>urn:opendaylight:params:xml:ns:yang:hwgw?module=hwgw&amp;revision=2015-12-27</capability>
       <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
   </required-capabilities>
   <configuration>
diff --git a/netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev141210/HwgwModule.java b/netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev141210/HwgwModule.java
deleted file mode 100644 (file)
index eedab4a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev141210;
-public class HwgwModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev141210.AbstractHwgwModule {
-    public HwgwModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public HwgwModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev141210.HwgwModule oldModule, java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void customValidation() {
-        // add custom validation form module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        // TODO:implement
-        throw new java.lang.UnsupportedOperationException();
-    }
-
-}
diff --git a/netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev141210/HwgwModuleFactory.java b/netvirt/renderers/hwgw/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/netvirt/hwgw/rev141210/HwgwModuleFactory.java
deleted file mode 100644 (file)
index df2b6d4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: hwgw yang module local name: hwgw
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Tue Dec 22 22:54:15 EST 2015
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev141210;
-public class HwgwModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev141210.AbstractHwgwModuleFactory {
-
-}
@@ -5,16 +5,16 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hwgw.rev141210;
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev151227;
 
 import org.opendaylight.ovsdb.netvirt.renderers.hwgw.HwgwProvider;
 
-public class HwgwModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev141210.AbstractHwgwModule {
+public class HwgwModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev151227.AbstractHwgwModule {
     public HwgwModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
         super(identifier, dependencyResolver);
     }
 
-    public HwgwModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hwgw.rev141210.HwgwModule oldModule, java.lang.AutoCloseable oldInstance) {
+    public HwgwModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev151227.HwgwModule oldModule, java.lang.AutoCloseable oldInstance) {
         super(identifier, dependencyResolver, oldModule, oldInstance);
     }
 
@@ -14,7 +14,7 @@
 *
 * Do not modify this file unless it is present under src/main directory
 */
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hwgw.rev141210;
-public class HwgwModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev141210.AbstractHwgwModuleFactory {
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev151227;
+public class HwgwModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev151227.AbstractHwgwModuleFactory {
 
 }
index 41d098b260f19b75d83308d8f2a18f768bb92d2f..22b2f503e3b659e2be3a97515e3dda6969a1eedf 100644 (file)
@@ -9,7 +9,7 @@ module hwgw {
     description
         "Service definition for hwgw project";
 
-    revision "2014-12-10" {
+    revision "2015-12-27" {
         description
             "Initial revision";
     }
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.hwgw.rev141210;
+package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.hwgw.rev151227;
 
 import org.junit.Test;
 import org.opendaylight.controller.config.api.DependencyResolver;
index f748ee76a4100bd81f991b71324cc638f59650b6..cdbbec28ac687f3d52eb39724e73005604262ecc 100644 (file)
             <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
             <name>binding-osgi-broker</name>
           </broker>
+          <clustering-entity-ownership-service>
+            <type xmlns:ns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:entity-ownership-service">ns:entity-ownership-service</type>
+            <name>entity-ownership-service</name>
+          </clustering-entity-ownership-service>
         </module>
       </modules>
     </data>
index e6037c09aa8e06e8667d9a0f803518488b0c0a5e..86556f6d4873efda77b757f1cfe0630b5796cb9a 100644 (file)
@@ -8,26 +8,42 @@
 
 package org.opendaylight.ovsdb.openstack.netvirt.providers;
 
+import org.opendaylight.ovsdb.openstack.netvirt.api.Constants;
+
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.common.api.clustering.Entity;
+import org.opendaylight.controller.md.sal.common.api.clustering.CandidateAlreadyRegisteredException;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipCandidateRegistration;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipChange;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListener;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListenerRegistration;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.concurrent.atomic.AtomicBoolean;
+
 /**
  * @author Sam Hague (shague@redhat.com)
  */
 public class NetvirtProvidersProvider implements BindingAwareProvider, AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(NetvirtProvidersProvider.class);
+
     private BundleContext bundleContext = null;
     private static DataBroker dataBroker = null;
     private ConfigActivator activator;
     private static ProviderContext providerContext = null;
+    private static EntityOwnershipService entityOwnershipService;
+    private ProviderEntityListener providerEntityListener = null;
+    private static AtomicBoolean hasProviderEntityOwnership = new AtomicBoolean(false);
 
-    public NetvirtProvidersProvider(BundleContext bundleContext) {
+    public NetvirtProvidersProvider(BundleContext bundleContext, EntityOwnershipService eos) {
         LOG.info("NetvirtProvidersProvider: bundleContext: {}", bundleContext);
         this.bundleContext = bundleContext;
+        entityOwnershipService = eos;
     }
 
     public static DataBroker getDataBroker() {
@@ -38,10 +54,15 @@ public class NetvirtProvidersProvider implements BindingAwareProvider, AutoClose
         return providerContext;
     }
 
+    public static boolean isMasterProviderInstance() {
+        return hasProviderEntityOwnership.get();
+    }
+
     @Override
     public void close() throws Exception {
         LOG.info("NetvirtProvidersProvider closed");
         activator.stop(bundleContext);
+        providerEntityListener.close();
     }
 
     @Override
@@ -55,5 +76,49 @@ public class NetvirtProvidersProvider implements BindingAwareProvider, AutoClose
         } catch (Exception e) {
             LOG.warn("Failed to start Netvirt: ", e);
         }
+        providerEntityListener = new ProviderEntityListener(this, entityOwnershipService);
+    }
+
+    private void handleOwnershipChange(EntityOwnershipChange ownershipChange) {
+        if (ownershipChange.isOwner()) {
+            LOG.info("*This* instance of OVSDB netvirt provider is a MASTER instance");
+            hasProviderEntityOwnership.set(true);
+        } else {
+            LOG.info("*This* instance of OVSDB netvirt provider is a SLAVE instance");
+            hasProviderEntityOwnership.set(false);
+        }
+    }
+
+    private class ProviderEntityListener implements EntityOwnershipListener {
+        private NetvirtProvidersProvider provider;
+        private EntityOwnershipListenerRegistration listenerRegistration;
+        private EntityOwnershipCandidateRegistration candidateRegistration;
+
+        ProviderEntityListener(NetvirtProvidersProvider provider,
+                               EntityOwnershipService entityOwnershipService) {
+            this.provider = provider;
+            this.listenerRegistration =
+                    entityOwnershipService.registerListener(Constants.NETVIRT_OWNER_ENTITY_TYPE, this);
+
+            //register instance entity to get the ownership of the netvirt provider
+            Entity instanceEntity = new Entity(
+                    Constants.NETVIRT_OWNER_ENTITY_TYPE, Constants.NETVIRT_OWNER_ENTITY_TYPE);
+            try {
+                this.candidateRegistration = entityOwnershipService.registerCandidate(instanceEntity);
+            } catch (CandidateAlreadyRegisteredException e) {
+                LOG.warn("OVSDB Netvirt Provider instance entity {} was already "
+                        + "registered for ownership", instanceEntity, e);
+            }
+        }
+
+        public void close() {
+            this.listenerRegistration.close();
+            this.candidateRegistration.close();
+        }
+
+        @Override
+        public void ownershipChanged(EntityOwnershipChange ownershipChange) {
+            provider.handleOwnershipChange(ownershipChange);
+        }
     }
 }
index 5a94eb972b8fa639938278590861e02f9a92700a..0727f3e0bfc74ed57068e068d69ebac270a8164c 100644 (file)
@@ -139,39 +139,43 @@ public abstract class AbstractServiceInstance {
     }
 
     protected void writeFlow(FlowBuilder flowBuilder, NodeBuilder nodeBuilder) {
-        LOG.debug("writeFlow 3: flowBuilder: {}, nodeBuilder: {}",
-                flowBuilder.build(), nodeBuilder.build());
-        WriteTransaction modification = dataBroker.newWriteOnlyTransaction();
-        LOG.debug("writeFlow: about to put nodePath for Flow {}, nodePath: {}",
-                flowBuilder.getFlowName(), createNodePath(nodeBuilder));
-        modification.put(LogicalDatastoreType.CONFIGURATION, createNodePath(nodeBuilder),
-                nodeBuilder.build(), true /*createMissingParents*/);
-        LOG.debug("writeFlow: about to put Flow {}", flowBuilder.getFlowName());
-        modification.put(LogicalDatastoreType.CONFIGURATION, createFlowPath(flowBuilder, nodeBuilder),
-                flowBuilder.build(), true /*createMissingParents*/);
-        LOG.debug("writeFlow: about to submit Flow {}", flowBuilder.getFlowName());
-        CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
-        LOG.debug("writeFlow: checking status of Flow {}", flowBuilder.getFlowName());
-        try {
-            commitFuture.checkedGet();  // TODO: Make it async (See bug 1362)
-            LOG.debug("Transaction success for write of Flow {}", flowBuilder.getFlowName());
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            modification.cancel();
+        if (NetvirtProvidersProvider.isMasterProviderInstance()) {
+            LOG.debug("writeFlow 3: flowBuilder: {}, nodeBuilder: {}",
+                    flowBuilder.build(), nodeBuilder.build());
+            WriteTransaction modification = dataBroker.newWriteOnlyTransaction();
+            LOG.debug("writeFlow: about to put nodePath for Flow {}, nodePath: {}",
+                    flowBuilder.getFlowName(), createNodePath(nodeBuilder));
+            modification.put(LogicalDatastoreType.CONFIGURATION, createNodePath(nodeBuilder),
+                    nodeBuilder.build(), true /*createMissingParents*/);
+            LOG.debug("writeFlow: about to put Flow {}", flowBuilder.getFlowName());
+            modification.put(LogicalDatastoreType.CONFIGURATION, createFlowPath(flowBuilder, nodeBuilder),
+                    flowBuilder.build(), true /*createMissingParents*/);
+            LOG.debug("writeFlow: about to submit Flow {}", flowBuilder.getFlowName());
+            CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
+            LOG.debug("writeFlow: checking status of Flow {}", flowBuilder.getFlowName());
+            try {
+                commitFuture.checkedGet();  // TODO: Make it async (See bug 1362)
+                LOG.debug("Transaction success for write of Flow {}", flowBuilder.getFlowName());
+            } catch (Exception e) {
+                LOG.error(e.getMessage(), e);
+                modification.cancel();
+            }
         }
     }
 
     protected void removeFlow(FlowBuilder flowBuilder, NodeBuilder nodeBuilder) {
-        WriteTransaction modification = dataBroker.newWriteOnlyTransaction();
-        modification.delete(LogicalDatastoreType.CONFIGURATION, createFlowPath(flowBuilder, nodeBuilder));
-
-        CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
-        try {
-            commitFuture.get();  // TODO: Make it async (See bug 1362)
-            LOG.debug("Transaction success for deletion of Flow {}", flowBuilder.getFlowName());
-        } catch (Exception e) {
-            LOG.error(e.getMessage(), e);
-            modification.cancel();
+        if (NetvirtProvidersProvider.isMasterProviderInstance()) {
+            WriteTransaction modification = dataBroker.newWriteOnlyTransaction();
+            modification.delete(LogicalDatastoreType.CONFIGURATION, createFlowPath(flowBuilder, nodeBuilder));
+
+            CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
+            try {
+                commitFuture.get();  // TODO: Make it async (See bug 1362)
+                LOG.debug("Transaction success for deletion of Flow {}", flowBuilder.getFlowName());
+            } catch (Exception e) {
+                LOG.error(e.getMessage(), e);
+                modification.cancel();
+            }
         }
     }
 
index 596ad714d1c750aa13d1b115834c490192d9f945..c46211f46ccac21fa96edbdb725cd3d8c4c6fd31 100644 (file)
@@ -1559,56 +1559,62 @@ public class OF13Provider implements ConfigInterface, NetworkingProvider {
     }
 
     private void writeGroup(GroupBuilder groupBuilder, NodeBuilder nodeBuilder) {
-        ReadWriteTransaction modification = dataBroker.newReadWriteTransaction();
-        InstanceIdentifier<Group> path1 = InstanceIdentifier.builder(Nodes.class).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory
-                .rev130819.nodes.Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Group.class,
-                        new GroupKey(groupBuilder.getGroupId())).build();
-        modification.put(LogicalDatastoreType.CONFIGURATION, path1, groupBuilder.build(), true /*createMissingParents*/);
-
-        CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
-        try {
-            commitFuture.get();  // TODO: Make it async (See bug 1362)
-            LOG.debug("Transaction success for write of Group " + groupBuilder.getGroupName());
-        } catch (InterruptedException|ExecutionException e) {
-            LOG.error(e.getMessage(), e);
+        if (NetvirtProvidersProvider.isMasterProviderInstance()) {
+            ReadWriteTransaction modification = dataBroker.newReadWriteTransaction();
+            InstanceIdentifier<Group> path1 = InstanceIdentifier.builder(Nodes.class).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory
+                    .rev130819.nodes.Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Group.class,
+                            new GroupKey(groupBuilder.getGroupId())).build();
+            modification.put(LogicalDatastoreType.CONFIGURATION, path1, groupBuilder.build(), true /*createMissingParents*/);
+
+            CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
+            try {
+                commitFuture.get();  // TODO: Make it async (See bug 1362)
+                LOG.debug("Transaction success for write of Group " + groupBuilder.getGroupName());
+            } catch (InterruptedException|ExecutionException e) {
+                LOG.error(e.getMessage(), e);
+            }
         }
     }
 
     private void removeGroup(GroupBuilder groupBuilder, NodeBuilder nodeBuilder) {
-        WriteTransaction modification = dataBroker.newWriteOnlyTransaction();
-        InstanceIdentifier<Group> path1 = InstanceIdentifier.builder(Nodes.class).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory
-                .rev130819.nodes.Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Group.class,
-                        new GroupKey(groupBuilder.getGroupId())).build();
-        modification.delete(LogicalDatastoreType.CONFIGURATION, path1);
-        CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
+        if (NetvirtProvidersProvider.isMasterProviderInstance()) {
+            WriteTransaction modification = dataBroker.newWriteOnlyTransaction();
+            InstanceIdentifier<Group> path1 = InstanceIdentifier.builder(Nodes.class).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory
+                    .rev130819.nodes.Node.class, nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Group.class,
+                            new GroupKey(groupBuilder.getGroupId())).build();
+            modification.delete(LogicalDatastoreType.CONFIGURATION, path1);
+            CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
 
-        try {
-            commitFuture.get();  // TODO: Make it async (See bug 1362)
-            LOG.debug("Transaction success for deletion of Group " + groupBuilder.getGroupName());
-        } catch (InterruptedException|ExecutionException e) {
-            LOG.error(e.getMessage(), e);
+            try {
+                commitFuture.get();  // TODO: Make it async (See bug 1362)
+                LOG.debug("Transaction success for deletion of Group " + groupBuilder.getGroupName());
+            } catch (InterruptedException|ExecutionException e) {
+                LOG.error(e.getMessage(), e);
+            }
         }
     }
 
     private void writeFlow(FlowBuilder flowBuilder, NodeBuilder nodeBuilder) {
-        ReadWriteTransaction modification = dataBroker.newReadWriteTransaction();
-        InstanceIdentifier<Flow> path1 =
-                InstanceIdentifier.builder(Nodes.class).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory
-                                .rev130819.nodes.Node.class,
-                        nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Table.class,
-                        new TableKey(flowBuilder.getTableId())).child(Flow.class, flowBuilder.getKey()).build();
+        if (NetvirtProvidersProvider.isMasterProviderInstance()){
+            ReadWriteTransaction modification = dataBroker.newReadWriteTransaction();
+            InstanceIdentifier<Flow> path1 =
+                    InstanceIdentifier.builder(Nodes.class).child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory
+                                    .rev130819.nodes.Node.class,
+                            nodeBuilder.getKey()).augmentation(FlowCapableNode.class).child(Table.class,
+                            new TableKey(flowBuilder.getTableId())).child(Flow.class, flowBuilder.getKey()).build();
 
-        //modification.put(LogicalDatastoreType.OPERATIONAL, path1, flowBuilder.build());
-        modification.put(LogicalDatastoreType.CONFIGURATION, path1, flowBuilder.build(),
-                true);//createMissingParents
+            //modification.put(LogicalDatastoreType.OPERATIONAL, path1, flowBuilder.build());
+            modification.put(LogicalDatastoreType.CONFIGURATION, path1, flowBuilder.build(),
+                    true);//createMissingParents
 
 
-        CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
-        try {
-            commitFuture.get();  // TODO: Make it async (See bug 1362)
-            LOG.debug("Transaction success for write of Flow " + flowBuilder.getFlowName());
-        } catch (InterruptedException|ExecutionException e) {
-            LOG.error(e.getMessage(), e);
+            CheckedFuture<Void, TransactionCommitFailedException> commitFuture = modification.submit();
+            try {
+                commitFuture.get();  // TODO: Make it async (See bug 1362)
+                LOG.debug("Transaction success for write of Flow " + flowBuilder.getFlowName());
+            } catch (InterruptedException|ExecutionException e) {
+                LOG.error(e.getMessage(), e);
+            }
         }
     }
 
index 51dfd624fa2133995b0a6ac35ad002a1cec55995..eaed95c249fc32ccf425bca6f0a632c00f43cb2c 100644 (file)
@@ -22,7 +22,7 @@ public class NetvirtProvidersImplModule extends org.opendaylight.yang.gen.v1.urn
 
     @Override
     public java.lang.AutoCloseable createInstance() {
-        NetvirtProvidersProvider provider = new NetvirtProvidersProvider(bundleContext);
+        NetvirtProvidersProvider provider = new NetvirtProvidersProvider(bundleContext, getClusteringEntityOwnershipServiceDependency());
         BindingAwareBroker localBroker = getBrokerDependency();
         localBroker.registerProvider(provider);
         return provider;
index 7ae4b17cef5823d29934a1521ac98baa00ad9e8b..a784a4b6f1ab06140087ddf84af1579ff2302846 100644 (file)
@@ -5,6 +5,7 @@ module netvirt-providers-impl {
 
     import config { prefix config; revision-date 2013-04-05; }
     import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
+    import opendaylight-entity-ownership-service {prefix eos; revision-date 2015-08-10;}
 
     description
         "Service definition for netvirt providers project";
@@ -30,6 +31,14 @@ module netvirt-providers-impl {
                     }
                 }
             }
+            container clustering-entity-ownership-service {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity eos:entity-ownership-service;
+                    }
+                }
+            }
         }
     }
 }
index 9d9c97f6044f64f578753c29e134e2f32b565c70..50727a188ef68bb345204058a87a84ad8e1d3205 100644 (file)
@@ -20,6 +20,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.lang.reflect.Field;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -31,8 +32,10 @@ import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.ovsdb.openstack.netvirt.NetvirtProvider;
 import org.opendaylight.ovsdb.openstack.netvirt.api.Constants;
 import org.opendaylight.ovsdb.openstack.netvirt.api.Southbound;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.NetvirtProvidersProvider;
 import org.opendaylight.ovsdb.utils.servicehelper.ServiceHelper;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
@@ -46,6 +49,7 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.osgi.framework.ServiceReference;
 import org.powermock.api.mockito.PowerMockito;
+import org.powermock.api.support.membermodification.MemberModifier;
 import org.powermock.modules.junit4.PowerMockRunner;
 
 import com.google.common.base.Optional;
@@ -140,6 +144,9 @@ public class AbstractServiceInstanceTest {
         FlowBuilder flowBuilder = mock(FlowBuilder.class);
         when(flowBuilder.getKey()).thenReturn(mock(FlowKey.class));
 
+        NetvirtProvidersProvider netvirtProvider = mock(NetvirtProvidersProvider.class);
+        MemberModifier.field(NetvirtProvidersProvider.class, "hasProviderEntityOwnership").set(netvirtProvider, new AtomicBoolean(true));
+
         abstractServiceInstance.writeFlow(flowBuilder, nodeBuilder);
 
         //verify(transaction, times(1)).put(eq(LogicalDatastoreType.CONFIGURATION), any(InstanceIdentifier.class), any(DataObject.class), eq(true));
@@ -163,6 +170,9 @@ public class AbstractServiceInstanceTest {
         FlowBuilder flowBuilder = mock(FlowBuilder.class);
         when(flowBuilder.getKey()).thenReturn(mock(FlowKey.class));
 
+        NetvirtProvidersProvider netvirtProvider = mock(NetvirtProvidersProvider.class);
+        MemberModifier.field(NetvirtProvidersProvider.class, "hasProviderEntityOwnership").set(netvirtProvider, new AtomicBoolean(true));
+
         abstractServiceInstance.removeFlow(flowBuilder, nodeBuilder);
         verify(transaction, times(1)).delete(eq(LogicalDatastoreType.CONFIGURATION), any(InstanceIdentifier.class));
         verify(commitFuture, times(1)).get();
index 4206a017514a964b9b6c8a2aed337355cc699e1a..fbbd6e63d68b3da432b8dbd9763b4596835fed76 100644 (file)
@@ -17,6 +17,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.net.InetAddress;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -30,6 +31,7 @@ import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFaile
 import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
 import org.opendaylight.ovsdb.openstack.netvirt.api.Status;
 import org.opendaylight.ovsdb.openstack.netvirt.api.StatusCode;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.NetvirtProvidersProvider;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey;
@@ -37,6 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.powermock.api.support.membermodification.MemberModifier;
 
 import com.google.common.util.concurrent.CheckedFuture;
 
index c21b60fa0bbde363e34bdfde92fe71e68db7dfed..3f8bdb188fe67af98d1dafd4b980ac57f17159fe 100644 (file)
@@ -18,6 +18,7 @@ import static org.mockito.Mockito.when;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.junit.Assert;
 import org.junit.Before;
@@ -36,6 +37,7 @@ import org.opendaylight.ovsdb.openstack.netvirt.translator.NeutronSecurityRule;
 import org.opendaylight.ovsdb.openstack.netvirt.translator.Neutron_IPs;
 import org.opendaylight.ovsdb.openstack.netvirt.api.SecurityGroupCacheManger;
 import org.opendaylight.ovsdb.openstack.netvirt.api.SecurityServicesManager;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.NetvirtProvidersProvider;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.PipelineOrchestrator;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder;
@@ -48,6 +50,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatch;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.powermock.api.mockito.PowerMockito;
+import org.powermock.api.support.membermodification.MemberModifier;
 import org.powermock.modules.junit4.PowerMockRunner;
 
 import com.google.common.util.concurrent.CheckedFuture;
@@ -108,7 +111,7 @@ public class EgressAclServiceTest {
     }
 
     @Before
-    public void setUp() {
+    public void setUp() throws IllegalArgumentException, IllegalAccessException {
         egressAclServiceSpy = PowerMockito.spy(egressAclService);
 
         when(writeTransaction.submit()).thenReturn(commitFuture);
@@ -139,6 +142,10 @@ public class EgressAclServiceTest {
 
         when(securityGroup.getSecurityRules()).thenReturn(portSecurityList);
         when(securityServices.getVmListForSecurityGroup(PORT_UUID, SECURITY_GROUP_UUID)).thenReturn(neutronDestIpList);
+
+        NetvirtProvidersProvider netvirtProvider = mock(NetvirtProvidersProvider.class);
+        MemberModifier.field(NetvirtProvidersProvider.class, "hasProviderEntityOwnership").set(netvirtProvider, new AtomicBoolean(true));
+
     }
 
     /**
index bcd5bb69c1f6dac4e0d0bc811280a3a11fbe2161..891394ff185b438602a3338d8aa40c732e58cd56 100644 (file)
@@ -17,6 +17,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.net.InetAddress;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -31,10 +32,12 @@ import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFaile
 import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
 import org.opendaylight.ovsdb.openstack.netvirt.api.Status;
 import org.opendaylight.ovsdb.openstack.netvirt.api.StatusCode;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.NetvirtProvidersProvider;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.PipelineOrchestrator;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.powermock.api.support.membermodification.MemberModifier;
 
 import com.google.common.util.concurrent.CheckedFuture;
 
@@ -57,12 +60,16 @@ public class InboundNatServiceTest {
     private static final String HOST_ADDRESS_PREFIX = "127.0.0.1/32";
 
     @Before
-    public void setUp() {
+    public void setUp() throws IllegalArgumentException, IllegalAccessException {
         when(writeTransaction.submit()).thenReturn(commitFuture);
 
         when(dataBroker.newWriteOnlyTransaction()).thenReturn(writeTransaction);
 
         when(orchestrator.getNextServiceInPipeline(any(Service.class))).thenReturn(Service.ARP_RESPONDER);
+
+        NetvirtProvidersProvider netvirtProvider = mock(NetvirtProvidersProvider.class);
+        MemberModifier.field(NetvirtProvidersProvider.class, "hasProviderEntityOwnership").set(netvirtProvider, new AtomicBoolean(true));
+
     }
 
     /**
index 34e5658eaef399d46ebc47aded2f660eb6b36eaf..f928918060c2bf95acf81e1c260ad612d52956f4 100644 (file)
@@ -15,6 +15,8 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import java.util.concurrent.atomic.AtomicBoolean;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -26,11 +28,13 @@ import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.NetvirtProvidersProvider;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.PipelineOrchestrator;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.powermock.api.support.membermodification.MemberModifier;
 
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.CheckedFuture;
@@ -74,6 +78,10 @@ public class L2FowardingServiceTest {
         //when(mdsalConsumer.getDataBroker()).thenReturn(dataBroker);
 
         when(orchestrator.getNextServiceInPipeline(any(Service.class))).thenReturn(Service.ARP_RESPONDER);
+
+        NetvirtProvidersProvider netvirtProvider = mock(NetvirtProvidersProvider.class);
+        MemberModifier.field(NetvirtProvidersProvider.class, "hasProviderEntityOwnership").set(netvirtProvider, new AtomicBoolean(true));
+
     }
 
     /**
index 66a0681936f6e9f9a3705b39a2eab67a607840f2..bd5453e55f0fe6b39816f94b279c6f23cfbb5058 100644 (file)
@@ -17,6 +17,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import java.net.InetAddress;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -31,10 +32,12 @@ import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFaile
 import org.opendaylight.ovsdb.openstack.netvirt.api.Action;
 import org.opendaylight.ovsdb.openstack.netvirt.api.Status;
 import org.opendaylight.ovsdb.openstack.netvirt.api.StatusCode;
+import org.opendaylight.ovsdb.openstack.netvirt.providers.NetvirtProvidersProvider;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.PipelineOrchestrator;
 import org.opendaylight.ovsdb.openstack.netvirt.providers.openflow13.Service;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.powermock.api.support.membermodification.MemberModifier;
 
 import com.google.common.util.concurrent.CheckedFuture;
 
@@ -64,6 +67,10 @@ public class L3FowardingServiceTest {
         when(dataBroker.newWriteOnlyTransaction()).thenReturn(writeTransaction);
 
         when(orchestrator.getNextServiceInPipeline(any(Service.class))).thenReturn(Service.ARP_RESPONDER);
+
+        NetvirtProvidersProvider netvirtProvider = mock(NetvirtProvidersProvider.class);
+        MemberModifier.field(NetvirtProvidersProvider.class, "hasProviderEntityOwnership").set(netvirtProvider, new AtomicBoolean(true));
+
     }
 
     /**
index 7b3ffd38bfe8df2569ad0a191eb60dc99e831eff..e99fbca132a7f3d64aafebfba0a5702ecb40437f 100644 (file)
             <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
             <name>binding-osgi-broker</name>
           </broker>
+          <clustering-entity-ownership-service>
+            <type xmlns:ns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:core:spi:entity-ownership-service">ns:entity-ownership-service</type>
+            <name>entity-ownership-service</name>
+          </clustering-entity-ownership-service>
         </module>
       </modules>
     </data>
index 43c637c88087cf5e17d06249f009b006b182ecd7..a6367872f8c41d0dcfbd6025d521032e2ba8f03d 100644 (file)
@@ -8,7 +8,12 @@
 
 package org.opendaylight.ovsdb.openstack.netvirt;
 
+import com.google.common.base.Optional;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipState;
+import org.opendaylight.ovsdb.openstack.netvirt.api.Constants;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.common.api.clustering.Entity;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
 import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
 import org.osgi.framework.BundleContext;
@@ -23,10 +28,22 @@ public class NetvirtProvider implements BindingAwareProvider, AutoCloseable {
     private BundleContext bundleContext = null;
     private static DataBroker dataBroker = null;
     private ConfigActivator activator;
+    private static EntityOwnershipService entityOwnershipService;
+    private static final Entity ownerInstanceEntity = new Entity(
+            Constants.NETVIRT_OWNER_ENTITY_TYPE, Constants.NETVIRT_OWNER_ENTITY_TYPE);
 
-    public NetvirtProvider(BundleContext bundleContext) {
+    public NetvirtProvider(BundleContext bundleContext, EntityOwnershipService eos) {
         LOG.info("NetvirtProvider: bundleContext: {}", bundleContext);
         this.bundleContext = bundleContext;
+        entityOwnershipService = eos;
+    }
+
+    public static boolean isMasterProviderInstance() {
+        if (entityOwnershipService != null) {
+            Optional<EntityOwnershipState> state = entityOwnershipService.getOwnershipState(ownerInstanceEntity);
+            return state.isPresent() && state.get().isOwner();
+        }
+        return false;
     }
 
     @Override
index e43145565bc2ca5bbb9b9cb5ea646177a5890819..2c9858f2ca3ba440448220bf8c9c6fb9f430cd16 100644 (file)
@@ -102,4 +102,9 @@ public final class Constants {
     //6653 is official openflow port.
     public static short OPENFLOW_PORT = 6653;
     public static String OPENFLOW_CONNECTION_PROTOCOL = "tcp";
+
+    /*
+     * Clustering
+     */
+    public static final String NETVIRT_OWNER_ENTITY_TYPE = "ovsdb-netvirt-provider";
 }
index 1daad3154ec60bf7bf395be4391fe5d14e075e58..825eabc35bf83f54ba09b6ff37641ed4f5a7f3d1 100644 (file)
@@ -12,6 +12,7 @@ import java.util.Set;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
@@ -38,7 +39,7 @@ import org.slf4j.LoggerFactory;
  *
  * @author Sam Hague (shague@redhat.com)
  */
-public class OvsdbDataChangeListener implements DataChangeListener, AutoCloseable {
+public class OvsdbDataChangeListener implements ClusteredDataChangeListener, AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(OvsdbDataChangeListener.class);
     private DataBroker dataBroker = null;
     private ListenerRegistration<DataChangeListener> registration;
index 6cb1f144fcbc26ed7546735e4f147c5ca77deba6..e9ac3fe0ab2bfe8b10e9b8827d7cb7ea8889a565 100644 (file)
@@ -76,7 +76,9 @@ public class TenantNetworkManagerImpl implements ConfigInterface, TenantNetworkM
         }
 
         try {
-            List<OvsdbTerminationPointAugmentation> ports = southbound.getTerminationPointsOfBridge(node);
+            // Make sure to get fresh list of termination points, and not use the ones provided in node param!
+            List<OvsdbTerminationPointAugmentation> ports = southbound.readTerminationPointAugmentations(node);
+
             for (OvsdbTerminationPointAugmentation port : ports) {
                 String ifaceId = southbound.getInterfaceExternalIdsValue(port, Constants.EXTERNAL_ID_INTERFACE_ID);
                 if (ifaceId != null && isInterfacePresentInTenantNetwork(ifaceId, networkId)) {
index 44adae86acabcb3bd428c1620ff4e1c45891c013..6156e64f06908f31758ffc31c5db4ab88099e360 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.ovsdb.openstack.netvirt.translator.iaware.impl;
 
 import java.util.Map.Entry;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
@@ -25,7 +26,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class NeutronFloatingIPChangeListener implements DataChangeListener, AutoCloseable{
+public class NeutronFloatingIPChangeListener implements ClusteredDataChangeListener, AutoCloseable{
     private static final Logger LOG = LoggerFactory.getLogger(NeutronFloatingIPChangeListener.class);
 
     private ListenerRegistration<DataChangeListener> registration;
index faaaa835231928a8f4db884d17e2eeb908874b51..c173bd7ce975c1259128dd0c8b1d80d53409c21d 100644 (file)
@@ -12,6 +12,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map.Entry;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
@@ -40,7 +41,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.ImmutableBiMap;
 
-public class NeutronLoadBalancerPoolChangeListener implements DataChangeListener, AutoCloseable {
+public class NeutronLoadBalancerPoolChangeListener implements ClusteredDataChangeListener, AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(NeutronLoadBalancerPoolChangeListener.class);
 
     private static final ImmutableBiMap<Class<? extends ProtocolBase>,String> PROTOCOL_MAP
index 357e263eee0efa6ab360646f0f789f6c7f91cf74..03313aaf9f065763038f194168ee5f1d42c0c85d 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.openstack.netvirt.translator.iaware.impl;
 
 import java.util.Map.Entry;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
@@ -30,7 +31,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class NeutronLoadBalancerPoolMemberChangeListener implements DataChangeListener, AutoCloseable {
+public class NeutronLoadBalancerPoolMemberChangeListener implements ClusteredDataChangeListener, AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(NeutronLoadBalancerPoolMemberChangeListener.class);
 
     private ListenerRegistration<DataChangeListener> registration;
index a9227a2bb2b6b74e4c9cf0889d2430ad8fed4097..161ba5d198eb7102a55002fe65407e36cd47624e 100644 (file)
@@ -11,6 +11,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map.Entry;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent;
@@ -39,7 +40,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.ImmutableBiMap;
 
-public class NeutronNetworkChangeListener implements DataChangeListener, AutoCloseable {
+public class NeutronNetworkChangeListener implements ClusteredDataChangeListener, AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(NeutronNetworkChangeListener.class);
 
     private static final ImmutableBiMap<Class<? extends NetworkTypeBase>,String> NETWORK_MAP
index d998c86f1bd6586eab423e1c5f4bb0daa59890b9..d404196d1c9f9bc1460250d14b845467e04e7e38 100644 (file)
@@ -15,6 +15,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
@@ -44,7 +45,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class NeutronPortChangeListener implements DataChangeListener, AutoCloseable{
+public class NeutronPortChangeListener implements ClusteredDataChangeListener, AutoCloseable{
     private static final Logger LOG = LoggerFactory.getLogger(NeutronPortChangeListener.class);
 
     private ListenerRegistration<DataChangeListener> registration;
index 256b438e1b98979af3b643f4b4348fd35b83845b..b28576ca34a3b8608322dc702f81810913974674 100644 (file)
@@ -13,6 +13,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
@@ -34,7 +35,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class NeutronRouterChangeListener implements DataChangeListener, AutoCloseable{
+public class NeutronRouterChangeListener implements ClusteredDataChangeListener, AutoCloseable{
     private static final Logger LOG = LoggerFactory.getLogger(NeutronRouterChangeListener.class);
 
     private ListenerRegistration<DataChangeListener> registration;
index 335de4f04f8836349236aa2b38852c39cb8d9db2..6c1f099869bb7410a652d9585afacee90d28e9a5 100644 (file)
@@ -11,6 +11,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map.Entry;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
@@ -31,8 +32,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class NeutronSecurityGroupDataChangeListener implements
-        DataChangeListener, AutoCloseable {
+public class NeutronSecurityGroupDataChangeListener implements ClusteredDataChangeListener, AutoCloseable {
     private static final Logger LOG = LoggerFactory
             .getLogger(NeutronSecurityGroupDataChangeListener.class);
 
index 6f09a7fa5ca840755923dbbb51e7581d0500b27d..cd474608c19b5cd9e2c243efaf6094006cea583c 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.ovsdb.openstack.netvirt.translator.iaware.impl;
 
 import java.util.Map.Entry;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
@@ -38,7 +39,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.ImmutableBiMap;
 
-public class NeutronSecurityRuleDataChangeListener implements DataChangeListener, AutoCloseable {
+public class NeutronSecurityRuleDataChangeListener implements ClusteredDataChangeListener, AutoCloseable {
 
     private static final Logger LOG = LoggerFactory.getLogger(NeutronSecurityRuleDataChangeListener.class);
 
index 50b1336d1510fa2226044250a9e8ebe516423a23..1b8d10e72d533842e985b8f3394bda60f15befa9 100644 (file)
@@ -13,6 +13,7 @@ import java.util.List;
 import java.util.Map.Entry;
 import java.util.Set;
 
+import org.opendaylight.controller.md.sal.binding.api.ClusteredDataChangeListener;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
@@ -46,7 +47,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.ImmutableBiMap;
 
-public class NeutronSubnetChangeListener implements DataChangeListener, AutoCloseable{
+public class NeutronSubnetChangeListener implements ClusteredDataChangeListener, AutoCloseable{
     private static final Logger LOG = LoggerFactory.getLogger(NeutronSubnetChangeListener.class);
 
     private static final ImmutableBiMap<Class<? extends IpVersionBase>,Integer> IPV_MAP
index 2b3f8cc52700526f6c5202b1bad8d0492a37bf94..8a43c9c8596b19c2450a9a9012abab4470842dd8 100644 (file)
@@ -22,7 +22,7 @@ public class NetvirtImplModule extends org.opendaylight.yang.gen.v1.urn.opendayl
 
     @Override
     public java.lang.AutoCloseable createInstance() {
-        NetvirtProvider provider = new NetvirtProvider(bundleContext);
+        NetvirtProvider provider = new NetvirtProvider(bundleContext, getClusteringEntityOwnershipServiceDependency());
         BindingAwareBroker localBroker = getBrokerDependency();
         localBroker.registerProvider(provider);
         return provider;
index 0c0e783e429d865975b9198256e099d56dc0144b..73042641c2297da4000b751f3daaffacf5a8d404 100644 (file)
@@ -5,6 +5,7 @@ module netvirt-impl {
 
     import config { prefix config; revision-date 2013-04-05; }
     import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
+    import opendaylight-entity-ownership-service {prefix eos; revision-date 2015-08-10;}
 
     description
         "Service definition for netvirt project";
@@ -30,6 +31,14 @@ module netvirt-impl {
                     }
                 }
             }
+            container clustering-entity-ownership-service {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity eos:entity-ownership-service;
+                    }
+                }
+            }
         }
     }
 }
index 92e92ea7d45c99c66625c02819e6acf0aede2cd2..6c6df3e47aa6a9e818a4ba377c086ed99e4f3a68 100644 (file)
@@ -117,7 +117,7 @@ public class TenantNetworkManagerImplTest {
 
         List<OvsdbTerminationPointAugmentation> ports = new ArrayList<>();
         ports.add(mock(OvsdbTerminationPointAugmentation.class));
-        when(southbound.getTerminationPointsOfBridge(any(Node.class))).thenReturn(ports);
+        when(southbound.readTerminationPointAugmentations(any(Node.class))).thenReturn(ports);
 
         assertTrue("Error, did not return correct boolean for isTenantNetworkPresentInNode", tenantNetworkManagerImpl.isTenantNetworkPresentInNode(mock(Node.class), SEG_ID));
     }