- commons
+-- parent : Contains Parent pom.xml for all the ovsdb modules.
- +-- integrationtest : Contains the parent pom.xml for all the integrationtest needs.
- distribution : Builds a working controller distribution based on the controller + ovsdb modules and other
dependant modules such as openflowplugin
- features : This folder contains all the Karaf related files.
-- integrationtest : Contains all the PAX-Exam based integrationTests that covers IT for all the modules.
-
- library : Contains Schema-independent library that is a reference implementation for RFC 7047.
This module doesn't depend on any of the Opendaylight components.
This library module can also be used independently in a non-OSGi environment.
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (C) 2014 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">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>commons</artifactId>
- <version>1.4.0-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
-
- <artifactId>commons.integrationtest</artifactId>
- <name>${project.artifactId}.parent</name>
- <version>1.4.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
- <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
- <licenses>
- <license>
- <name>Eclipse Public License v1.0</name>
- <url>http://www.eclipse.org/legal/epl-v10.html</url>
- </license>
- </licenses>
- <developers>
- <developer>
- <name>Sam Hague</name>
- <email>shague@gmail.com</email>
- <url>https://github.com/shague</url>
- </developer>
- </developers>
- <scm>
- <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>
- <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>
- <tag>HEAD</tag>
- <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
- </scm>
-
- <properties>
- <!-- Overrides -->
- <!-- Controller Dependencies for Pax Exam -->
- <configuration.implementation.version>0.6.0-SNAPSHOT</configuration.implementation.version>
- <configuration.version>0.6.0-SNAPSHOT</configuration.version>
- <connectionmanager.version>0.3.0-SNAPSHOT</connectionmanager.version>
- <containermanager.it.version>0.7.0-SNAPSHOT</containermanager.it.version>
- <flowprogrammer.northbound.version>0.6.0-SNAPSHOT</flowprogrammer.northbound.version>
- <forwarding.staticrouting>0.7.0-SNAPSHOT</forwarding.staticrouting>
- <forwarding.staticrouting.northbound.version>0.6.0-SNAPSHOT</forwarding.staticrouting.northbound.version>
- <forwardingrulesmanager.implementation.version>0.6.0-SNAPSHOT</forwardingrulesmanager.implementation.version>
- <hosttracker.api.version>0.7.0-SNAPSHOT</hosttracker.api.version>
- <hosttracker.implementation.version>0.7.0-SNAPSHOT</hosttracker.implementation.version>
- <hosttracker.northbound.version>0.6.0-SNAPSHOT</hosttracker.northbound.version>
- <logging.bridge.version>0.6.0-SNAPSHOT</logging.bridge.version>
- <routing.dijkstra_implementation.version>0.6.0-SNAPSHOT</routing.dijkstra_implementation.version>
- <sal.implementation.version>0.6.0-SNAPSHOT</sal.implementation.version>
- <security.version>0.6.0-SNAPSHOT</security.version>
- <statistics.northbound.version>0.6.0-SNAPSHOT</statistics.northbound.version>
- <statisticsmanager.implementation.version>0.6.0-SNAPSHOT</statisticsmanager.implementation.version>
- <statisticsmanager.version>0.7.0-SNAPSHOT</statisticsmanager.version>
- <subnets.northbound.version>0.6.0-SNAPSHOT</subnets.northbound.version>
- <switchmanager.implementation.version>0.6.0-SNAPSHOT</switchmanager.implementation.version>
- <switchmanager.northbound.version>0.6.0-SNAPSHOT</switchmanager.northbound.version>
- <topology.northbound.version>0.6.0-SNAPSHOT</topology.northbound.version>
- <topology.web.version>0.6.0-SNAPSHOT</topology.web.version>
- <topologymanager.version>0.6.0-SNAPSHOT</topologymanager.version>
- <usermanager.implementation.version>0.6.0-SNAPSHOT</usermanager.implementation.version>
- <usermanager.northbound.version>0.2.0-SNAPSHOT</usermanager.northbound.version>
- <usermanager.version>0.6.0-SNAPSHOT</usermanager.version>
- <!-- 3rd Party Dependencies -->
- <yaml.version>1.10</yaml.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.yaml</groupId>
- <artifactId>snakeyaml</artifactId>
- <version>${yaml.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-json-provider</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.module</groupId>
- <artifactId>jackson-module-jaxb-annotations</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
- <!-- Jersey for JAXRS -->
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-client</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.3</version>
- </dependency>
- <dependency>
- <groupId>eclipselink</groupId>
- <artifactId>javax.persistence</artifactId>
- </dependency>
- <dependency>
- <groupId>eclipselink</groupId>
- <artifactId>javax.resource</artifactId>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>javax.servlet</artifactId>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>javax.servlet.jsp</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.gogo.command</artifactId>
- <version>0.14.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.gogo.runtime</artifactId>
- <version>0.12.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.gogo.shell</artifactId>
- <version>0.10.0</version>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>org.eclipse.equinox.cm</artifactId>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>org.eclipse.equinox.console</artifactId>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>org.eclipse.equinox.ds</artifactId>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>org.eclipse.equinox.launcher</artifactId>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>org.eclipse.equinox.util</artifactId>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>org.eclipse.osgi.services</artifactId>
- </dependency>
- <!-- Gemini Web -->
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.gemini.web.core</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.gemini.web.extender</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.gemini.web.tomcat</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.virgo.kernel.equinox.extensions</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.virgo.util.common</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.virgo.util.io</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.virgo.util.math</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.virgo.util.osgi</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.virgo.util.osgi.manifest</artifactId>
- </dependency>
- <dependency>
- <groupId>geminiweb</groupId>
- <artifactId>org.eclipse.virgo.util.parser.manifest</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-buffer</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-common</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-handler</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-transport</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.portlet</groupId>
- <artifactId>portlet-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>javax.activation</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>javax.annotation</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>javax.ejb</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>javax.el</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>javax.mail.glassfish</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>javax.servlet.jsp.jstl</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>javax.servlet.jsp.jstl.impl</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>javax.xml.rpc</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.catalina</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.catalina.ha</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.catalina.tribes</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.coyote</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.el</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.jasper</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.juli.extras</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.tomcat.api</artifactId>
- </dependency>
- <dependency>
- <groupId>orbit</groupId>
- <artifactId>org.apache.tomcat.util</artifactId>
- </dependency>
- <dependency>
- <groupId>org.aopalliance</groupId>
- <artifactId>com.springsource.org.aopalliance</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.dependencymanager</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.dependencymanager.shell</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.fileinstall</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore-nio</artifactId>
- <version>4.2.1</version>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.enunciate</groupId>
- <artifactId>enunciate-core-annotations</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.jettison</groupId>
- <artifactId>jettison</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.transaction</groupId>
- <artifactId>jboss-transaction-api_1.1_spec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-it</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller.thirdparty</groupId>
- <artifactId>com.sun.jersey.jersey-servlet</artifactId>
- <version>${jersey-servlet.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller.thirdparty</groupId>
- <artifactId>org.apache.catalina.filters.CorsFilter</artifactId>
- <version>${corsfilter.version}</version>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-all</artifactId>
- <version>${asm.version}</version>
- </dependency>
- <!-- Visual VM hook -->
- <dependency>
- <groupId>org.ow2.chameleon.management</groupId>
- <artifactId>chameleon-mbeans</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.aop</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.asm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.beans</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.context</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.context.support</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.expression</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.transaction</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>org.springframework.web.servlet</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-config</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-taglibs</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.security</groupId>
- <artifactId>spring-security-web</artifactId>
- </dependency>
- <dependency>
- <groupId>virgomirror</groupId>
- <artifactId>org.eclipse.jdt.core.compiler.batch</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>library</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>northbound</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>openstack.net-virt</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>schema.hardwarevtep</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>schema.openvswitch</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>utils.servicehelper</artifactId>
- </dependency>
-
- <!-- Add Pax Exam -->
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit4</artifactId>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-link-mvn</artifactId>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.url</groupId>
- <artifactId>pax-url-aether</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>properties-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>set-system-properties</goal>
- </goals>
- <configuration>
- <properties>
- <property>
- <name>logback.configurationFile</name>
- <!--<value>${project.parent.basedir}/logback.xml</value>-->
- </property>
- </properties>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>maven-paxexam-plugin</artifactId>
- <version>1.2.4</version>
- <executions>
- <execution>
- <id>generate-config</id>
- <phase>none</phase>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
<maven>3.1.1</maven>
</prerequisites>
<modules>
- <module>integrationtest</module>
<module>parent</module>
</modules>
</project>
+++ /dev/null
-/target-ide
-PutObjectStoreHere
-ObjectStore
-logs
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (C) 2014 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">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>commons.integrationtest</artifactId>
- <version>1.4.0-SNAPSHOT</version>
- <relativePath>../commons/integrationtest</relativePath>
- </parent>
-
- <artifactId>integrationtest</artifactId>
- <version>1.4.0-SNAPSHOT</version>
- <packaging>jar</packaging>
- <description>The OVSDB Plugin integration project is a project for OpenDaylight that will implement the Open vSwitch Database RFC 7047 management protocol allowing the Southbound configuration of vSwitches and a network virtualization implementation.</description>
- <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
- <licenses>
- <license>
- <name>Eclipse Public License v1.0</name>
- <url>http://www.eclipse.org/legal/epl-v10.html</url>
- </license>
- </licenses>
- <developers>
- <developer>
- <name>Sam Hague</name>
- <email>shague@gmail.com</email>
- <url>https://github.com/shague</url>
- </developer>
- </developers>
- <scm>
- <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>
- <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>
- <tag>HEAD</tag>
- <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
- </scm>
-
- <dependencies>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-it</artifactId>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-native</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller.model</groupId>
- <artifactId>model-inventory</artifactId>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-spi</artifactId>
- <!-- Should be in a parent POM -->
- <version>4.4.0</version>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Cache surefire in Maven Local repo for offline builds -->
- <dependency>
- <groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-junit4</artifactId>
- <version>${maven.surefire.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-junit47</artifactId>
- <version>${maven.surefire.version}</version>
- </dependency>
- </dependencies>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>${lifecycle.mapping.version}</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.apache.servicemix.tooling</groupId>
- <artifactId>depends-maven-plugin</artifactId>
- <versionRange>[0,)</versionRange>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore/>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>maven-paxexam-plugin</artifactId>
- <executions>
- <execution>
- <id>generate-config</id>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.servicemix.tooling</groupId>
- <artifactId>depends-maven-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <id>generate-depends-file</id>
- <goals>
- <goal>generate-depends-file</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <executions>
- <execution>
- <id>failsafe-integration-tests</id>
- <phase>integration-test</phase>
- <goals>
- <goal>integration-test</goal>
- </goals>
- <configuration>
- <forkCount>1</forkCount>
- <reuseForks>false</reuseForks>
- <parallel>none</parallel>
- <threadCount>1</threadCount>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-native</artifactId>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>karafit</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-karaf</artifactId>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-</project>
+++ /dev/null
-/*
- * Copyright (C) 2014 EBay Software Foundation
- *
- * 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
- *
- * Authors : Ashwin Raveendran
- */
-package org.opendaylight.ovsdb.integrationtest.ovsdbclient;
-
-import static org.opendaylight.ovsdb.lib.operations.Operations.op;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.ovsdb.lib.MonitorCallBack;
-import org.opendaylight.ovsdb.lib.OvsdbClient;
-import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
-import org.opendaylight.ovsdb.lib.message.MonitorRequest;
-import org.opendaylight.ovsdb.lib.message.MonitorRequestBuilder;
-import org.opendaylight.ovsdb.lib.message.MonitorSelect;
-import org.opendaylight.ovsdb.lib.message.TableUpdate;
-import org.opendaylight.ovsdb.lib.message.TableUpdates;
-import org.opendaylight.ovsdb.lib.message.UpdateNotification;
-import org.opendaylight.ovsdb.lib.notation.Column;
-import org.opendaylight.ovsdb.lib.notation.Mutator;
-import org.opendaylight.ovsdb.lib.notation.Row;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-import org.opendaylight.ovsdb.lib.operations.OperationResult;
-import org.opendaylight.ovsdb.lib.operations.TransactionBuilder;
-import org.opendaylight.ovsdb.lib.schema.ColumnSchema;
-import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
-import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
-import org.opendaylight.ovsdb.lib.schema.TableSchema;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-import com.google.common.util.concurrent.ListenableFuture;
-
-
-public class OvsdbClientTestIT extends OvsdbTestBase {
-
- OvsdbClient ovs;
- DatabaseSchema dbSchema = null;
- static String testBridgeName = "br-test";
- static UUID testBridgeUuid = null;
-
- /**
- * Test general OVSDB transactions (viz., insert, select, update,
- * mutate, comment, delete, where, commit) as well as the special
- * transactions (viz., abort and assert)
- */
- @Test
- public void testTransact() throws IOException, InterruptedException, ExecutionException {
- Assert.assertNotNull(dbSchema);
- TableSchema<GenericTableSchema> bridge = dbSchema.table("Bridge", GenericTableSchema.class);
- ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
-
- createBridgeTransaction();
- abortTransaction();
- assertTransaction();
- }
-
- /**
- * Test OVS monitor request and reply, with and without specific column filters,
- * for the Bridge table in the OVSDB. The setup involves creating a test bridge with 5
- * flood_vlans and 2 key-value pairs, and monitoring the DB update.
- */
- @Test
- public void testMonitorRequest() throws ExecutionException, InterruptedException, IOException {
- Assert.assertNotNull(dbSchema);
- // Create Test Bridge before testing the Monitor operation
- createBridgeTransaction();
- sendBridgeMonitorRequest(true); // Test monitor request with Column filters
- sendBridgeMonitorRequest(false); // Test monitor request without filters
- }
-
- public void sendBridgeMonitorRequest(boolean filter) throws ExecutionException, InterruptedException, IOException {
- Assert.assertNotNull(dbSchema);
- GenericTableSchema bridge = dbSchema.table("Bridge", GenericTableSchema.class);
-
- List<MonitorRequest<GenericTableSchema>> monitorRequests = Lists.newArrayList();
- ColumnSchema<GenericTableSchema, Set<Integer>> flood_vlans = bridge.multiValuedColumn("flood_vlans", Integer.class);
- ColumnSchema<GenericTableSchema, Map<String, String>> externalIds = bridge.multiValuedColumn("external_ids", String.class, String.class);
- ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
- MonitorRequestBuilder<GenericTableSchema> builder = MonitorRequestBuilder.builder(bridge);
- if (filter) {
- builder.addColumn(bridge.column("name"))
- .addColumn(bridge.column("fail_mode", String.class))
- .addColumn(flood_vlans)
- .addColumn(externalIds);
- }
- monitorRequests.add(builder.with(new MonitorSelect(true, true, true, true))
- .build());
-
- final List<Object> results = Lists.newArrayList();
-
- TableUpdates updates = ovs.monitor(dbSchema, monitorRequests, new MonitorCallBack() {
- @Override
- public void update(TableUpdates result, DatabaseSchema dbSchema) {
- results.add(result);
- System.out.println("result = " + result);
- }
-
- @Override
- public void exception(Throwable t) {
- results.add(t);
- System.out.println("t = " + t);
- }
- });
- if (updates != null) {
- results.add(updates);
- }
- for (int i = 0; i < 3 ; i++) { //wait 3 seconds to get a result
- System.out.println("waiting on monitor response for Bridge Table...");
- if (!results.isEmpty()) {
- break;
- }
- Thread.sleep(1000);
- }
-
- Assert.assertTrue(!results.isEmpty());
- Object result = results.get(0);
- Assert.assertTrue(result instanceof TableUpdates);
- updates = (TableUpdates) result;
- TableUpdate<GenericTableSchema> update = updates.getUpdate(bridge);
- Assert.assertTrue(update.getRows().size() > 0);
- for (UUID uuid : update.getRows().keySet()) {
- Row<GenericTableSchema> aNew = update.getNew(uuid);
- if (!aNew.getColumn(name).getData().equals(testBridgeName)) {
- continue;
- }
- if (filter) {
- Assert.assertEquals(builder.getColumns().size(), aNew.getColumns().size());
- } else {
- // As per RFC7047, Section 4.1.5 : If "columns" is omitted, all columns in the table, except for "_uuid", are monitored.
- Assert.assertEquals(bridge.getColumns().size() - 1, aNew.getColumns().size());
- }
- for (Column<GenericTableSchema, ?> column: aNew.getColumns()) {
- if (column.getSchema().equals(flood_vlans)) {
- // Test for the 5 flood_vlans inserted in Bridge br-test in createBridgeTransaction
- Set<Integer> data = column.getData(flood_vlans);
- Assert.assertNotNull(data);
- Assert.assertTrue(!data.isEmpty());
- Assert.assertEquals(5, data.size());
- } else if (column.getSchema().equals(externalIds)) {
- // Test for the {"key", "value"} external_ids inserted in Bridge br-test in createBridgeTransaction
- Map<String, String> data = column.getData(externalIds);
- Assert.assertNotNull(data);
- Assert.assertNotNull(data.get("key"));
- Assert.assertEquals("value", data.get("key"));
- // Test for {"key2", "value2"} external_ids mutation-inserted in Bridge br-test in createBridgeTransaction
- Assert.assertNotNull(data.get("key2"));
- Assert.assertEquals("value2", data.get("key2"));
- }
- }
- return;
- }
- Assert.fail("Bridge being monitored :"+testBridgeName+" Not found");
- }
-
- /*
- * TODO : selectOpenVSwitchTableUuid method isn't working as expected due to the Jackson
- * parsing challenges on the Row object returned by the Select operation.
- */
- private UUID selectOpenVSwitchTableUuid() throws ExecutionException, InterruptedException {
- Assert.assertNotNull(dbSchema);
- GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
-
- List<MonitorRequest<GenericTableSchema>> monitorRequests = Lists.newArrayList();
- ColumnSchema<GenericTableSchema, UUID> _uuid = ovsTable.column("_uuid", UUID.class);
-
- List<OperationResult> results = ovs.transactBuilder(dbSchema)
- .add(op.select(ovsTable)
- .column(_uuid))
- .execute()
- .get();
-
- Assert.assertTrue(!results.isEmpty());
- OperationResult result = results.get(0);
- List<Row<GenericTableSchema>> rows = result.getRows();
- Row<GenericTableSchema> ovsTableRow = rows.get(0);
- return ovsTableRow.getColumn(_uuid).getData();
- }
-
- private void createBridgeTransaction() throws IOException, InterruptedException, ExecutionException {
- Assert.assertNotNull(dbSchema);
- TableSchema<GenericTableSchema> bridge = dbSchema.table("Bridge", GenericTableSchema.class);
- GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
-
- ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
- ColumnSchema<GenericTableSchema, String> fail_mode = bridge.column("fail_mode", String.class);
- ColumnSchema<GenericTableSchema, Set<Integer>> flood_vlans = bridge.multiValuedColumn("flood_vlans", Integer.class);
- ColumnSchema<GenericTableSchema, Map<String, String>> externalIds = bridge.multiValuedColumn("external_ids", String.class, String.class);
- ColumnSchema<GenericTableSchema, Set<UUID>> bridges = ovsTable.multiValuedColumn("bridges", UUID.class);
- ColumnSchema<GenericTableSchema, UUID> _uuid = ovsTable.column("_uuid", UUID.class);
-
- String namedUuid = "br_test";
- int insertOperationIndex = 0;
- UUID parentTable = selectOpenVSwitchTableUuid();
- TransactionBuilder transactionBuilder = ovs.transactBuilder(dbSchema)
- /*
- * Make sure that the position of insert operation matches the insertOperationIndex.
- * This will be used later when the Results are processed.
- */
- .add(op.insert(bridge)
- .withId(namedUuid)
- .value(name, testBridgeName)
- .value(flood_vlans, Sets.newHashSet(100, 101, 4001))
- .value(externalIds, ImmutableMap.of("key","value")))
- .add(op.comment("Inserting Bridge br-int"))
- .add(op.update(bridge)
- .set(fail_mode, "secure")
- .where(name.opEqual(testBridgeName))
- .build())
- .add(op.select(bridge)
- .column(name)
- .column(_uuid)
- .where(name.opEqual(testBridgeName))
- .build())
- .add(op.mutate(bridge)
- .addMutation(flood_vlans, Mutator.INSERT, Sets.newHashSet(200,400))
- .where(name.opEqual(testBridgeName))
- .build())
- .add(op.mutate(bridge)
- .addMutation(externalIds, Mutator.INSERT, ImmutableMap.of("key2","value2"))
- .where(name.opEqual(testBridgeName))
- .build())
- .add(op.mutate(ovsTable)
- .addMutation(bridges, Mutator.INSERT, Sets.newHashSet(new UUID(namedUuid)))
- .where(_uuid.opEqual(parentTable))
- .build())
- .add(op.commit(true));
-
- ListenableFuture<List<OperationResult>> results = transactionBuilder.execute();
- List<OperationResult> operationResults = results.get();
- Assert.assertFalse(operationResults.isEmpty());
- // Check if Results matches the number of operations in transaction
- Assert.assertEquals(transactionBuilder.getOperations().size(), operationResults.size());
- System.out.println("Insert & Update operation results = " + operationResults);
- for (OperationResult result : operationResults) {
- Assert.assertNull(result.getError());
- }
- testBridgeUuid = operationResults.get(insertOperationIndex).getUuid();
- }
-
- private void assertTransaction() throws InterruptedException, ExecutionException {
- Assert.assertNotNull(dbSchema);
- TableSchema<GenericTableSchema> bridge = dbSchema.table("Bridge", GenericTableSchema.class);
- ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
-
- /*
- * Adding a separate Assert operation in a transaction. Lets not mix this with other
- * valid transactions as above.
- */
- ListenableFuture<List<OperationResult>> results = ovs.transactBuilder(dbSchema)
- .add(op.delete(bridge)
- .where(name.opEqual(testBridgeName))
- .build())
- .add(op.assertion("Assert12345")) // Failing intentionally
- .execute();
-
- List<OperationResult> operationResults = results.get();
- Assert.assertFalse(operationResults.isEmpty());
- /* Testing for an Assertion Error */
- Assert.assertFalse(operationResults.get(1).getError() == null);
- System.out.println("Assert operation results = " + operationResults);
- }
-
- private void abortTransaction() throws InterruptedException, ExecutionException {
- Assert.assertNotNull(dbSchema);
- TableSchema<GenericTableSchema> bridge = dbSchema.table("Bridge", GenericTableSchema.class);
- ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
-
- /*
- * Adding a separate Abort operation in a transaction. Lets not mix this with other
- * valid transactions as above.
- */
- ListenableFuture<List<OperationResult>> results = ovs.transactBuilder(dbSchema)
- .add(op.delete(bridge)
- .where(name.opEqual(testBridgeName))
- .build())
- .add(op.abort())
- .execute();
-
- List<OperationResult> operationResults = results.get();
- Assert.assertFalse(operationResults.isEmpty());
- /* Testing for Abort Error */
- Assert.assertFalse(operationResults.get(1).getError() == null);
- System.out.println("Abort operation results = " + operationResults);
- }
-
- public void testGetDBs() throws ExecutionException, InterruptedException {
- ListenableFuture<List<String>> databases = ovs.getDatabases();
- List<String> dbNames = databases.get();
- Assert.assertNotNull(dbNames);
- boolean hasOpenVswitchSchema = false;
- for(String dbName : dbNames) {
- if (dbName.equals(OPEN_VSWITCH_SCHEMA)) {
- hasOpenVswitchSchema = true;
- break;
- }
- }
- Assert.assertTrue(OPEN_VSWITCH_SCHEMA+" schema is not supported by the switch", hasOpenVswitchSchema);
- }
-
- @Before
- public void setUp() throws IOException, ExecutionException, InterruptedException, TimeoutException {
- if (ovs != null) {
- return;
- }
-
- ovs = getTestConnection();
- System.out.println("Connection Info :" + ovs.getConnectionInfo().toString());
- testGetDBs();
- dbSchema = ovs.getSchema(OPEN_VSWITCH_SCHEMA).get();
- }
-
- @After
- public void tearDown() throws InterruptedException, ExecutionException {
- if (dbSchema == null) {
- return;
- }
- TableSchema<GenericTableSchema> bridge = dbSchema.table("Bridge", GenericTableSchema.class);
- ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
- GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
- ColumnSchema<GenericTableSchema, Set<UUID>> bridges = ovsTable.multiValuedColumn("bridges", UUID.class);
- ColumnSchema<GenericTableSchema, UUID> _uuid = ovsTable.column("_uuid", UUID.class);
- UUID parentTable = selectOpenVSwitchTableUuid();
-
- ListenableFuture<List<OperationResult>> results = ovs.transactBuilder(dbSchema)
- .add(op.delete(bridge)
- .where(name.opEqual(testBridgeName))
- .build())
- .add(op.mutate(ovsTable)
- .addMutation(bridges, Mutator.DELETE, Sets.newHashSet(testBridgeUuid))
- .where(_uuid.opEqual(parentTable))
- .build())
- .add(op.commit(true))
- .execute();
-
- List<OperationResult> operationResults = results.get();
- System.out.println("Delete operation results = " + operationResults);
- OvsdbConnectionService.getService().disconnect(ovs);
- }
-
-
- @Override
- public void update(Object node, UpdateNotification upadateNotification) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void locked(Object node, List<String> ids) {
- // TODO Auto-generated method stub
-
- }
- @Override
- public void stolen(Object node, List<String> ids) {
- // TODO Auto-generated method stub
-
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2014 EBay Software Foundation
- *
- * 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
- *
- * Authors : Ashwin Raveendran, Madhu Venugopal
- */
-
-package org.opendaylight.ovsdb.integrationtest.ovsdbclient;
-
-import static org.opendaylight.ovsdb.lib.operations.Operations.op;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeoutException;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.ovsdb.lib.OvsdbClient;
-import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
-import org.opendaylight.ovsdb.lib.message.UpdateNotification;
-import org.opendaylight.ovsdb.lib.notation.Mutator;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-import org.opendaylight.ovsdb.lib.operations.OperationResult;
-import org.opendaylight.ovsdb.lib.operations.TransactionBuilder;
-import org.opendaylight.ovsdb.lib.schema.ColumnSchema;
-import org.opendaylight.ovsdb.lib.schema.DatabaseSchema;
-import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
-import org.opendaylight.ovsdb.lib.schema.TableSchema;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Sets;
-import com.google.common.util.concurrent.ListenableFuture;
-
-public class OvsdbClientTestITTyped extends OvsdbTestBase {
-
- OvsdbClient ovs;
- DatabaseSchema dbSchema = null;
- static String testBridgeName = "br_test";
- static UUID testBridgeUuid = null;
-
- /**
- * Test creation of statically typed bridge table as defined in
- * ovs-vswitchd.conf.db with get/set for all relevant columns. The
- * SETDATA methods for "name", "status" and "flood_vlans" columns
- * are verified.
- */
- @Test
- public void testTypedBridgeCreate() throws IOException, InterruptedException, ExecutionException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
- TestBridge rBridge = ovs.createTypedRowWrapper(TestBridge.class);
- rBridge.setName(testBridgeName);
- rBridge.setStatus(ImmutableMap.of("key","value"));
- rBridge.setFloodVlans(Sets.newHashSet(34));
-
- GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
- ColumnSchema<GenericTableSchema, Set<UUID>> bridges = ovsTable.multiValuedColumn("bridges", UUID.class);
-
- String namedUuid = "br_test";
- int insertOperationIndex = 0;
-
- TransactionBuilder transactionBuilder = ovs.transactBuilder(dbSchema)
- .add(op.insert(rBridge)
- .withId(namedUuid))
- .add(op.mutate(ovsTable)
- .addMutation(bridges, Mutator.INSERT, Sets.newHashSet(new UUID(namedUuid))));
-
- ListenableFuture<List<OperationResult>> results = transactionBuilder.execute();
- List<OperationResult> operationResults = results.get();
- Assert.assertFalse(operationResults.isEmpty());
- // Check if Results matches the number of operations in transaction
- Assert.assertEquals(transactionBuilder.getOperations().size(), operationResults.size());
- System.out.println("Insert & Update operation results = " + operationResults);
- testBridgeUuid = operationResults.get(insertOperationIndex).getUuid();
- }
-
- public void testGetDBs() throws ExecutionException, InterruptedException {
- ListenableFuture<List<String>> databases = ovs.getDatabases();
- List<String> dbNames = databases.get();
- Assert.assertNotNull(dbNames);
- boolean hasOpenVswitchSchema = false;
- for(String dbName : dbNames) {
- if (dbName.equals(OPEN_VSWITCH_SCHEMA)) {
- hasOpenVswitchSchema = true;
- break;
- }
- }
- Assert.assertTrue(OPEN_VSWITCH_SCHEMA+" schema is not supported by the switch", hasOpenVswitchSchema);
- }
-
- @Before
- public void setUp() throws IOException, ExecutionException, InterruptedException, TimeoutException {
- if (ovs != null) {
- return;
- }
- ovs = this.getTestConnection();
- testGetDBs();
- dbSchema = ovs.getSchema(OPEN_VSWITCH_SCHEMA).get();
- }
-
- @After
- public void tearDown() throws InterruptedException, ExecutionException {
- TableSchema<GenericTableSchema> bridge = dbSchema.table("Bridge", GenericTableSchema.class);
- ColumnSchema<GenericTableSchema, String> name = bridge.column("name", String.class);
- GenericTableSchema ovsTable = dbSchema.table("Open_vSwitch", GenericTableSchema.class);
- ColumnSchema<GenericTableSchema, Set<UUID>> bridges = ovsTable.multiValuedColumn("bridges", UUID.class);
-
- ListenableFuture<List<OperationResult>> results = ovs.transactBuilder(dbSchema)
- .add(op.delete(bridge)
- .where(name.opEqual(testBridgeName))
- .build())
- .add(op.mutate(ovsTable)
- .addMutation(bridges, Mutator.DELETE, Sets.newHashSet(testBridgeUuid)))
- .add(op.commit(true))
- .execute();
-
- List<OperationResult> operationResults = results.get();
- System.out.println("Delete operation results = " + operationResults);
- OvsdbConnectionService.getService().disconnect(ovs);
- }
-
- @Override
- public void update(Object node, UpdateNotification upadateNotification) {
- // TODO Auto-generated method stub
-
- }
- @Override
- public void locked(Object node, List<String> ids) {
- // TODO Auto-generated method stub
-
- }
- @Override
- public void stolen(Object node, List<String> ids) {
- // TODO Auto-generated method stub
-
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2014 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
- *
- * Authors : Madhu Venugopal
- */
-package org.opendaylight.ovsdb.integrationtest.ovsdbclient;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.rules.TestRule;
-import org.junit.rules.TestWatcher;
-import org.junit.runner.Description;
-import org.opendaylight.ovsdb.lib.OvsdbClient;
-import org.opendaylight.ovsdb.lib.OvsdbConnection;
-import org.opendaylight.ovsdb.lib.OvsdbConnectionListener;
-import org.opendaylight.ovsdb.lib.impl.OvsdbConnectionService;
-import org.opendaylight.ovsdb.lib.message.OvsdbRPC;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class OvsdbTestBase implements OvsdbRPC.Callback{
- private static final Logger LOG = LoggerFactory.getLogger(OvsdbTestBase.class);
- private final static String SERVER_IPADDRESS = "ovsdbserver.ipaddress";
- private final static String SERVER_PORT = "ovsdbserver.port";
- private final static String CONNECTION_TYPE = "ovsdbserver.connection";
- private final static String CONNECTION_TYPE_ACTIVE = "active";
- private final static String CONNECTION_TYPE_PASSIVE = "passive";
-
- private final static String DEFAULT_SERVER_PORT = "6640";
-
- /**
- * Represents the Open Vswitch Schema
- */
- public final static String OPEN_VSWITCH_SCHEMA = "Open_vSwitch";
-
- public Properties loadProperties() {
- Properties props = new Properties(System.getProperties());
- return props;
- }
-
- public OvsdbClient getTestConnection() throws IOException, InterruptedException, ExecutionException, TimeoutException {
- Properties props = loadProperties();
- String addressStr = props.getProperty(SERVER_IPADDRESS);
- String portStr = props.getProperty(SERVER_PORT, DEFAULT_SERVER_PORT);
- String connectionType = props.getProperty(CONNECTION_TYPE, "active");
-
- // If the connection type is active, controller connects to the ovsdb-server
- if (connectionType.equalsIgnoreCase(CONNECTION_TYPE_ACTIVE)) {
- if (addressStr == null) {
- Assert.fail(usage());
- }
-
- InetAddress address;
- try {
- address = InetAddress.getByName(addressStr);
- } catch (Exception e) {
- System.out.println("Unable to resolve " + addressStr);
- e.printStackTrace();
- return null;
- }
-
- Integer port;
- try {
- port = Integer.parseInt(portStr);
- } catch (NumberFormatException e) {
- System.out.println("Invalid port number : " + portStr);
- e.printStackTrace();
- return null;
- }
-
- OvsdbConnection connection = OvsdbConnectionService.getService();
- return connection.connect(address, port);
- } else if (connectionType.equalsIgnoreCase(CONNECTION_TYPE_PASSIVE)) {
- ExecutorService executor = Executors.newFixedThreadPool(1);
- Future<OvsdbClient> passiveConnection = executor.submit(new PassiveListener());
- return passiveConnection.get(60, TimeUnit.SECONDS);
- }
- Assert.fail("Connection parameter ("+CONNECTION_TYPE+") must be either active or passive");
- return null;
- }
-
- private String usage() {
- return "Integration Test needs a valid connection configuration as follows :\n" +
- "active connection : mvn -Pintegrationtest -Dovsdbserver.ipaddress=x.x.x.x -Dovsdbserver.port=yyyy verify\n"+
- "passive connection : mvn -Pintegrationtest -Dovsdbserver.connection=passive verify\n";
- }
-
- public class PassiveListener implements Callable<OvsdbClient>, OvsdbConnectionListener {
- OvsdbClient client = null;
- @Override
- public OvsdbClient call() throws Exception {
- OvsdbConnection connection = OvsdbConnectionService.getService();
- connection.registerConnectionListener(this);
- while (client == null) {
- Thread.sleep(500);
- }
- return client;
- }
-
- @Override
- public void connected(OvsdbClient client) {
- this.client = client;
- }
-
- @Override
- public void disconnected(OvsdbClient client) {
- Assert.assertEquals(this.client.getConnectionInfo(), client.getConnectionInfo());
- this.client = null;
- }
- }
-
- @Rule
- public TestRule watcher = new TestWatcher() {
- @Override
- protected void starting(Description description) {
- LOG.info("TestWatcher: Starting test: {}",
- description.getDisplayName());
- }
-
- @Override
- protected void finished(Description description) {
- LOG.info("TestWatcher: Finished test: {}", description.getDisplayName());
- }
- };
-}
+++ /dev/null
-/*
- * Copyright (C) 2014 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
- *
- * Authors : Madhu Venugopal
- */
-
-package org.opendaylight.ovsdb.integrationtest.ovsdbclient;
-import java.util.Map;
-import java.util.Set;
-
-import org.opendaylight.ovsdb.lib.notation.Column;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
-import org.opendaylight.ovsdb.lib.schema.typed.MethodType;
-import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable;
-import org.opendaylight.ovsdb.lib.schema.typed.TypedColumn;
-import org.opendaylight.ovsdb.lib.schema.typed.TypedTable;
-
-/**
- * Statically Typed Bridge Table as defined in ovs-vswitchd.conf.db
- */
-
-/*
- * Interface name was set to TestBridge on purpose to test the @TypeTable annotation
- * functionality of TyperHelper.java
- */
-@TypedTable(name="Bridge", database="Open_vSwitch")
-public interface TestBridge extends TypedBaseTable {
- /*
- * Its a good practice to set the @TypedColumn to these Statically typed Tables & Columns.
- * Implementations can choose to use GETDATA or GETCOLUMN or both to get the data.
- * But GETCOLUMN gives more info on ColumnSchema.
- * The following "name" column is decorated with both GETDATA and GETCOLUMN and the corresponding test
- * will test both the options.
- */
- @TypedColumn(name="name", method=MethodType.GETDATA)
- String getName();
-
- @TypedColumn(name="name", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, String> getNameColumn();
-
- @TypedColumn(name="name", method=MethodType.SETDATA)
- void setName(String name);
-
- /*
- * Annotations are NOT added to the Status column on purpose to test the backup
- * functionality on getter, setter, column name derivation etc. TyperHelper.java.
- */
- Column<GenericTableSchema, Map<String, String>> getStatusColumn();
- void setStatus(Map<String, String> status);
-
- /*
- * TypedColumn's name Annotation should override the method name based Column derivation.
- * The method name and TypedColumn name was kept different on purpose to test the name
- * resolution priority of TyperHelper.java
- */
- @TypedColumn(name="flood_vlans", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<Integer>> getFloodVlansColumn();
-
- @TypedColumn(name="flood_vlans", method=MethodType.SETDATA)
- void setFloodVlans(Set<Integer> vlans);
-
-
- @TypedColumn(name="ports", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<UUID>> getPortsColumn();
-
- @TypedColumn(name="ports", method=MethodType.SETDATA)
- void setPorts(Set<UUID> ports);
-
-
- @TypedColumn(name="mirrors", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<UUID>> getMirrorsColumn();
-
- @TypedColumn(name="mirrors", method=MethodType.SETDATA)
- void setMirrors(Set<UUID> mirrors);
-
-
- @TypedColumn(name="controller", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<UUID>> getControllerColumn();
-
- @TypedColumn(name="controller", method=MethodType.SETDATA)
- void setController(Set<UUID> controller);
-
-
- @TypedColumn(name="datapath_id", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<String>> getDatapathIdColumn();
-
- @TypedColumn(name="datapath_id", method=MethodType.SETDATA)
- void setDatapathId(Set<String> datapathId);
-
-
- @TypedColumn(name="datapath_type", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, String> getDatapathTypeColumn();
-
- @TypedColumn(name="datapath_type", method=MethodType.SETDATA)
- void setDatapathType(String datapathType);
-
-
- @TypedColumn(name="fail_mode", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<String>> getFailModeColumn();
-
- @TypedColumn(name="fail_mode", method=MethodType.SETDATA)
- void setFailMode(Set<String> failMode);
-
-
- @TypedColumn(name="sflow", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<UUID>> getSflowColumn();
-
- @TypedColumn(name="sflow", method=MethodType.SETDATA)
- void setSflow(Set<UUID> sflow);
-
-
- @TypedColumn(name="netflow", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<UUID>> getNetflowColumn();
-
- @TypedColumn(name="netflow", method=MethodType.SETDATA)
- void setNetflow(Set<UUID> netflow);
-
-
- @TypedColumn(name="flow_tables", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Map<Integer, UUID>> getFlowTablesColumn();
-
- @TypedColumn(name="flow_tables", method=MethodType.SETDATA)
- void setFlowTables(Map<Integer, UUID> flowTables);
-
-
- @TypedColumn(name="stp_enable", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Boolean> getStpEnableColumn();
-
- @TypedColumn(name="stp_enable", method=MethodType.SETDATA)
- void setStpEnable(Boolean stp_enable);
-
-
- @TypedColumn(name="protocols", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<String>> getProtocolsColumn();
-
- @TypedColumn(name="protocols", method=MethodType.SETDATA)
- void setProtocols(Set<String> protocols);
-
-
- @TypedColumn(name="other_config", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Map<String, String>> getOtherConfigColumn();
-
- @TypedColumn(name="other_config", method=MethodType.SETDATA)
- void setOtherConfig(Map<String, String> other_config);
-
-
- @TypedColumn(name="external_ids", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Map<String, String>> getExternalIdsColumn();
-
- @TypedColumn(name="external_ids", method=MethodType.SETDATA)
- void setExternalIds(Map<String, String> externalIds);
-
-
- @TypedColumn(name="ipfix", method=MethodType.GETCOLUMN)
- Column<GenericTableSchema, Set<UUID>> getIpfixColumn();
-
- @TypedColumn(name="ipfix", method=MethodType.SETDATA)
- void setIpfix(Set<UUID> ipfix);
-}
+++ /dev/null
-/*
- * Copyright (C) 2014 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
- *
- * Authors : Madhu Venugopal
- */
-
-package org.opendaylight.ovsdb.integrationtest.ovsdbclient;
-import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable;
-import org.opendaylight.ovsdb.lib.schema.typed.TypedTable;
-
-/**
- * VersionIncompatibleBridge is used to test the Version Compatibility logic in the Library
- * with an absurdly low fromVersion and untilVersion which will fail for all the OVS versions.
- */
-@TypedTable(name="Bridge", database="Open_vSwitch", fromVersion="0.0.1", untilVersion="0.0.2")
-public interface VersionIncompatibleBridge extends TypedBaseTable {
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<persisted-snapshots>
- <snapshots>
- <snapshot>
- <required-capabilities>
- <capability>urn:opendaylight:l2:types?module=opendaylight-l2-types&revision=2013-08-27</capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28
- </capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom?module=opendaylight-md-sal-dom&revision=2013-10-28</capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:config?module=config&revision=2013-04-05
- </capability>
- <capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
- <capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04</capability>
- <capability>urn:ietf:params:xml:ns:yang:rpc-context?module=rpc-context&revision=2013-06-17
- </capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl?module=opendaylight-sal-binding-broker-impl&revision=2013-10-28
- </capability>
- <capability>urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2010-09-24
- </capability>
- <capability>urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2010-09-24
- </capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl?module=opendaylight-sal-dom-broker-impl&revision=2013-10-28
- </capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:logback:config?module=config-logging&revision=2013-07-16</capability>
- <capability>urn:opendaylight:yang:extension:yang-ext?module=yang-ext&revision=2013-07-09
- </capability>
- <capability>
- urn:opendaylight:params:xml:ns:yang:controller:md:sal:common?module=opendaylight-md-sal-common&revision=2013-10-28
- </capability>
-
- <!-- openflowjava -->
- <capability>urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl?module=openflow-switch-connection-provider-impl&revision=2014-03-28</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider?module=openflow-switch-connection-provider&revision=2014-03-28</capability>
- <!-- openflowplugin -->
- <capability>urn:opendaylight:params:xml:ns:yang:openflow:common:config:impl?module=openflow-provider-impl&revision=2014-03-26</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:openflow:common:config?module=openflow-provider&revision=2014-03-26</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:controller:md:sal:dom:impl">prefix:schema-service-singleton</type>
- <name>yang-schema-service</name>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:runtime-generated-mapping</type>
- <name>runtime-mapping-singleton</name>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-notification-broker</type>
- <name>binding-notification-broker</name>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-broker-impl</type>
- <name>binding-broker-impl</name>
- <notification-service xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>
- <name>binding-notification-broker</name>
- </notification-service>
- <data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-data-broker</type>
- <name>binding-data-broker</name>
- </data-broker>
- <root-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>binding-data-broker</name>
- </root-data-broker>
- </module>
- <!--
- Tree-based in-memory data store. This is the data store which is currently
- recommended for single-node deployments.
- -->
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:dom-inmemory-data-broker</type>
- <name>inmemory-data-broker</name>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:impl">prefix:dom-broker-impl</type>
- <name>inmemory-dom-broker</name>
- <async-data-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>inmemory-data-broker</name>
- </async-data-broker>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-data-compatible-broker</type>
- <name>inmemory-binding-data-broker</name>
- <dom-async-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
- <name>dom-broker</name>
- </dom-async-broker>
- <binding-mapping-service xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- </module>
- <module>
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">prefix:binding-forwarded-data-broker</type>
- <name>binding-async-data-broker</name>
- <binding-forwarded-data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- <dom-async-broker>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <name>inmemory-data-broker</name>
- </dom-async-broker>
- <schema-service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <name>yang-schema-service</name>
- </schema-service>
- <binding-mapping-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding:binding-dom-mapping-service</type>
- <name>runtime-mapping-singleton</name>
- </binding-mapping-service>
- </binding-forwarded-data-broker>
- </module>
-
- </modules>
-
- <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:schema-service</type>
- <instance>
- <name>yang-schema-service</name>
- <provider>/modules/module[type='schema-service-singleton'][name='yang-schema-service']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding-impl="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">binding-impl:binding-dom-mapping-service</type>
- <instance>
- <name>runtime-mapping-singleton</name>
- <provider>/modules/module[type='runtime-generated-mapping'][name='runtime-mapping-singleton']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-notification-service</type>
- <instance>
- <name>binding-notification-broker</name>
- <provider>/modules/module[type='binding-notification-broker'][name='binding-notification-broker']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
- <instance>
- <name>binding-osgi-broker</name>
- <provider>/modules/module[type='binding-broker-impl'][name='binding-broker-impl']</provider>
- </instance>
- </service>
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
- <instance>
- <name>binding-rpc-broker</name>
- <provider>/modules/module[type='binding-broker-impl'][name='binding-broker-impl']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
- <instance>
- <name>dom-broker</name>
- <provider>/modules/module[type='dom-broker-impl'][name='inmemory-dom-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-data-broker</type>
- <instance>
- <name>binding-data-broker</name>
- <provider>/modules/module[type='binding-data-compatible-broker'][name='inmemory-binding-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <instance>
- <name>binding-data-broker</name>
- <provider>/modules/module[type='binding-forwarded-data-broker'][name='binding-async-data-broker']</provider>
- </instance>
- </service>
-
- <service>
- <type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-async-data-broker</type>
- <instance>
- <name>inmemory-data-broker</name>
- <provider>/modules/module[type='dom-inmemory-data-broker'][name='inmemory-data-broker']</provider>
- </instance>
- </service>
-
- </services>
- </data>
-
- </configuration>
- </snapshot>
-
- </snapshots>
-</persisted-snapshots>
+++ /dev/null
-pax.exam.logging = none
-pax.exam.service.timeout = 5000
+++ /dev/null
-<configuration scan="true">
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
- </encoder>
- </appender>
-
- <logger name="org.opendaylight.ovsdb" level="INFO" />
-
- <logger name="org.opendaylight.ovsdb.lib.jsonrpc.JsonRpcEndpoint" level="TRACE" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
- <root level="ERROR">
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
+++ /dev/null
-<?xml version='1.0' encoding='utf-8'?>
-<Server>
- <!--APR library loader. Documentation at /docs/apr.html -->
- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
- <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
- <Listener className="org.apache.catalina.core.JasperListener" />
- <!-- Prevent memory leaks due to use of particular java/javax APIs-->
- <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
- <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
- <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
-
- <Service name="Catalina">
- <Connector port="8888" protocol="org.apache.coyote.http11.Http11NioProtocol"
- connectionTimeout="20000"
- redirectPort="8443" />
-
- <!--
- Please remove the comments around the following Connector tag to enable HTTPS Authentication support.
- Remember to add a valid keystore in the configuration folder.
- More info : http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration
- -->
-
- <!--
- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
- maxThreads="150" scheme="https" secure="true"
- clientAuth="false" sslProtocol="TLS"
- keystoreFile="configuration/keystore"
- keystorePass="changeit"/>
- -->
-
- <Engine name="Catalina" defaultHost="localhost">
- <Host name="localhost" appBase=""
- unpackWARs="false" autoDeploy="false"
- deployOnStartup="false" createDirs="false">
- <Realm className="org.opendaylight.controller.security.ControllerCustomRealm" />
- <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-
- <!--
- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
- prefix="web_access_log_" suffix=".txt" resolveHosts="false"
- rotatable="true" fileDateFormat="yyyy-MM"
- pattern="%{yyyy-MM-dd HH:mm:ss.SSS z}t - [%a] - %r"/>
- -->
-
- </Host>
- </Engine>
- </Service>
-</Server>
<url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
</scm>
<properties>
- <skip.integrationtest>true</skip.integrationtest>
<sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
<root.directory>${env.PWD}</root.directory>
<sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
</plugins>
</build>
<profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <skipITs>true</skipITs>
+ </properties>
+ </profile>
<profile>
<id>integrationtest</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
- <skip.integrationtest>false</skip.integrationtest>
+ <skipITs>false</skipITs>
</properties>
</profile>
</profiles>
</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <skipITs>true</skipITs>
+ </properties>
+ </profile>
+ <profile>
+ <id>integrationtest</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <skipITs>false</skipITs>
+ </properties>
+ </profile>
+ </profiles>
</project>
*/
@Override
public int canCreateNetwork(NeutronNetwork network) {
- if (network.isShared()) {
- LOG.error(" Network shared attribute not supported ");
+ if (network.isShared() && !network.getRouterExternal()) {
+ LOG.error("Shared attribute is only supported on external networks");
return HttpURLConnection.HTTP_NOT_ACCEPTABLE;
}
@Override
public int canUpdateNetwork(NeutronNetwork delta,
NeutronNetwork original) {
- if (delta.isShared()) {
- LOG.error(" Network shared attribute not supported ");
+ if (delta.isShared() && !delta.getRouterExternal()) {
+ LOG.error("Shared attribute is only supported on external networks");
return HttpURLConnection.HTTP_NOT_ACCEPTABLE;
}
}
this.updateL3ForNeutronPort(neutronPort, currPortShouldBeDeleted);
}
+
+ if (isDelete) {
+ /*
+ * Bug 4277: Remove the router interface cache only after deleting the neutron port l3 flows.
+ */
+ this.cleanupRouterCache(neutronRouterInterface);
+ }
}
/**
}
}
- // Keep cache for finding router's mac from network uuid -- remove
- //
- if (isDelete) {
- networkIdToRouterMacCache.remove(neutronNetwork.getNetworkUUID());
- networkIdToRouterIpListCache.remove(neutronNetwork.getNetworkUUID());
- subnetIdToRouterInterfaceCache.remove(subnet.getSubnetUUID());
- }
+ // Keep cache for finding router's mac from network uuid -- NOTE: remove is done later, via cleanupRouterCache()
}
private void programFlowForNetworkFromExternal(final Node node,
return null;
}
+ private void cleanupRouterCache(final NeutronRouter_Interface neutronRouterInterface) {
+ /*
+ * Fix for 4277
+ * Remove the router cache only after deleting the neutron
+ * port l3 flows.
+ */
+ final NeutronPort neutronPort = neutronPortCache.getPort(neutronRouterInterface.getPortUUID());
+
+ if (neutronPort != null) {
+ networkIdToRouterMacCache.remove(neutronPort.getNetworkUUID());
+ networkIdToRouterIpListCache.remove(neutronPort.getNetworkUUID());
+ subnetIdToRouterInterfaceCache.remove(neutronRouterInterface.getSubnetUUID());
+ }
+ }
+
public void triggerGatewayMacResolver(final Node node, final NeutronPort gatewayPort ){
Preconditions.checkNotNull(node);
NeutronPort neutronPort = mock(NeutronPort.class);
when(neutronPort.getMacAddress()).thenReturn(MAC_ADDRESS);
when(neutronPort.getFixedIPs()).thenReturn(ips);
+ when(neutronPort.getNetworkUUID()).thenReturn(UUID);
NeutronSubnet neutronSubnet = mock(NeutronSubnet.class);
when(neutronSubnet.getNetworkUUID()).thenReturn(UUID);
when(neutronSubnet.getGatewayIP()).thenReturn(IP);
when(neutronNetwork.getProviderSegmentationID()).thenReturn(ID);
when(neutronNetwork.getRouterExternal()).thenReturn(false); //might change that to true
when(neutronNetwork.getNetworkUUID()).thenReturn(UUID);
+ NeutronRouter neutronRouter = mock(NeutronRouter.class);
Node node = mock(Node.class);
List<Node> nodes = new ArrayList<Node>();
// init instance variables
INeutronPortCRUD neutronPortCache = mock(INeutronPortCRUD.class);
PowerMockito.when(neutronPortCache.getPort(anyString())).thenReturn(neutronPort);
+ PowerMockito.when(neutronPortCache.getAllPorts()).thenReturn(new ArrayList<NeutronPort>());
INeutronSubnetCRUD neutronSubnetCache = mock(INeutronSubnetCRUD.class);
PowerMockito.when(neutronSubnetCache.getSubnet(anyString())).thenReturn(neutronSubnet);
INeutronNetworkCRUD neutronNetworkCache = mock(INeutronNetworkCRUD.class);
networkIdToRouterMacCache.put(UUID, MAC_ADDRESS);
networkIdToRouterIpListCache.put(UUID, ips);
+ subnetIdToRouterInterfaceCache.put(UUID, intf);
networkIdToRouterMacCacheSize = networkIdToRouterMacCache.size();
networkIdToRouterIpListCacheSize = networkIdToRouterIpListCache.size();
subnetIdToRouterInterfaceCacheSize = subnetIdToRouterInterfaceCache.size();
- Whitebox.invokeMethod(neutronL3Adapter, "programFlowsForNeutronRouterInterface", intf, true);
+ Whitebox.invokeMethod(neutronL3Adapter, "handleNeutronRouterInterfaceEvent", neutronRouter, intf, Action.DELETE);
+ PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programFlowsForNeutronRouterInterface", intf, true);
PowerMockito.verifyPrivate(neutronL3Adapter, times(2)).invoke("getDpidForIntegrationBridge", any(Node.class));
- PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programFlowsForNeutronRouterInterfacePair", any(Node.class), anyLong(), any(NeutronRouter_Interface.class), any(NeutronRouter_Interface.class), any(NeutronNetwork.class), anyString(), anyString(), anyString(), anyInt(), eq(Action.DELETE), anyBoolean());
+ PowerMockito.verifyPrivate(neutronL3Adapter, times(2)).invoke("programFlowsForNeutronRouterInterfacePair", any(Node.class), anyLong(), any(NeutronRouter_Interface.class), any(NeutronRouter_Interface.class), any(NeutronNetwork.class), anyString(), anyString(), anyString(), anyInt(), eq(Action.DELETE), anyBoolean());
PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programFlowForNetworkFromExternal", any(Node.class), anyLong(), anyString(), anyString(), anyString(), anyInt(), eq(Action.DELETE));
PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programStaticArpStage1", anyLong(), anyString(), anyString(), anyString(), eq(Action.DELETE));
PowerMockito.verifyPrivate(neutronL3Adapter, times(1)).invoke("programIpRewriteExclusionStage1", any(Node.class), anyLong(), anyString(), anyString(), eq(Action.DELETE));
<module>utils</module>
<module>ovsdb-ui</module>
<module>hwvtepsouthbound</module>
- <!-- Integration Tests -->
- <module>integrationtest</module>
</modules>
<build>