From 342229989dc14e3be34703f5bc1dccb37bf895ae Mon Sep 17 00:00:00 2001 From: Lorand Jakab Date: Thu, 1 Oct 2015 19:17:22 +0300 Subject: [PATCH] Switch to using lisp-address instead of LispAddress This commit modifies the build to make experimentation easy. Modules that wouldn't build are commented out, tests that would fail are skipped by default, and Karaf will only load odl-lispflowmapping-models instead of the odl-lispflowmapping-msmr feature. Additionally odl-mdsal-apidoc is pulled in automatically. If you start Karaf after a successful build, you should be able to explore the API and play with adding/removing keys/mappings to/from the config datastore. Change-Id: I70fd3c950d4b668bc57fa55a8156b76fe2751437 Signed-off-by: Lorand Jakab --- artifacts/pom.xml | 4 +++ distribution-karaf/pom.xml | 3 +- features/pom.xml | 8 +++++ features/src/main/features/features.xml | 6 +++- .../api/src/main/yang/mappingservice.yang | 24 +++++--------- mappingservice/lisp-proto/pom.xml | 33 +++++++++++++++++++ .../types/rev150309/SimpleAddressBuilder.java | 19 +++++++++++ .../lisp-proto/src/main/yang/lisp-proto.yang | 15 ++++----- mappingservice/pom.xml | 2 ++ pom.xml | 2 +- 10 files changed, 89 insertions(+), 27 deletions(-) create mode 100644 mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/lisp/address/types/rev150309/SimpleAddressBuilder.java diff --git a/artifacts/pom.xml b/artifacts/pom.xml index 6df17f7b5..e58207adb 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -22,6 +22,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html mappingservice.api ${project.version} + ${project.groupId} mappingservice.lisp-proto ${project.version} + ${project.groupId} features-lispflowmapping diff --git a/distribution-karaf/pom.xml b/distribution-karaf/pom.xml index e84766918..ad9e21be2 100644 --- a/distribution-karaf/pom.xml +++ b/distribution-karaf/pom.xml @@ -26,7 +26,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - odl-lispflowmapping-msmr + + odl-lispflowmapping-models diff --git a/features/pom.xml b/features/pom.xml index 23a4bc583..289ae5f8a 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -35,6 +35,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html 0.8.0-SNAPSHOT 0.6.0-SNAPSHOT 1.3.0-SNAPSHOT + + true @@ -96,6 +98,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html xml runtime + ${project.groupId} mappingservice.api ${project.version} + ${project.groupId} mappingservice.lisp-proto ${project.version} + diff --git a/features/src/main/features/features.xml b/features/src/main/features/features.xml index 3055fea69..14c622482 100644 --- a/features/src/main/features/features.xml +++ b/features/src/main/features/features.xml @@ -23,6 +23,7 @@ mvn:org.opendaylight.neutron/features-neutron/${neutron.version}/xml/features mvn:org.opendaylight.dlux/features-dlux/${dlux.core.version}/xml/features + + TODO felix-dm should be removed when we get rid of Activators, hopefully soon odl-base-felix-dm odl-neutron-service odl-lispflowmapping-mappingservice @@ -72,10 +73,13 @@ odl-lispflowmapping-mappingservice mvn:org.opendaylight.lispflowmapping/lispflowmapping-ui-bundle/${project.version} + --> odl-config-api odl-mdsal-models + + odl-mdsal-apidocs mvn:org.apache.commons/commons-lang3/${commons.lang3.version} mvn:org.opendaylight.lispflowmapping/mappingservice.lisp-proto/${project.version} mvn:org.opendaylight.lispflowmapping/mappingservice.api/${project.version} diff --git a/mappingservice/api/src/main/yang/mappingservice.yang b/mappingservice/api/src/main/yang/mappingservice.yang index fe2f823a5..37674ee70 100644 --- a/mappingservice/api/src/main/yang/mappingservice.yang +++ b/mappingservice/api/src/main/yang/mappingservice.yang @@ -6,7 +6,8 @@ module mappingservice { import config { prefix config; revision-date 2013-04-05; } import ietf-inet-types { prefix inet; revision-date 2010-09-24; } - import yang-ext { prefix ext; revision-date "2013-07-09"; } + import yang-ext { prefix ext; revision-date 2013-07-09; } + import lisp-address-types { prefix lisp-address; revision-date 2015-03-09; } import lisp-proto { prefix lisp-proto; revision-date 2015-08-20; } contact "Lorand Jakab test + + + + + + maven-compiler-plugin + + + default-compile + compile + + compile + + + + org/opendaylight/lispflowmapping/** + + + + + default-testCompile + test-compile + + testCompile + + + true + + + + + + diff --git a/mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/lisp/address/types/rev150309/SimpleAddressBuilder.java b/mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/lisp/address/types/rev150309/SimpleAddressBuilder.java new file mode 100644 index 000000000..8935e8555 --- /dev/null +++ b/mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/lisp/address/types/rev150309/SimpleAddressBuilder.java @@ -0,0 +1,19 @@ +package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.lisp.address.types.rev150309; + + +/** + * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. + * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). + * + * The reason behind putting it under src/main/java is: + * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent + * loss of user code. + * + */ +public class SimpleAddressBuilder { + + public static SimpleAddress getDefaultInstance(java.lang.String defaultValue) { + throw new java.lang.UnsupportedOperationException("Not yet implemented"); + } + +} diff --git a/mappingservice/lisp-proto/src/main/yang/lisp-proto.yang b/mappingservice/lisp-proto/src/main/yang/lisp-proto.yang index 9933cd31b..4c43b7273 100644 --- a/mappingservice/lisp-proto/src/main/yang/lisp-proto.yang +++ b/mappingservice/lisp-proto/src/main/yang/lisp-proto.yang @@ -6,7 +6,7 @@ module lisp-proto { import ietf-inet-types { prefix inet; revision-date 2010-09-24; } import ietf-yang-types { prefix yang; revision-date 2010-09-24; } - import lisp-address-types { prefix address; revision-date 2015-03-09; } + import lisp-address-types { prefix lisp-address; revision-date 2015-03-09; } organization "LISP Flow Mapping"; @@ -362,10 +362,7 @@ module lisp-proto { grouping EidRecords { list EidRecord { - uses LispAddress; - leaf mask { - type uint8; - } + uses lisp-address:lisp-address; } } @@ -398,7 +395,7 @@ module lisp-proto { } //locator address - uses LispAddress; + uses lisp-address:lisp-address; } } @@ -424,7 +421,7 @@ module lisp-proto { type boolean; } // EID prefix - uses LispAddress; + uses lisp-address:lisp-address; // locator record list uses LocatorRecords; @@ -511,10 +508,10 @@ module lisp-proto { type int64; } container SourceEid { - uses LispAddress; + uses lisp-address:lisp-address; } list itrRloc { - uses LispAddress; + uses lisp-address:lisp-address; } uses EidRecords; container MapReply{ diff --git a/mappingservice/pom.xml b/mappingservice/pom.xml index 197b8d69b..993d83585 100644 --- a/mappingservice/pom.xml +++ b/mappingservice/pom.xml @@ -18,11 +18,13 @@ lisp-proto api + diff --git a/pom.xml b/pom.xml index a36ecdffb..7357b8258 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ ui features distribution-karaf - mappingservice/integrationtest + -- 2.36.6