Revert "add endpointcost-northbound-route" 29/34429/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 11 Feb 2016 01:42:59 +0000 (01:42 +0000)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 11 Feb 2016 01:42:59 +0000 (01:42 +0000)
This reverts commit 7cc585f037e221b3393c19b9b25e531f14cd5433.

Change-Id: I898038efac18f1d5ba84aecc3351e55e3932b220
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
21 files changed:
alto-core/northbound/api/src/main/java/org/opendaylight/alto/core/northbound/api/utils/rfc7285/RFC7285CostType.java
alto-core/northbound/features/pom.xml
alto-core/northbound/features/src/main/features/features.xml
alto-core/standard-northbound-routes/endpointcost/api/pom.xml [deleted file]
alto-core/standard-northbound-routes/endpointcost/api/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/AltoNbrEndpointcostUtils.java [deleted file]
alto-core/standard-northbound-routes/endpointcost/api/src/main/yang/alto-nbr-endpointcost.yang [deleted file]
alto-core/standard-northbound-routes/endpointcost/impl/pom.xml [deleted file]
alto-core/standard-northbound-routes/endpointcost/impl/src/main/config/default-config.xml [deleted file]
alto-core/standard-northbound-routes/endpointcost/impl/src/main/config/maven-metadata-local.xml [deleted file]
alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/impl/AltoNorthboundRouteEndpointcost.java [deleted file]
alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/impl/EndpointcostRouteChecker.java [deleted file]
alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/core/northbound/route/endpointcost/impl/rev151021/AltoNorthboundRouteEndpointcostModule.java [deleted file]
alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/core/northbound/route/endpointcost/impl/rev151021/AltoNorthboundRouteEndpointcostModuleFactory.java [deleted file]
alto-core/standard-northbound-routes/endpointcost/impl/src/main/yang/alto-northbound-route-endpointcost-impl.yang [deleted file]
alto-core/standard-northbound-routes/endpointcost/pom.xml [deleted file]
alto-core/standard-northbound-routes/pom.xml
test/scripts/northbound/nbr-endpointcost-create [deleted file]
test/scripts/northbound/nbr-networkmap-create
test/scripts/northbound/query-nbr-endpointcost [deleted file]
test/scripts/northbound/template/endpointcost-filter [deleted file]
test/scripts/northbound/template/nbr-record-endpointcost [deleted file]

index 058b6cb413ec8fbd1d5d1aa431461a09dc8c2afa..677fed05097f8276d99d43469323a38c25dad280 100644 (file)
@@ -8,11 +8,9 @@
 
 package org.opendaylight.alto.core.northbound.api.utils.rfc7285;
 
-import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.Arrays;
 
-@JsonInclude(JsonInclude.Include.NON_NULL)
 public class RFC7285CostType {
 
     @JsonProperty("cost-mode")
index fe3997ec866d432a33f2e5a51d612463f13fe420..a9def41d49def32c386643e4e6b19fcc16d8e10a 100644 (file)
@@ -177,31 +177,5 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-northbound-route-endpointcost-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-northbound-route-endpointcost-impl</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-northbound-route-endpointcost-impl</artifactId>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <classifier>config</classifier>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-service-model-endpointcost-features</artifactId>
-      <classifier>features</classifier>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
   </dependencies>
 </project>
index a3e5b036dc548f7300375fdfcba190980bcb67d6..36bfb442ae3bc550b754d2fe5c92882bc2b1d871 100644 (file)
@@ -18,7 +18,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <repository>mvn:org.opendaylight.alto.core/alto-service-model-networkmap-features/${project.version}/xml/features</repository>
     <repository>mvn:org.opendaylight.alto.core/alto-service-model-costmap-features/${project.version}/xml/features</repository>
-    <repository>mvn:org.opendaylight.alto.core/alto-service-model-endpointcost-features/${project.version}/xml/features</repository>
 
   <feature name='odl-alto-northbound-api' version='${project.version}' description='OpenDaylight :: alto-northbound :: api'>
     <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
@@ -52,13 +51,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
           mvn:org.opendaylight.alto.core/alto-northbound-route-costmap-impl/${project.version}/xml/config
       </configfile>
 
-      <feature version='${project.version}'>odl-alto-service-model-endpointcost</feature>
-      <bundle>mvn:org.opendaylight.alto.core/alto-northbound-route-endpointcost-api/${project.version}</bundle>
-      <bundle>mvn:org.opendaylight.alto.core/alto-northbound-route-endpointcost-impl/${project.version}</bundle>
-      <configfile finalname="${configfile.directory}/alto-northbound-route-endpointcost.xml">
-          mvn:org.opendaylight.alto.core/alto-northbound-route-endpointcost-impl/${project.version}/xml/config
-      </configfile>
-
   </feature>
   <feature name='odl-alto-northbound-rest' version='${project.version}' description='OpenDaylight :: alto-northbound :: REST'>
     <feature version="${project.version}">odl-alto-northbound</feature>
diff --git a/alto-core/standard-northbound-routes/endpointcost/api/pom.xml b/alto-core/standard-northbound-routes/endpointcost/api/pom.xml
deleted file mode 100644 (file)
index f1c4a00..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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>config-parent</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-    <relativePath/>
-  </parent>
-
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.opendaylight.alto.core</groupId>
-  <artifactId>alto-northbound-route-endpointcost-api</artifactId>
-  <version>0.2.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-
-  <dependencies>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-service-model-endpointcost-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-servlets</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>com.sun.jersey</groupId>
-      <artifactId>jersey-server</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.5</version>
-    </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-northbound-routes/endpointcost/api/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/AltoNbrEndpointcostUtils.java b/alto-core/standard-northbound-routes/endpointcost/api/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/AltoNbrEndpointcostUtils.java
deleted file mode 100644 (file)
index bab3186..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 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.northbound.route.endpointcost;
-
-/**
- * Created by wukunheng00 on 12/3/15.
- */
-
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.rev151021.Records;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.rev151021.records.Record;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.rev151021.records.RecordKey;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-public class AltoNbrEndpointcostUtils {
-
-    public static InstanceIdentifier<Record> getRecordIID(String path) {
-        RecordKey key = new RecordKey(new Uri(path));
-        return InstanceIdentifier.builder(Records.class).child(Record.class, key).build();
-    }
-}
-
diff --git a/alto-core/standard-northbound-routes/endpointcost/api/src/main/yang/alto-nbr-endpointcost.yang b/alto-core/standard-northbound-routes/endpointcost/api/src/main/yang/alto-nbr-endpointcost.yang
deleted file mode 100644 (file)
index bee788c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-module alto-nbr-endpointcost {
-    yang-version 1;
-
-    namespace "urn:opendaylight:alto:core:northbound:route:endpointcost";
-
-    prefix "alto-nbr-endpointcost";
-
-    import config { prefix config; revision-date 2013-04-05; }
-    import ietf-inet-types { prefix ietf-inet; revision-date 2013-07-15; }
-    import alto-model-endpointcost { prefix endpointcost-model; revision-date 2015-10-21; }
-
-    organization "Yale University";
-
-    contact "alto-dev@lists.opendaylight.org";
-
-    revision "2015-10-21" {
-        description "Initial revision of alto-northbound model";
-    }
-
-    container "records" {
-        list "record" {
-            key "path";
-
-            leaf "path" {
-                type ietf-inet:uri;
-            }
-
-            leaf "resource-iid" {
-                type instance-identifier;
-            }
-
-
-        }
-    }
-
-}
diff --git a/alto-core/standard-northbound-routes/endpointcost/impl/pom.xml b/alto-core/standard-northbound-routes/endpointcost/impl/pom.xml
deleted file mode 100644 (file)
index 3ace424..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<?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-northbound-route-endpointcost-impl</artifactId>
-  <version>0.2.0-SNAPSHOT</version>
-  <packaging>bundle</packaging>
-  <dependencies>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>config-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-northbound-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-service-model-endpointcost-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-northbound-route-endpointcost-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>ietf-inet-types-2013-07-15</artifactId>
-    </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>
-
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.datatype</groupId>
-      <artifactId>jackson-datatype-json-org</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.jaxrs</groupId>
-      <artifactId>jackson-jaxrs-base</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.jaxrs</groupId>
-      <artifactId>jackson-jaxrs-json-provider</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.module</groupId>
-      <artifactId>jackson-module-jaxb-annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-servlets</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>com.sun.jersey</groupId>
-      <artifactId>jersey-server</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>2.5</version>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>${bundle.plugin.version}</version>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            <Import-Package>*,com.sun.jersey.spi.container.servlet, org.eclipse.jetty.servlets</Import-Package>
-            <Web-ContextPath>/alto</Web-ContextPath>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
-</project>
diff --git a/alto-core/standard-northbound-routes/endpointcost/impl/src/main/config/default-config.xml b/alto-core/standard-northbound-routes/endpointcost/impl/src/main/config/default-config.xml
deleted file mode 100644 (file)
index 6ec577e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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:core:northbound:route:endpointcost:impl?module=alto-northbound-route-endpointcost-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>
-      <capability>urn:opendaylight:alto:core:northbound?module=alto-northbound&amp;revision=2015-10-21</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:core:northbound:route:endpointcost:impl">prefix:alto-northbound-route-endpointcost-impl</type>
-          <name>alto-northbound-route-endpointcost</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>
-          <alto-northbound-router>
-            <type xmlns:alto-northbound-router="urn:opendaylight:alto:core:northbound">alto-northbound-router:alto-northbound-router</type>
-            <name>alto-northbound-router</name>
-          </alto-northbound-router>
-        </module>
-      </modules>
-    </data>
-  </configuration>
-</snapshot>
diff --git a/alto-core/standard-northbound-routes/endpointcost/impl/src/main/config/maven-metadata-local.xml b/alto-core/standard-northbound-routes/endpointcost/impl/src/main/config/maven-metadata-local.xml
deleted file mode 100644 (file)
index f403e79..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<metadata modelVersion="1.1.0">
-  <groupId>org.opendaylight.alto.core</groupId>
-  <artifactId>alto-northbound-impl</artifactId>
-  <version>0.2.0-SNAPSHOT</version>
-  <versioning>
-    <snapshot>
-      <localCopy>true</localCopy>
-    </snapshot>
-    <lastUpdated>20151105030453</lastUpdated>
-    <snapshotVersions>
-      <snapshotVersion>
-        <classifier>config</classifier>
-        <extension>xml</extension>
-        <value>0.2.0-SNAPSHOT</value>
-        <updated>20151105030453</updated>
-      </snapshotVersion>
-    </snapshotVersions>
-  </versioning>
-</metadata>
diff --git a/alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/impl/AltoNorthboundRouteEndpointcost.java b/alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/impl/AltoNorthboundRouteEndpointcost.java
deleted file mode 100644 (file)
index 150d33f..0000000
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * Copyright (c) 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.northbound.route.endpointcost.impl;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.google.common.base.Optional;
-import org.opendaylight.alto.core.northbound.api.AltoNorthboundRoute;
-import org.opendaylight.alto.core.northbound.api.AltoNorthboundRouter;
-import org.opendaylight.alto.core.northbound.api.utils.rfc7285.RFC7285CostType;
-import org.opendaylight.alto.core.northbound.api.utils.rfc7285.RFC7285Endpoint;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
-import org.opendaylight.controller.md.sal.binding.api.ReadTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.rev151021.Records;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.rev151021.records.Record;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.rev151021.records.RecordKey;
-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.ContextTag;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.rev150921.context.resource.ContextTagKey;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.types.rev150921.CostMetric;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.AltoModelEndpointcostService;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.QueryInput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.QueryInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.QueryOutput;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.ResourceTypeEndpointcost;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.alto.request.endpointcost.request.EndpointcostRequest;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.alto.request.endpointcost.request.EndpointcostRequestBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.alto.response.endpointcost.response.EndpointcostResponse;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.cost.type.container.CostType;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.cost.type.container.CostTypeBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.endpointcost.request.data.EndpointcostParams;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.endpointcost.request.data.EndpointcostParamsBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.endpointcost.response.data.EndpointcostData;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.Ipv4AddressData;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.Ipv6AddressData;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.endpoint.filter.data.EndpointFilterBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.endpoint.filter.data.endpoint.filter.Destination;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.endpoint.filter.data.endpoint.filter.DestinationBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.endpoint.filter.data.endpoint.filter.Source;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.endpoint.filter.data.endpoint.filter.SourceBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.endpointcostmap.response.data.EndpointCostMap;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.endpointcostmap.response.data.endpoint.cost.map.EndpointCost;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.endpointcostmap.response.data.endpoint.cost.map.endpoint.cost.Cost;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.query.input.request.endpointcost.request.endpointcost.params.filter.EndpointFilterData;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.query.input.request.endpointcost.request.endpointcost.params.filter.EndpointFilterDataBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.query.input.request.endpointcost.request.endpointcost.params.filter.endpoint.filter.data.endpoint.filter.source.address.Ipv4Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.query.input.request.endpointcost.request.endpointcost.params.filter.endpoint.filter.data.endpoint.filter.source.address.Ipv6Builder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.query.output.response.endpointcost.response.endpointcost.data.EndpointCostmapData;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rfc7285.rev151021.typed.address.data.Address;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Response;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Future;
-
-public class AltoNorthboundRouteEndpointcost implements BindingAwareProvider, AutoCloseable, AltoNorthboundRoute {
-    public static final String ENDPOINTCOST_ROUTE = "endpointcost";
-
-    public static final String ALTO_ENDPOINTCOST_FILTER = "application/alto-endpointcostfilter+json";
-    public static final String ALTO_ENDPOINTCOST = "application/alto-endpointcost+json";
-
-    public static final String FIELD_ENDPOINTS = "endpoints";
-    public static final String FIELD_COST_TYPE = "cost-type";
-    public static final String FIELD_COST_MODE = "cost-mode";
-    public static final String FIELD_COST_METRIC = "cost-metric";
-    public static final String FIELD_SOURCE = "srcs";
-    public static final String FIELD_DESTINSTION = "dsts";
-
-    private ObjectMapper mapper = new ObjectMapper();
-    private static final Logger LOG = LoggerFactory.getLogger(AltoNorthboundRouteEndpointcost.class);
-    private static DataBroker m_dataBroker = null;
-    private AltoNorthboundRouter m_router = null;
-
-    private  static AltoModelEndpointcostService mapService = null;
-    @Override
-    public void onSessionInitiated(ProviderContext session) {
-        m_dataBroker = session.getSALService(DataBroker.class);
-        if (m_dataBroker == null) {
-            LOG.error("Failed to init: data broker is null");
-        }
-
-        mapService = session.getRpcService(AltoModelEndpointcostService.class);
-        LOG.info("AltoNorthboundRouteEndpointcost initiated");
-
-    }
-
-    public void register(AltoNorthboundRouter router) {
-        m_router = router;
-        m_router.addRoute("endpointcost", new AltoNorthboundRouteEndpointcost());
-    }
-
-    @Override
-    public void close() {
-        m_router.removeRoute("endpointcost");
-    }
-
-    @Path("{path}")
-    @GET
-    @Produces({ALTO_ENDPOINTCOST, ALTO_ERROR})
-    public Response getFullMap(@PathParam("path") String path) throws JsonProcessingException{
-        QueryInput input = prepareDefaultInput(path);
-        Future<RpcResult<QueryOutput>> outputFuture = mapService.query(input);
-        QueryOutput output = null;
-        try {
-            output = outputFuture.get().getResult();
-        } catch (Exception e) {
-            LOG.warn("get output failed:" , e);
-        }
-        Response response = buildOutput(input, output);
-        if(response != null)
-            return response;
-        else
-            return Response.status(404).build();
-    }
-
-    @Path("{path}")
-    @POST
-    @Consumes({ALTO_ENDPOINTCOST_FILTER})
-    @Produces({ALTO_ENDPOINTCOST, ALTO_ERROR})
-    public Response getFilteredMap(@PathParam("path") String path, String filter) throws JsonProcessingException {
-        Response error;
-
-        String cost_mode = null;
-        String cost_metric = null;
-        List<String> endpoints_source = null;
-        List<String> endpoints_destination = null;
-
-
-        try {
-            JsonNode filterNode = mapper.readTree(filter);
-
-            JsonNode _endpoints = filterNode.get(FIELD_ENDPOINTS);
-
-            error = EndpointcostRouteChecker.checkMissing(_endpoints, FIELD_ENDPOINTS, filter);
-            if (error != null)
-                return error;
-
-            error = EndpointcostRouteChecker.checkList(_endpoints, FIELD_ENDPOINTS, filter);
-            if (error != null)
-                return error;
-
-            //need check endpoints_source
-            JsonNode _endpoints_source = _endpoints.get(FIELD_SOURCE);
-            error = EndpointcostRouteChecker.checkList(_endpoints_source, FIELD_SOURCE, filter);
-            if (error != null){
-                return error;
-            }
-            endpoints_source = arrayNode2List(FIELD_SOURCE, (ArrayNode)_endpoints_source);
-
-            //need check endpoints_destination
-            JsonNode _endpoints_destination = _endpoints.get(FIELD_DESTINSTION);
-            error = EndpointcostRouteChecker.checkList(_endpoints_destination, FIELD_DESTINSTION, filter);
-            if (error != null){
-                return error;
-            }
-            endpoints_destination = arrayNode2List(FIELD_DESTINSTION, (ArrayNode) _endpoints_destination);
-
-            JsonNode _cost_type = filterNode.get(FIELD_COST_TYPE);
-            if(_cost_type == null){
-                error = null;
-                return error;
-            }else {
-                cost_mode = _cost_type.get(FIELD_COST_MODE).asText();
-                cost_metric = _cost_type.get(FIELD_COST_METRIC).asText();
-            }
-
-
-        } catch (JsonProcessingException e) {
-            throw e;
-        } catch (Exception e) {
-            return Response.status(500).build();
-        }
-
-        //TODO
-        QueryInput input = prepareInput(path, cost_mode, cost_metric, endpoints_source, endpoints_destination);
-        Future<RpcResult<QueryOutput>> outputFuture = mapService.query(input);
-        QueryOutput output = null;
-        try {
-            output = outputFuture.get().getResult();
-        } catch (Exception e) {
-            LOG.warn("get output failed:" , e);
-        }
-        Response response = buildOutput(input, output);
-        if(response != null)
-            return response;
-        else
-            return Response.status(404).build();
-    }
-
-    protected List<String> arrayNode2List(String field, ArrayNode node) {
-        HashSet<String> retval = new HashSet<String>();
-
-        for (Iterator<JsonNode> itr = node.elements(); itr.hasNext(); ) {
-            JsonNode data = itr.next();
-
-            retval.add(data.asText());
-        }
-        return new LinkedList<String>(retval);
-    }
-
-    protected QueryInput prepareDefaultInput(String rid) {
-        /*
-         * Set pids as empty so all PID should be returned.
-         *
-         * Set address-types as missing so all address types should be returned.
-         *
-         * See https://tools.ietf.org/html/rfc7285#section-11.3.1.3
-         *
-         * */
-        return prepareInput(rid, null, null, new LinkedList<String>(), new LinkedList<String>());
-    }
-
-    protected QueryInput prepareInput(String path, String cost_mode, String cost_metric, List<String> endpoints_source, List<String> endpoints_destination) {
-        //TODO
-        QueryInputBuilder queryInputBuilder = new QueryInputBuilder();
-
-        //set request
-        EndpointcostRequestBuilder endpointcostRequestBuilder = new EndpointcostRequestBuilder();
-        EndpointcostParamsBuilder endpointcostParamsBuilder = new EndpointcostParamsBuilder();
-
-        CostTypeBuilder costTypeBuilder = new CostTypeBuilder();
-        costTypeBuilder.setCostMetric(new CostMetric(cost_metric));
-        costTypeBuilder.setCostMode(cost_mode);
-
-        EndpointFilterBuilder endpointFilterBuilder = new EndpointFilterBuilder();
-
-        List<Source> sources = new ArrayList<Source>();
-        List<Destination> destinations = new ArrayList<Destination>();
-
-        for(String source : endpoints_source){
-            SourceBuilder sourceBuilder = new SourceBuilder();
-            String[] tmp= source.split(":");
-            Ipv4Builder ipv4 = new Ipv4Builder();
-            Ipv6Builder ipv6 = new Ipv6Builder();
-            if(tmp[0].equals("ipv4")){
-                ipv4.setIpv4(new Ipv4Address(tmp[1]));
-                sourceBuilder.setAddress(ipv4.build());
-            }else if(tmp[0].equals("ipv6")){
-                ipv6.setIpv6(new Ipv6Address(tmp[1]));
-                sourceBuilder.setAddress(ipv6.build());
-            }
-            sources.add(sourceBuilder.build());
-        }
-        for(String destination : endpoints_destination){
-            DestinationBuilder destinationBuilder = new DestinationBuilder();
-            String[] tmp= destination.split(":");
-            Ipv4Builder ipv4 = new Ipv4Builder();
-            Ipv6Builder ipv6 = new Ipv6Builder();
-            if(tmp[0].equals("ipv4")){
-                ipv4.setIpv4(new Ipv4Address(tmp[1]));
-                destinationBuilder.setAddress(ipv4.build());
-            }else if(tmp[0].equals("ipv4")){
-                ipv6.setIpv6(new Ipv6Address(tmp[1]));
-                destinationBuilder.setAddress(ipv6.build());
-            }else return null;
-            destinations.add(destinationBuilder.build());
-        }
-        endpointFilterBuilder.setSource(sources);
-        endpointFilterBuilder.setDestination(destinations);
-        EndpointFilterDataBuilder endpointFilterDataBuilder = new EndpointFilterDataBuilder();
-        endpointFilterDataBuilder.setEndpointFilter(endpointFilterBuilder.build());
-
-        endpointcostParamsBuilder.setCostType(costTypeBuilder.build());
-        endpointcostParamsBuilder.setFilter(endpointFilterDataBuilder.build());
-        endpointcostRequestBuilder.setEndpointcostParams(endpointcostParamsBuilder.build());
-
-        //create servicereference by getting contexttag from resourcepool
-        ReadOnlyTransaction rtx = m_dataBroker.newReadOnlyTransaction();
-        InstanceIdentifier<ContextTag> ctagIID = getResourceByPath(path, rtx);
-        if(ctagIID == null){
-            return null;
-        }
-
-        queryInputBuilder.setRequest(endpointcostRequestBuilder.build());
-        queryInputBuilder.setServiceReference(ctagIID);
-        queryInputBuilder.setType(ResourceTypeEndpointcost.class);
-        return queryInputBuilder.build();
-    }
-
-    public InstanceIdentifier<ContextTag> getResourceByPath(String path, ReadTransaction transaction){
-        //get iid from (list Records)
-        InstanceIdentifier<Record> recordIID = InstanceIdentifier.builder(Records.class).child(Record.class, new RecordKey(new Uri(path))).build();
-
-        Future<Optional<Record>> recordFuture = transaction.read(LogicalDatastoreType.CONFIGURATION, recordIID);
-        Optional<Record> optional = null;
-        try{
-             optional = recordFuture.get();
-        }catch(Exception e){
-            LOG.error("Reading Record failed", e);
-            return null;
-        }
-        //get resourceIID from nbr-costmap.yang
-        InstanceIdentifier<?> record2resourceIID = null;
-        if(optional.isPresent())
-            record2resourceIID = optional.get().getResourceIid();
-        InstanceIdentifier<Resource> resourceIID = (InstanceIdentifier<Resource>)record2resourceIID;
-        Future<Optional<Resource>> resourceFuture = transaction.read(LogicalDatastoreType.OPERATIONAL, resourceIID);
-
-        Optional<Resource> optional1 = null;
-        try{
-            optional1 = resourceFuture.get();
-        }
-        catch(Exception e){
-            LOG.error("Read resource failed:", e);
-            return null;
-        }
-        Resource resource = null;
-        if(optional1.isPresent())
-            resource = optional1.get();
-        InstanceIdentifier<ContextTag> finalresourceIID = resourceIID.child(ContextTag.class, new ContextTagKey(resource.getDefaultTag()));
-        return finalresourceIID;
-    }
-
-
-
-    protected RFC7285Endpoint.CostResponse.Meta buildMeta(RFC7285CostType rfccostType) {
-        RFC7285Endpoint.CostResponse.Meta meta = new RFC7285Endpoint.CostResponse.Meta();
-        meta.costType = rfccostType;
-        return meta;
-    }
-
-    //Cost.toString is a String like Ordinal [_cost=2, augmentation=[]],and I need to extrat "_cost=2" from this String
-    protected String getCostValue(Cost cost){
-        String costValue = null;
-        String costString = cost.toString();
-        String[] a1 = costString.split(",");
-        String[] a2 = a1[0].split("=");
-        costValue = a2[1];
-        return costValue;
-    }
-    protected  String getAddressValue(Address address){
-        String addressValue = null;
-        if(address instanceof Ipv4AddressData){
-            Ipv4AddressData ipv4 = (Ipv4AddressData)address;
-            addressValue ="ipv4:" + ipv4.getIpv4().getValue();
-        }else if(address instanceof Ipv6AddressData){
-            Ipv6AddressData ipv6 = (Ipv6AddressData)address;
-            addressValue = "ipv6:"+ipv6.getIpv6().getValue();
-        }
-        return addressValue;
-    }
-
-    protected Response buildOutput(QueryInput input, QueryOutput output) throws JsonProcessingException{
-
-        //get costtype and endpoint source
-        EndpointcostRequest request = (EndpointcostRequest) input.getRequest();
-        EndpointcostParams params = request.getEndpointcostParams();
-        EndpointFilterData filterData = (EndpointFilterData) params.getFilter();
-
-        CostType costType = params.getCostType();
-        String cost_metric = costType.getCostMetric().getValue();
-        String cost_mode = costType.getCostMode();
-
-        List<Source> endpoints_source = filterData.getEndpointFilter().getSource();
-
-        //translate costtype to rfccosttype
-        RFC7285CostType rfccostType = new RFC7285CostType();
-        rfccostType.metric = cost_metric;
-        rfccostType.mode = cost_mode;
-
-        EndpointcostResponse ecResponse = (EndpointcostResponse)output.getResponse();
-        EndpointcostData ecData = ecResponse.getEndpointcostData();
-        EndpointCostmapData ecmData = null;
-        if (ecData instanceof EndpointCostmapData) {
-            ecmData = (EndpointCostmapData) ecResponse.getEndpointcostData();
-        }else return Response.ok("there is not endpointcostmap").build();
-
-        EndpointCostMap endpointCostMap = ecmData.getEndpointCostMap();
-        List<EndpointCost> endpointCostList =  endpointCostMap.getEndpointCost();
-
-        Map<String, Map<String, Object>> answer = new LinkedHashMap<String, Map<String, Object>>();
-
-        for(Source endpointsource : endpoints_source) {
-            Map<String, Object> dst2cost = new HashMap<>();
-            String endpointSourceAddressValue = getAddressValue(endpointsource.getAddress());
-            for (EndpointCost endpointCost : endpointCostList) {
-                String costSourceAddressValue = getAddressValue(endpointCost.getSource().getAddress());
-                String costDestinactionAddressValue = getAddressValue(endpointCost.getDestination().getAddress());
-                if(endpointSourceAddressValue.equals(costSourceAddressValue))
-                    dst2cost.put(costDestinactionAddressValue, getCostValue(endpointCost.getCost()));
-            }
-            answer.put(endpointSourceAddressValue, dst2cost);
-        }
-
-        RFC7285Endpoint.CostResponse rfcEndpointcost = new RFC7285Endpoint.CostResponse();
-        rfcEndpointcost.meta = buildMeta(rfccostType);
-        rfcEndpointcost.answer = answer;
-
-        String responseString = mapper.writeValueAsString(rfcEndpointcost);
-        return Response.ok(responseString, ALTO_ENDPOINTCOST).build();
-    }
-}
diff --git a/alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/impl/EndpointcostRouteChecker.java b/alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/alto/core/northbound/route/endpointcost/impl/EndpointcostRouteChecker.java
deleted file mode 100644 (file)
index 8f0500c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 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.northbound.route.endpointcost.impl;
-
-import javax.ws.rs.core.Response;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-public class EndpointcostRouteChecker {
-
-    public static Response checkMissing(JsonNode target, String field, String origin) {
-        if (target == null) {
-            // TODO :: report missing field, something like
-            // return new AltoMissingFieldError(field, origin);
-            return null;
-        }
-        return null;
-    }
-
-    public static Response checkList(JsonNode list, String field, String origin) {
-        if (!list.isArray()) {
-            // TODO :: report invalid field type, something like
-            // return new AltoInvalidFieldType(field, "array", origin);
-            return null;
-        }
-        return null;
-    }
-
-}
diff --git a/alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/core/northbound/route/endpointcost/impl/rev151021/AltoNorthboundRouteEndpointcostModule.java b/alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/core/northbound/route/endpointcost/impl/rev151021/AltoNorthboundRouteEndpointcostModule.java
deleted file mode 100644 (file)
index 252936d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.impl.rev151021;
-
-import org.opendaylight.alto.core.northbound.route.endpointcost.impl.AltoNorthboundRouteEndpointcost;
-
-public class AltoNorthboundRouteEndpointcostModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.impl.rev151021.AbstractAltoNorthboundRouteEndpointcostModule {
-    public AltoNorthboundRouteEndpointcostModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public AltoNorthboundRouteEndpointcostModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.impl.rev151021.AltoNorthboundRouteEndpointcostModule 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() {
-        AltoNorthboundRouteEndpointcost endpointcost = new AltoNorthboundRouteEndpointcost();
-        getBrokerDependency().registerProvider(endpointcost);
-        endpointcost.register(getAltoNorthboundRouterDependency());
-        return endpointcost;
-    }
-
-}
diff --git a/alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/core/northbound/route/endpointcost/impl/rev151021/AltoNorthboundRouteEndpointcostModuleFactory.java b/alto-core/standard-northbound-routes/endpointcost/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/opendaylight/alto/core/northbound/route/endpointcost/impl/rev151021/AltoNorthboundRouteEndpointcostModuleFactory.java
deleted file mode 100644 (file)
index cec93fa..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: alto-northbound-route-endpointcost-impl yang module local name: alto-northbound-route-endpointcost-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Sat Jan 02 16:06:35 CST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.impl.rev151021;
-public class AltoNorthboundRouteEndpointcostModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.northbound.route.endpointcost.impl.rev151021.AbstractAltoNorthboundRouteEndpointcostModuleFactory {
-
-}
diff --git a/alto-core/standard-northbound-routes/endpointcost/impl/src/main/yang/alto-northbound-route-endpointcost-impl.yang b/alto-core/standard-northbound-routes/endpointcost/impl/src/main/yang/alto-northbound-route-endpointcost-impl.yang
deleted file mode 100644 (file)
index 3ca7d2d..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-module alto-northbound-route-endpointcost-impl {
-    yang-version 1;
-    namespace "urn:opendaylight:alto:core:northbound:route:endpointcost:impl";
-    prefix "alto-northbound-router-endpointcost-impl";
-
-    import alto-northbound { prefix alto-northbound; revision-date 2015-10-21; }
-    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 northbound project";
-
-    revision "2015-10-21" {
-        description
-            "Initial revision";
-    }
-
-    identity alto-northbound-route-endpointcost-impl {
-        base config:module-type;
-        config:java-name-prefix AltoNorthboundRouteEndpointcost;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case alto-northbound-route-endpointcost {
-            when "/config:modules/config:module/config:type = 'alto-northbound-route-endpointcost-impl'";
-            container broker {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity md-sal-binding:binding-broker-osgi-registry;
-                    }
-                }
-            }
-
-            container alto-northbound-router {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity alto-northbound:alto-northbound-router;
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/alto-core/standard-northbound-routes/endpointcost/pom.xml b/alto-core/standard-northbound-routes/endpointcost/pom.xml
deleted file mode 100644 (file)
index 4fee063..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-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">
-
-  <parent>
-    <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>odlparent</artifactId>
-    <version>1.6.0-SNAPSHOT</version>
-    <relativePath/>
-  </parent>
-
-  <groupId>org.opendaylight.alto.core</groupId>
-  <artifactId>routes-endpointcost-aggregator</artifactId>
-  <version>0.2.0-SNAPSHOT</version>
-  <name>alto-northbound-route-endpointcost-aggregator</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>
-        <module>impl</module>
-      </modules>
-    </profile>
-
-    <profile>
-      <id>alto-dev</id>
-      <modules>
-        <module>api</module>
-        <module>impl</module>
-      </modules>
-    </profile>
-
-    <profile>
-      <id>alto-test</id>
-      <modules>
-        <module>api</module>
-        <module>impl</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 7708ec8e44b9cabbcfdcfbdc06370f6079228268..b2e16cb6083cf427491108c7d8a9eada8a0f300f 100644 (file)
@@ -32,7 +32,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <modules>
         <module>networkmap</module>
         <module>costmap</module>
-        <module>endpointcost</module>
       </modules>
     </profile>
 
diff --git a/test/scripts/northbound/nbr-endpointcost-create b/test/scripts/northbound/nbr-endpointcost-create
deleted file mode 100644 (file)
index e17a288..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-ENDPOINTCOST_PATH=$1
-RESOURCE_ID=$2
-if [ $3 ]; then
-       CONTEXT_ID=$3
-else
-       CONTEXT_ID="00000000-0000-0000-0000-000000000000"
-fi
-
-DATA=$(cat ./template/nbr-record-endpointcost \
-               | sed 's/\$1/'$ENDPOINTCOST_PATH'/g' \
-               | sed 's/\$2/'$CONTEXT_ID'/g' \
-               | sed 's/\$3/'$RESOURCE_ID'/g')
-
-# echo $DATA | python -m json.tool
-
-curl -X PUT -u admin:admin -H "Content-Type: application/json" \
-       -d "$DATA" \
-       http://localhost:8181/restconf/config/alto-nbr-endpointcost:records/record/$ENDPOINTCOST_PATH
index fc09f1943fc849b0353f9e10455cfbd12952c51c..13f0b24b2970bdcec9ad8d6df445ad5760c71d1c 100755 (executable)
@@ -8,7 +8,7 @@ else
        CONTEXT_ID="00000000-0000-0000-0000-000000000000"
 fi
 
-DATA=$(cat ./template/nbr-record-networkmap \
+DATA=$(cat ./northbound/template/nbr-record-networkmap \
                | sed 's/\$1/'$NETWORKMAP_PATH'/g' \
                | sed 's/\$2/'$CONTEXT_ID'/g' \
                | sed 's/\$3/'$RESOURCE_ID'/g')
diff --git a/test/scripts/northbound/query-nbr-endpointcost b/test/scripts/northbound/query-nbr-endpointcost
deleted file mode 100644 (file)
index 48eb946..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-ENDPOINTCOST_PATH=$1
-
-DATA=$(cat ./template/endpointcost-filter)
-
-
-
-curl -X POST -u admin:admin -H "Content-Type: application/alto-endpointcostfilter+json" \
-       -d "$DATA" \
-       http://localhost:8080/alto/endpointcost/$ENDPOINTCOST_PATH | python -m json.tool
diff --git a/test/scripts/northbound/template/endpointcost-filter b/test/scripts/northbound/template/endpointcost-filter
deleted file mode 100644 (file)
index 7c582ee..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-{
-       "cost-type": {"cost-mode" : "ordinal",
-       "cost-metric" : "routingcost"},
-       "endpoints" : {
-               "srcs": [ "ipv4:192.0.2.2" ],
-               "dsts": [
-                       "ipv4:192.0.2.89",
-                       "ipv4:198.51.100.34",
-                       "ipv4:203.0.113.45"
-               ]
-       }
-}
diff --git a/test/scripts/northbound/template/nbr-record-endpointcost b/test/scripts/northbound/template/nbr-record-endpointcost
deleted file mode 100644 (file)
index 0ff0305..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-       "record": {
-               "path": "$1",
-               "resource-iid": "/alto-resourcepool:context[alto-resourcepool:context-id='$2']/alto-resourcepool:resource[alto-resourcepool:resource-id='$3']"
-       }
-}