Taken care of the checkstyle errors as well.
Change-Id: I3c744aaa8ee3cbb3987242830ff03a242af3ac0a
Signed-off-by: Emiapwil (Gao Kai) <gaok12@mails.tsinghua.edu.cn>
<?xml version="1.0" encoding="UTF-8"?>
-<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/xsd/maven-4.0.0.xsd">
+<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.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
</parent>
<groupId>org.opendaylight.alto</groupId>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-sources</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
-
- <configuration>
- <failsOnError>true</failsOnError>
- <configLocation>controller/checkstyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <sourceDirectory>${project.basedir}</sourceDirectory>
- <excludes>**\/target\/,**\/bin\/,**\/third-party,**\/yang-gen-sal</excludes>
- </configuration>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${controller.checkstyle.version}</version>
- </dependency>
- </dependencies>
- </plugin>
-
- <plugin>
+ <plugin> <!-- OSGi plugin -->
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<artifactId>alto-model</artifactId>
<version>${project.version}</version>
</dependency>
-
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
- </dependency>
-
+ </dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
- </dependency>
-
+ </dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
- </dependency>
+ </dependency>
</dependencies>
</project>
-
package org.opendaylight.alto.commons.types.convertor;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefixBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.Map;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.MapBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.MapKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMapBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMapKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.EndpointAddressType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.PidName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.ResourceId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.TagString;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroup;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroupBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroupKey;
-
-import org.opendaylight.alto.commons.types.rfc7285.RFC7285Type;
-import org.opendaylight.alto.commons.types.model150404.ModelType;
-
public class Model2RFCConvertor {
-
- public static final String IPV4 = "ipv4";
- public static final String IPV6 = "ipv6";
-
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.MapBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.MapKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMapBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMapKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.EndpointAddressType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.PidName;
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.ResourceId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.TagString;
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroup;
import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroupBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroupKey;
import org.opendaylight.alto.commons.types.rfc7285.RFC7285Type;
import org.opendaylight.alto.commons.types.model150404.ModelType;
buildAddressGroup(EndpointAddressType.Enumeration.Ipv6, str2IpPrefix(addressGroup.ipv6)),
};
- return Arrays.asList(result);
+ return Arrays.asList(result);
}
private EndpointAddressGroup buildAddressGroup(EndpointAddressType.Enumeration type, List<IpPrefix> prefixes) {
package org.opendaylight.alto.commons.types.model150404;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.opendaylight.alto.commons.types.rfc7285.RFC7285Type;
-import org.opendaylight.alto.commons.types.convertor.RFC2ModelConvertor;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefixBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.Map;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.MapBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.MapKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMapBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMapKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.EndpointAddressType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.PidName;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.ResourceId;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.TagString;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroup;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroupBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.types.rev150404.endpoint.address.group.EndpointAddressGroupKey;
-
public class JSONMapper {
-
- private RFC7285Type.JSONMapper rfc7285Mapper = new RFC7285Type.JSONMapper();
- private RFC2ModelConvertor convertor = new RFC2ModelConvertor();
-
- public NetworkMap asNetworkMap(String rfc7285json) throws Exception {
- return (NetworkMap)convertor.convert((RFC7285Type.NetworkMap)rfc7285Mapper.asNetworkMap(rfc7285json));
- }
-
}
public class ModelType {
public static interface NetworkMap
- extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMap {}
+ extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.resources.network.maps.NetworkMap {}
public static interface NetworkMapData
extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.rev150404.network.map.Map {
import java.util.LinkedHashMap;
public class Endpoint {
-
+
public static class AddressGroup extends Extensible {
@JsonIgnore
private static final Pattern VALID_ID_PATTERN_WITH_DOT
= Pattern.compile("^["+VALID_CHARSET_WITH_DOT+"]{1,64}$");
private static final String VALID_TAG_CHARSET = "!-~";
- private static final Pattern VALID_TAG_PATTERN
+ private static final Pattern VALID_TAG_PATTERN
= Pattern.compile("^["+VALID_TAG_CHARSET+"]{1,64}$}");
public static boolean validId(String id) {
}
public CostMap.Filter asCostMapFilter(String json) throws Exception {
- return mapper.readValue(json, CostMap.Filter.class);
+ return mapper.readValue(json, CostMap.Filter.class);
}
public VersionTag asVersionTag(String json) throws Exception {
extends org.opendaylight.alto.commons.types.rfc7285.CostMap {}
public static class CostType
- extends org.opendaylight.alto.commons.types.rfc7285.CostType {}
+ extends org.opendaylight.alto.commons.types.rfc7285.CostType {}
public static class Endpoint
- extends org.opendaylight.alto.commons.types.rfc7285.Endpoint {}
+ extends org.opendaylight.alto.commons.types.rfc7285.Endpoint {}
public static class IRD
- extends org.opendaylight.alto.commons.types.rfc7285.IRD {}
+ extends org.opendaylight.alto.commons.types.rfc7285.IRD {}
public static class MediaType
- extends org.opendaylight.alto.commons.types.rfc7285.MediaType {}
+ extends org.opendaylight.alto.commons.types.rfc7285.MediaType {}
public static class JSONMapper
- extends org.opendaylight.alto.commons.types.rfc7285.JSONMapper {}
+ extends org.opendaylight.alto.commons.types.rfc7285.JSONMapper {}
public static class VersionTag
extends org.opendaylight.alto.commons.types.rfc7285.VersionTag {}
<?xml version="1.0" encoding="UTF-8"?>
-
-<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/xsd/maven-4.0.0.xsd">
-
+<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.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
+
<artifactId>alto-config</artifactId>
<packaging>jar</packaging>
+
<build>
<plugins>
- <plugin>
+ <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
-<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/maven-v4_0_0.xsd">
-
+<?xml version="1.0" encoding="UTF-8"?>
+<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.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
+ <groupId>org.opendaylight.alto</groupId>
+ <artifactId>alto-manager</artifactId>
+ <packaging>bundle</packaging>
+ <name>${project.artifactId}</name>
+
<properties>
<configfile>default.networkmap</configfile>
</properties>
- <artifactId>alto-manager</artifactId>
- <packaging>bundle</packaging>
- <name>${project.artifactId}</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<dependency>
<groupId>org.apache.karaf.shell</groupId>
<artifactId>org.apache.karaf.shell.console</artifactId>
- <version>2.2.11</version>
+ <version>${karaf.shell.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
- <version>${httpclient.version}</version>
- <type>bundle</type>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-osgi</artifactId>
- <version>${httpclient.version}</version>
- <type>bundle</type>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
- <version>${jackson.version}</version>
</dependency>
</dependencies>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>${bundle.plugin.version}</version>
<configuration>
<instructions>
<Import-Package>
org.apache.felix.service.command,
org.apache.felix.gogo.commands,
org.apache.karaf.shell.console,
- org.apache.http.*,
- *
+ org.apache.http.*
</Import-Package>
<Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
</instructions>
@Command(scope = "alto", name = "load", description = "Alto Manager")
public class AltoManager extends OsgiCommandSupport {
-
+
private static final Logger log = LoggerFactory.getLogger(AltoManager.class);
private JsonFactory jsonF = new JsonFactory();
private HttpClient httpClient;
-
+
public AltoManager () {
httpClient = initiateHttpClient();
log.info(this.getClass().getName() + " Initiated");
}
-
+
private HttpClient initiateHttpClient() {
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
}
return null;
}
-
+
private void putResources() throws IOException {
log.info("Loading Resources From " + path);
String data = readFromFile(path);
httpPut(AltoManagerConstants.HOST, data);
}
-
+
private void putNetworkMap() throws IOException {
log.info("Loading Network Map From " + this.path);
String data = readFromFile(path);
log.info("Url: " + url);
httpPut(url, data);
}
-
+
private void httpPut(String url, String data) throws IOException {
HttpPut httpput = new HttpPut(url);
httpput.setHeader(HTTP.CONTENT_TYPE, AltoManagerConstants.JSON_CONTENT_TYPE);
return new String(Files.readAllBytes(Paths.get(path)),
StandardCharsets.UTF_8);
}
-
+
private void handleResponse(HttpResponse response) throws ParseException, IOException {
HttpEntity entity = response.getEntity();
if (entity != null) {
}
}
}
-
+
private String resourceIdFromNetworkMap(String jsonString) throws JsonParseException, IOException {
JsonParser jParser = jsonF.createParser(jsonString);
while (jParser.nextToken() != JsonToken.END_OBJECT) {
String resourceId = jParser.getText();
return resourceId;
}
- }
+ }
return null;
}
-
+
private void postResources(String path) throws IOException {
log.info("Loading Resources From " + path);
String content = readFromFile(path);
-
+
HttpPost httppost = new HttpPost(AltoManagerConstants.HOST);
httppost.setHeader(HTTP.CONTENT_TYPE, AltoManagerConstants.JSON_CONTENT_TYPE);
httppost.setEntity(new StringEntity(content));
public static final String HOST = "http://127.0.0.1:8181/restconf/config/";
public static final String MODULE = "alto-service";
public static final String JSON_CONTENT_TYPE = "application/yang.data+json";
-
+
public static final String RESOURCES_LABEL = MODULE + ":resources";
public static final String NETWORK_MAPS_LABEL = MODULE + ":network-maps";
public static final String NETWORK_MAP_LABEL = MODULE + ":network-map";
-
+
public static final String RESOURCE_ID_LABEL = MODULE + ":resource-id";
public static final String RESOURCES_HOST = HOST + RESOURCES_LABEL + "/";
public static final String NETWORK_MAPS_HOST = RESOURCES_HOST + NETWORK_MAPS_LABEL + "/";
public static final String NETWORK_MAP_HOST = NETWORK_MAPS_HOST + NETWORK_MAP_LABEL + "/";
-
+
public static final String DEFAULT_RESOURCES_PATH = "configuration/default.networkmap";
-
+
public static enum SERVICE_TYPE{
RESOURCE, NETWORK, COST
}
/**
* Unit test for simple App.
*/
-public class AppTest
+public class AppTest
extends TestCase
{
/**
<?xml version="1.0" encoding="UTF-8"?>
-<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">
+<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.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>alto-model</artifactId>
<packaging>bundle</packaging>
- <properties>
- <jmxGeneratorPath>${project.build.directory}/generated-sources/config</jmxGeneratorPath>
- </properties>
-
<build>
<plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>target/generated-sources/sal</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-sources</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <failsOnError>true</failsOnError>
- <configLocation>controller/checkstyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <sourceDirectory>${project.basedir}</sourceDirectory>
- <includes>**\/*.yang</includes>
- <excludes>**\/target\/,**\/bin\/,**\/third-party,**\/yang-gen-sal</excludes>
- </configuration>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${controller.checkstyle.version}</version>
- </dependency>
- </dependencies>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
-
- <plugin>
+ <plugin> <!-- OSGi plugin -->
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-maven-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>yang-jmx-generator-plugin</artifactId>
+ <version>${config.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>maven-sal-api-gen-plugin</artifactId>
+ <version>${yangtools.version}</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<goals>
<goal>generate-sources</goal>
</goals>
-
<configuration>
<codeGenerators>
<generator>
<codeGeneratorClass>
org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
</codeGeneratorClass>
- <outputBaseDir>${project.build.directory}/generated-sources/config</outputBaseDir>
+ <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
<additionalConfiguration>
<namespaceToPackage1>
urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang
<codeGeneratorClass>
org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
</codeGeneratorClass>
- <outputBaseDir>${project.build.directory}/generated-sources/sal</outputBaseDir>
- </generator>
- <generator>
- <codeGeneratorClass>
- org.opendaylight.yangtools.yang.unified.doc.generator.maven.DocumentationGeneratorImpl
- </codeGeneratorClass>
- <outputBaseDir>${project.build.directory}/site/models</outputBaseDir>
+ <outputBaseDir>${salGeneratorPath}</outputBaseDir>
</generator>
+ -->
</codeGenerators>
<inspectDependencies>true</inspectDependencies>
</configuration>
</execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>yang-jmx-generator-plugin</artifactId>
- <version>0.3.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>${yangtools.version}</version>
- <type>jar</type>
- </dependency>
- </dependencies>
</plugin>
</plugins>
</build>
<dependencies>
- <dependency>
+ <dependency> <!-- yang generated -->
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
-
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-inet-types</artifactId>
- <version>${ietf.model.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-yang-types-20130715</artifactId>
- <version>${ietf.yang.types.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.ovsdb</groupId>
- <artifactId>southbound-api</artifactId>
- <version>${ovsdb.southbound.version}</version>
</dependency>
</dependencies>
</project>
-
<?xml version="1.0" encoding="UTF-8"?>
-<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/xsd/maven-4.0.0.xsd">
+<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.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
</parent>
+
+ <groupId>org.opendaylight.alto</groupId>
<artifactId>alto-northbound</artifactId>
<packaging>bundle</packaging>
<manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
</configuration>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-sources</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
-
- <configuration>
- <failsOnError>true</failsOnError>
- <configLocation>controller/checkstyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <sourceDirectory>${project.basedir}</sourceDirectory>
- <excludes>**\/target\/,**\/bin\/,**\/third-party,**\/yang-gen-sal</excludes>
- </configuration>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${controller.checkstyle.version}</version>
- </dependency>
- </dependencies>
- </plugin>
</plugins>
</build>
<dependency>
<groupId>org.opendaylight.controller.thirdparty</groupId>
<artifactId>com.sun.jersey.jersey-servlet</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<dependency>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>enunciate-core-annotations</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.opendaylight.controller.thirdparty</groupId>
- <artifactId>org.apache.catalina.filters.CorsFilter</artifactId>
- <version>${corsfilter.version}</version>
</dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- </dependency>
-
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
</dependency>
</dependencies>
</project>
-
@Produces({ MediaType.ALTO_NETWORKMAP, MediaType.ALTO_ERROR })
public Response retrieveDefaultNetworkMap() throws Exception {
checkAltoService();
-
+
NetworkMap map = altoService.getDefaultNetworkMap();
if (map == null)
return fail(Status.NOT_FOUND, null);
return fail(Status.NOT_FOUND, vtag);
return success(map, MediaType.ALTO_NETWORKMAP);
}
-
+
@Path("/costmap/{id}")
@GET
@Produces({ MediaType.ALTO_COSTMAP, MediaType.ALTO_ERROR})
return fail(Status.NOT_FOUND, id);
return success(map, MediaType.ALTO_NETWORKMAP);
}
-
+
@Path("/filtered/networkmap/{id}/{tag}")
@POST
@Consumes({ MediaType.ALTO_NETWORKMAP_FILTER})
if (map == null)
return fail(Status.NOT_FOUND, vtag);
return success(map, MediaType.ALTO_NETWORKMAP);
- }
+ }
@Path("/filtered/costmap/{id}")
@POST
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
import org.opendaylight.alto.commons.types.rfc7285.MediaType;
<?xml version="1.0" encoding="UTF-8"?>
-
-<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/xsd/maven-4.0.0.xsd">
-
+<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.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<packaging>bundle</packaging>
<properties>
- <sal-binding-api.version>1.2.0-SNAPSHOT</sal-binding-api.version>
<configfile>default.networkmap</configfile>
</properties>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
- <version>${mdsal.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-config</artifactId>
- <version>${mdsal.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-common-util</artifactId>
- <version>${mdsal.version}</version>
</dependency>
<dependency>
<!-- dependencies to use AbstractDataBrokerTest -->
<dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-broker-impl</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <scope>test</scope>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-broker-impl</artifactId>
<type>test-jar</type>
- <version>1.2.0-SNAPSHOT</version>
+ <version>${mdsal.version}</version>
<scope>test</scope>
</dependency>
-
- <dependency>
- <artifactId>junit</artifactId>
- <groupId>junit</groupId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-commons</artifactId>
- <version>${project.version}</version>
+ <!-- used to mock up classes -->
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
</dependency>
-
</dependencies>
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+
+
+ <plugin> <!-- OSGi plugin -->
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
</instructions>
</configuration>
</plugin>
+
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-maven-plugin</artifactId>
</dependencies>
<executions>
<execution>
- <id>config</id>
<goals>
<goal>generate-sources</goal>
</goals>
<configuration>
<codeGenerators>
<generator>
- <codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass>
+ <codeGeneratorClass>
+ org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+ </codeGeneratorClass>
<outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
<additionalConfiguration>
- <namespaceToPackage1>urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang</namespaceToPackage1>
+ <namespaceToPackage1>
+ urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang
+ </namespaceToPackage1>
</additionalConfiguration>
</generator>
<generator>
- <codeGeneratorClass>org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
+ <codeGeneratorClass>
+ org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
+ </codeGeneratorClass>
<outputBaseDir>${salGeneratorPath}</outputBaseDir>
</generator>
</codeGenerators>
</plugin>
</plugins>
</build>
- <scm>
- <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
- <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
- <tag>HEAD</tag>
- <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
- </scm>
</project>
public static final InstanceIdentifier<Resources> ALTO_IID
= InstanceIdentifier.builder(Resources.class).build();
-
+
private DataBroker dataProvider;
private final ExecutorService executor;
-
+
public AltoProvider() {
this.executor = Executors.newFixedThreadPool(1);
}
public class AltoProviderModule extends AbstractAltoProviderModule {
private static final Logger log = LoggerFactory.getLogger(AltoProviderModule.class);
-
+
public AltoProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
}
@Override
public java.lang.AutoCloseable createInstance() {
- final AltoProvider altoProvider = new AltoProvider();
+ final AltoProvider altoProvider = new AltoProvider();
+
+ DataBroker dataBrokerService = getDataBrokerDependency();
+ altoProvider.setDataProvider(dataBrokerService);
- DataBroker dataBrokerService = getDataBrokerDependency();
- altoProvider.setDataProvider(dataBrokerService);
-
- final BindingAwareBroker.RpcRegistration<AltoServiceService> rpcRegistration = getRpcRegistryDependency()
+ final BindingAwareBroker.RpcRegistration<AltoServiceService> rpcRegistration = getRpcRegistryDependency()
.addRpcImplementation(AltoServiceService.class, altoProvider);
-
- final ListenerRegistration<DataChangeListener> altoDataChangeListenerRegistration =
- dataBrokerService.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION, AltoProvider.ALTO_IID, altoProvider, DataChangeScope.SUBTREE);
- final AltoProviderRuntimeRegistration runtimeReg = getRootRuntimeBeanRegistratorWrapper().register(altoProvider);
-
- final class AutoCloseableAlto implements AutoCloseable {
- @Override
- public void close() throws Exception {
- rpcRegistration.close();
- altoDataChangeListenerRegistration.close();
- runtimeReg.close();
- altoProvider.close();
- }
- }
-
- return new AutoCloseableAlto();
+
+ final ListenerRegistration<DataChangeListener> altoDataChangeListenerRegistration =
+ dataBrokerService.registerDataChangeListener(LogicalDatastoreType.CONFIGURATION, AltoProvider.ALTO_IID, altoProvider, DataChangeScope.SUBTREE);
+ final AltoProviderRuntimeRegistration runtimeReg = getRootRuntimeBeanRegistratorWrapper().register(altoProvider);
+
+ final class AutoCloseableAlto implements AutoCloseable {
+ @Override
+ public void close() throws Exception {
+ rpcRegistration.close();
+ altoDataChangeListenerRegistration.close();
+ runtimeReg.close();
+ altoProvider.close();
+ }
+ }
+
+ return new AutoCloseableAlto();
}
}
<parent>
<groupId>org.opendaylight.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<?xml version="1.0" encoding="UTF-8"?>
-<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/xsd/maven-4.0.0.xsd">
+<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.alto</groupId>
- <artifactId>services.api</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath>../</relativePath>
+ <artifactId>alto-parent</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <relativePath>../../../</relativePath>
</parent>
<groupId>org.opendaylight.alto</groupId>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle.version}</version>
-
- <executions>
- <execution>
- <phase>process-sources</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
-
- <configuration>
- <failsOnError>true</failsOnError>
- <configLocation>controller/checkstyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <sourceDirectory>${project.basedir}</sourceDirectory>
- <excludes>**\/target\/,**\/bin\/,**\/third-party,**\/yang-gen-sal</excludes>
- </configuration>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${controller.checkstyle.version}</version>
- </dependency>
- </dependencies>
- </plugin>
-
- <plugin>
+ <plugin> <!-- OSGi plugin -->
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</instructions>
</configuration>
</plugin>
-
</plugins>
-
</build>
<dependencies>
<artifactId>alto-commons</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </dependency>
</dependencies>
</project>
-
public Boolean validateCostMapFilter(String id, CostMap.Filter filter);
public Boolean validateCostMapFilter(VersionTag vtag, CostMap.Filter filter);
-
+
}
<parent>
<groupId>org.opendaylight.alto</groupId>
<artifactId>services.ext</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<build>
<plugins>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</instructions>
</configuration>
</plugin>
-
</plugins>
</build>
<dependencies>
-
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>alto-model</artifactId>
<artifactId>service-api-rfc7285</artifactId>
<version>${project.version}</version>
</dependency>
-
</dependencies>
</project>
private JSONMapper mapper = new JSONMapper();
- private static final String NETWORKMAP_JSON =
+ private static final String NETWORKMAP_JSON =
"{"
+ "\"meta\" : {"
+ "\"vtag\": {"
+ "}"
+ "}"
+ "}";
-
+
private static final String DEFAULT_NETWORKMAP_ID = "default-networkmap";
private static final String DEFAULT_NETWORKMAP_TAG = "3ee2cb7e8d63d9fab71b9b34cbf764436315542e";
private NetworkMap networkMap = null;
+ "\"PID3\": { \"PID1\": 20, \"PID2\": 15 }"
+ "}"
+ "}";
-
+
private static final String DEFAULT_COSTMAP_ID = "default-costmap";
private CostMap costMap = null;
costMap = null;
}
}
-
+
public CostMap getCostMap(String id) {
if (!DEFAULT_COSTMAP_ID.equals(id))
return null;
<parent>
<groupId>org.opendaylight.alto</groupId>
<artifactId>services.ext</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <executions>
- <execution>
- <phase>process-sources</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
-
- <configuration>
- <failsOnError>true</failsOnError>
- <configLocation>controller/checkstyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <sourceDirectory>${project.basedir}</sourceDirectory>
- <excludes>**\/target\/,**\/bin\/,**\/third-party,**\/yang-gen-sal</excludes>
- </configuration>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>checkstyle</artifactId>
- <version>${controller.checkstyle.version}</version>
- </dependency>
- </dependencies>
</plugin>
<plugin>
</build>
<dependencies>
-
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>alto-model</artifactId>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>commons</artifactId>
+ <artifactId>alto-commons</artifactId>
<version>${project.version}</version>
</dependency>
-
</dependencies>
</project>
<parent>
<groupId>org.opendaylight.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<parent>
<groupId>org.opendaylight.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
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">
+ <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.alto</groupId>
<artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>alto-features</artifactId>
<name>${project.artifactId}</name>
- <modelVersion>4.0.0</modelVersion>
-
- <prerequisites>
- <maven>3.1.1</maven>
- </prerequisites>
<properties>
<features.file>features.xml</features.file>
- <branding.version>${project.version}</branding.version>
-
- <mdsal.version>1.2.0-SNAPSHOT</mdsal.version>
- <yangtools.version>0.7.0-SNAPSHOT</yangtools.version>
</properties>
<dependencyManagement>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-config</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-config</artifactId>
- <version>${project.version}</version>
- </dependency>
-
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>alto-northbound</artifactId>
<artifactId>alto-manager</artifactId>
<version>${project.version}</version>
</dependency>
+
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
- <version>${httpclient.version}</version>
- <type>bundle</type>
</dependency>
+
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-osgi</artifactId>
- <version>${httpclient.version}</version>
- <type>bundle</type>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
-
+
</project>
<?xml version="1.0" encoding="UTF-8"?>
<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>
-
- <prerequisites>
- <maven>3.0.4</maven>
- </prerequisites>
-
- <parent>
- <groupId>org.opendaylight.odlparent</groupId>
- <artifactId>odlparent</artifactId>
- <version>1.5.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.opendaylight.alto</groupId>
- <artifactId>alto-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <name>alto</name> <!-- Used by Sonar to set project name -->
- <packaging>pom</packaging>
-
- <properties>
- <httpclient.version>4.4.1</httpclient.version>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <checkstyle.skip>true</checkstyle.skip>
-
- <!-- Java Versions -->
- <maven.compiler.source>1.7</maven.compiler.source>
- <maven.compiler.target>1.7</maven.compiler.target>
-
- <!-- Build Plugin Versions -->
- <maven.release.version>2.4.2</maven.release.version>
- <maven.resources.version>2.6</maven.resources.version>
- <maven.helper.version>1.8</maven.helper.version>
- <maven.dependency.version>2.6</maven.dependency.version>
- <maven.exec.version>1.3.2</maven.exec.version>
-
- <ietf.model.version>2010.09.24.7-SNAPSHOT</ietf.model.version>
- <ietf.yang.types.version>2013.07.15.7-SNAPSHOT</ietf.yang.types.version>
- <ietf.topology.version>2013.10.21.2-SNAPSHOT</ietf.topology.version>
- <yang.ext.version>2013.09.07.7-SNAPSHOT</yang.ext.version>
- <config.version>0.3.0-SNAPSHOT</config.version>
- <sal.version>0.7.1-SNAPSHOT</sal.version>
- <war.version>3.0.1</war.version>
- <mdsal.version>1.2.0-SNAPSHOT</mdsal.version>
- <controller.model.version>1.2.0-SNAPSHOT</controller.model.version>
- <build.helper.version>1.8</build.helper.version>
- <netconf.parent.version>0.3.0-SNAPSHOT</netconf.parent.version>
- <config.parent.version>0.3.0-SNAPSHOT</config.parent.version>
- <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
- <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
- <jersey.version>1.17</jersey.version>
- <jersey.servlet.version>1.17</jersey.servlet.version>
- <jersey.json.version>1.17</jersey.json.version>
- <jackson.version>2.3.2</jackson.version>
-
- <yangtools.version>0.7.0-SNAPSHOT</yangtools.version>
- <yangtools.binding.version>0.7.0-SNAPSHOT</yangtools.binding.version>
-
- <lispflowmapping.version>1.2.0-SNAPSHOT</lispflowmapping.version>
- <ovsdb.southbound.version>1.1.0-SNAPSHOT</ovsdb.southbound.version>
-
- <!-- Supporting Libraries -->
- <slf4j.version>1.7.2</slf4j.version>
- <feature.openflowplugin.version>0.1.0-SNAPSHOT</feature.openflowplugin.version>
-
- <branding.version>1.1.0-SNAPSHOT</branding.version>
- <karaf.resources.version>1.5.0-SNAPSHOT</karaf.resources.version>
- <feature.test.version>1.5.0-SNAPSHOT</feature.test.version>
- <karaf.empty.version>1.5.0-SNAPSHOT</karaf.empty.version>
- <controller.checkstyle.version>0.1.0-SNAPSHOT</controller.checkstyle.version>
- <controller.commons.northbound.version>0.5.0-SNAPSHOT</controller.commons.northbound.version>
- <corsfilter.version>7.0.42</corsfilter.version>
-
- <!-- Test Libraries -->
- <powermock.version>1.5.6</powermock.version>
- </properties>
-
- <repositories>
- <repository>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <id>opendaylight-mirror</id>
- <name>opendaylight-mirror</name>
- <url>http://nexus.opendaylight.org/content/groups/public/</url>
- </repository>
- <repository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <id>opendaylight-snapshot</id>
- <name>opendaylight-snapshot</name>
- <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
- </repository>
- </repositories>
-
- <distributionManagement>
- <repository>
- <id>opendaylight-release</id>
- <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release</url>
- </repository>
- <snapshotRepository>
- <id>opendaylight-snapshot</id>
- <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot</url>
- </snapshotRepository>
- </distributionManagement>
-
- <modules>
- <module>alto-model</module>
- <module>alto-config</module>
- <module>alto-provider</module>
- <module>features</module>
- <module>alto-commons</module>
- <module>alto-services/api</module>
- <module>alto-services/ext</module>
- <module>alto-services/provider</module>
- <module>alto-manager</module>
- <module>alto-northbound</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- </plugin>
- </plugins>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>${compiler.version}</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>maven-paxexam-plugin</artifactId>
- <version>1.2.4</version>
- </plugin>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <configuration>
- <filesets>
- <fileset>
- <directory>${jmxGeneratorPath}</directory>
- <includes>
- <include>**</include>
- </includes>
- </fileset>
- <fileset>
- <directory>${salGeneratorPath}</directory>
- <includes>
- <include>**</include>
- </includes>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>${build.helper.version}</version>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${jmxGeneratorPath}</source>
- <source>${salGeneratorPath}</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-maven-plugin</artifactId>
- <version>0.7.0-SNAPSHOT</version>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>${maven.bundle.version}</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
- </instructions>
- <manifestLocation>${project.build.directory}/META-INF</manifestLocation>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco.version}</version>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>3.0</maven>
+ </prerequisites>
+
+ <parent>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>odlparent</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.alto</groupId>
+ <artifactId>alto-parent</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <name>alto</name> <!-- Used by Sonar to set project name -->
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>alto-model</module>
+ <module>alto-config</module> <!-- required by alto-manager -->
+ <module>alto-provider</module>
+ <module>features</module>
+ <module>alto-commons</module>
+ <module>alto-manager</module>
+ <module>alto-services/api</module>
+ <module>alto-services/ext</module>
+ <!-- <module>alto-karaf</module> -->
+ <module>alto-northbound</module>
+ </modules>
+
+ <properties>
+ <karaf.shell.version>2.2.11</karaf.shell.version>
+
+ <!-- required by alto command line -->
+ <httpclient.version>4.4.1</httpclient.version>
+
+ <ietf.model.version>2010.09.24.7-SNAPSHOT</ietf.model.version>
+ <ietf.yang.types.version>2013.07.15.7-SNAPSHOT</ietf.yang.types.version>
+
+ <!-- used by yangtools, but the name is strange.
+ TODO: need more investigation -->
+ <config.version>0.3.0-SNAPSHOT</config.version>
+
+ <sal.version>0.7.1-SNAPSHOT</sal.version>
+ <war.version>3.0.1</war.version>
+ <mdsal.version>1.2.0-SNAPSHOT</mdsal.version>
+ <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
+ <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
+
+ <yangtools.version>0.7.0-SNAPSHOT</yangtools.version>
+
+ <controller.checkstyle.version> <!-- checkstyle artifact of controller -->
+ 0.1.0-SNAPSHOT
+ </controller.checkstyle.version>
+ <controller.commons.northbound.version> <!-- required by alto-northbound -->
+ 0.5.0-SNAPSHOT
+ </controller.commons.northbound.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ <version>${ietf.model.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-yang-types-20130715</artifactId>
+ <version>${ietf.yang.types.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient-osgi</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-osgi</artifactId>
+ <version>${httpclient.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-api</artifactId>
+ <version>${mdsal.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-binding-config</artifactId>
+ <version>${mdsal.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-common-util</artifactId>
+ <version>${mdsal.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin> <!-- used by most projects -->
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <version>${yangtools.version}</version>
+ </plugin>
+
+ <plugin> <!-- global checkstyle -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle.version}</version>
+
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ <configuration>
+ <!-- TODO: remove before releasing -->
+ <failsOnError>true</failsOnError>
+ <configLocation>controller/checkstyle.xml</configLocation>
+ <consoleOutput>true</consoleOutput>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <sourceDirectory>${project.basedir}</sourceDirectory>
+ <excludes>**\/target\/,**\/bin\/,**\/third-party\/,**\/yang\/gen\/,**\/yang-gen-sal\/</excludes>
+ </configuration>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>${controller.checkstyle.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
</project>