-/**
+/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
<artifactId>yang-parser-impl</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-parser-rfc7950</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-test-util</artifactId>
<module>yang-parser-api</module>
<module>yang-parser-spi</module>
<module>yang-parser-reactor</module>
+ <module>yang-parser-rfc7950</module>
<module>yang-parser-impl</module>
<module>yang-data-jaxen</module>
<module>yang-model-validator</module>
<dependency>
<groupId>${project.groupId}</groupId>
- <!-- FIXME: this needs to be trimmed down to the point of requiring only yang-parser-spi
- and yang-parser-reactor -->
- <artifactId>yang-parser-impl</artifactId>
+ <artifactId>yang-parser-rfc7950</artifactId>
</dependency>
</dependencies>
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
public interface QNamePredicate extends Identifiable<QName> {
LeafRefPath getPathKeyExpression();
-}
\ No newline at end of file
+}
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
QName getQName();
-}
\ No newline at end of file
+}
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
<artifactId>yang-data-util</artifactId>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>yang-parser-rfc7950</artifactId>
+ </dependency>
+
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>odlext-model-api</artifactId>
<artifactId>rfc8040-model-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.antlr</groupId>
- <artifactId>antlr4-runtime</artifactId>
- </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<build>
<plugins>
- <plugin>
- <groupId>org.antlr</groupId>
- <artifactId>antlr4-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>antlr4</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <sourceDirectory>src/main/antlr</sourceDirectory>
- <outputDirectory>target/generated-sources/parser/org/opendaylight/yangtools/antlrv4/code/gen</outputDirectory>
- <visitor>true</visitor>
- <listener>true</listener>
- </configuration>
- </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <configuration>
- <excludePackageNames>
- *.opendaylight.yangtools.antlrv4.code.gen
- </excludePackageNames>
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.sourceForResource;
import com.google.common.collect.ImmutableSet;
+import java.io.IOException;
import java.net.URI;
import java.util.List;
import java.util.Set;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
+import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException;
+import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
import org.opendaylight.yangtools.yang.parser.impl.DefaultReactors;
+import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangStatementStreamSource;
import org.opendaylight.yangtools.yang.parser.spi.meta.InvalidSubstatementException;
import org.opendaylight.yangtools.yang.parser.spi.meta.MissingSubstatementException;
import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
assertTrue(cause.getMessage().startsWith("LEAF is not valid for YANG_DATA."));
}
}
+
+ private static StatementStreamSource sourceForResource(final String resourceName) {
+ try {
+ return YangStatementStreamSource.create(YangTextSchemaSource.forResource(resourceName));
+ } catch (IOException | YangSyntaxErrorException e) {
+ throw new IllegalArgumentException("Failed to create source", e);
+ }
+ }
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2013 Cisco Systems, Inc. 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.odlparent</groupId>
+ <artifactId>bundle-parent</artifactId>
+ <version>2.0.5</version>
+ <relativePath/>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yang-parser-rfc7950</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+ <name>${project.artifactId}</name>
+ <description>RFC6020/RFC7950 parser support</description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>yangtools-artifacts</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>yang-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>yang-model-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>yang-parser-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>yang-parser-reactor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>yang-parser-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>yang-model-util</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>yang-data-util</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odlext-model-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>openconfig-model-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>rfc8040-model-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>concepts</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>antlr4</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <sourceDirectory>src/main/antlr</sourceDirectory>
+ <outputDirectory>${project.build.directory}/generated-sources/parser/org/opendaylight/yangtools/antlrv4/code/gen</outputDirectory>
+ <visitor>true</visitor>
+ <listener>true</listener>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <excludePackageNames>
+ *.opendaylight.yangtools.antlrv4.code.gen
+ </excludePackageNames>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Export-Package>
+ {local-packages},
+ org.opendaylight.yangtools.yang.parser.impl.*,
+ ;-split-package:=error
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!--
+ Maven Site Configuration
+
+ The following configuration is necessary for maven-site-plugin to
+ correctly identify the correct deployment path for OpenDaylight Maven
+ sites.
+ -->
+ <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
+
+ <distributionManagement>
+ <site>
+ <id>opendaylight-site</id>
+ <url>${nexus.site.url}/${project.artifactId}/</url>
+ </site>
+ </distributionManagement>
+</project>
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
FractionDigitsEffectiveStatementImpl(final StmtContext<Integer, FractionDigitsStatement, ?> ctx) {
super(ctx);
}
-}
\ No newline at end of file
+}
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. 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.yangtools.yang.parser.rfc6020.repo;
+package org.opendaylight.yangtools.yang.parser.rfc7950.repo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
* 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.yangtools.yang.parser.impl.util;
+package org.opendaylight.yangtools.yang.parser.rfc7950.repo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import java.io.IOException;
import org.junit.Test;
import org.opendaylight.yangtools.yang.model.parser.api.YangSyntaxErrorException;
-import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo;
public class YangModelDependencyInfoTest {
--- /dev/null
+module iana-timezones {
+ namespace "urn:ietf:params:xml:ns:yang:iana-timezones";
+ prefix ianatz;
+
+ organization "IANA";
+ contact
+ " Internet Assigned Numbers Authority
+
+ Postal: ICANN
+ 4676 Admiralty Way, Suite 330
+ Marina del Rey, CA 90292
+
+ Tel: +1 310 823 9358
+ E-Mail: iana&iana.org";
+ description
+ "This YANG module defines the iana-timezone typedef, which
+ contains YANG definitions for IANA-registered timezones.
+
+ This YANG module is maintained by IANA, and reflects the
+ IANA Time Zone Database.
+ (http://www.iana.org/time-zones)
+
+ The latest revision of this YANG module can be obtained from
+ the IANA web site.
+
+ Copyright (c) 2011 IETF Trust and the persons identified as
+ authors of the code. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, is permitted pursuant to, and subject
+ to the license terms contained in, the Simplified BSD License
+ set forth in Section 4.c of the IETF Trust's Legal Provisions
+ Relating to IETF Documents
+ (http://trustee.ietf.org/license-info).
+
+ This version of this YANG module is part of RFC XXXX; see
+ the RFC itself for full legal notices.";
+
+ revision 2012-07-09 {
+ description
+ "Initial revision. Using IANA Time Zone Data v. 2012c
+ (Released 2012-03-27)";
+ reference "RFC XXXX: TITLE";
+ }
+ typedef iana-timezone {
+ description
+ "A timezone location as defined by the IANA timezone
+ database (http://www.iana.org/time-zones)";
+ type enumeration {
+ enum "Europe/Andorra" {
+ value 0;
+ }
+ enum "Asia/Dubai" {
+ value 1;
+ }
+ enum "Asia/Kabul" {
+ value 2;
+ }
+ enum "America/Antigua" {
+ value 3;
+ }
+ enum "America/Anguilla" {
+ value 4;
+ }
+ enum "Europe/Tirane" {
+ value 5;
+ }
+ enum "Asia/Yerevan" {
+ value 6;
+ }
+ enum "Africa/Luanda" {
+ value 7;
+ }
+ enum "Antarctica/McMurdo" {
+ value 8;
+ description
+ "McMurdo Station, Ross Island";
+ }
+ enum "Antarctica/South_Pole" {
+ value 9;
+ description
+ "Amundsen-Scott Station, South Pole";
+ }
+ enum "Antarctica/Rothera" {
+ value 10;
+ description
+ "Rothera Station, Adelaide Island";
+ }
+ enum "Antarctica/Palmer" {
+ value 11;
+ description
+ "Palmer Station, Anvers Island";
+ }
+ enum "Antarctica/Mawson" {
+ value 12;
+ description
+ "Mawson Station, Holme Bay";
+ }
+ enum "Antarctica/Davis" {
+ value 13;
+ description
+ "Davis Station, Vestfold Hills";
+ }
+ enum "Antarctica/Casey" {
+ value 14;
+ description
+ "Casey Station, Bailey Peninsula";
+ }
+ enum "Antarctica/Vostok" {
+ value 15;
+ description
+ "Vostok Station, Lake Vostok";
+ }
+ enum "Antarctica/DumontDUrville" {
+ value 16;
+ description
+ "Dumont-d'Urville Station, Terre Adelie";
+ }
+ enum "Antarctica/Syowa" {
+ value 17;
+ description
+ "Syowa Station, E Ongul I";
+ }
+ enum "Antarctica/Macquarie" {
+ value 18;
+ description
+ "Macquarie Island Station, Macquarie Island";
+ }
+ enum "America/Argentina/Buenos_Aires" {
+ value 19;
+ description
+ "Buenos Aires (BA, CF)";
+ }
+ enum "America/Argentina/Cordoba" {
+ value 20;
+ description
+ "most locations (CB, CC, CN, ER, FM, MN, SE, SF)";
+ }
+ enum "America/Argentina/Salta" {
+ value 21;
+ description
+ "(SA, LP, NQ, RN)";
+ }
+ enum "America/Argentina/Jujuy" {
+ value 22;
+ description
+ "Jujuy (JY)";
+ }
+ enum "America/Argentina/Tucuman" {
+ value 23;
+ description
+ "Tucuman (TM)";
+ }
+ enum "America/Argentina/Catamarca" {
+ value 24;
+ description
+ "Catamarca (CT), Chubut (CH)";
+ }
+ enum "America/Argentina/La_Rioja" {
+ value 25;
+ description
+ "La Rioja (LR)";
+ }
+ enum "America/Argentina/San_Juan" {
+ value 26;
+ description
+ "San Juan (SJ)";
+ }
+ enum "America/Argentina/Mendoza" {
+ value 27;
+ description
+ "Mendoza (MZ)";
+ }
+ enum "America/Argentina/San_Luis" {
+ value 28;
+ description
+ "San Luis (SL)";
+ }
+ enum "America/Argentina/Rio_Gallegos" {
+ value 29;
+ description
+ "Santa Cruz (SC)";
+ }
+ enum "America/Argentina/Ushuaia" {
+ value 30;
+ description
+ "Tierra del Fuego (TF)";
+ }
+ enum "Pacific/Pago_Pago" {
+ value 31;
+ }
+ enum "Europe/Vienna" {
+ value 32;
+ }
+ enum "Australia/Lord_Howe" {
+ value 33;
+ description
+ "Lord Howe Island";
+ }
+ enum "Australia/Hobart" {
+ value 34;
+ description
+ "Tasmania - most locations";
+ }
+ enum "Australia/Currie" {
+ value 35;
+ description
+ "Tasmania - King Island";
+ }
+ enum "Australia/Melbourne" {
+ value 36;
+ description
+ "Victoria";
+ }
+ enum "Australia/Sydney" {
+ value 37;
+ description
+ "New South Wales - most locations";
+ }
+ enum "Australia/Broken_Hill" {
+ value 38;
+ description
+ "New South Wales - Yancowinna";
+ }
+ enum "Australia/Brisbane" {
+ value 39;
+ description
+ "Queensland - most locations";
+ }
+ enum "Australia/Lindeman" {
+ value 40;
+ description
+ "Queensland - Holiday Islands";
+ }
+ enum "Australia/Adelaide" {
+ value 41;
+ description
+ "South Australia";
+ }
+ enum "Australia/Darwin" {
+ value 42;
+ description
+ "Northern Territory";
+ }
+ enum "Australia/Perth" {
+ value 43;
+ description
+ "Western Australia - most locations";
+ }
+ enum "Australia/Eucla" {
+ value 44;
+ description
+ "Western Australia - Eucla area";
+ }
+ enum "America/Aruba" {
+ value 45;
+ }
+ enum "Europe/Mariehamn" {
+ value 46;
+ }
+ enum "Asia/Baku" {
+ value 47;
+ }
+ enum "Europe/Sarajevo" {
+ value 48;
+ }
+ enum "America/Barbados" {
+ value 49;
+ }
+ enum "Asia/Dhaka" {
+ value 50;
+ }
+ enum "Europe/Brussels" {
+ value 51;
+ }
+ enum "Africa/Ouagadougou" {
+ value 52;
+ }
+ enum "Europe/Sofia" {
+ value 53;
+ }
+ enum "Asia/Bahrain" {
+ value 54;
+ }
+ enum "Africa/Bujumbura" {
+ value 55;
+ }
+ enum "Africa/Porto-Novo" {
+ value 56;
+ }
+ enum "America/St_Barthelemy" {
+ value 57;
+ }
+ enum "Atlantic/Bermuda" {
+ value 58;
+ }
+ enum "Asia/Brunei" {
+ value 59;
+ }
+ enum "America/La_Paz" {
+ value 60;
+ }
+ enum "America/Kralendijk" {
+ value 61;
+ }
+ enum "America/Noronha" {
+ value 62;
+ description
+ "Atlantic islands";
+ }
+ enum "America/Belem" {
+ value 63;
+ description
+ "Amapa, E Para";
+ }
+ enum "America/Fortaleza" {
+ value 64;
+ description
+ "NE Brazil (MA, PI, CE, RN, PB)";
+ }
+ enum "America/Recife" {
+ value 65;
+ description
+ "Pernambuco";
+ }
+ enum "America/Araguaina" {
+ value 66;
+ description
+ "Tocantins";
+ }
+ enum "America/Maceio" {
+ value 67;
+ description
+ "Alagoas, Sergipe";
+ }
+ enum "America/Bahia" {
+ value 68;
+ description
+ "Bahia";
+ }
+ enum "America/Sao_Paulo" {
+ value 69;
+ description
+ "S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)";
+ }
+ enum "America/Campo_Grande" {
+ value 70;
+ description
+ "Mato Grosso do Sul";
+ }
+ enum "America/Cuiaba" {
+ value 71;
+ description
+ "Mato Grosso";
+ }
+ enum "America/Santarem" {
+ value 72;
+ description
+ "W Para";
+ }
+ enum "America/Porto_Velho" {
+ value 73;
+ description
+ "Rondonia";
+ }
+ enum "America/Boa_Vista" {
+ value 74;
+ description
+ "Roraima";
+ }
+ enum "America/Manaus" {
+ value 75;
+ description
+ "E Amazonas";
+ }
+ enum "America/Eirunepe" {
+ value 76;
+ description
+ "W Amazonas";
+ }
+ enum "America/Rio_Branco" {
+ value 77;
+ description
+ "Acre";
+ }
+ enum "America/Nassau" {
+ value 78;
+ }
+ enum "Asia/Thimphu" {
+ value 79;
+ }
+ enum "Africa/Gaborone" {
+ value 80;
+ }
+ enum "Europe/Minsk" {
+ value 81;
+ }
+ enum "America/Belize" {
+ value 82;
+ }
+ enum "America/St_Johns" {
+ value 83;
+ description
+ "Newfoundland Time, including SE Labrador";
+ }
+ enum "America/Halifax" {
+ value 84;
+ description
+ "Atlantic Time - Nova Scotia (most places), PEI";
+ }
+ enum "America/Glace_Bay" {
+ value 85;
+ description
+ "Atlantic Time - Nova Scotia - places that did not observe
+ DST 1966-1971";
+ }
+ enum "America/Moncton" {
+ value 86;
+ description
+ "Atlantic Time - New Brunswick";
+ }
+ enum "America/Goose_Bay" {
+ value 87;
+ description
+ "Atlantic Time - Labrador - most locations";
+ }
+ enum "America/Blanc-Sablon" {
+ value 88;
+ description
+ "Atlantic Standard Time - Quebec - Lower North Shore";
+ }
+ enum "America/Montreal" {
+ value 89;
+ description
+ "Eastern Time - Quebec - most locations";
+ }
+ enum "America/Toronto" {
+ value 90;
+ description
+ "Eastern Time - Ontario - most locations";
+ }
+ enum "America/Nipigon" {
+ value 91;
+ description
+ "Eastern Time - Ontario & Quebec - places that did not
+ observe DST 1967-1973";
+ }
+ enum "America/Thunder_Bay" {
+ value 92;
+ description
+ "Eastern Time - Thunder Bay, Ontario";
+ }
+ enum "America/Iqaluit" {
+ value 93;
+ description
+ "Eastern Time - east Nunavut - most locations";
+ }
+ enum "America/Pangnirtung" {
+ value 94;
+ description
+ "Eastern Time - Pangnirtung, Nunavut";
+ }
+ enum "America/Resolute" {
+ value 95;
+ description
+ "Central Standard Time - Resolute, Nunavut";
+ }
+ enum "America/Atikokan" {
+ value 96;
+ description
+ "Eastern Standard Time - Atikokan, Ontario and Southampton I,
+ Nunavut";
+ }
+ enum "America/Rankin_Inlet" {
+ value 97;
+ description
+ "Central Time - central Nunavut";
+ }
+ enum "America/Winnipeg" {
+ value 98;
+ description
+ "Central Time - Manitoba & west Ontario";
+ }
+ enum "America/Rainy_River" {
+ value 99;
+ description
+ "Central Time - Rainy River & Fort Frances, Ontario";
+ }
+ enum "America/Regina" {
+ value 100;
+ description
+ "Central Standard Time - Saskatchewan - most locations";
+ }
+ enum "America/Swift_Current" {
+ value 101;
+ description
+ "Central Standard Time - Saskatchewan - midwest";
+ }
+ enum "America/Edmonton" {
+ value 102;
+ description
+ "Mountain Time - Alberta, east British Columbia & west
+ Saskatchewan";
+ }
+ enum "America/Cambridge_Bay" {
+ value 103;
+ description
+ "Mountain Time - west Nunavut";
+ }
+ enum "America/Yellowknife" {
+ value 104;
+ description
+ "Mountain Time - central Northwest Territories";
+ }
+ enum "America/Inuvik" {
+ value 105;
+ description
+ "Mountain Time - west Northwest Territories";
+ }
+ enum "America/Creston" {
+ value 106;
+ description
+ "Mountain Standard Time - Creston, British Columbia";
+ }
+ enum "America/Dawson_Creek" {
+ value 107;
+ description
+ "Mountain Standard Time - Dawson Creek & Fort Saint John,
+ British Columbia";
+ }
+ enum "America/Vancouver" {
+ value 108;
+ description
+ "Pacific Time - west British Columbia";
+ }
+ enum "America/Whitehorse" {
+ value 109;
+ description
+ "Pacific Time - south Yukon";
+ }
+ enum "America/Dawson" {
+ value 110;
+ description
+ "Pacific Time - north Yukon";
+ }
+ enum "Indian/Cocos" {
+ value 111;
+ }
+ enum "Africa/Kinshasa" {
+ value 112;
+ description
+ "west Dem. Rep. of Congo";
+ }
+ enum "Africa/Lubumbashi" {
+ value 113;
+ description
+ "east Dem. Rep. of Congo";
+ }
+ enum "Africa/Bangui" {
+ value 114;
+ }
+ enum "Africa/Brazzaville" {
+ value 115;
+ }
+ enum "Europe/Zurich" {
+ value 116;
+ }
+ enum "Africa/Abidjan" {
+ value 117;
+ }
+ enum "Pacific/Rarotonga" {
+ value 118;
+ }
+ enum "America/Santiago" {
+ value 119;
+ description
+ "most locations";
+ }
+ enum "Pacific/Easter" {
+ value 120;
+ description
+ "Easter Island & Sala y Gomez";
+ }
+ enum "Africa/Douala" {
+ value 121;
+ }
+ enum "Asia/Shanghai" {
+ value 122;
+ description
+ "east China - Beijing, Guangdong, Shanghai, etc.";
+ }
+ enum "Asia/Harbin" {
+ value 123;
+ description
+ "Heilongjiang (except Mohe), Jilin";
+ }
+ enum "Asia/Chongqing" {
+ value 124;
+ description
+ "central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou,
+ etc.";
+ }
+ enum "Asia/Urumqi" {
+ value 125;
+ description
+ "most of Tibet & Xinjiang";
+ }
+ enum "Asia/Kashgar" {
+ value 126;
+ description
+ "west Tibet & Xinjiang";
+ }
+ enum "America/Bogota" {
+ value 127;
+ }
+ enum "America/Costa_Rica" {
+ value 128;
+ }
+ enum "America/Havana" {
+ value 129;
+ }
+ enum "Atlantic/Cape_Verde" {
+ value 130;
+ }
+ enum "America/Curacao" {
+ value 131;
+ }
+ enum "Indian/Christmas" {
+ value 132;
+ }
+ enum "Asia/Nicosia" {
+ value 133;
+ }
+ enum "Europe/Prague" {
+ value 134;
+ }
+ enum "Europe/Berlin" {
+ value 135;
+ }
+ enum "Africa/Djibouti" {
+ value 136;
+ }
+ enum "Europe/Copenhagen" {
+ value 137;
+ }
+ enum "America/Dominica" {
+ value 138;
+ }
+ enum "America/Santo_Domingo" {
+ value 139;
+ }
+ enum "Africa/Algiers" {
+ value 140;
+ }
+ enum "America/Guayaquil" {
+ value 141;
+ description
+ "mainland";
+ }
+ enum "Pacific/Galapagos" {
+ value 142;
+ description
+ "Galapagos Islands";
+ }
+ enum "Europe/Tallinn" {
+ value 143;
+ }
+ enum "Africa/Cairo" {
+ value 144;
+ }
+ enum "Africa/El_Aaiun" {
+ value 145;
+ }
+ enum "Africa/Asmara" {
+ value 146;
+ }
+ enum "Europe/Madrid" {
+ value 147;
+ description
+ "mainland";
+ }
+ enum "Africa/Ceuta" {
+ value 148;
+ description
+ "Ceuta & Melilla";
+ }
+ enum "Atlantic/Canary" {
+ value 149;
+ description
+ "Canary Islands";
+ }
+ enum "Africa/Addis_Ababa" {
+ value 150;
+ }
+ enum "Europe/Helsinki" {
+ value 151;
+ }
+ enum "Pacific/Fiji" {
+ value 152;
+ }
+ enum "Atlantic/Stanley" {
+ value 153;
+ }
+ enum "Pacific/Chuuk" {
+ value 154;
+ description
+ "Chuuk (Truk) and Yap";
+ }
+ enum "Pacific/Pohnpei" {
+ value 155;
+ description
+ "Pohnpei (Ponape)";
+ }
+ enum "Pacific/Kosrae" {
+ value 156;
+ description
+ "Kosrae";
+ }
+ enum "Atlantic/Faroe" {
+ value 157;
+ }
+ enum "Europe/Paris" {
+ value 158;
+ }
+ enum "Africa/Libreville" {
+ value 159;
+ }
+ enum "Europe/London" {
+ value 160;
+ }
+ enum "America/Grenada" {
+ value 161;
+ }
+ enum "Asia/Tbilisi" {
+ value 162;
+ }
+ enum "America/Cayenne" {
+ value 163;
+ }
+ enum "Europe/Guernsey" {
+ value 164;
+ }
+ enum "Africa/Accra" {
+ value 165;
+ }
+ enum "Europe/Gibraltar" {
+ value 166;
+ }
+ enum "America/Godthab" {
+ value 167;
+ description
+ "most locations";
+ }
+ enum "America/Danmarkshavn" {
+ value 168;
+ description
+ "east coast, north of Scoresbysund";
+ }
+ enum "America/Scoresbysund" {
+ value 169;
+ description
+ "Scoresbysund / Ittoqqortoormiit";
+ }
+ enum "America/Thule" {
+ value 170;
+ description
+ "Thule / Pituffik";
+ }
+ enum "Africa/Banjul" {
+ value 171;
+ }
+ enum "Africa/Conakry" {
+ value 172;
+ }
+ enum "America/Guadeloupe" {
+ value 173;
+ }
+ enum "Africa/Malabo" {
+ value 174;
+ }
+ enum "Europe/Athens" {
+ value 175;
+ }
+ enum "Atlantic/South_Georgia" {
+ value 176;
+ }
+ enum "America/Guatemala" {
+ value 177;
+ }
+ enum "Pacific/Guam" {
+ value 178;
+ }
+ enum "Africa/Bissau" {
+ value 179;
+ }
+ enum "America/Guyana" {
+ value 180;
+ }
+ enum "Asia/Hong_Kong" {
+ value 181;
+ }
+ enum "America/Tegucigalpa" {
+ value 182;
+ }
+ enum "Europe/Zagreb" {
+ value 183;
+ }
+ enum "America/Port-au-Prince" {
+ value 184;
+ }
+ enum "Europe/Budapest" {
+ value 185;
+ }
+ enum "Asia/Jakarta" {
+ value 186;
+ description
+ "Java & Sumatra";
+ }
+ enum "Asia/Pontianak" {
+ value 187;
+ description
+ "west & central Borneo";
+ }
+ enum "Asia/Makassar" {
+ value 188;
+ description
+ "east & south Borneo, Sulawesi (Celebes), Bali, Nusa
+ Tengarra, west Timor";
+ }
+ enum "Asia/Jayapura" {
+ value 189;
+ description
+ "west New Guinea (Irian Jaya) & Malukus (Moluccas)";
+ }
+ enum "Europe/Dublin" {
+ value 190;
+ }
+ enum "Asia/Jerusalem" {
+ value 191;
+ }
+ enum "Europe/Isle_of_Man" {
+ value 192;
+ }
+ enum "Asia/Kolkata" {
+ value 193;
+ }
+ enum "Indian/Chagos" {
+ value 194;
+ }
+ enum "Asia/Baghdad" {
+ value 195;
+ }
+ enum "Asia/Tehran" {
+ value 196;
+ }
+ enum "Atlantic/Reykjavik" {
+ value 197;
+ }
+ enum "Europe/Rome" {
+ value 198;
+ }
+ enum "Europe/Jersey" {
+ value 199;
+ }
+ enum "America/Jamaica" {
+ value 200;
+ }
+ enum "Asia/Amman" {
+ value 201;
+ }
+ enum "Asia/Tokyo" {
+ value 202;
+ }
+ enum "Africa/Nairobi" {
+ value 203;
+ }
+ enum "Asia/Bishkek" {
+ value 204;
+ }
+ enum "Asia/Phnom_Penh" {
+ value 205;
+ }
+ enum "Pacific/Tarawa" {
+ value 206;
+ description
+ "Gilbert Islands";
+ }
+ enum "Pacific/Enderbury" {
+ value 207;
+ description
+ "Phoenix Islands";
+ }
+ enum "Pacific/Kiritimati" {
+ value 208;
+ description
+ "Line Islands";
+ }
+ enum "Indian/Comoro" {
+ value 209;
+ }
+ enum "America/St_Kitts" {
+ value 210;
+ }
+ enum "Asia/Pyongyang" {
+ value 211;
+ }
+ enum "Asia/Seoul" {
+ value 212;
+ }
+ enum "Asia/Kuwait" {
+ value 213;
+ }
+ enum "America/Cayman" {
+ value 214;
+ }
+ enum "Asia/Almaty" {
+ value 215;
+ description
+ "most locations";
+ }
+ enum "Asia/Qyzylorda" {
+ value 216;
+ description
+ "Qyzylorda (Kyzylorda, Kzyl-Orda)";
+ }
+ enum "Asia/Aqtobe" {
+ value 217;
+ description
+ "Aqtobe (Aktobe)";
+ }
+ enum "Asia/Aqtau" {
+ value 218;
+ description
+ "Atyrau (Atirau, Gur'yev), Mangghystau (Mankistau)";
+ }
+ enum "Asia/Oral" {
+ value 219;
+ description
+ "West Kazakhstan";
+ }
+ enum "Asia/Vientiane" {
+ value 220;
+ }
+ enum "Asia/Beirut" {
+ value 221;
+ }
+ enum "America/St_Lucia" {
+ value 222;
+ }
+ enum "Europe/Vaduz" {
+ value 223;
+ }
+ enum "Asia/Colombo" {
+ value 224;
+ }
+ enum "Africa/Monrovia" {
+ value 225;
+ }
+ enum "Africa/Maseru" {
+ value 226;
+ }
+ enum "Europe/Vilnius" {
+ value 227;
+ }
+ enum "Europe/Luxembourg" {
+ value 228;
+ }
+ enum "Europe/Riga" {
+ value 229;
+ }
+ enum "Africa/Tripoli" {
+ value 230;
+ }
+ enum "Africa/Casablanca" {
+ value 231;
+ }
+ enum "Europe/Monaco" {
+ value 232;
+ }
+ enum "Europe/Chisinau" {
+ value 233;
+ }
+ enum "Europe/Podgorica" {
+ value 234;
+ }
+ enum "America/Marigot" {
+ value 235;
+ }
+ enum "Indian/Antananarivo" {
+ value 236;
+ }
+ enum "Pacific/Majuro" {
+ value 237;
+ description
+ "most locations";
+ }
+ enum "Pacific/Kwajalein" {
+ value 238;
+ description
+ "Kwajalein";
+ }
+ enum "Europe/Skopje" {
+ value 239;
+ }
+ enum "Africa/Bamako" {
+ value 240;
+ }
+ enum "Asia/Rangoon" {
+ value 241;
+ }
+ enum "Asia/Ulaanbaatar" {
+ value 242;
+ description
+ "most locations";
+ }
+ enum "Asia/Hovd" {
+ value 243;
+ description
+ "Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan";
+ }
+ enum "Asia/Choibalsan" {
+ value 244;
+ description
+ "Dornod, Sukhbaatar";
+ }
+ enum "Asia/Macau" {
+ value 245;
+ }
+ enum "Pacific/Saipan" {
+ value 246;
+ }
+ enum "America/Martinique" {
+ value 247;
+ }
+ enum "Africa/Nouakchott" {
+ value 248;
+ }
+ enum "America/Montserrat" {
+ value 249;
+ }
+ enum "Europe/Malta" {
+ value 250;
+ }
+ enum "Indian/Mauritius" {
+ value 251;
+ }
+ enum "Indian/Maldives" {
+ value 252;
+ }
+ enum "Africa/Blantyre" {
+ value 253;
+ }
+ enum "America/Mexico_City" {
+ value 254;
+ description
+ "Central Time - most locations";
+ }
+ enum "America/Cancun" {
+ value 255;
+ description
+ "Central Time - Quintana Roo";
+ }
+ enum "America/Merida" {
+ value 256;
+ description
+ "Central Time - Campeche, Yucatan";
+ }
+ enum "America/Monterrey" {
+ value 257;
+ description
+ "Mexican Central Time - Coahuila, Durango, Nuevo Leon,
+ Tamaulipas away from US border";
+ }
+ enum "America/Matamoros" {
+ value 258;
+ description
+ "US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas
+ near US border";
+ }
+ enum "America/Mazatlan" {
+ value 259;
+ description
+ "Mountain Time - S Baja, Nayarit, Sinaloa";
+ }
+ enum "America/Chihuahua" {
+ value 260;
+ description
+ "Mexican Mountain Time - Chihuahua away from US border";
+ }
+ enum "America/Ojinaga" {
+ value 261;
+ description
+ "US Mountain Time - Chihuahua near US border";
+ }
+ enum "America/Hermosillo" {
+ value 262;
+ description
+ "Mountain Standard Time - Sonora";
+ }
+ enum "America/Tijuana" {
+ value 263;
+ description
+ "US Pacific Time - Baja California near US border";
+ }
+ enum "America/Santa_Isabel" {
+ value 264;
+ description
+ "Mexican Pacific Time - Baja California away from US border";
+ }
+ enum "America/Bahia_Banderas" {
+ value 265;
+ description
+ "Mexican Central Time - Bahia de Banderas";
+ }
+ enum "Asia/Kuala_Lumpur" {
+ value 266;
+ description
+ "peninsular Malaysia";
+ }
+ enum "Asia/Kuching" {
+ value 267;
+ description
+ "Sabah & Sarawak";
+ }
+ enum "Africa/Maputo" {
+ value 268;
+ }
+ enum "Africa/Windhoek" {
+ value 269;
+ }
+ enum "Pacific/Noumea" {
+ value 270;
+ }
+ enum "Africa/Niamey" {
+ value 271;
+ }
+ enum "Pacific/Norfolk" {
+ value 272;
+ }
+ enum "Africa/Lagos" {
+ value 273;
+ }
+ enum "America/Managua" {
+ value 274;
+ }
+ enum "Europe/Amsterdam" {
+ value 275;
+ }
+ enum "Europe/Oslo" {
+ value 276;
+ }
+ enum "Asia/Kathmandu" {
+ value 277;
+ }
+ enum "Pacific/Nauru" {
+ value 278;
+ }
+ enum "Pacific/Niue" {
+ value 279;
+ }
+ enum "Pacific/Auckland" {
+ value 280;
+ description
+ "most locations";
+ }
+ enum "Pacific/Chatham" {
+ value 281;
+ description
+ "Chatham Islands";
+ }
+ enum "Asia/Muscat" {
+ value 282;
+ }
+ enum "America/Panama" {
+ value 283;
+ }
+ enum "America/Lima" {
+ value 284;
+ }
+ enum "Pacific/Tahiti" {
+ value 285;
+ description
+ "Society Islands";
+ }
+ enum "Pacific/Marquesas" {
+ value 286;
+ description
+ "Marquesas Islands";
+ }
+ enum "Pacific/Gambier" {
+ value 287;
+ description
+ "Gambier Islands";
+ }
+ enum "Pacific/Port_Moresby" {
+ value 288;
+ }
+ enum "Asia/Manila" {
+ value 289;
+ }
+ enum "Asia/Karachi" {
+ value 290;
+ }
+ enum "Europe/Warsaw" {
+ value 291;
+ }
+ enum "America/Miquelon" {
+ value 292;
+ }
+ enum "Pacific/Pitcairn" {
+ value 293;
+ }
+ enum "America/Puerto_Rico" {
+ value 294;
+ }
+ enum "Asia/Gaza" {
+ value 295;
+ description
+ "Gaza Strip";
+ }
+ enum "Asia/Hebron" {
+ value 296;
+ description
+ "West Bank";
+ }
+ enum "Europe/Lisbon" {
+ value 297;
+ description
+ "mainland";
+ }
+ enum "Atlantic/Madeira" {
+ value 298;
+ description
+ "Madeira Islands";
+ }
+ enum "Atlantic/Azores" {
+ value 299;
+ description
+ "Azores";
+ }
+ enum "Pacific/Palau" {
+ value 300;
+ }
+ enum "America/Asuncion" {
+ value 301;
+ }
+ enum "Asia/Qatar" {
+ value 302;
+ }
+ enum "Indian/Reunion" {
+ value 303;
+ }
+ enum "Europe/Bucharest" {
+ value 304;
+ }
+ enum "Europe/Belgrade" {
+ value 305;
+ }
+ enum "Europe/Kaliningrad" {
+ value 306;
+ description
+ "Moscow-01 - Kaliningrad";
+ }
+ enum "Europe/Moscow" {
+ value 307;
+ description
+ "Moscow+00 - west Russia";
+ }
+ enum "Europe/Volgograd" {
+ value 308;
+ description
+ "Moscow+00 - Caspian Sea";
+ }
+ enum "Europe/Samara" {
+ value 309;
+ description
+ "Moscow+00 - Samara, Udmurtia";
+ }
+ enum "Asia/Yekaterinburg" {
+ value 310;
+ description
+ "Moscow+02 - Urals";
+ }
+ enum "Asia/Omsk" {
+ value 311;
+ description
+ "Moscow+03 - west Siberia";
+ }
+ enum "Asia/Novosibirsk" {
+ value 312;
+ description
+ "Moscow+03 - Novosibirsk";
+ }
+ enum "Asia/Novokuznetsk" {
+ value 313;
+ description
+ "Moscow+03 - Novokuznetsk";
+ }
+ enum "Asia/Krasnoyarsk" {
+ value 314;
+ description
+ "Moscow+04 - Yenisei River";
+ }
+ enum "Asia/Irkutsk" {
+ value 315;
+ description
+ "Moscow+05 - Lake Baikal";
+ }
+ enum "Asia/Yakutsk" {
+ value 316;
+ description
+ "Moscow+06 - Lena River";
+ }
+ enum "Asia/Vladivostok" {
+ value 317;
+ description
+ "Moscow+07 - Amur River";
+ }
+ enum "Asia/Sakhalin" {
+ value 318;
+ description
+ "Moscow+07 - Sakhalin Island";
+ }
+ enum "Asia/Magadan" {
+ value 319;
+ description
+ "Moscow+08 - Magadan";
+ }
+ enum "Asia/Kamchatka" {
+ value 320;
+ description
+ "Moscow+08 - Kamchatka";
+ }
+ enum "Asia/Anadyr" {
+ value 321;
+ description
+ "Moscow+08 - Bering Sea";
+ }
+ enum "Africa/Kigali" {
+ value 322;
+ }
+ enum "Asia/Riyadh" {
+ value 323;
+ }
+ enum "Pacific/Guadalcanal" {
+ value 324;
+ }
+ enum "Indian/Mahe" {
+ value 325;
+ }
+ enum "Africa/Khartoum" {
+ value 326;
+ }
+ enum "Europe/Stockholm" {
+ value 327;
+ }
+ enum "Asia/Singapore" {
+ value 328;
+ }
+ enum "Atlantic/St_Helena" {
+ value 329;
+ }
+ enum "Europe/Ljubljana" {
+ value 330;
+ }
+ enum "Arctic/Longyearbyen" {
+ value 331;
+ }
+ enum "Europe/Bratislava" {
+ value 332;
+ }
+ enum "Africa/Freetown" {
+ value 333;
+ }
+ enum "Europe/San_Marino" {
+ value 334;
+ }
+ enum "Africa/Dakar" {
+ value 335;
+ }
+ enum "Africa/Mogadishu" {
+ value 336;
+ }
+ enum "America/Paramaribo" {
+ value 337;
+ }
+ enum "Africa/Juba" {
+ value 338;
+ }
+ enum "Africa/Sao_Tome" {
+ value 339;
+ }
+ enum "America/El_Salvador" {
+ value 340;
+ }
+ enum "America/Lower_Princes" {
+ value 341;
+ }
+ enum "Asia/Damascus" {
+ value 342;
+ }
+ enum "Africa/Mbabane" {
+ value 343;
+ }
+ enum "America/Grand_Turk" {
+ value 344;
+ }
+ enum "Africa/Ndjamena" {
+ value 345;
+ }
+ enum "Indian/Kerguelen" {
+ value 346;
+ }
+ enum "Africa/Lome" {
+ value 347;
+ }
+ enum "Asia/Bangkok" {
+ value 348;
+ }
+ enum "Asia/Dushanbe" {
+ value 349;
+ }
+ enum "Pacific/Fakaofo" {
+ value 350;
+ }
+ enum "Asia/Dili" {
+ value 351;
+ }
+ enum "Asia/Ashgabat" {
+ value 352;
+ }
+ enum "Africa/Tunis" {
+ value 353;
+ }
+ enum "Pacific/Tongatapu" {
+ value 354;
+ }
+ enum "Europe/Istanbul" {
+ value 355;
+ }
+ enum "America/Port_of_Spain" {
+ value 356;
+ }
+ enum "Pacific/Funafuti" {
+ value 357;
+ }
+ enum "Asia/Taipei" {
+ value 358;
+ }
+ enum "Africa/Dar_es_Salaam" {
+ value 359;
+ }
+ enum "Europe/Kiev" {
+ value 360;
+ description
+ "most locations";
+ }
+ enum "Europe/Uzhgorod" {
+ value 361;
+ description
+ "Ruthenia";
+ }
+ enum "Europe/Zaporozhye" {
+ value 362;
+ description
+ "Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk";
+ }
+ enum "Europe/Simferopol" {
+ value 363;
+ description
+ "central Crimea";
+ }
+ enum "Africa/Kampala" {
+ value 364;
+ }
+ enum "Pacific/Johnston" {
+ value 365;
+ description
+ "Johnston Atoll";
+ }
+ enum "Pacific/Midway" {
+ value 366;
+ description
+ "Midway Islands";
+ }
+ enum "Pacific/Wake" {
+ value 367;
+ description
+ "Wake Island";
+ }
+ enum "America/New_York" {
+ value 368;
+ description
+ "Eastern Time";
+ }
+ enum "America/Detroit" {
+ value 369;
+ description
+ "Eastern Time - Michigan - most locations";
+ }
+ enum "America/Kentucky/Louisville" {
+ value 370;
+ description
+ "Eastern Time - Kentucky - Louisville area";
+ }
+ enum "America/Kentucky/Monticello" {
+ value 371;
+ description
+ "Eastern Time - Kentucky - Wayne County";
+ }
+ enum "America/Indiana/Indianapolis" {
+ value 372;
+ description
+ "Eastern Time - Indiana - most locations";
+ }
+ enum "America/Indiana/Vincennes" {
+ value 373;
+ description
+ "Eastern Time - Indiana - Daviess, Dubois, Knox & Martin
+ Counties";
+ }
+ enum "America/Indiana/Winamac" {
+ value 374;
+ description
+ "Eastern Time - Indiana - Pulaski County";
+ }
+ enum "America/Indiana/Marengo" {
+ value 375;
+ description
+ "Eastern Time - Indiana - Crawford County";
+ }
+ enum "America/Indiana/Petersburg" {
+ value 376;
+ description
+ "Eastern Time - Indiana - Pike County";
+ }
+ enum "America/Indiana/Vevay" {
+ value 377;
+ description
+ "Eastern Time - Indiana - Switzerland County";
+ }
+ enum "America/Chicago" {
+ value 378;
+ description
+ "Central Time";
+ }
+ enum "America/Indiana/Tell_City" {
+ value 379;
+ description
+ "Central Time - Indiana - Perry County";
+ }
+ enum "America/Indiana/Knox" {
+ value 380;
+ description
+ "Central Time - Indiana - Starke County";
+ }
+ enum "America/Menominee" {
+ value 381;
+ description
+ "Central Time - Michigan - Dickinson, Gogebic, Iron &
+ Menominee Counties";
+ }
+ enum "America/North_Dakota/Center" {
+ value 382;
+ description
+ "Central Time - North Dakota - Oliver County";
+ }
+ enum "America/North_Dakota/New_Salem" {
+ value 383;
+ description
+ "Central Time - North Dakota - Morton County (except Mandan
+ area)";
+ }
+ enum "America/North_Dakota/Beulah" {
+ value 384;
+ description
+ "Central Time - North Dakota - Mercer County";
+ }
+ enum "America/Denver" {
+ value 385;
+ description
+ "Mountain Time";
+ }
+ enum "America/Boise" {
+ value 386;
+ description
+ "Mountain Time - south Idaho & east Oregon";
+ }
+ enum "America/Shiprock" {
+ value 387;
+ description
+ "Mountain Time - Navajo";
+ }
+ enum "America/Phoenix" {
+ value 388;
+ description
+ "Mountain Standard Time - Arizona";
+ }
+ enum "America/Los_Angeles" {
+ value 389;
+ description
+ "Pacific Time";
+ }
+ enum "America/Anchorage" {
+ value 390;
+ description
+ "Alaska Time";
+ }
+ enum "America/Juneau" {
+ value 391;
+ description
+ "Alaska Time - Alaska panhandle";
+ }
+ enum "America/Sitka" {
+ value 392;
+ description
+ "Alaska Time - southeast Alaska panhandle";
+ }
+ enum "America/Yakutat" {
+ value 393;
+ description
+ "Alaska Time - Alaska panhandle neck";
+ }
+ enum "America/Nome" {
+ value 394;
+ description
+ "Alaska Time - west Alaska";
+ }
+ enum "America/Adak" {
+ value 395;
+ description
+ "Aleutian Islands";
+ }
+ enum "America/Metlakatla" {
+ value 396;
+ description
+ "Metlakatla Time - Annette Island";
+ }
+ enum "Pacific/Honolulu" {
+ value 397;
+ description
+ "Hawaii";
+ }
+ enum "America/Montevideo" {
+ value 398;
+ }
+ enum "Asia/Samarkand" {
+ value 399;
+ description
+ "west Uzbekistan";
+ }
+ enum "Asia/Tashkent" {
+ value 400;
+ description
+ "east Uzbekistan";
+ }
+ enum "Europe/Vatican" {
+ value 401;
+ }
+ enum "America/St_Vincent" {
+ value 402;
+ }
+ enum "America/Caracas" {
+ value 403;
+ }
+ enum "America/Tortola" {
+ value 404;
+ }
+ enum "America/St_Thomas" {
+ value 405;
+ }
+ enum "Asia/Ho_Chi_Minh" {
+ value 406;
+ }
+ enum "Pacific/Efate" {
+ value 407;
+ }
+ enum "Pacific/Wallis" {
+ value 408;
+ }
+ enum "Pacific/Apia" {
+ value 409;
+ }
+ enum "Asia/Aden" {
+ value 410;
+ }
+ enum "Indian/Mayotte" {
+ value 411;
+ }
+ enum "Africa/Johannesburg" {
+ value 412;
+ }
+ enum "Africa/Lusaka" {
+ value 413;
+ }
+ enum "Africa/Harare" {
+ value 414;
+ }
+ }
+ }
+}
--- /dev/null
+module network-topology {
+ yang-version 1;
+ namespace "urn:TBD:params:xml:ns:yang:network-topology";
+ // replace with IANA namespace when assigned
+ prefix "nt";
+
+ import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
+
+ organization "TBD";
+
+ contact "WILL-BE-DEFINED-LATER";
+
+ description
+ "This module defines a model for the topology of a network.
+ Key design decisions are as follows:
+ A topology consists of a set of nodes and links.
+ Links are point-to-point and unidirectional.
+ Bidirectional connections need to be represented through
+ two separate links.
+ Multipoint connections, broadcast domains etc can be represented
+ through a hierarchy of nodes, then connecting nodes at
+ upper layers of the hierarchy.";
+
+ revision 2013-10-21 {
+ description
+ "Initial revision.";
+ }
+
+ typedef topology-id {
+ type inet:uri;
+ description
+ "An identifier for a topology.";
+ }
+
+ typedef node-id {
+ type inet:uri;
+ description
+ "An identifier for a node in a topology.
+ The identifier may be opaque.
+ The identifier SHOULD be chosen such that the same node in a
+ real network topology will always be identified through the
+ same identifier, even if the model is instantiated in separate
+ datastores. An implementation MAY choose to capture semantics
+ in the identifier, for example to indicate the type of node
+ and/or the type of topology that the node is a part of.";
+ }
+
+
+ typedef link-id {
+ type inet:uri;
+ description
+ "An identifier for a link in a topology.
+ The identifier may be opaque.
+ The identifier SHOULD be chosen such that the same link in a
+ real network topology will always be identified through the
+ same identifier, even if the model is instantiated in separate
+ datastores. An implementation MAY choose to capture semantics
+ in the identifier, for example to indicate the type of link
+ and/or the type of topology that the link is a part of.";
+ }
+
+ typedef tp-id {
+ type inet:uri;
+ description
+ "An identifier for termination points on a node.
+ The identifier may be opaque.
+ The identifier SHOULD be chosen such that the same TP in a
+ real network topology will always be identified through the
+ same identifier, even if the model is instantiated in separate
+ datastores. An implementation MAY choose to capture semantics
+ in the identifier, for example to indicate the type of TP
+ and/or the type of node and topology that the TP is a part of.";
+ }
+
+ typedef tp-ref {
+ type leafref {
+ path "/network-topology/topology/node/termination-point/tp-id";
+ }
+ description
+ "A type for an absolute reference to a termination point.
+ (This type should not be used for relative references.
+ In such a case, a relative path should be used instead.)";
+ }
+ typedef topology-ref {
+ type leafref {
+ path "/network-topology/topology/topology-id";
+ }
+ description
+ "A type for an absolute reference a topology instance.";
+ }
+
+ typedef node-ref {
+ type leafref {
+ path "/network-topology/topology/node/node-id";
+ }
+ description
+
+ "A type for an absolute reference to a node instance.
+ (This type should not be used for relative references.
+ In such a case, a relative path should be used instead.)";
+ }
+
+ typedef link-ref {
+ type leafref {
+ path "/network-topology/topology/link/link-id";
+ }
+ description
+ "A type for an absolute reference a link instance.
+ (This type should not be used for relative references.
+ In such a case, a relative path should be used instead.)";
+ }
+
+ grouping tp-attributes {
+ description
+ "The data objects needed to define a termination point.
+ (This only includes a single leaf at this point, used
+ to identify the termination point.)
+ Provided in a grouping so that in addition to the datastore,
+ the data can also be included in notifications.";
+ leaf tp-id {
+ type tp-id;
+ }
+ leaf-list tp-ref {
+ type tp-ref;
+ config false;
+ description
+ "The leaf list identifies any termination points that the
+ termination point is dependent on, or maps onto.
+ Those termination points will themselves be contained
+ in a supporting node.
+ This dependency information can be inferred from
+ the dependencies between links. For this reason,
+ this item is not separately configurable. Hence no
+ corresponding constraint needs to be articulated.
+ The corresponding information is simply provided by the
+ implementing system.";
+ }
+ }
+
+ grouping node-attributes {
+ description
+ "The data objects needed to define a node.
+ The objects are provided in a grouping so that in addition to
+ the datastore, the data can also be included in notifications
+ as needed.";
+
+ leaf node-id {
+ type node-id;
+ description
+ "The identifier of a node in the topology.
+ A node is specific to a topology to which it belongs.";
+ }
+ list supporting-node {
+ description
+ "This list defines vertical layering information for nodes.
+ It allows to capture for any given node, which node (or nodes)
+ in the corresponding underlay topology it maps onto.
+ A node can map to zero, one, or more nodes below it;
+ accordingly there can be zero, one, or more elements in the list.
+ If there are specific layering requirements, for example
+ specific to a particular type of topology that only allows
+ for certain layering relationships, the choice
+ below can be augmented with additional cases.
+ A list has been chosen rather than a leaf-list in order
+ to provide room for augmentations, e.g. for
+ statistics or priorization information associated with
+ supporting nodes.";
+ key "node-ref";
+ leaf node-ref {
+ type node-ref;
+ }
+ }
+ }
+
+ grouping link-attributes {
+ // This is a grouping, not defined inline with the link definition itself,
+ // so it can be included in a notification, if needed
+ leaf link-id {
+ type link-id;
+ description
+ "The identifier of a link in the topology.
+ A link is specific to a topology to which it belongs.";
+ }
+ container source {
+ leaf source-node {
+ mandatory true;
+ type node-ref;
+ description
+ "Source node identifier, must be in same topology.";
+ }
+ leaf source-tp {
+ type tp-ref;
+ description
+ "Termination point within source node that terminates the link.";
+
+ }
+ }
+ container destination {
+ leaf dest-node {
+ mandatory true;
+ type node-ref;
+ description
+ "Destination node identifier, must be in same topology.";
+ }
+ leaf dest-tp {
+ type tp-ref;
+ description
+ "Termination point within destination node that terminates the link.";
+ }
+ }
+ list supporting-link {
+ key "link-ref";
+ leaf link-ref {
+ type link-ref;
+ }
+ }
+ }
+
+
+ container network-topology {
+ list topology {
+ description "
+ This is the model of an abstract topology.
+ A topology contains nodes and links.
+ Each topology MUST be identified by
+ unique topology-id for reason that a network could contain many
+ topologies.
+ ";
+ key "topology-id";
+ leaf topology-id {
+ type topology-id;
+ description "
+ It is presumed that a datastore will contain many topologies. To
+ distinguish between topologies it is vital to have UNIQUE
+ topology identifiers.
+ ";
+ }
+ leaf server-provided {
+ type boolean;
+ config false;
+ description "
+ Indicates whether the topology is configurable by clients,
+ or whether it is provided by the server. This leaf is
+
+ populated by the server implementing the model.
+ It is set to false for topologies that are created by a client;
+ it is set to true otherwise. If it is set to true, any
+ attempt to edit the topology MUST be rejected.
+ ";
+ }
+ container topology-types {
+ description
+ "This container is used to identify the type, or types
+ (as a topology can support several types simultaneously),
+ of the topology.
+ Topology types are the subject of several integrity constraints
+ that an implementing server can validate in order to
+ maintain integrity of the datastore.
+ Topology types are indicated through separate data nodes;
+ the set of topology types is expected to increase over time.
+ To add support for a new topology, an augmenting module
+ needs to augment this container with a new empty optional
+ container to indicate the new topology type.
+ The use of a container allows to indicate a subcategorization
+ of topology types.
+ The container SHALL NOT be augmented with any data nodes
+ that serve a purpose other than identifying a particular
+ topology type.
+ ";
+ }
+ list underlay-topology {
+ key "topology-ref";
+ leaf topology-ref {
+ type topology-ref;
+ }
+ // a list, not a leaf-list, to allow for potential augmentation
+ // with properties specific to the underlay topology,
+ // such as statistics, preferences, or cost.
+ description
+ "Identifies the topology, or topologies, that this topology
+ is dependent on.";
+ }
+
+ list node {
+ description "The list of network nodes defined for the topology.";
+ key "node-id";
+ uses node-attributes;
+ must "boolean(../underlay-topology[*]/node[./supporting-nodes/node-ref])";
+ // This constraint is meant to ensure that a referenced node is in fact
+ // a node in an underlay topology.
+ list termination-point {
+ description
+
+ "A termination point can terminate a link.
+ Depending on the type of topology, a termination point could,
+ for example, refer to a port or an interface.";
+ key "tp-id";
+ uses tp-attributes;
+ }
+ }
+
+ list link {
+ description "
+ A Network Link connects a by Local (Source) node and
+ a Remote (Destination) Network Nodes via a set of the
+ nodes' termination points.
+ As it is possible to have several links between the same
+ source and destination nodes, and as a link could potentially
+ be re-homed between termination points, to ensure that we
+ would always know to distinguish between links, every link
+ is identified by a dedicated link identifier.
+ Note that a link models a point-to-point link, not a multipoint
+ link.
+ Layering dependencies on links in underlay topologies are
+ not represented as the layering information of nodes and of
+ termination points is sufficient.
+ ";
+ key "link-id";
+ uses link-attributes;
+ must "boolean(../underlay-topology/link[./supporting-link])";
+ // Constraint: any supporting link must be part of an underlay topology
+ must "boolean(../node[./source/source-node])";
+ // Constraint: A link must have as source a node of the same topology
+ must "boolean(../node[./destination/dest-node])";
+ // Constraint: A link must have as source a destination of the same topology
+ must "boolean(../node/termination-point[./source/source-tp])";
+ // Constraint: The source termination point must be contained in the source node
+ must "boolean(../node/termination-point[./destination/dest-tp])";
+ // Constraint: The destination termination point must be contained
+ // in the destination node
+ }
+ }
+ }
+}
--- /dev/null
+module foobar {
+ namespace "foobar-namespace";
+ prefix "foobar-prefix";
+
+ container test-container-a {
+ if-feature test-feature-1;
+
+ leaf test-leaf-a {
+ type string;
+ }
+ }
+
+ container test-container-b {
+ if-feature foobar-feature;
+
+ leaf test-leaf-b {
+ type string;
+ }
+ }
+
+ container test-container-c {
+ leaf test-leaf-c {
+ type string;
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+module bar {
+ yang-version 1;
+ namespace "urn:opendaylight.bar";
+ prefix "bar";
+
+ organization "opendaylight";
+ contact "http://www.opendaylight.org/";
+ description "This model define custom type definitions";
+
+ revision "2013-07-03" {
+ reference " WILL BE DEFINED LATER";
+ }
+
+ typedef int32-ext1 {
+ type int32 {
+ range "2..20";
+ }
+ }
+
+ typedef int32-ext2 {
+ type int32-ext1 {
+ range "3..9|11..max";
+ }
+ units "mile";
+ default "11";
+ }
+
+ typedef string-ext1 {
+ type string {
+ pattern "[a-k]*";
+ length "5..11";
+ }
+ }
+
+ typedef string-ext2 {
+ type string-ext1 {
+ length "6..10";
+ }
+ }
+
+ typedef string-ext3 {
+ type string-ext2 {
+ pattern "[b-u]*";
+ }
+ }
+
+ typedef string-ext4 {
+ type string-ext3 {
+ pattern "[e-z]*";
+ }
+ }
+
+ typedef invalid-string-pattern {
+ type string {
+ pattern "[[A-1*-%22!^^}";
+ }
+ }
+
+ typedef multiple-pattern-string {
+ type string {
+ pattern "[[A-1*-%22!^^}";
+ pattern "[e-z]*";
+ }
+ }
+
+ typedef my-decimal-type {
+ type decimal64 {
+ fraction-digits 6;
+ }
+ }
+
+ typedef my-union {
+ type union {
+ type int16 {
+ range "1..100";
+ }
+ type int32;
+ }
+ }
+
+ typedef my-union-ext {
+ type my-union;
+ }
+
+ typedef nested-union2 {
+ type union {
+ type my-union-ext;
+ type string;
+ }
+ }
+
+ container interfaces {
+ grouping ifEntry {
+ container augment-holder;
+ }
+ list ifEntry {
+ key "ifIndex";
+
+ leaf ifIndex {
+ type uint32;
+ units minutes;
+ }
+
+ leaf ifMtu {
+ type int32;
+ }
+
+ min-elements 1;
+ max-elements 11;
+ }
+ }
+
+ extension opendaylight {
+ argument "name" {
+ yin-element "true";
+ }
+ }
+
+}
--- /dev/null
+module foo {
+ yang-version 1;
+ namespace "urn:opendaylight.foo";
+ prefix "foo";
+
+ import bar {
+ prefix "br";
+ revision-date 2013-07-03;
+ }
+
+ import baz {
+ prefix "bz";
+ revision-date 2013-02-27;
+ }
+
+ include subfoo {
+ revision-date "2013-02-27";
+ }
+
+ organization "opendaylight";
+ contact "http://www.opendaylight.org/";
+
+ revision "2013-02-27" {
+ reference " WILL BE DEFINED LATER";
+ }
+
+ typedef identifier {
+ type int32;
+ }
+
+ leaf int32-leaf {
+ type br:int32-ext2 {
+ range "12..max";
+ }
+ }
+
+ leaf string-leaf {
+ type br:string-ext4;
+ }
+
+ leaf invalid-pattern-string-leaf {
+ type br:invalid-string-pattern;
+ }
+
+ leaf invalid-direct-string-pattern-def-leaf {
+ type string {
+ pattern "[[A-1*-%22!^^}";
+ }
+ }
+
+ leaf multiple-pattern-string-leaf {
+ type br:multiple-pattern-string;
+ }
+
+ leaf multiple-pattern-direct-string-def-leaf {
+ type string {
+ pattern "[e-z]*";
+ pattern "[[A-1*-%22!^^}";
+ pattern "[a-d]*";
+ }
+ }
+
+ leaf length-leaf {
+ type br:string-ext2 {
+ length "7..max";
+ }
+ }
+
+ leaf decimal-leaf {
+ type br:my-decimal-type {
+ fraction-digits 6;
+ }
+ }
+
+ leaf decimal-leaf2 {
+ type br:my-decimal-type;
+ }
+
+ container ext {
+ bz:c-define "MY_INTERFACES";
+ }
+
+ leaf union-leaf {
+ type br:my-union-ext;
+ }
+
+ deviation /br:interfaces/br:ifEntry {
+ deviate add {
+ config "true";
+ }
+ reference "system/user ref";
+ }
+
+ leaf custom-union-leaf {
+ type bz:union1;
+ }
+
+ container transfer {
+ choice how {
+ default interval;
+ container input {
+ }
+ list output {
+ leaf id {
+ type string;
+ }
+ }
+ case interval {
+ leaf interval {
+ type uint16;
+ default 30;
+ units minutes;
+ }
+ }
+ case daily {
+ leaf daily {
+ type empty;
+ }
+ leaf time-of-day {
+ type string;
+ units 24-hour-clock;
+ default 1am;
+ }
+ }
+ case manual {
+ leaf manual {
+ type empty;
+ }
+ }
+ }
+ }
+
+ anyxml datas {
+ description
+ "Copy of the source typesstore subset that matched
+ the filter criteria (if any). An empty types container
+ indicates that the request did not produce any results.";
+ status obsolete;
+ }
+
+ augment "/br:interfaces/br:ifEntry/bz:augment-holder" {
+ when "if:ifType='ds0'";
+ leaf ds0ChannelNumber {
+ type string;
+ }
+ leaf interface-id {
+ type leafref {
+ path "/if:interfaces/if:interface/if:name";
+ }
+ }
+ leaf my-type {
+ type br:int32-ext2;
+ }
+ container schemas {
+ }
+ choice odl {
+ leaf id {
+ type int8;
+ }
+ case node1 {
+ description "node1";
+ }
+ case node2 {
+ description "node2";
+ }
+ container node3 {
+ description "node3";
+ }
+ }
+ }
+
+ container mycont {
+ container innercont {
+ typedef mytype {
+ type string;
+ }
+ leaf myleaf {
+ type mytype;
+ }
+ }
+ }
+
+ uses bz:target {
+ augment "how/interval" {
+ description "inner augment";
+ leaf name {
+ type string;
+ }
+ }
+ }
+
+ container peer {
+ container destination {
+ uses bz:target {
+ refine address {
+ default "1.2.3.4";
+ description "IP address of target node";
+ reference "address reference added by refine";
+ config false;
+ mandatory false;
+ must "ifType != 'ethernet' or " +
+ "(ifType = 'ethernet' and ifMTU = 1500)" {
+ error-message "An ethernet MTU must be 1500";
+ }
+ foo:mountpoint "mnt-extension";
+ }
+ refine port {
+ description "description of port defined by refine";
+ reference "port reference added by refine";
+ config false;
+ presence "presence is required";
+ }
+ refine "addresses" {
+ description "description of addresses defined by refine";
+ reference "addresses reference added by refine";
+ config false;
+ min-elements 2;
+ max-elements unbounded;
+ }
+ refine addresses/id {
+ description "id of address";
+ }
+ }
+ }
+ }
+
+ extension mountpoint {
+ description "enter point";
+ argument "name" {
+ yin-element "true";
+ }
+ }
+
+}
--- /dev/null
+submodule subfoo {
+ yang-version 1;
+
+ belongs-to foo {
+ prefix f;
+ }
+
+ import bar {
+ prefix "br";
+ revision-date 2013-07-03;
+ }
+
+ import baz {
+ prefix "bz";
+ revision-date 2013-02-27;
+ }
+
+ revision "2013-02-27" {
+ }
+
+ leaf id {
+ type br:int32-ext2 {
+ range "12..max";
+ }
+ }
+
+ leaf foo-id {
+ type f:identifier;
+ }
+
+ container sub-ext {
+ bz:c-define "MY_INTERFACES";
+ }
+
+ container sub-transfer {
+ choice how {
+ default input;
+ container input {
+ }
+ list output {
+ leaf id {
+ type string;
+ }
+ }
+ case manual {
+ leaf manual {
+ type empty;
+ }
+ }
+ }
+ }
+
+ anyxml sub-datas {
+ status obsolete;
+ }
+
+ augment "/br:interfaces/br:ifEntry/bz:augment-holder" {
+ when "if:ifType='ds0'";
+ leaf subleaf {
+ type string;
+ }
+ }
+
+ extension sub-mountpoint {
+ argument "name" {
+ yin-element "true";
+ }
+ }
+
+}
--- /dev/null
+module imported {
+
+ yang-version 1;
+ namespace "urn:simple.demo.test1";
+ prefix "imp";
+
+ //organization "opendaylight";
+ //contact "WILL-BE-DEFINED-LATER";
+
+}
--- /dev/null
+module imported {
+
+ yang-version 1;
+ namespace "urn:simple.demo.test1";
+ prefix "imp";
+
+ revision 2012-12-12 {}
+
+ //organization "opendaylight";
+ //contact "WILL-BE-DEFINED-LATER";
+
+}
--- /dev/null
+module module-without-revision {
+
+ yang-version 1;
+ namespace "urn:simple.demo.test1";
+ prefix "mwr";
+
+ import ietf-inet-types {
+ prefix "inet";
+ revision-date 2010-09-24;
+ }
+
+ organization "opendaylight";
+ contact "WILL-BE-DEFINED-LATER";
+
+ typedef dscp-ext {
+ type inet:dscp {
+ range "min..max";
+ }
+ }
+
+ leaf id {
+ type inet:port-number {
+ range "0..65535";
+ }
+ }
+
+}
--- /dev/null
+module top {
+
+ yang-version 1;
+ namespace "urn:simple.demo.test1";
+ prefix "top";
+
+ import imported {
+ prefix "imp";
+ }
+
+ revision 2012-10-10 {}
+
+ organization "opendaylight";
+ contact "WILL-BE-DEFINED-LATER";
+
+}
--- /dev/null
+module m2 {
+
+ yang-version 1;
+ namespace "urn:test.m2";
+ prefix "m2";
+
+ import m4 {
+ prefix "m4";
+ }
+ import m5 {
+ prefix "m5";
+ }
+
+ revision 2013-09-30 {
+ }
+
+}
--- /dev/null
+module bar {
+ namespace bar;
+ prefix bar;
+
+ revision 1999-01-01;
+
+ grouping grp {
+ container my-container-1 {
+ }
+ }
+}
--- /dev/null
+module bar {
+ namespace bar;
+ prefix bar;
+
+ revision 2017-02-06;
+
+ grouping grp {
+ container my-container-2 {
+ }
+ }
+}
--- /dev/null
+module foo {
+ namespace foo;
+ prefix foo;
+
+ import bar { prefix bar-1; revision-date 1999-01-01; }
+ import bar { prefix bar-2; revision-date 2017-02-06; }
+
+ container root {
+ uses bar-1:grp;
+ uses bar-2:grp;
+ }
+}
--- /dev/null
+module bar {
+ namespace bar;
+ prefix bar;
+
+ revision 1970-01-01;
+
+ container root {
+ }
+}
--- /dev/null
+module bar {
+ namespace bar;
+ prefix bar;
+
+ revision 1999-01-01;
+
+ container root {
+ }
+
+ grouping grp {
+ container my-container-1 {
+ }
+ }
+}
--- /dev/null
+module bar {
+ namespace bar;
+ prefix bar;
+
+ revision 2017-02-06;
+
+ container root {
+ }
+
+ grouping grp {
+ container my-container-2 {
+ }
+ }
+}
--- /dev/null
+module foo {
+ namespace foo;
+ prefix foo;
+ yang-version 1.1;
+
+ import bar { prefix bar-1; revision-date 1999-01-01; }
+ import bar { prefix bar-2; revision-date 2017-02-06; }
+ import bar { prefix bar-3; revision-date 1970-01-01; }
+
+ grouping grp {
+ uses bar-1:grp;
+ uses bar-2:grp;
+ }
+
+ container root {
+ uses grp;
+ }
+
+ augment "/bar-3:root" {
+ uses foo:grp;
+ }
+}
--- /dev/null
+module baz {
+ yang-version 1;
+ namespace "urn:opendaylight.baz";
+ prefix "baz";
+
+ import bar {
+ prefix "br";
+ revision-date 2013-07-03;
+ }
+
+ organization "opendaylight";
+ contact "http://www.opendaylight.org/";
+
+ revision "2013-02-27" {
+ reference " WILL BE DEFINED LATER";
+ }
+
+ typedef union1 {
+ type union2;
+ }
+
+ typedef union2 {
+ type union {
+ type int32;
+ type br:nested-union2;
+ }
+ }
+
+ augment "/br:interfaces/br:ifEntry" {
+ when "if:ifType='ds0'";
+ container augment-holder {
+ description "Description for augment holder";
+ }
+ }
+
+ augment "/br:interfaces/br:ifEntry" {
+ when "if:ifType='ds2'";
+ container augment-holder2 {
+ description "Description for augment holder";
+ }
+ }
+
+ container network {
+ baz:c-define point {
+ }
+
+ description "network-description";
+ reference "network-reference";
+ status obsolete;
+ config true;
+ presence "some presence text";
+ }
+
+ feature local-storage {
+ description
+ "This feature means the device supports local
+ storage (memory, flash or disk) that can be used to
+ store syslog messages.";
+ }
+
+ extension c-define {
+ description "Takes as argument a name string. Makes the code generator use the given name in the #define.";
+ argument "name" {
+ yin-element "true";
+ }
+ }
+
+ notification event {
+ leaf event-class {
+ type string;
+ }
+ anyxml reporting-entity;
+ leaf severity {
+ type string;
+ }
+ }
+
+ rpc get-config {
+ description "Retrieve all or part of a specified configuration.";
+ reference "RFC 6241, Section 7.1";
+
+ input {
+ container source {
+ description
+ "Particular configuration to retrieve.";
+
+ choice config-source {
+ mandatory true;
+ description
+ "The configuration to retrieve.";
+ case a {
+ leaf candidate {
+ if-feature candidate;
+ type empty;
+ description
+ "The candidate configuration is the config source.";
+ }
+ }
+ case b {
+ leaf running {
+ type empty;
+ description
+ "The running configuration is the config source.";
+ }
+ }
+ case c {
+ leaf startup {
+ if-feature startup;
+ type empty;
+ description
+ "The startup configuration is the config source.
+ This is optional-to-implement on the server because
+ not all servers will support filtering for this
+ datastore.";
+ }
+ }
+ }
+ }
+
+ anyxml filter {
+ description "Subtree or XPath filter to use.";
+ baz:c-define element-attributes;
+ }
+ }
+
+ output {
+ anyxml data {
+ description
+ "Copy of the source datastore subset that matched
+ the filter criteria (if any). An empty data container
+ indicates that the request did not produce any results.";
+ }
+ }
+ }
+
+ grouping target {
+ anyxml data {
+ config true;
+ description "Copy of the source datastore subset.";
+ mandatory false;
+ must "test-condition-text";
+ reference "test-no-reference";
+ status "obsolete";
+ when "test-when-text";
+ }
+ choice how {
+ description "test choice description";
+ default interval;
+ case interval {
+ leaf interval {
+ type uint16;
+ default 30;
+ units minutes;
+ }
+ }
+ case daily {
+ leaf daily {
+ type empty;
+ }
+ leaf time-of-day {
+ type string;
+ units 24-hour-clock;
+ default 1am;
+ }
+ }
+ }
+ leaf address {
+ type string;
+ description "Target IP address";
+ mandatory true;
+ }
+ container port {
+ description "Target port container";
+ }
+ list addresses {
+ key "id";
+ leaf id {
+ type int8;
+ }
+ }
+ grouping target-inner {
+ description "target-inner default description";
+ leaf inner-grouping-id {
+ type int8;
+ }
+ }
+ typedef group-type {
+ type br:my-decimal-type;
+ }
+
+ br:opendaylight awesome;
+ }
+
+}
--- /dev/null
+ module ietf-inet-types {
+
+ namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types";
+ prefix "inet";
+
+ organization
+ "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
+
+ contact
+ "WG Web: <http://tools.ietf.org/wg/netmod/>
+ WG List: <mailto:netmod@ietf.org>
+
+ WG Chair: David Partain
+ <mailto:david.partain@ericsson.com>
+
+ WG Chair: David Kessens
+ <mailto:david.kessens@nsn.com>
+
+ Editor: Juergen Schoenwaelder
+ <mailto:j.schoenwaelder@jacobs-university.de>";
+
+ description
+ "This module contains a collection of generally useful derived
+ YANG data types for Internet addresses and related things.
+
+ Copyright (c) 2010 IETF Trust and the persons identified as
+ authors of the code. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, is permitted pursuant to, and subject to the license
+ terms contained in, the Simplified BSD License set forth in Section
+ 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
+ (http://trustee.ietf.org/license-info).
+
+ This version of this YANG module is part of RFC 6021; see
+ the RFC itself for full legal notices.";
+
+ revision 2010-09-24 {
+ description
+ "Initial revision.";
+ reference
+ "RFC 6021: Common YANG Data Types";
+ }
+
+ /*** collection of protocol field related types ***/
+
+ typedef ip-version {
+ type enumeration {
+ enum unknown {
+ value "0";
+ description
+ "An unknown or unspecified version of the Internet protocol.";
+ }
+ enum ipv4 {
+ value "1";
+ description
+ "The IPv4 protocol as defined in RFC 791.";
+ }
+ enum ipv6 {
+ value "2";
+ description
+ "The IPv6 protocol as defined in RFC 2460.";
+ }
+ }
+ description
+ "This value represents the version of the IP protocol.
+
+ In the value set and its semantics, this type is equivalent
+ to the InetVersion textual convention of the SMIv2.";
+ reference
+ "RFC 791: Internet Protocol
+ RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
+ RFC 4001: Textual Conventions for Internet Network Addresses";
+ }
+
+ typedef dscp {
+ type uint8 {
+ range "0..63";
+ }
+ description
+ "The dscp type represents a Differentiated Services Code-Point
+ that may be used for marking packets in a traffic stream.
+
+ In the value set and its semantics, this type is equivalent
+ to the Dscp textual convention of the SMIv2.";
+ reference
+ "RFC 3289: Management Information Base for the Differentiated
+ Services Architecture
+ RFC 2474: Definition of the Differentiated Services Field
+ (DS Field) in the IPv4 and IPv6 Headers
+ RFC 2780: IANA Allocation Guidelines For Values In
+ the Internet Protocol and Related Headers";
+ }
+
+ typedef ipv6-flow-label {
+ type uint32 {
+ range "0..1048575";
+ }
+ description
+ "The flow-label type represents flow identifier or Flow Label
+ in an IPv6 packet header that may be used to discriminate
+ traffic flows.
+
+ In the value set and its semantics, this type is equivalent
+ to the IPv6FlowLabel textual convention of the SMIv2.";
+ reference
+ "RFC 3595: Textual Conventions for IPv6 Flow Label
+ RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
+ }
+
+ typedef port-number {
+ type uint16 {
+ range "0..65535";
+ }
+ description
+ "The port-number type represents a 16-bit port number of an
+ Internet transport layer protocol such as UDP, TCP, DCCP, or
+ SCTP. Port numbers are assigned by IANA. A current list of
+ all assignments is available from <http://www.iana.org/>.
+
+ Note that the port number value zero is reserved by IANA. In
+ situations where the value zero does not make sense, it can
+ be excluded by subtyping the port-number type.
+
+ In the value set and its semantics, this type is equivalent
+ to the InetPortNumber textual convention of the SMIv2.";
+ reference
+ "RFC 768: User Datagram Protocol
+ RFC 793: Transmission Control Protocol
+ RFC 4960: Stream Control Transmission Protocol
+ RFC 4340: Datagram Congestion Control Protocol (DCCP)
+ RFC 4001: Textual Conventions for Internet Network Addresses";
+ }
+
+ /*** collection of autonomous system related types ***/
+
+ typedef as-number {
+ type uint32;
+ description
+ "The as-number type represents autonomous system numbers
+ which identify an Autonomous System (AS). An AS is a set
+ of routers under a single technical administration, using
+ an interior gateway protocol and common metrics to route
+ packets within the AS, and using an exterior gateway
+ protocol to route packets to other ASs'. IANA maintains
+ the AS number space and has delegated large parts to the
+ regional registries.
+
+ Autonomous system numbers were originally limited to 16
+ bits. BGP extensions have enlarged the autonomous system
+ number space to 32 bits. This type therefore uses an uint32
+ base type without a range restriction in order to support
+ a larger autonomous system number space.
+
+ In the value set and its semantics, this type is equivalent
+ to the InetAutonomousSystemNumber textual convention of
+ the SMIv2.";
+ reference
+ "RFC 1930: Guidelines for creation, selection, and registration
+ of an Autonomous System (AS)
+ RFC 4271: A Border Gateway Protocol 4 (BGP-4)
+ RFC 4893: BGP Support for Four-octet AS Number Space
+ RFC 4001: Textual Conventions for Internet Network Addresses";
+ }
+
+ /*** collection of IP address and hostname related types ***/
+
+ typedef ip-address {
+ type union {
+ type inet:ipv4-address;
+ type inet:ipv6-address;
+ }
+ description
+ "The ip-address type represents an IP address and is IP
+ version neutral. The format of the textual representations
+ implies the IP version.";
+ }
+
+ typedef ipv4-address {
+ type string {
+ pattern
+ '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
+ + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
+ + '(%[\p{N}\p{L}]+)?';
+ }
+ description
+ "The ipv4-address type represents an IPv4 address in
+ dotted-quad notation. The IPv4 address may include a zone
+ index, separated by a % sign.
+
+ The zone index is used to disambiguate identical address
+ values. For link-local addresses, the zone index will
+ typically be the interface index number or the name of an
+ interface. If the zone index is not present, the default
+ zone of the device will be used.
+
+ The canonical format for the zone index is the numerical
+ format";
+ }
+
+ typedef ipv6-address {
+ type string {
+ pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
+ + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
+ + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
+ + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
+ + '(%[\p{N}\p{L}]+)?';
+ pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
+ + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
+ + '(%.+)?';
+ }
+ description
+ "The ipv6-address type represents an IPv6 address in full,
+ mixed, shortened, and shortened-mixed notation. The IPv6
+ address may include a zone index, separated by a % sign.
+
+ The zone index is used to disambiguate identical address
+ values. For link-local addresses, the zone index will
+ typically be the interface index number or the name of an
+ interface. If the zone index is not present, the default
+ zone of the device will be used.
+
+ The canonical format of IPv6 addresses uses the compressed
+ format described in RFC 4291, Section 2.2, item 2 with the
+ following additional rules: the :: substitution must be
+ applied to the longest sequence of all-zero 16-bit chunks
+ in an IPv6 address. If there is a tie, the first sequence
+ of all-zero 16-bit chunks is replaced by ::. Single
+ all-zero 16-bit chunks are not compressed. The canonical
+ format uses lowercase characters and leading zeros are
+ not allowed. The canonical format for the zone index is
+ the numerical format as described in RFC 4007, Section
+ 11.2.";
+ reference
+ "RFC 4291: IP Version 6 Addressing Architecture
+ RFC 4007: IPv6 Scoped Address Architecture
+ RFC 5952: A Recommendation for IPv6 Address Text Representation";
+ }
+
+ typedef ip-prefix {
+ type union {
+ type inet:ipv4-prefix;
+ type inet:ipv6-prefix;
+ }
+ description
+ "The ip-prefix type represents an IP prefix and is IP
+ version neutral. The format of the textual representations
+ implies the IP version.";
+ }
+
+ typedef ipv4-prefix {
+ type string {
+ pattern
+ '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
+ + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
+ + '/(([0-9])|([1-2][0-9])|(3[0-2]))';
+ }
+ description
+ "The ipv4-prefix type represents an IPv4 address prefix.
+ The prefix length is given by the number following the
+ slash character and must be less than or equal to 32.
+
+ A prefix length value of n corresponds to an IP address
+ mask that has n contiguous 1-bits from the most
+ significant bit (MSB) and all other bits set to 0.
+
+ The canonical format of an IPv4 prefix has all bits of
+ the IPv4 address set to zero that are not part of the
+ IPv4 prefix.";
+ }
+
+ typedef ipv6-prefix {
+ type string {
+ pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
+ + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
+ + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
+ + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
+ + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))';
+ pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
+ + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
+ + '(/.+)';
+ }
+ description
+ "The ipv6-prefix type represents an IPv6 address prefix.
+ The prefix length is given by the number following the
+ slash character and must be less than or equal 128.
+
+ A prefix length value of n corresponds to an IP address
+ mask that has n contiguous 1-bits from the most
+ significant bit (MSB) and all other bits set to 0.
+
+ The IPv6 address should have all bits that do not belong
+ to the prefix set to zero.
+
+ The canonical format of an IPv6 prefix has all bits of
+ the IPv6 address set to zero that are not part of the
+ IPv6 prefix. Furthermore, IPv6 address is represented
+ in the compressed format described in RFC 4291, Section
+ 2.2, item 2 with the following additional rules: the ::
+ substitution must be applied to the longest sequence of
+ all-zero 16-bit chunks in an IPv6 address. If there is
+ a tie, the first sequence of all-zero 16-bit chunks is
+ replaced by ::. Single all-zero 16-bit chunks are not
+ compressed. The canonical format uses lowercase
+ characters and leading zeros are not allowed.";
+ reference
+ "RFC 4291: IP Version 6 Addressing Architecture";
+ }
+
+ /*** collection of domain name and URI types ***/
+
+ typedef domain-name {
+ type string {
+ pattern '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*'
+ + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)'
+ + '|\.';
+ length "1..253";
+ }
+ description
+ "The domain-name type represents a DNS domain name. The
+ name SHOULD be fully qualified whenever possible.
+
+ Internet domain names are only loosely specified. Section
+ 3.5 of RFC 1034 recommends a syntax (modified in Section
+ 2.1 of RFC 1123). The pattern above is intended to allow
+ for current practice in domain name use, and some possible
+ future expansion. It is designed to hold various types of
+ domain names, including names used for A or AAAA records
+ (host names) and other records, such as SRV records. Note
+ that Internet host names have a stricter syntax (described
+ in RFC 952) than the DNS recommendations in RFCs 1034 and
+ 1123, and that systems that want to store host names in
+ schema nodes using the domain-name type are recommended to
+ adhere to this stricter standard to ensure interoperability.
+
+ The encoding of DNS names in the DNS protocol is limited
+ to 255 characters. Since the encoding consists of labels
+ prefixed by a length bytes and there is a trailing NULL
+ byte, only 253 characters can appear in the textual dotted
+ notation.
+
+ The description clause of schema nodes using the domain-name
+ type MUST describe when and how these names are resolved to
+ IP addresses. Note that the resolution of a domain-name value
+ may require to query multiple DNS records (e.g., A for IPv4
+ and AAAA for IPv6). The order of the resolution process and
+ which DNS record takes precedence can either be defined
+ explicitely or it may depend on the configuration of the
+ resolver.
+
+ Domain-name values use the US-ASCII encoding. Their canonical
+ format uses lowercase US-ASCII characters. Internationalized
+ domain names MUST be encoded in punycode as described in RFC
+ 3492";
+ reference
+ "RFC 952: DoD Internet Host Table Specification
+ RFC 1034: Domain Names - Concepts and Facilities
+ RFC 1123: Requirements for Internet Hosts -- Application
+ and Support
+ RFC 2782: A DNS RR for specifying the location of services
+ (DNS SRV)
+ RFC 3492: Punycode: A Bootstring encoding of Unicode for
+ Internationalized Domain Names in Applications
+ (IDNA)
+ RFC 5891: Internationalizing Domain Names in Applications
+ (IDNA): Protocol";
+ }
+
+ typedef host {
+ type union {
+ type inet:ip-address;
+ type inet:domain-name;
+ }
+ description
+ "The host type represents either an IP address or a DNS
+ domain name.";
+ }
+
+ typedef uri {
+ type string;
+ description
+ "The uri type represents a Uniform Resource Identifier
+ (URI) as defined by STD 66.
+
+ Objects using the uri type MUST be in US-ASCII encoding,
+ and MUST be normalized as described by RFC 3986 Sections
+ 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary
+ percent-encoding is removed, and all case-insensitive
+ characters are set to lowercase except for hexadecimal
+ digits, which are normalized to uppercase as described in
+ Section 6.2.2.1.
+
+ The purpose of this normalization is to help provide
+ unique URIs. Note that this normalization is not
+ sufficient to provide uniqueness. Two URIs that are
+ textually distinct after this normalization may still be
+ equivalent.
+
+ Objects using the uri type may restrict the schemes that
+ they permit. For example, 'data:' and 'urn:' schemes
+ might not be appropriate.
+
+ A zero-length URI is not a valid URI. This can be used to
+ express 'URI absent' where required.
+
+ In the value set and its semantics, this type is equivalent
+ to the Uri SMIv2 textual convention defined in RFC 5017.";
+ reference
+ "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
+ RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
+ Group: Uniform Resource Identifiers (URIs), URLs,
+ and Uniform Resource Names (URNs): Clarifications
+ and Recommendations
+ RFC 5017: MIB Textual Conventions for Uniform Resource
+ Identifiers (URIs)";
+ }
+
+ }