Models for cost map and endpoint property service 85/30385/2
authorgc19931011 <449200053@qq.com>
Mon, 30 Nov 2015 07:41:12 +0000 (15:41 +0800)
committerKai GAO <gaok12@mails.tsinghua.edu.cn>
Mon, 30 Nov 2015 14:48:12 +0000 (22:48 +0800)
Patch set 2: fix the modules in default profile

Change-Id: I8cf19ce53d2107e260074e43cd51299561ce47b0
Signed-off-by: gc19931011 <449200053@qq.com>
Signed-off-by: Kai GAO <gaok12@mails.tsinghua.edu.cn>
43 files changed:
README.md
alto-core/basic-types/pom.xml
alto-core/standard-service-models/model-costmap/api/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/api/src/main/java/org/opendaylight/alto/core/service/model/costmap/CostmapUtils.java [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/api/src/main/yang/alto-model-costmap-rfc7285.yang [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/api/src/main/yang/alto-model-costmap.yang [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/artifacts/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/features/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/features/src/main/features/features.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/src/main/config/default-config.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/src/main/config/maven-metadata-local.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/alto/core/impl/costmap/test/AltoCostmapProvider.java [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModule.java [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleFactory.java [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/src/main/yang/costmap-impl.yang [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleFactoryTest.java [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleTest.java [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/it/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/it/src/test/java/org/opendaylight/alto/core/it/AltoCostmapIT.java [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/karaf/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-costmap/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/api/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/api/src/main/yang/alto-model-endpointproperty-rfc7285.yang [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/api/src/main/yang/alto-model-endpointproperty.yang [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/artifacts/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/features/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/features/src/main/features/features.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/src/main/config/default-config.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/src/main/config/maven-metadata-local.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/alto/core/impl/endpointproperty/test/AltoEndpointPropertyProvider.java [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModule.java [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleFactory.java [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/src/main/yang/alto-endpoint-test-impl.yang [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleFactoryTest.java [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleTest.java [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/it/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/it/src/test/java/org/opendaylight/alto/core/it/AltoEndpointcostIT.java [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/karaf/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/model-endpointproperty/pom.xml [new file with mode: 0644]
alto-core/standard-service-models/pom.xml
pom.xml

index 7ec3255a9a0729d2f508983cc11a51aa2f8cf926..5eed60b16a900d2b1bacdfd765bb19014239b7c4 100644 (file)
--- a/README.md
+++ b/README.md
 # Test service models for ALTO
 
 ~~~
+resourcepool
 {
     "input": {
         "service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-base']/alto-resourcepool:context-tag[alto-resourcepool:tag='NEED TO CHECK THE RESOURCEPOOL']"
     }
 }
 
-
+networkmap
 {
     "input": {
         "service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-networkmap']/alto-resourcepool:context-tag[alto-resourcepool:tag='NEED TO CHECK THE RESOURCEPOOL']",
     }
 }
 
+costmap
+{
+    "input": {
+        "service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-costmap']/alto-resourcepool:context-tag[alto-resourcepool:tag='b781f0ee38e74b07b89e03a26c50ff3e']",
+        "type":"alto-model-costmap:resource-type-costmap",
+        "costmap-params": {
+            "cost-type": {
+                "cost-mode": "ordinal",
+                "cost-metric": "routingcost"
+            },
+            "costmap-filter": {
+                "pid-source": ["PID1"],
+                "pid-destination": ["PID1","PID2","PID3"]
+            }
+        }
+    }
+}
 
+endpointcost
 {
     "input": {
         "service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-endpointcost']/alto-resourcepool:context-tag[alto-resourcepool:tag='NEED TO CHECK THE RESOURCEPOOL']",
         }
     }
 }
+
+
+endpointproperty
+{
+    "input": {
+        "service-reference":"/alto-resourcepool:context[alto-resourcepool:context-id='00000000-0000-0000-0000-000000000000']/alto-resourcepool:resource[alto-resourcepool:resource-id='test-model-endpointproperty']/alto-resourcepool:context-tag[alto-resourcepool:tag='89a179d3000a4f44b423c86261ce36ff']",
+        "type":"alto-model-endpointproperty:resource-type-endpointproperty",
+        "endpointproperty-params": {
+            "endpointproperty-filter": {
+               "property-filter":[
+                       {"resource-specific-property": "my-default-networkmap.pid"},
+                       {"global-property": "priv:ietf-example-prop"}
+               ],
+                "endpoint-filter": [
+                       {"ipv4": "192.168.0.1"},
+                       {"ipv4": "192.168.0.2"}
+                ]
+            }
+
+        }
+    }
+}
+
+
+
+
+
+
 ~~~
 
 
index 645b0938f8f569b96bc1f1691f3dae34bb7bdc8d..ff90330b7579565e9b9669ab4009dae6d4f7379f 100644 (file)
@@ -22,10 +22,34 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <prerequisites>
     <maven>3.1.1</maven>
   </prerequisites>
-  <modules>
-    <module>model</module>
-    <module>features</module>
-  </modules>
+  <profiles>
+    <profile>
+      <id>minimal</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <modules>
+        <module>model</module>
+      </modules>
+    </profile>
+
+    <profile>
+      <id>alto-dev</id>
+      <modules>
+        <module>model</module>
+        <module>features</module>
+      </modules>
+    </profile>
+
+    <profile>
+      <id>alto-test</id>
+      <modules>
+        <module>model</module>
+        <module>features</module>
+      </modules>
+    </profile>
+  </profiles>
+
   <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
   <build>
     <plugins>
diff --git a/alto-core/standard-service-models/model-costmap/api/pom.xml b/alto-core/standard-service-models/model-costmap/api/pom.xml
new file mode 100644 (file)
index 0000000..37715b6
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.mdsal</groupId>
+    <artifactId>binding-parent</artifactId>
+    <version>0.8.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-costmap-api</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.alto.core</groupId>
+      <artifactId>alto-basic-types</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.alto.core</groupId>
+      <artifactId>alto-resourcepool-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.alto.core</groupId>
+      <artifactId>alto-service-model-base-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>yang-ext</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>ietf-inet-types-2013-07-15</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/alto-core/standard-service-models/model-costmap/api/src/main/java/org/opendaylight/alto/core/service/model/costmap/CostmapUtils.java b/alto-core/standard-service-models/model-costmap/api/src/main/java/org/opendaylight/alto/core/service/model/costmap/CostmapUtils.java
new file mode 100644 (file)
index 0000000..7c6ef6c
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.alto.core.service.model.costmap;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.types.rev150921.CostMetric;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.context.resource.capabilities.CostType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.context.resource.capabilities.CostTypeBuilder;
+
+
+public class CostmapUtils {
+    public static CostType createCostTypeCapability(String metric, String mode){
+        return createCostTypeCapability(new CostMetric(metric),mode);
+    }
+
+    public static CostType createCostTypeCapability(CostMetric metric,String mode){
+        CostTypeBuilder builder= new CostTypeBuilder();
+        builder.setCostMetric(metric);
+        builder.setCostMode(mode);
+        return builder.build();
+    }
+}
diff --git a/alto-core/standard-service-models/model-costmap/api/src/main/yang/alto-model-costmap-rfc7285.yang b/alto-core/standard-service-models/model-costmap/api/src/main/yang/alto-model-costmap-rfc7285.yang
new file mode 100644 (file)
index 0000000..11c9ba1
--- /dev/null
@@ -0,0 +1,66 @@
+module alto-model-costmap-rfc7285 {
+    yang-version 1;
+
+    namespace "urn:opendaylight:alto:service:model:costmap:rfc7285";
+
+    prefix "alto-model-costmap-rfc7285";
+
+    import "alto-basic-types" {
+        prefix "alto-types";
+    }
+
+    import "alto-model-costmap" {
+        prefix "alto-cm";
+    }
+
+    import yang-ext {
+        prefix ext;
+    }
+
+    organization "Yale University";
+
+    contact "alto-dev@lists.opendaylight.org";
+
+    revision "2015-10-21" {
+        description "Initial revision of alto costmap";
+    }
+
+    grouping "costmap-filter-data"{
+        container "costmap-filter"{
+            leaf-list "pid-source"{
+                type "alto-types:pid-name";
+            }
+            leaf-list "pid-destination"{
+                type "alto-types:pid-name";
+            }
+        }
+    }
+
+
+   augment "alto-cm:query/alto-cm:input/alto-cm:request/alto-cm:costmap-request/alto-cm:costmap-params/alto-cm:filter" {
+        ext:augment-identifier "rfc7285-costmap-filter";
+        case "costmap-filter-data" {
+            uses "costmap-filter-data";
+        }
+    }
+
+
+    augment "alto-cm:query/alto-cm:output/alto-cm:response/alto-cm:costmap-response/alto-cm:costmap-response-data/alto-cm:costmap-source/alto-cm:costmap-destination/alto-cm:cost" {
+        case numerical {
+            leaf "cost" {
+                type decimal64 {
+                    fraction-digits 4;
+                }
+            }
+        }
+       case ordinal {
+            leaf "cost" {
+                type int32;
+            }
+        }
+    }
+
+
+
+
+}
\ No newline at end of file
diff --git a/alto-core/standard-service-models/model-costmap/api/src/main/yang/alto-model-costmap.yang b/alto-core/standard-service-models/model-costmap/api/src/main/yang/alto-model-costmap.yang
new file mode 100644 (file)
index 0000000..096dcb9
--- /dev/null
@@ -0,0 +1,144 @@
+module alto-model-costmap {
+
+    yang-version 1;
+
+    namespace "urn:opendaylight:alto:service:model:costmap";
+
+    prefix "alto-model-costmap";
+
+    import "alto-basic-types" {
+        prefix "alto-types";
+    }
+
+    import "alto-resourcepool" {
+        prefix "alto-resourcpool";
+    }
+
+    import "alto-model-base" {
+        prefix "base";
+    }
+    import "yang-ext" {
+        prefix "yang-ext";
+    }
+
+    import "ietf-inet-types" {
+        prefix "ietf-inet";
+    }
+
+
+
+    organization "Yale University";
+
+    contact "alto-dev@lists.opendaylight.org";
+
+    revision "2015-10-21" {
+        description "Initial revision of alto costmap";
+    }
+
+    identity "resource-type-costmap"{
+        base "alto-resourcepool:resource-type";
+        description
+            "The resource type for cost map";
+    }
+
+    grouping "cost-type-data" {
+        container "cost-type" {
+            leaf "cost-metric" {
+                type alto-types:cost-metric;
+            }
+
+            leaf "cost-mode" {
+                mandatory true;
+                type string;
+            }
+        }
+    }
+
+    grouping "costmap-request-data" {
+        container "costmap-params" {
+            uses "cost-type-data";
+
+            leaf-list "constraints" {
+                type string;
+            }
+
+            choice "filter" {
+            }
+        }
+    }
+
+    identity "costmap-response-type-base" {
+        description
+            "Base identity for costmap response";
+    }
+
+    grouping "costmap-response-data"{
+        container "costmap-response-data"{
+            uses "cost-type-data";
+            list "costmap-source"{
+                key "pid-source";
+                leaf "pid-source"{
+                    type "alto-types:pid-name";
+                }
+                list "costmap-destination"{
+                    key "pid-destination";
+                    leaf "pid-destination"{
+                        type "alto-types:pid-name";
+                    }
+                    choice "cost"{
+                    }
+                }
+            }
+        }
+    }
+
+    grouping "alto-request-costmap" {
+        uses "base:alto-request-base" {
+            augment "request" {
+                case "costmap-request" {
+                    uses "costmap-request-data";
+                }
+            }
+        }
+    }
+
+    grouping "alto-response-costmap" {
+        uses "base:alto-response-error" {
+            augment "response" {
+                case "costmap-response" {
+                    uses "costmap-response-data";
+                }
+            }
+        }
+    }
+
+    rpc query {
+        input {
+            uses "alto-request-costmap";
+        }
+
+        output {
+            uses "alto-response-costmap";
+        }
+    }
+
+    augment "/alto-resourcepool:context"
+            + "/alto-resourcepool:resource"
+            + "/alto-resourcepool:capabilities" {
+
+
+        yang-ext:augment-identifier "capabilities-cost-type";
+
+        list "cost-type" {
+            uses "alto-types:cost-type-data";
+
+            leaf "description" {
+                type string;
+            }
+        }
+
+        leaf "constraint-support" {
+            type boolean;
+        }
+    }
+}
diff --git a/alto-core/standard-service-models/model-costmap/artifacts/pom.xml b/alto-core/standard-service-models/model-costmap/artifacts/pom.xml
new file mode 100644 (file)
index 0000000..f9bfbc8
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University 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>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-costmap-artifacts</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>alto-service-model-costmap-api</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>alto-service-model-costmap-impl</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>alto-service-model-costmap-features</artifactId>
+        <version>${project.version}</version>
+        <classifier>features</classifier>
+        <type>xml</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+</project>
diff --git a/alto-core/standard-service-models/model-costmap/features/pom.xml b/alto-core/standard-service-models/model-costmap/features/pom.xml
new file mode 100644 (file)
index 0000000..2385ac6
--- /dev/null
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public  License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>features-parent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-costmap-features</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <name>${project.artifactId}</name>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <properties>
+    <mdsal.model.version>0.8.0-SNAPSHOT</mdsal.model.version>
+    <mdsal.version>1.3.0-SNAPSHOT</mdsal.version>
+    <restconf.version>1.3.0-SNAPSHOT</restconf.version>
+    <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
+    <dlux.version>0.3.0-SNAPSHOT</dlux.version>
+    <configfile.directory>etc/opendaylight/karaf</configfile.directory>
+  </properties>
+  <dependencyManagement>
+    <dependencies>
+      <!-- project specific dependencies -->
+      <dependency>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>mdsal-artifacts</artifactId>
+        <version>${mdsal.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.netconf</groupId>
+        <artifactId>restconf-artifacts</artifactId>
+        <version>${restconf.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.yangtools</groupId>
+      <artifactId>features-yangtools</artifactId>
+      <classifier>features</classifier>
+      <version>${yangtools.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>features-mdsal-model</artifactId>
+      <version>${mdsal.model.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>features-mdsal</artifactId>
+      <classifier>features</classifier>
+      <version>${mdsal.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>features-restconf</artifactId>
+      <classifier>features</classifier>
+      <version>${restconf.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.dlux</groupId>
+      <artifactId>features-dlux</artifactId>
+      <classifier>features</classifier>
+      <version>${dlux.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-costmap-impl</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-costmap-impl</artifactId>
+      <version>${project.version}</version>
+      <type>xml</type>
+      <classifier>config</classifier>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-costmap-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-base-features</artifactId>
+      <classifier>features</classifier>
+      <version>${project.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-base-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/alto-core/standard-service-models/model-costmap/features/src/main/features/features.xml b/alto-core/standard-service-models/model-costmap/features/src/main/features/features.xml
new file mode 100644 (file)
index 0000000..0685725
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2015 Yale University 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
+-->
+<features name="odl-alto-service-model-costmap-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+  <repository>mvn:org.opendaylight.yangtools/features-yangtools/${yangtools.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${mdsal.model.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.netconf/features-restconf/${restconf.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.dlux/features-dlux/${dlux.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.alto.core/alto-service-model-base-features/${project.version}/xml/features</repository>
+
+  <feature name='odl-alto-service-model-costmap-api' version='${project.version}' description='OpenDaylight :: alto-service-model-costmap :: api'>
+    <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
+    <feature version='${project.version}'>odl-alto-service-model-base</feature>
+    <bundle>mvn:org.opendaylight.alto.core/alto-service-model-costmap-api/${project.version}</bundle>
+  </feature>
+
+  <feature name='odl-alto-service-model-costmap' version='${project.version}' description='OpenDaylight :: alto-service-model-costmap'>
+    <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
+    <feature version='${project.version}'>odl-alto-service-model-costmap-api</feature>
+    <bundle>mvn:org.opendaylight.alto.core/alto-service-model-costmap-impl/${project.version}</bundle>
+    <configfile finalname="${configfile.directory}/alto-service-model-costmap.xml">mvn:org.opendaylight.alto.core/alto-service-model-costmap-impl/${project.version}/xml/config</configfile>
+  </feature>
+
+  <feature name='odl-alto-service-model-costmap-rest' version='${project.version}' description='OpenDaylight :: alto-service-model-costmap :: REST'>
+    <feature version="${project.version}">odl-alto-service-model-costmap</feature>
+    <feature version="${restconf.version}">odl-restconf</feature>
+  </feature>
+
+  <feature name='odl-alto-service-model-costmap-ui' version='${project.version}' description='OpenDaylight :: alto-service-model-costmap :: UI'>
+    <feature version="${project.version}">odl-alto-service-model-costmap-rest</feature>
+    <feature version="${restconf.version}">odl-mdsal-apidocs</feature>
+    <feature version="${mdsal.version}">odl-mdsal-xsql</feature>
+    <feature version="${dlux.version}">odl-dlux-yangui</feature>
+  </feature>
+
+</features>
diff --git a/alto-core/standard-service-models/model-costmap/impl/pom.xml b/alto-core/standard-service-models/model-costmap/impl/pom.xml
new file mode 100644 (file)
index 0000000..659f670
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>config-parent</artifactId>
+    <version>0.4.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-costmap-impl</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-base-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-resourcepool-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-costmap-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- Testing Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/alto-core/standard-service-models/model-costmap/impl/src/main/config/default-config.xml b/alto-core/standard-service-models/model-costmap/impl/src/main/config/default-config.xml
new file mode 100644 (file)
index 0000000..edbc005
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<snapshot>
+  <required-capabilities>
+      <capability>urn:opendaylight:alto:service:model:test:costmap?module=alto-costmap-test-impl&amp;revision=2015-10-21</capability>
+      <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
+  </required-capabilities>
+  <configuration>
+
+    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <module>
+          <type xmlns:prefix="urn:opendaylight:alto:service:model:test:costmap">prefix:alto-model-costmap-test</type>
+          <name>alto-costmap-test</name>
+          <broker>
+            <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
+            <name>binding-osgi-broker</name>
+          </broker>
+        </module>
+      </modules>
+    </data>
+  </configuration>
+</snapshot>
diff --git a/alto-core/standard-service-models/model-costmap/impl/src/main/config/maven-metadata-local.xml b/alto-core/standard-service-models/model-costmap/impl/src/main/config/maven-metadata-local.xml
new file mode 100644 (file)
index 0000000..5e6dbd2
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-costmap-impl</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <localCopy>true</localCopy>
+    </snapshot>
+    <lastUpdated>20151028073152</lastUpdated>
+    <snapshotVersions>
+      <snapshotVersion>
+        <classifier>config</classifier>
+        <extension>xml</extension>
+        <value>0.2.0-SNAPSHOT</value>
+        <updated>20151028073152</updated>
+      </snapshotVersion>
+    </snapshotVersions>
+  </versioning>
+</metadata>
diff --git a/alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/alto/core/impl/costmap/test/AltoCostmapProvider.java b/alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/alto/core/impl/costmap/test/AltoCostmapProvider.java
new file mode 100644 (file)
index 0000000..56564fe
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.alto.core.impl.costmap.test;
+
+
+
+import org.opendaylight.alto.core.resourcepool.ResourcepoolUtils;
+import org.opendaylight.alto.core.service.model.costmap.CostmapUtils;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.rev150921.context.Resource;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.rev150921.context.resource.CapabilitiesBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.types.rev150921.CostMetric;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.types.rev150921.PidName;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.types.rev150921.ResourceId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.AltoModelCostmapService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.CapabilitiesCostType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.CapabilitiesCostTypeBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.QueryInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.QueryOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.QueryOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.ResourceTypeCostmap;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.alto.request.costmap.request.CostmapRequest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.alto.response.costmap.response.CostmapResponseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.cost.type.data.CostType;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.costmap.request.data.CostmapParams;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.costmap.response.data.CostmapResponseDataBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.costmap.response.data.costmap.response.data.CostmapSource;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.costmap.response.data.costmap.response.data.CostmapSourceBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.costmap.response.data.costmap.response.data.costmap.source.CostmapDestination;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.costmap.response.data.costmap.response.data.costmap.source.CostmapDestinationBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rev151021.costmap.response.data.costmap.response.data.costmap.source.costmap.destination.Cost;
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rfc7285.rev151021.costmap.filter.data.CostmapFilter;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rfc7285.rev151021.query.input.request.costmap.request.costmap.params.filter.CostmapFilterData;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rfc7285.rev151021.query.output.response.costmap.response.costmap.response.data.costmap.source.costmap.destination.cost.NumericalBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.costmap.rfc7285.rev151021.query.output.response.costmap.response.costmap.response.data.costmap.source.costmap.destination.cost.OrdinalBuilder;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+public class AltoCostmapProvider implements BindingAwareProvider, AutoCloseable, AltoModelCostmapService {
+
+    private static final Logger LOG = LoggerFactory.getLogger(AltoCostmapProvider.class);
+
+
+    private DataBroker m_dataBroker = null;
+    private BindingAwareBroker.RoutedRpcRegistration<AltoModelCostmapService> m_serviceReg = null;
+    private ListenerRegistration<DataChangeListener> m_listener=null;
+
+    private static final String TEST_COSTMAP_NAME="test-model-costmap";
+    private static final ResourceId TEST_COSTMAP_RID = new ResourceId(TEST_COSTMAP_NAME);
+    private static final CostMetric COST_METRIC_ROUTINGCOST = new CostMetric("routingcost");
+    private static final String COST_MODE_ORDINAL = "ordinal";
+    private InstanceIdentifier<Resource> m_testIID = null;
+
+    protected void createContextTag()
+            throws InterruptedException, ExecutionException, TransactionCommitFailedException  {
+        WriteTransaction wx = m_dataBroker.newWriteOnlyTransaction();
+
+
+
+        CapabilitiesCostTypeBuilder cctBuilder = new CapabilitiesCostTypeBuilder();
+        cctBuilder.setCostType(Arrays.asList(
+                CostmapUtils.createCostTypeCapability(COST_METRIC_ROUTINGCOST,
+                        COST_MODE_ORDINAL)
+        ));
+        CapabilitiesBuilder builder = new CapabilitiesBuilder();
+        builder.addAugmentation(CapabilitiesCostType.class, cctBuilder.build());
+
+        ResourcepoolUtils.createResourceWithCapabilities(ResourcepoolUtils.DEFAULT_CONTEXT,
+                TEST_COSTMAP_NAME,
+                ResourceTypeCostmap.class,
+                builder.build(), wx);
+
+        ResourcepoolUtils.lazyUpdateResource(ResourcepoolUtils.DEFAULT_CONTEXT,
+                TEST_COSTMAP_NAME, wx);
+
+        wx.submit().get();
+    }
+
+
+    protected void removeContextTag()
+            throws InterruptedException, ExecutionException, TransactionCommitFailedException  {
+        WriteTransaction wx = m_dataBroker.newWriteOnlyTransaction();
+
+        ResourcepoolUtils.deleteResource(ResourcepoolUtils.DEFAULT_CONTEXT,
+                TEST_COSTMAP_NAME, wx);
+
+        wx.submit().get();
+    }
+
+    protected void setupListener() {
+        ResourcepoolUtils.ContextTagListener listener = new ResourcepoolUtils.ContextTagListener(m_testIID, m_serviceReg);
+        m_listener = m_dataBroker.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL,
+                m_testIID,listener, AsyncDataBroker.DataChangeScope.SUBTREE);
+
+        assert m_listener != null;
+    }
+
+    @Override
+    public void onSessionInitiated(BindingAwareBroker.ProviderContext session) {
+        LOG.info("AltoModelCostmapProvider Session Initiated");
+
+        m_dataBroker = session.getSALService(DataBroker.class);
+        m_testIID = ResourcepoolUtils.getResourceIID(ResourcepoolUtils.DEFAULT_CONTEXT,
+                TEST_COSTMAP_NAME);
+        m_serviceReg = session.addRoutedRpcImplementation(AltoModelCostmapService.class, this);
+
+
+        try{
+            setupListener();
+            createContextTag();
+        } catch (Exception e){
+        }
+
+    }
+
+    protected Cost createNumericalCost(double cost) {
+        NumericalBuilder builder;
+        builder = new NumericalBuilder();
+        builder.setCost(new BigDecimal(cost));
+        return builder.build();
+    }
+
+    protected Cost createOrdinalCost(int order) {
+        OrdinalBuilder builder=new OrdinalBuilder();
+        builder.setCost(order);
+        return builder.build();
+    }
+
+
+    @Override
+    public void close() throws Exception {
+        LOG.info("AltoModelCostProvider Closed");
+
+        if (m_serviceReg != null) {
+            m_serviceReg.close();
+        }
+
+        try {
+            removeContextTag();
+        } catch (Exception e) {
+        }
+    }
+
+
+
+
+    @Override
+    public Future<RpcResult<QueryOutput>> query(QueryInput input) {
+        if (!input.getType().equals(ResourceTypeCostmap.class)) {
+            return RpcResultBuilder.<QueryOutput>failed().buildFuture();
+        }
+
+        CostmapRequest request = (CostmapRequest)input.getRequest();
+        CostmapParams params = request.getCostmapParams();
+
+        CostType costType = params.getCostType();
+//        if(!(params.getFilter() instanceof CostmapFilter)){
+//            return RpcResultBuilder.<QueryOutput>failed().buildFuture();
+//        }
+//        if(!costType.getCostMode().equals("ordinal")){
+//            LOG.warn(costType.getCostMode().toString());
+//            return RpcResultBuilder.<QueryOutput>failed().buildFuture();
+//        }
+//        if(!costType.getCostMetric().equals(COST_METRIC_ROUTINGCOST)){
+//            LOG.warn(costType.getCostMetric().toString());
+//            return RpcResultBuilder.<QueryOutput>failed().buildFuture();
+//        }
+        LOG.info("query test3");
+
+        CostmapFilter costmapFilter=((CostmapFilterData)params.getFilter()).getCostmapFilter();
+        List<PidName> pid_src=costmapFilter.getPidSource();
+        List<PidName> pid_dst=costmapFilter.getPidDestination();
+        int order = 0;
+        LinkedList<CostmapSource> costmapSources = new LinkedList<CostmapSource>();
+        for(PidName src:pid_src){
+            LinkedList<CostmapDestination> costmapDestinations= new LinkedList<CostmapDestination>();
+
+            for (PidName dst : pid_dst){
+                CostmapDestinationBuilder costmapDestinationBuilder= new CostmapDestinationBuilder();
+                costmapDestinationBuilder.setPidDestination(dst);
+                costmapDestinationBuilder.setCost(createOrdinalCost(++order));
+                costmapDestinations.add(costmapDestinationBuilder.build());
+            }
+            CostmapSourceBuilder costmapSourceBuilder= new CostmapSourceBuilder();
+            costmapSourceBuilder.setPidSource(src);
+            costmapSourceBuilder.setCostmapDestination(costmapDestinations);
+            costmapSources.add(costmapSourceBuilder.build());
+        }
+
+
+
+
+
+        CostmapResponseDataBuilder costmapResponseDataBuilder= new CostmapResponseDataBuilder();
+        costmapResponseDataBuilder.setCostType(costType);
+        costmapResponseDataBuilder.setCostmapSource(costmapSources);
+
+        CostmapResponseBuilder costmapResponseBuilder= new CostmapResponseBuilder();
+        costmapResponseBuilder.setCostmapResponseData(costmapResponseDataBuilder.build());
+
+
+        QueryOutputBuilder builder = new QueryOutputBuilder();
+
+        builder.setType(ResourceTypeCostmap.class).setResponse(costmapResponseBuilder.build());
+
+
+        return RpcResultBuilder.<QueryOutput>success(builder.build()).buildFuture();
+    }
+}
diff --git a/alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModule.java b/alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModule.java
new file mode 100644 (file)
index 0000000..bbc4a3c
--- /dev/null
@@ -0,0 +1,27 @@
+package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.costmap.rev151021;
+
+import org.opendaylight.alto.core.impl.costmap.test.AltoCostmapProvider;
+
+public class AltoCostmapModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.costmap.rev151021.AbstractAltoCostmapModule {
+    public AltoCostmapModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public AltoCostmapModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.costmap.rev151021.AltoCostmapModule oldModule, java.lang.AutoCloseable oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
+    }
+
+    @Override
+    public void customValidation() {
+        // add custom validation form module attributes here.
+    }
+
+    @Override
+    public java.lang.AutoCloseable createInstance() {
+        AltoCostmapProvider provider = new AltoCostmapProvider();
+        getBrokerDependency().registerProvider(provider);
+        return provider;
+
+    }
+
+}
diff --git a/alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleFactory.java b/alto-core/standard-service-models/model-costmap/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleFactory.java
new file mode 100644 (file)
index 0000000..94d39b8
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+* Generated file
+*
+* Generated from: yang module name: alto-costmap-test-impl yang module local name: alto-model-costmap-test
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Mon Nov 23 10:49:33 CST 2015
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.costmap.rev151021;
+public class AltoCostmapModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.costmap.rev151021.AbstractAltoCostmapModuleFactory {
+
+}
diff --git a/alto-core/standard-service-models/model-costmap/impl/src/main/yang/costmap-impl.yang b/alto-core/standard-service-models/model-costmap/impl/src/main/yang/costmap-impl.yang
new file mode 100644 (file)
index 0000000..21f8716
--- /dev/null
@@ -0,0 +1,35 @@
+module alto-costmap-test-impl {
+    yang-version 1;
+    namespace "urn:opendaylight:alto:service:model:test:costmap";
+    prefix "alto-model-costmap-test-impl";
+
+    import config { prefix config; revision-date 2013-04-05; }
+    import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
+
+    description
+        "Service definition for costmap project";
+
+    revision "2015-10-21" {
+        description
+            "Initial revision";
+    }
+
+    identity alto-model-costmap-test {
+        base config:module-type;
+        config:java-name-prefix AltoCostmap;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case alto-model-costmap-test-impl {
+            when "/config:modules/config:module/config:type = 'alto-model-costmap-test'";
+            container broker {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity md-sal-binding:binding-broker-osgi-registry;
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/alto-core/standard-service-models/model-costmap/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleFactoryTest.java b/alto-core/standard-service-models/model-costmap/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleFactoryTest.java
new file mode 100644 (file)
index 0000000..ca8d6e3
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.costmap.rev151021;
+
+import org.junit.Test;
+
+public class AltoCostmapModuleFactoryTest {
+    @Test
+    public void testFactoryConstructor() {
+        // ensure no exceptions on construction
+        new AltoCostmapModuleFactory();
+    }
+}
diff --git a/alto-core/standard-service-models/model-costmap/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleTest.java b/alto-core/standard-service-models/model-costmap/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/costmap/rev151021/AltoCostmapModuleTest.java
new file mode 100644 (file)
index 0000000..ed42656
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.costmap.rev151021;
+
+import org.junit.Test;
+import org.opendaylight.controller.config.api.DependencyResolver;
+import org.opendaylight.controller.config.api.JmxAttribute;
+import org.opendaylight.controller.config.api.ModuleIdentifier;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.alto.core.impl.costmap.test.AltoCostmapProvider;
+
+import javax.management.ObjectName;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class AltoCostmapModuleTest {
+    @Test
+    public void testCustomValidation() {
+        AltoCostmapModule module = new AltoCostmapModule(mock(ModuleIdentifier.class), mock(DependencyResolver.class));
+
+        // ensure no exceptions on validation
+        // currently this method is empty
+        module.customValidation();
+    }
+
+    @Test
+    public void testCreateInstance() throws Exception {
+        // configure mocks
+        DependencyResolver dependencyResolver = mock(DependencyResolver.class);
+        BindingAwareBroker broker = mock(BindingAwareBroker.class);
+            when(dependencyResolver.resolveInstance(eq(BindingAwareBroker.class), any(ObjectName.class), any(JmxAttribute.class))).thenReturn(broker);
+
+        // create instance of module with injected mocks
+        AltoCostmapModule module = new AltoCostmapModule(mock(ModuleIdentifier.class), dependencyResolver);
+
+        // getInstance calls resolveInstance to get the broker dependency and then calls createInstance
+        AutoCloseable closeable = module.getInstance();
+
+        // verify that the module registered the returned provider with the broker
+        verify(broker).registerProvider((AltoCostmapProvider)closeable);
+
+        // ensure no exceptions on close
+        closeable.close();
+    }
+}
diff --git a/alto-core/standard-service-models/model-costmap/it/pom.xml b/alto-core/standard-service-models/model-costmap/it/pom.xml
new file mode 100644 (file)
index 0000000..77becf6
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>mdsal-it-parent</artifactId>
+    <version>1.3.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-costmap-it</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+
+  <properties>
+    <skipITs>false</skipITs>
+    <karaf.distro.groupId>org.opendaylight.alto.core</karaf.distro.groupId>
+    <karaf.distro.artifactId>alto-service-model-costmap-karaf</karaf.distro.artifactId>
+    <karaf.distro.version>0.2.0-SNAPSHOT</karaf.distro.version>
+    <karaf.distro.type>zip</karaf.distro.type>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-costmap-features</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/alto-core/standard-service-models/model-costmap/it/src/test/java/org/opendaylight/alto/core/it/AltoCostmapIT.java b/alto-core/standard-service-models/model-costmap/it/src/test/java/org/opendaylight/alto/core/it/AltoCostmapIT.java
new file mode 100644 (file)
index 0000000..18f4230
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.alto.core.it;
+
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
+import org.ops4j.pax.exam.options.MavenUrlReference;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class AltoCostmapIT extends AbstractMdsalTestBase {
+    private static final Logger LOG = LoggerFactory.getLogger(AltoCostmapIT.class);
+
+    @Override
+    public String getModuleName() {
+        return "alto-model-costmap-test";
+    }
+
+    @Override
+    public String getInstanceName() {
+        return "alto-costmap-test";
+    }
+
+    @Override
+    public MavenUrlReference getFeatureRepo() {
+        return maven()
+                .groupId("org.opendaylight.alto.core")
+                .artifactId("alto-service-model-costmap-features")
+                .classifier("features")
+                .type("xml")
+                .versionAsInProject();
+    }
+
+    @Override
+    public String getFeatureName() {
+        return "odl-alto-service-model-costmap-ui";
+    }
+
+    @Override
+    public Option getLoggingOption() {
+        Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
+                logConfiguration(AltoCostmapIT.class),
+                LogLevel.INFO.name());
+        option = composite(option, super.getLoggingOption());
+        return option;
+    }
+
+    @Test
+    public void testcostmapFeatureLoad() {
+        Assert.assertTrue(true);
+    }
+}
diff --git a/alto-core/standard-service-models/model-costmap/karaf/pom.xml b/alto-core/standard-service-models/model-costmap/karaf/pom.xml
new file mode 100644 (file)
index 0000000..c0302d0
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>karaf-parent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-costmap-karaf</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <name>${project.artifactId}</name>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <properties>
+    <karaf.localFeature>odl-alto-service-model-costmap-ui</karaf.localFeature>
+  </properties>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>alto-service-model-costmap-artifacts</artifactId>
+        <version>${project.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <!-- scope is compile so all features (there is only one) are installed
+      into startup.properties and the feature repo itself is not installed -->
+      <groupId>org.apache.karaf.features</groupId>
+      <artifactId>framework</artifactId>
+      <type>kar</type>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-costmap-features</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+  </dependencies>
+  <!-- DO NOT install or deploy the karaf artifact -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/alto-core/standard-service-models/model-costmap/pom.xml b/alto-core/standard-service-models/model-costmap/pom.xml
new file mode 100644 (file)
index 0000000..1b1e16d
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>odlparent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-costmap-aggregator</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <name>alto-service-model-costmap</name>
+  <packaging>pom</packaging>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+
+  <profiles>
+    <profile>
+      <id>minimal</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+
+      </activation>
+      <modules>
+        <module>api</module>
+      </modules>
+    </profile>
+
+    <profile>
+      <id>alto-dev</id>
+      <modules>
+        <module>api</module>
+        <module>impl</module>
+        <module>features</module>
+        <module>artifacts</module>
+      </modules>
+    </profile>
+
+    <profile>
+      <id>alto-test</id>
+      <modules>
+        <module>api</module>
+        <module>impl</module>
+        <module>features</module>
+        <module>artifacts</module>
+        <module>karaf</module>
+        <module>it</module>
+      </modules>
+    </profile>
+  </profiles>
+
+  <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/alto-core/standard-service-models/model-endpointproperty/api/pom.xml b/alto-core/standard-service-models/model-endpointproperty/api/pom.xml
new file mode 100644 (file)
index 0000000..0aef834
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.mdsal</groupId>
+    <artifactId>binding-parent</artifactId>
+    <version>0.8.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-endpointproperty-api</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.alto.core</groupId>
+      <artifactId>alto-basic-types</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.alto.core</groupId>
+      <artifactId>alto-resourcepool-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.alto.core</groupId>
+      <artifactId>alto-service-model-base-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.alto.core</groupId>
+      <artifactId>alto-service-model-networkmap-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>yang-ext</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>ietf-inet-types-2013-07-15</artifactId>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/alto-core/standard-service-models/model-endpointproperty/api/src/main/yang/alto-model-endpointproperty-rfc7285.yang b/alto-core/standard-service-models/model-endpointproperty/api/src/main/yang/alto-model-endpointproperty-rfc7285.yang
new file mode 100644 (file)
index 0000000..a374d84
--- /dev/null
@@ -0,0 +1,193 @@
+module alto-model-endpointproperty-rfc7285 {
+    yang-version 1;
+
+    namespace "urn:opendaylight:alto:service:model:endpointproperty:rfc7285";
+
+    prefix "alto-model-endpointproperty-rfc7285";
+
+    import "alto-model-endpointproperty" {
+        prefix "alto-eps";
+    }
+
+    import "alto-basic-types"{
+        prefix "base";
+    }
+
+    import "ietf-inet-types" {
+        prefix "ietf-inet";
+    }
+
+    import yang-ext {
+        prefix ext;
+    }
+
+    organization "Yale University";
+
+    contact "alto-dev@lists.opendaylight.org";
+
+    revision "2015-10-21" {
+        description "Initial revision of alto endpointproperty";
+    }
+    grouping "typed-property-data" {
+        choice "property" {
+        }
+    }
+
+    grouping "typed-address-data" {
+        choice "address" {
+        }
+    }
+
+    grouping "resource-specific-property"{
+        leaf "resource-specific-property"{
+            type base:specific-endpoint-property;
+        }
+    }
+
+    grouping "global-property"{
+        leaf "global-property"{
+            type base:global-endpoint-property;
+        }
+    }
+
+    grouping "ipv4-address-data" {
+        leaf "ipv4" {
+            type ietf-inet:ipv4-address;
+        }
+    }
+
+
+    grouping "ipv6-address-data" {
+        leaf "ipv6" {
+            type ietf-inet:ipv6-address;
+        }
+    }
+
+
+    grouping "endpointproperty-filter-data" {
+        container "endpointproperty-filter" {
+            list "property-filter" {
+                uses "typed-property-data";
+            }
+
+            list "endpoint-filter" {
+                uses "typed-address-data";
+            }
+        }
+    }
+    augment "/alto-eps:query/alto-eps:input/alto-eps:request/alto-eps:endpointproperty-request/alto-eps:endpointproperty-params/alto-eps:filter" {
+
+        ext:augment-identifier "rfc7285-endpointproperty-filter";
+
+        case "endpointproperty-filter-data" {
+            uses "endpointproperty-filter-data";
+        }
+    }
+
+
+
+    identity "endpointproperty-response-type-endpointpropertymap" {
+        base "alto-eps:endpointproperty-response-type-base";
+    }
+
+
+
+    augment "/alto-eps:query/alto-eps:input/alto-eps:request/alto-eps:endpointproperty-request/alto-eps:endpointproperty-params/alto-eps:filter/endpointproperty-filter-data/endpointproperty-filter/property-filter/property" {
+
+        ext:augment-identifier "rfc7285-endpoint-filter-property";
+
+        case resource-specific-property {
+            uses resource-specific-property;
+        }
+
+        case global-property {
+            uses global-property;
+        }
+    }
+
+
+
+    augment "/alto-eps:query/alto-eps:input/alto-eps:request/alto-eps:endpointproperty-request/alto-eps:endpointproperty-params/alto-eps:filter/endpointproperty-filter-data/endpointproperty-filter/endpoint-filter/address" {
+
+        ext:augment-identifier "rfc7285-endpointproperty-filter-endpoint";
+        case ipv4 {
+            uses "ipv4-address-data";
+        }
+
+        case ipv6 {
+            uses "ipv6-address-data";
+        }
+    }
+
+    augment "/alto-eps:query/alto-eps:output/alto-eps:response/alto-eps:endpointproperty-response/alto-eps:endpointproperty-data/endpoint-propertymap-data/endpoint-property-map/endpoint-property/source/address" {
+        ext:augment-identifier "rfc7285-endpoint-propertymap-source";
+
+        case ipv4 {
+            uses "ipv4-address-data";
+        }
+
+        case ipv6 {
+            uses "ipv6-address-data";
+        }
+    }
+
+    augment "/alto-eps:query/alto-eps:output/alto-eps:response/alto-eps:endpointproperty-response/alto-eps:endpointproperty-data/endpoint-propertymap-data/endpoint-property-map/endpoint-property/property/property" {
+        ext:augment-identifier "rfc7285-endpoint-propertymap-property";
+
+        case resource-specific-property {
+            uses resource-specific-property;
+        }
+
+        case global-property {
+            uses global-property;
+        }
+    }
+
+
+    grouping "endpointpropertymap-response-data" {
+        container "endpoint-property-map" {
+            list "endpoint-property" {
+                container "source" {
+                    uses "typed-address-data";
+                }
+
+                container "property" {
+                    uses "typed-property-data";
+                }
+
+                choice "property-value" {
+                }
+            }
+        }
+    }
+
+
+
+    augment "/alto-eps:query/alto-eps:output/alto-eps:response/alto-eps:endpointproperty-response/alto-eps:endpointproperty-data" {
+
+        ext:augment-identifier "rfc7285-endpoint-property-map";
+
+        case "endpoint-propertymap-data" {
+            uses "endpointpropertymap-response-data";
+        }
+    }
+
+
+
+
+    augment "/alto-eps:query/alto-eps:output/alto-eps:response/alto-eps:endpointproperty-response/alto-eps:endpointproperty-data/endpoint-propertymap-data/endpoint-property-map/endpoint-property/property-value"{
+        case pid-name {
+            leaf "value"{
+                type base:pid-name;
+            }
+        }
+    }
+
+
+
+
+
+
+
+
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/api/src/main/yang/alto-model-endpointproperty.yang b/alto-core/standard-service-models/model-endpointproperty/api/src/main/yang/alto-model-endpointproperty.yang
new file mode 100644 (file)
index 0000000..1357c5c
--- /dev/null
@@ -0,0 +1,91 @@
+module alto-model-endpointproperty {
+    yang-version 1;
+
+    namespace "urn:opendaylight:alto:service:model:endpointproperty";
+
+    prefix "alto-model-endpointproperty";
+
+    import "alto-basic-types" {
+        prefix "alto-types";
+    }
+
+    import "alto-resourcepool" {
+        prefix "alto-resourcepool";
+    }
+
+    import "alto-model-base" {
+        prefix "base";
+    }
+
+    import "alto-model-networkmap" {
+        prefix "networkmap";
+    }
+
+    import "ietf-inet-types" {
+        prefix "ietf-inet";
+    }
+
+    organization "Yale University";
+
+    contact "alto-dev@lists.opendaylight.org";
+
+    revision "2015-10-21" {
+        description "Initial revision of alto endpointproperty";
+    }
+
+    identity "resource-type-endpointproperty" {
+        base "alto-resourcepool:resource-type";
+        description
+            "The resource type for endpoint property service";
+    }
+
+
+
+    grouping "endpointproperty-request-data" {
+        container "endpointproperty-params" {
+
+            choice "filter" {
+            }
+        }
+    }
+
+    identity "endpointproperty-response-type-base" {
+        description
+            "Base identity for endpoint property response";
+    }
+
+    grouping "endpointproperty-response-data" {
+        choice "endpointproperty-data" {
+        }
+    }
+
+    grouping "alto-request-endpointproperty" {
+        uses "base:alto-request-base" {
+            augment "request" {
+                case "endpointproperty-request" {
+                    uses "endpointproperty-request-data";
+                }
+            }
+        }
+    }
+
+    grouping "alto-response-endpointproperty" {
+        uses "base:alto-response-error" {
+            augment "response" {
+                case "endpointproperty-response" {
+                    uses "endpointproperty-response-data";
+                }
+            }
+        }
+    }
+
+    rpc query {
+        input {
+            uses "alto-request-endpointproperty";
+        }
+
+        output {
+            uses "alto-response-endpointproperty";
+        }
+    }
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/artifacts/pom.xml b/alto-core/standard-service-models/model-endpointproperty/artifacts/pom.xml
new file mode 100644 (file)
index 0000000..f379bf4
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University 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>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-endpointproperty-artifacts</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>alto-service-model-endpointproperty-api</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>alto-service-model-endpointproperty-impl</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>alto-service-model-endpointproperty-features</artifactId>
+        <version>${project.version}</version>
+        <classifier>features</classifier>
+        <type>xml</type>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+</project>
diff --git a/alto-core/standard-service-models/model-endpointproperty/features/pom.xml b/alto-core/standard-service-models/model-endpointproperty/features/pom.xml
new file mode 100644 (file)
index 0000000..a3e7310
--- /dev/null
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>features-parent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-endpointproperty-features</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <name>${project.artifactId}</name>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <properties>
+    <mdsal.model.version>0.8.0-SNAPSHOT</mdsal.model.version>
+    <mdsal.version>1.3.0-SNAPSHOT</mdsal.version>
+    <restconf.version>1.3.0-SNAPSHOT</restconf.version>
+    <yangtools.version>0.8.0-SNAPSHOT</yangtools.version>
+    <dlux.version>0.3.0-SNAPSHOT</dlux.version>
+    <configfile.directory>etc/opendaylight/karaf</configfile.directory>
+  </properties>
+  <dependencyManagement>
+    <dependencies>
+      <!-- project specific dependencies -->
+      <dependency>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>mdsal-artifacts</artifactId>
+        <version>${mdsal.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.netconf</groupId>
+        <artifactId>restconf-artifacts</artifactId>
+        <version>${restconf.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.yangtools</groupId>
+      <artifactId>features-yangtools</artifactId>
+      <classifier>features</classifier>
+      <version>${yangtools.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.mdsal.model</groupId>
+      <artifactId>features-mdsal-model</artifactId>
+      <version>${mdsal.model.version}</version>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>features-mdsal</artifactId>
+      <classifier>features</classifier>
+      <version>${mdsal.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.netconf</groupId>
+      <artifactId>features-restconf</artifactId>
+      <classifier>features</classifier>
+      <version>${restconf.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.opendaylight.dlux</groupId>
+      <artifactId>features-dlux</artifactId>
+      <classifier>features</classifier>
+      <version>${dlux.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-endpointproperty-impl</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-endpointproperty-impl</artifactId>
+      <version>${project.version}</version>
+      <type>xml</type>
+      <classifier>config</classifier>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-endpointproperty-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-base-features</artifactId>
+      <classifier>features</classifier>
+      <version>${project.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-base-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/alto-core/standard-service-models/model-endpointproperty/features/src/main/features/features.xml b/alto-core/standard-service-models/model-endpointproperty/features/src/main/features/features.xml
new file mode 100644 (file)
index 0000000..c9bf1ac
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2015 Yale University 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
+-->
+<features name="odl-alto-service-model-endpointproperty-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+  <repository>mvn:org.opendaylight.yangtools/features-yangtools/${yangtools.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${mdsal.model.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.netconf/features-restconf/${restconf.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.dlux/features-dlux/${dlux.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.alto.core/alto-service-model-base-features/${project.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.alto.core/alto-service-model-networkmap-features/${project.version}/xml/features</repository>
+
+  <feature name='odl-alto-service-model-endpointproperty-api' version='${project.version}' description='OpenDaylight :: alto-service-model-endpointproperty :: api'>
+    <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
+    <feature version='${project.version}'>odl-alto-service-model-base</feature>
+    <feature version='${project.version}'>odl-alto-service-model-networkmap-api</feature>
+    <bundle>mvn:org.opendaylight.alto.core/alto-service-model-endpointproperty-api/${project.version}</bundle>
+  </feature>
+
+  <feature name='odl-alto-service-model-endpointproperty' version='${project.version}' description='OpenDaylight :: alto-service-model-endpointproperty'>
+    <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
+    <feature version='${project.version}'>odl-alto-service-model-endpointproperty-api</feature>
+    <bundle>mvn:org.opendaylight.alto.core/alto-service-model-endpointproperty-impl/${project.version}</bundle>
+    <configfile finalname="${configfile.directory}/alto-service-model-endpointproperty.xml">mvn:org.opendaylight.alto.core/alto-service-model-endpointproperty-impl/${project.version}/xml/config</configfile>
+  </feature>
+
+  <feature name='odl-alto-service-model-endpointproperty-rest' version='${project.version}' description='OpenDaylight :: alto-service-model-endpointproperty :: REST'>
+    <feature version="${project.version}">odl-alto-service-model-endpointproperty</feature>
+    <feature version="${restconf.version}">odl-restconf</feature>
+  </feature>
+
+  <feature name='odl-alto-service-model-endpointproperty-ui' version='${project.version}' description='OpenDaylight :: alto-service-model-endpointproperty :: UI'>
+    <feature version="${project.version}">odl-alto-service-model-endpointproperty-rest</feature>
+    <feature version="${restconf.version}">odl-mdsal-apidocs</feature>
+    <feature version="${mdsal.version}">odl-mdsal-xsql</feature>
+    <feature version="${dlux.version}">odl-dlux-yangui</feature>
+  </feature>
+
+</features>
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/pom.xml b/alto-core/standard-service-models/model-endpointproperty/impl/pom.xml
new file mode 100644 (file)
index 0000000..e2e8bb9
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>config-parent</artifactId>
+    <version>0.4.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-endpointproperty-impl</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-base-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-resourcepool-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-networkmap-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-endpointproperty-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+
+    <!-- Testing Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/src/main/config/default-config.xml b/alto-core/standard-service-models/model-endpointproperty/impl/src/main/config/default-config.xml
new file mode 100644 (file)
index 0000000..4f2b278
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<snapshot>
+  <required-capabilities>
+      <capability>urn:opendaylight:alto:service:model:test:endpointproperty?module=alto-endpointproperty-test-impl&amp;revision=2015-10-21</capability>
+      <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
+  </required-capabilities>
+  <configuration>
+
+    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
+      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+        <module>
+          <type xmlns:prefix="urn:opendaylight:alto:service:model:test:endpointproperty">prefix:alto-model-endpointproperty-test</type>
+          <name>alto-endpointproperty-test</name>
+          <broker>
+            <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
+            <name>binding-osgi-broker</name>
+          </broker>
+        </module>
+      </modules>
+    </data>
+  </configuration>
+</snapshot>
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/src/main/config/maven-metadata-local.xml b/alto-core/standard-service-models/model-endpointproperty/impl/src/main/config/maven-metadata-local.xml
new file mode 100644 (file)
index 0000000..7d41f47
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata modelVersion="1.1.0">
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-endpointproperty-impl</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <versioning>
+    <snapshot>
+      <localCopy>true</localCopy>
+    </snapshot>
+    <lastUpdated>20151028073152</lastUpdated>
+    <snapshotVersions>
+      <snapshotVersion>
+        <classifier>config</classifier>
+        <extension>xml</extension>
+        <value>0.2.0-SNAPSHOT</value>
+        <updated>20151028073152</updated>
+      </snapshotVersion>
+    </snapshotVersions>
+  </versioning>
+</metadata>
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/alto/core/impl/endpointproperty/test/AltoEndpointPropertyProvider.java b/alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/alto/core/impl/endpointproperty/test/AltoEndpointPropertyProvider.java
new file mode 100644 (file)
index 0000000..5a0e7c7
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.alto.core.impl.endpointproperty.test;
+
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import org.opendaylight.alto.core.resourcepool.ResourcepoolUtils;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.DataChangeListener;
+import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker;
+import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
+import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
+
+
+
+
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.rev150921.context.Resource;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.types.rev150921.PidName;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.types.rev150921.ResourceId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rev151021.AltoModelEndpointpropertyService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rev151021.QueryInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rev151021.QueryOutput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rev151021.QueryOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rev151021.ResourceTypeEndpointproperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rev151021.alto.request.endpointproperty.request.EndpointpropertyRequest;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rev151021.alto.response.endpointproperty.response.EndpointpropertyResponseBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rev151021.endpointproperty.request.data.EndpointpropertyParams;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.TypedAddressData;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.TypedPropertyData;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.endpointpropertymap.response.data.EndpointPropertyMapBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.endpointpropertymap.response.data.endpoint.property.map.EndpointProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.endpointpropertymap.response.data.endpoint.property.map.EndpointPropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.endpointpropertymap.response.data.endpoint.property.map.endpoint.property.PropertyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.endpointpropertymap.response.data.endpoint.property.map.endpoint.property.SourceBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.query.input.request.endpointproperty.request.endpointproperty.params.filter.EndpointpropertyFilterData;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.query.output.response.endpointproperty.response.endpointproperty.data.EndpointPropertymapDataBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointproperty.rfc7285.rev151021.query.output.response.endpointproperty.response.endpointproperty.data.endpoint.propertymap.data.endpoint.property.map.endpoint.property.property.value.PidNameBuilder;
+
+
+
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AltoEndpointPropertyProvider implements BindingAwareProvider, AutoCloseable, AltoModelEndpointpropertyService {
+
+    private static final Logger LOG = LoggerFactory.getLogger(AltoEndpointPropertyProvider.class);
+
+    private DataBroker m_dataBroker = null;
+    private RoutedRpcRegistration<AltoModelEndpointpropertyService> m_serviceReg = null;
+    private ListenerRegistration<DataChangeListener> m_listener=null;
+
+    private static  final String TEST_ENDPOINTPROPERTY_NAME="test-model-endpointproperty";
+    private static final ResourceId TEST_ENDPOINTPROPERTY_RID = new ResourceId(TEST_ENDPOINTPROPERTY_NAME);
+    private InstanceIdentifier<Resource> m_testIID = null;
+
+
+
+    protected void createContextTag()
+            throws InterruptedException, ExecutionException, TransactionCommitFailedException {
+        WriteTransaction wx = m_dataBroker.newWriteOnlyTransaction();
+
+        ResourcepoolUtils.createResource(ResourcepoolUtils.DEFAULT_CONTEXT,
+                TEST_ENDPOINTPROPERTY_NAME,
+                ResourceTypeEndpointproperty.class,
+                wx
+        );
+
+        ResourcepoolUtils.lazyUpdateResource(ResourcepoolUtils.DEFAULT_CONTEXT,
+                TEST_ENDPOINTPROPERTY_NAME, wx);
+
+        wx.submit().get();
+    }
+
+
+    protected void removeContextTag()
+            throws InterruptedException, ExecutionException, TransactionCommitFailedException  {
+        WriteTransaction wx = m_dataBroker.newWriteOnlyTransaction();
+
+        ResourcepoolUtils.deleteResource(ResourcepoolUtils.DEFAULT_CONTEXT,
+                TEST_ENDPOINTPROPERTY_NAME, wx);
+
+        wx.submit().get();
+    }
+
+    protected void setupListener() {
+        ResourcepoolUtils.ContextTagListener listener = new ResourcepoolUtils.ContextTagListener(m_testIID, m_serviceReg);
+        m_listener = m_dataBroker.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL,
+                m_testIID,listener, AsyncDataBroker.DataChangeScope.SUBTREE);
+
+        assert m_listener != null;
+    }
+    @Override
+    public void onSessionInitiated(ProviderContext session) {
+        LOG.info("AltoModelEndpoinPropertyProvider Session Initiated");
+
+        m_dataBroker = session.getSALService(DataBroker.class);
+        m_testIID = ResourcepoolUtils.getResourceIID(ResourcepoolUtils.DEFAULT_CONTEXT,
+                TEST_ENDPOINTPROPERTY_NAME);
+        m_serviceReg = session.addRoutedRpcImplementation(AltoModelEndpointpropertyService.class, this);
+
+        try {
+            setupListener();
+            createContextTag();
+        } catch (Exception e) {
+        }
+    }
+
+    @Override
+    public void close() throws Exception {
+        LOG.info("AltoModelBaseProvider Closed");
+        if (m_serviceReg != null) {
+            m_serviceReg.close();
+        }
+
+        try {
+            removeContextTag();
+        } catch (Exception e) {
+        }
+    }
+
+
+
+
+
+
+
+
+
+    @Override
+    public Future<RpcResult<QueryOutput>> query(QueryInput input) {
+
+
+        if (!input.getType().equals(ResourceTypeEndpointproperty.class)) {
+            return RpcResultBuilder.<QueryOutput>failed().buildFuture();
+        }
+
+        EndpointpropertyRequest request = (EndpointpropertyRequest)input.getRequest();
+
+        EndpointpropertyParams params = request.getEndpointpropertyParams();
+
+
+        EndpointpropertyFilterData filter= (EndpointpropertyFilterData)params.getFilter();
+
+
+
+
+        List<? extends TypedAddressData> endpoints=filter.getEndpointpropertyFilter().getEndpointFilter();
+        List<? extends TypedPropertyData> properties = filter.getEndpointpropertyFilter().getPropertyFilter();
+
+
+        int order = 0;
+        LinkedList<EndpointProperty> eppist = new LinkedList<EndpointProperty>();
+        for (TypedAddressData endpoint: endpoints) {
+            for (TypedPropertyData property: properties) {
+
+
+                SourceBuilder srcBuilder = new SourceBuilder();
+                srcBuilder.setAddress(endpoint.getAddress());
+
+
+                PropertyBuilder propertyBuilder = new PropertyBuilder();
+                propertyBuilder.setProperty(property.getProperty());
+
+                PidName pidName = new PidName("PID1");
+                PidNameBuilder pidNameBuilder = new PidNameBuilder();
+                pidNameBuilder.setValue(pidName);
+
+
+
+                EndpointPropertyBuilder epBuilder = new EndpointPropertyBuilder();
+                epBuilder.setSource(srcBuilder.build());
+                epBuilder.setProperty(propertyBuilder.build());
+                epBuilder.setPropertyValue(pidNameBuilder.build());
+
+
+                eppist.add(epBuilder.build());
+            }
+        }
+
+        EndpointPropertyMapBuilder endpointPropertyMapBuilder = new EndpointPropertyMapBuilder();
+        endpointPropertyMapBuilder.setEndpointProperty(eppist);
+
+
+        EndpointPropertymapDataBuilder endpointPropertymapDataBuilder = new EndpointPropertymapDataBuilder();
+        endpointPropertymapDataBuilder.setEndpointPropertyMap(endpointPropertyMapBuilder.build());
+
+        EndpointpropertyResponseBuilder endpointpropertyResponseBuilder = new EndpointpropertyResponseBuilder();
+        endpointpropertyResponseBuilder.setEndpointpropertyData(endpointPropertymapDataBuilder.build());
+
+        QueryOutputBuilder queryOutputBuilder = new QueryOutputBuilder();
+        queryOutputBuilder.setResponse(endpointpropertyResponseBuilder.build());
+        return RpcResultBuilder.<QueryOutput>success(queryOutputBuilder.build()).buildFuture();
+    }
+
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModule.java b/alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModule.java
new file mode 100644 (file)
index 0000000..a22d0a9
--- /dev/null
@@ -0,0 +1,27 @@
+package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.endpointproperty.rev151021;
+
+import org.opendaylight.alto.core.impl.endpointproperty.test.AltoEndpointPropertyProvider;
+
+public class AltoEndpointPropertyModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.endpointproperty.rev151021.AbstractAltoEndpointPropertyModule {
+    public AltoEndpointPropertyModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public AltoEndpointPropertyModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, AltoEndpointPropertyModule oldModule, java.lang.AutoCloseable oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
+    }
+
+    @Override
+    public void customValidation() {
+        // add custom validation form module attributes here.
+    }
+
+    @Override
+    public java.lang.AutoCloseable createInstance() {
+        AltoEndpointPropertyProvider provider = new AltoEndpointPropertyProvider();
+
+        getBrokerDependency().registerProvider(provider);
+        return provider;
+    }
+
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleFactory.java b/alto-core/standard-service-models/model-endpointproperty/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleFactory.java
new file mode 100644 (file)
index 0000000..2a22a1b
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+* Generated file
+*
+* Generated from: yang module name: alto-endpointproperty-test-impl yang module local name: alto-model-endpointproperty-test
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Wed Nov 25 19:28:28 CST 2015
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.endpointproperty.rev151021;
+public class AltoEndpointPropertyModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.endpointproperty.rev151021.AbstractAltoEndpointPropertyModuleFactory {
+
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/src/main/yang/alto-endpoint-test-impl.yang b/alto-core/standard-service-models/model-endpointproperty/impl/src/main/yang/alto-endpoint-test-impl.yang
new file mode 100644 (file)
index 0000000..093fe86
--- /dev/null
@@ -0,0 +1,35 @@
+module alto-endpointproperty-test-impl {
+    yang-version 1;
+    namespace "urn:opendaylight:alto:service:model:test:endpointproperty";
+    prefix "alto-model-endpointproperty-test-impl";
+
+    import config { prefix config; revision-date 2013-04-05; }
+    import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
+
+    description
+        "Service definition for endpointproperty project";
+
+    revision "2015-10-21" {
+        description
+            "Initial revision";
+    }
+
+    identity alto-model-endpointproperty-test {
+        base config:module-type;
+        config:java-name-prefix AltoEndpointProperty;
+    }
+
+    augment "/config:modules/config:module/config:configuration" {
+        case alto-model-endpointproperty-test-impl {
+            when "/config:modules/config:module/config:type = 'alto-model-endpointproperty-test'";
+            container broker {
+                uses config:service-ref {
+                    refine type {
+                        mandatory true;
+                        config:required-identity md-sal-binding:binding-broker-osgi-registry;
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleFactoryTest.java b/alto-core/standard-service-models/model-endpointproperty/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleFactoryTest.java
new file mode 100644 (file)
index 0000000..3562fe3
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.endpointproperty.rev151021;
+
+import org.junit.Test;
+
+
+public class AltoEndpointPropertyModuleFactoryTest {
+    @Test
+    public void testFactoryConstructor() {
+        // ensure no exceptions on construction
+        new AltoEndpointPropertyModuleFactory();
+    }
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleTest.java b/alto-core/standard-service-models/model-endpointproperty/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/service/model/test/endpointproperty/rev151021/AltoEndpointPropertyModuleTest.java
new file mode 100644 (file)
index 0000000..91b4fb0
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.test.endpointproperty.rev151021;
+
+import org.junit.Test;
+import org.opendaylight.controller.config.api.DependencyResolver;
+import org.opendaylight.controller.config.api.JmxAttribute;
+import org.opendaylight.controller.config.api.ModuleIdentifier;
+import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
+import org.opendaylight.alto.core.impl.endpointproperty.test.AltoEndpointPropertyProvider;
+
+import javax.management.ObjectName;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class AltoEndpointPropertyModuleTest {
+    @Test
+    public void testCustomValidation() {
+        AltoEndpointPropertyModule module = new AltoEndpointPropertyModule(mock(ModuleIdentifier.class), mock(DependencyResolver.class));
+
+        // ensure no exceptions on validation
+        // currently this method is empty
+        module.customValidation();
+    }
+
+    @Test
+    public void testCreateInstance() throws Exception {
+        // configure mocks
+        DependencyResolver dependencyResolver = mock(DependencyResolver.class);
+        BindingAwareBroker broker = mock(BindingAwareBroker.class);
+        when(dependencyResolver.resolveInstance(eq(BindingAwareBroker.class), any(ObjectName.class), any(JmxAttribute.class))).thenReturn(broker);
+
+        // create instance of module with injected mocks
+        AltoEndpointPropertyModule module = new AltoEndpointPropertyModule(mock(ModuleIdentifier.class), dependencyResolver);
+
+        // getInstance calls resolveInstance to get the broker dependency and then calls createInstance
+        AutoCloseable closeable = module.getInstance();
+
+        // verify that the module registered the returned provider with the broker
+        verify(broker).registerProvider((AltoEndpointPropertyProvider)closeable);
+
+        // ensure no exceptions on close
+        closeable.close();
+    }
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/it/pom.xml b/alto-core/standard-service-models/model-endpointproperty/it/pom.xml
new file mode 100644 (file)
index 0000000..58c5e5c
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>mdsal-it-parent</artifactId>
+    <version>1.3.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-endpointproperty-it</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <packaging>bundle</packaging>
+
+  <properties>
+    <skipITs>false</skipITs>
+    <karaf.distro.groupId>org.opendaylight.alto.core</karaf.distro.groupId>
+    <karaf.distro.artifactId>alto-service-model-endpointproperty-karaf</karaf.distro.artifactId>
+    <karaf.distro.version>0.2.0-SNAPSHOT</karaf.distro.version>
+    <karaf.distro.type>zip</karaf.distro.type>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-endpointproperty-features</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/alto-core/standard-service-models/model-endpointproperty/it/src/test/java/org/opendaylight/alto/core/it/AltoEndpointcostIT.java b/alto-core/standard-service-models/model-endpointproperty/it/src/test/java/org/opendaylight/alto/core/it/AltoEndpointcostIT.java
new file mode 100644 (file)
index 0000000..533f25c
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright © 2015 Yale University and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.alto.core.it;
+
+import static org.ops4j.pax.exam.CoreOptions.composite;
+import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
+import org.ops4j.pax.exam.options.MavenUrlReference;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class AltoEndpointcostIT extends AbstractMdsalTestBase {
+    private static final Logger LOG = LoggerFactory.getLogger(AltoEndpointcostIT.class);
+
+    @Override
+    public String getModuleName() {
+        return "alto-model-endpointcost-test";
+    }
+
+    @Override
+    public String getInstanceName() {
+        return "alto-endpointcost-test";
+    }
+
+    @Override
+    public MavenUrlReference getFeatureRepo() {
+        return maven()
+                .groupId("org.opendaylight.alto.core")
+                .artifactId("alto-service-model-endpointcost-features")
+                .classifier("features")
+                .type("xml")
+                .versionAsInProject();
+    }
+
+    @Override
+    public String getFeatureName() {
+        return "odl-alto-service-model-endpointcost-ui";
+    }
+
+    @Override
+    public Option getLoggingOption() {
+        Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
+                logConfiguration(AltoEndpointcostIT.class),
+                LogLevel.INFO.name());
+        option = composite(option, super.getLoggingOption());
+        return option;
+    }
+
+    @Test
+    public void testendpointcostFeatureLoad() {
+        Assert.assertTrue(true);
+    }
+}
diff --git a/alto-core/standard-service-models/model-endpointproperty/karaf/pom.xml b/alto-core/standard-service-models/model-endpointproperty/karaf/pom.xml
new file mode 100644 (file)
index 0000000..3636d4b
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <parent>
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>karaf-parent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-endpointproperty-karaf</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <name>${project.artifactId}</name>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <properties>
+    <karaf.localFeature>odl-alto-service-model-endpointproperty-ui</karaf.localFeature>
+  </properties>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>alto-service-model-endpointproperty-artifacts</artifactId>
+        <version>${project.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  <dependencies>
+    <dependency>
+      <!-- scope is compile so all features (there is only one) are installed
+      into startup.properties and the feature repo itself is not installed -->
+      <groupId>org.apache.karaf.features</groupId>
+      <artifactId>framework</artifactId>
+      <type>kar</type>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>alto-service-model-endpointproperty-features</artifactId>
+      <classifier>features</classifier>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
+  </dependencies>
+  <!-- DO NOT install or deploy the karaf artifact -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/alto-core/standard-service-models/model-endpointproperty/pom.xml b/alto-core/standard-service-models/model-endpointproperty/pom.xml
new file mode 100644 (file)
index 0000000..8ad2f3e
--- /dev/null
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © 2015 Yale University and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <parent>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>odlparent</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <relativePath/>
+  </parent>
+
+  <groupId>org.opendaylight.alto.core</groupId>
+  <artifactId>alto-service-model-endpointproperty-aggregator</artifactId>
+  <version>0.2.0-SNAPSHOT</version>
+  <name>alto-service-model-endpointproperty</name>
+  <packaging>pom</packaging>
+  <modelVersion>4.0.0</modelVersion>
+  <prerequisites>
+    <maven>3.1.1</maven>
+  </prerequisites>
+  <profiles>
+    <profile>
+      <id>minimal</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <modules>
+        <module>api</module>
+      </modules>
+    </profile>
+
+    <profile>
+      <id>alto-dev</id>
+      <modules>
+        <module>api</module>
+        <module>impl</module>
+        <module>features</module>
+        <module>artifacts</module>
+      </modules>
+    </profile>
+
+    <profile>
+      <id>alto-test</id>
+      <modules>
+        <module>api</module>
+        <module>impl</module>
+        <module>features</module>
+        <module>artifacts</module>
+        <module>karaf</module>
+        <module>it</module>
+      </modules>
+    </profile>
+  </profiles>
+
+  <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
index b8529a51152c3a45cfdb11521b6f183bc508039b..de9bc96714704458a92a165128f5814bcd419394 100644 (file)
@@ -27,6 +27,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <module>model-networkmap</module>
     <module>model-endpointcost</module>
     <module>model-ird</module>
+    <module>model-endpointproperty</module>
+    <module>model-costmap</module>
   </modules>
   <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
   <build>
diff --git a/pom.xml b/pom.xml
index f2035f6acecd494291a537c142ba401fb1ff64ef..0f28a397e10fb944773a100628ca763426ca0ce7 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,5 +1,10 @@
 <?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">
+<!--
+Copyright © 2015 Copyright (c) Yale University and others. All rights reserved.
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <prerequisites>
     <maven>3.0</maven>