Fixed the dependency issue in features. 56/20456/1
authorGao Kai <gaok12@mails.tsinghua.edu.cn>
Thu, 14 May 2015 08:35:33 +0000 (16:35 +0800)
committerY. Richard Yang <yry@cs.yale.edu>
Fri, 15 May 2015 00:49:45 +0000 (00:49 +0000)
Fixed the dependent-vtag bug in alto-hosttracker.

Change-Id: Ibc726888c4c115578f342ec90e598d4926bfe22f
Signed-off-by: Gao Kai <gaok12@mails.tsinghua.edu.cn>
(cherry picked from commit ffdc27220fc94060f60160c7d30f00467929c899)

alto-hosttracker/implementation/src/main/java/org/opendaylight/alto/altohosttracker/plugin/internal/AltoHostTrackerImpl.java
alto-services/provider/simple-alto/src/main/java/org/opendaylight/alto/services/provider/simple/SimpleAltoService.java
features/pom.xml
features/src/main/resources/features.xml

index 2dc8ba89e86a2e3d25a60081c2e28ec1075f6201..12fd27164228594d0cc201dd299bfef445923d85 100644 (file)
@@ -158,6 +158,7 @@ public class AltoHostTrackerImpl implements DataChangeListener {
     }
 
     public void writeDefaultCostMaps() {
+        ResourceId nm_rid = new ResourceId(new ValidIdString(NMRESOURCEID));
         ResourceId rid = new ResourceId(new ValidIdString(CMRESOURCEID));
 
         InstanceIdentifier<CostMaps> ALTO_CMS = InstanceIdentifier
@@ -170,7 +171,7 @@ public class AltoHostTrackerImpl implements DataChangeListener {
         PidName pid1 = new PidName(vis1);
 
         TagString dtag = new TagString(this.networkTag);
-        DependentVtags dv = new DependentVtagsBuilder().setResourceId(rid)
+        DependentVtags dv = new DependentVtagsBuilder().setResourceId(nm_rid)
                 .setTag(dtag).build();
         List<DependentVtags> dvList = new ArrayList<DependentVtags>();
         dvList.add(dv);
index 080315c930c5a5f46a922a32d5aec3b7564d480d..9d272fe6b4c6ffa4f0ff231e0bd66ec85699fa0e 100644 (file)
@@ -166,6 +166,7 @@ public class SimpleAltoService implements NetworkMapService, CostMapService, Aut
         return validateNetworkMapFilter(vtag.rid, filter);
     }
 
+
     @Override
        public RFC7285CostMap getCostMap(String id) {
         m_logger.info("Handling cost-map resource: {}", id);
@@ -178,6 +179,7 @@ public class SimpleAltoService implements NetworkMapService, CostMapService, Aut
                         = tx.read(LogicalDatastoreType.CONFIGURATION, ciid);
             if (result.get().isPresent()) {
                 CostMap cm = result.get().get();
+                m_logger.info(cm.toString());
                 m_logger.info(m_mapper.writeValueAsString(cm));
                 ObjectNode node = m_mapper.valueToTree(cm);
 
index a09c4cd45d8073982488ff9a98b6dbc111c15bac..62b7b6c35924d165ecdbe40f422242a81630f4f1 100644 (file)
@@ -109,6 +109,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <groupId>${project.groupId}</groupId>
       <artifactId>alto-config</artifactId>
       <version>${project.version}</version>
+      <type>xml</type>
+      <classifier>config</classifier>
     </dependency>
 
     <dependency>
@@ -153,6 +155,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <groupId>${project.groupId}.alto-hosttracker</groupId>
       <artifactId>alto-hosttracker-config</artifactId>
       <version>${project.version}</version>
+      <type>xml</type>
+      <classifier>config</classifier>
     </dependency>
 
 
@@ -166,35 +170,47 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <artifactId>httpcore-osgi</artifactId>
     </dependency>
 
-        <dependency>
-            <groupId>org.opendaylight.controller.model</groupId>
-            <artifactId>model-inventory</artifactId>
-            <version>${mdsal.version}</version>
-            <type>jar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.l2switch.addresstracker</groupId>
-            <artifactId>addresstracker-model</artifactId>
-            <version>${l2switch.version}</version>
-            <type>jar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.l2switch.hosttracker</groupId>
-            <artifactId>hosttracker-model</artifactId>
-            <version>${l2switch.version}</version>
-            <type>jar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools.model</groupId>
-            <artifactId>ietf-topology</artifactId>
-            <version>${ietf.topology.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller.thirdparty</groupId>
-            <artifactId>net.sf.jung2</artifactId>
-            <version>2.0.1</version>
-        </dependency>
+    <dependency>
+      <groupId>org.opendaylight.controller.model</groupId>
+      <artifactId>model-inventory</artifactId>
+      <version>${mdsal.version}</version>
+      <type>jar</type>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.l2switch</groupId>
+      <artifactId>features-l2switch</artifactId>
+      <classifier>features</classifier>
+      <version>${l2switch.version}</version>
+      <type>xml</type>
+      <scope>runtime</scope>
+    </dependency>
 
+    <dependency>
+      <groupId>org.opendaylight.l2switch.addresstracker</groupId>
+      <artifactId>addresstracker-model</artifactId>
+      <version>${l2switch.version}</version>
+      <type>jar</type>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.l2switch.hosttracker</groupId>
+      <artifactId>hosttracker-model</artifactId>
+      <version>${l2switch.version}</version>
+      <type>jar</type>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.yangtools.model</groupId>
+      <artifactId>ietf-topology</artifactId>
+      <version>${ietf.topology.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.opendaylight.controller.thirdparty</groupId>
+      <artifactId>net.sf.jung2</artifactId>
+      <version>2.0.1</version>
+    </dependency>
   </dependencies>
 
   <build>
index 8213b7df8b0a57117b018650b33332277d012354..a1f0a23ab592a318574fa900b339bcffd57592ae 100644 (file)
@@ -14,6 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
   <repository>mvn:org.opendaylight.controller/features-restconf/${mdsal.version}/xml/features</repository>
   <repository>mvn:org.opendaylight.controller/features-base/${odl.version}/xml/features</repository>
+  <repository>mvn:org.opendaylight.l2switch/features-l2switch/${l2switch.version}/xml/features</repository>
 
   <feature name='odl-alto-all' version='${project.version}' description='OpenDaylight :: alto :: All '>
     <feature version='${project.version}'>odl-alto-provider</feature>
@@ -85,8 +86,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <feature version='${mdsal.version}'>odl-mdsal-common</feature>
     <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
     <feature version='${sal.version}'>odl-adsal-core</feature>
-    <bundle>mvn:org.opendaylight.alto/simple-impl/${project.version}</bundle>
     <configfile finalname='${configfile.directory}/alto-simple.xml'>mvn:org.opendaylight.alto/simple-impl/${project.version}/xml/config</configfile>
+    <bundle>mvn:org.opendaylight.alto/simple-impl/${project.version}</bundle>
   </feature>
 
   <feature name='odl-alto-northbound' version='${project.version}' description='Opendaylight :: alto :: Northbound'>
@@ -100,6 +101,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
   <feature name='odl-alto-integration-test' version='${project.version}' description='Opendaylight :: alto :: IntegrationTest'>
     <feature>odl-restconf-all</feature>
+    <feature version='${project.version}'>odl-alto-hosttracker</feature>
     <feature version='${project.version}'>odl-alto-northbound</feature>
     <feature version='${project.version}'>odl-alto-manager</feature>
   </feature>