<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-inet-types</artifactId>
- <version>2010.09.24.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-yang-types</artifactId>
- <version>2010.09.24.2-SNAPSHOT</version>
</dependency>
</dependencies>
<parent>
<artifactId>model-ietf</artifactId>
<groupId>org.opendaylight.yangtools.model</groupId>
- <version>0.5.7-SNAPSHOT</version>
+ <version>0.1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-topology-l3-unicast-igp</artifactId>
- <version>2013.07.12-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-ted</artifactId>
- <version>2013.07.12-SNAPSHOT</version>
</dependency>
</dependencies>
prefix "isis";
import network-topology {
prefix nt;
+ revision-date 2013-07-12;
}
import l3-unicast-igp-topology {
prefix igp;
+ revision-date 2013-07-12;
}
import ted {
prefix ted;
+ revision-date 2013-07-12;
}
organization "TBD";
prefix "isis";
import network-topology {
prefix nt;
+ revision-date 2013-10-21;
}
import l3-unicast-igp-topology {
prefix igp;
+ revision-date 2013-10-21;
}
import ted {
prefix ted;
+ revision-date 2013-10-21;
}
organization "TBD";
<parent>
<artifactId>model-ietf</artifactId>
<groupId>org.opendaylight.yangtools.model</groupId>
- <version>0.5.7-SNAPSHOT</version>
+ <version>0.1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-topology</artifactId>
- <version>2013.07.12-SNAPSHOT</version>
</dependency>
</dependencies>
prefix "l3t";
import network-topology {
prefix "nt";
+ revision-date 2013-07-12;
}
import ietf-inet-types {
prefix "l3t";
import network-topology {
prefix "nt";
+ revision-date 2013-10-21;
}
import ietf-inet-types {
<parent>
<artifactId>model-ietf</artifactId>
<groupId>org.opendaylight.yangtools.model</groupId>
- <version>0.5.7-SNAPSHOT</version>
+ <version>0.1.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
- <artifactId>model-l3-unicast-igp-topology</artifactId>
- <version>2013.07.12-SNAPSHOT</version>
+ <artifactId>ietf-topology-l3-unicast-igp</artifactId>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
- <artifactId>model-ted</artifactId>
- <version>2013.07.12-SNAPSHOT</version>
+ <artifactId>ietf-ted</artifactId>
</dependency>
</dependencies>
import network-topology {
prefix "nt";
+ revision-date 2013-10-21;
}
import l3-unicast-igp-topology {
prefix "l3t";
+ revision-date 2013-10-21;
}
import ietf-inet-types {
prefix "inet";
}
import ted {
prefix "ted";
+ revision-date 2013-10-21;
}
organization "TBD";
ňmodule ospf-topology {
yang-version 1;
namespace "urn:ietf:params:xml:ns:yang:ospf-topology";
- // replace with IANA namespace when assigned
+ // replace with IANA namespace when assigned
prefix "ospf";
import network-topology {
- prefix "nt";
+ prefix "nt";
+ revision-date 2013-07-12;
}
import l3-unicast-igp-topology {
- prefix "igp";
+ prefix "igp";
+ revision-date 2013-07-12;
}
import ietf-inet-types {
- prefix "inet";
+ prefix "inet";
}
import ted {
- prefix "ted";
+ prefix "ted";
+ revision-date 2013-07-12;
}
organization "TBD";
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-inet-types</artifactId>
- <version>2010.09.24.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opendaylight.yangtools.model</groupId>
<artifactId>ietf-yang-types</artifactId>
- <version>2010.09.24.2-SNAPSHOT</version>
</dependency>
</dependencies>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
+ <properties>
+ <ietf.topology.version>2013.10.21.0-SNAPSHOT</ietf.topology.version>
+ </properties>
<modules>
<module>ietf-inet-types</module>
<module>ietf-yang-types</module>
<module>ietf-ted</module>
<module>ietf-topology</module>
- <!--module>ietf-netconf</module -->
- <!--
- <module>ietf-topology-l3-unicast-igp</module>
<module>ietf-topology-isis</module>
+ <module>ietf-topology-l3-unicast-igp</module>
<module>ietf-topology-ospf</module>
- -->
+ <!--module>ietf-netconf</module -->
</modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-inet-types</artifactId>
+ <version>2010.09.24.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools.model</groupId>
+ <artifactId>ietf-yang-types</artifactId>
+ <version>2010.09.24.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ietf-ted</artifactId>
+ <version>${ietf.topology.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ietf-topology</artifactId>
+ <version>${ietf.topology.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ietf-topology-isis</artifactId>
+ <version>${ietf.topology.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ietf-topology-l3-unicast-igp</artifactId>
+ <version>${ietf.topology.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>ietf-topology-ospf</artifactId>
+ <version>${ietf.topology.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
</project>
* Extract module:revision from module builders
*/
private static void processDependencies(Map<String, Map<Date, ModuleNodeImpl>> moduleGraph, List<?> builders) {
- Map<String, Date> imported = Maps.newHashMap();
+
// Create edges in graph
for (Object mb : builders) {
+ Map<String, Date> imported = Maps.newHashMap();
String fromName = null;
Date fromRevision = null;
ModuleDependencySort.sort(builders);
}
- @Test(expected = YangValidationException.class)
- public void testImportTwiceDifferentRevision() throws Exception {
- Date date1 = new Date(463846463486L);
- Date date2 = new Date(364896446683L);
- b = mockModuleBuilder("b", date1);
- ModuleBuilder b2 = mockModuleBuilder("b", date2);
-
- mockDependency(a, b);
- mockDependency(c, b2);
-
- ModuleBuilder[] builders = new ModuleBuilder[] { a, c, b, b2 };
- try {
- ModuleDependencySort.sort(builders);
- } catch (YangValidationException e) {
- assertThat(e.getMessage(), containsString("Module:b imported twice with different revisions:"
- + SIMPLE_DATE_FORMAT.format(date1) + ", " + SIMPLE_DATE_FORMAT.format(date2)));
- throw e;
- }
- }
-
@Test
public void testModuleTwiceWithDifferentRevs() throws Exception {
ModuleBuilder a2 = mockModuleBuilder("a", new Date());