diff options
Diffstat (limited to 'platform-logic')
17 files changed, 5048 insertions, 37 deletions
diff --git a/platform-logic/datachange/pom.xml b/platform-logic/datachange/pom.xml index 9a296b5c..35cde149 100644 --- a/platform-logic/datachange/pom.xml +++ b/platform-logic/datachange/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> diff --git a/platform-logic/generic-resource-api/pom.xml b/platform-logic/generic-resource-api/pom.xml index 759c4c01..af1d091a 100644 --- a/platform-logic/generic-resource-api/pom.xml +++ b/platform-logic/generic-resource-api/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> diff --git a/platform-logic/installer/pom.xml b/platform-logic/installer/pom.xml index 2f3a70d7..32408926 100644 --- a/platform-logic/installer/pom.xml +++ b/platform-logic/installer/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath/> </parent> diff --git a/platform-logic/installer/src/assembly/assemble_zip.xml b/platform-logic/installer/src/assembly/assemble_zip.xml index a8e4546d..9fc5ff8b 100644 --- a/platform-logic/installer/src/assembly/assemble_zip.xml +++ b/platform-logic/installer/src/assembly/assemble_zip.xml @@ -22,35 +22,41 @@ <!-- Defines how we build the .zip file which is our distribution. --> <assembly - xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>bin</id> - <formats> - <format>zip</format> - </formats> - - <includeBaseDirectory>false</includeBaseDirectory> - - <fileSets> - - <fileSet> - <directory>../target/svclogic</directory> - <outputDirectory>svclogic</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> - <fileSet> - <directory>../target/restapi</directory> - <outputDirectory>restapi</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> - - </fileSets> - + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>bin</id> + <formats> + <format>zip</format> + </formats> + + <includeBaseDirectory>false</includeBaseDirectory> + + <fileSets> + + <fileSet> + <directory>../target/svclogic</directory> + <outputDirectory>svclogic</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + <fileSet> + <directory>../target/restapi</directory> + <outputDirectory>restapi</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + <fileSet> + <directory>../target/restconfapi</directory> + <outputDirectory>restconfapi</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + + </fileSets> </assembly> diff --git a/platform-logic/lcm/pom.xml b/platform-logic/lcm/pom.xml index d9343110..e8d62566 100644 --- a/platform-logic/lcm/pom.xml +++ b/platform-logic/lcm/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> diff --git a/platform-logic/pom.xml b/platform-logic/pom.xml index 4fb18398..1c803100 100644 --- a/platform-logic/pom.xml +++ b/platform-logic/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> @@ -26,6 +26,7 @@ <module>vnfapi</module> <module>lcm</module> <module>restapi-templates</module> + <module>restconfapi-yang</module> <module>datachange</module> <module>installer</module> </modules> diff --git a/platform-logic/restapi-templates/pom.xml b/platform-logic/restapi-templates/pom.xml index cd767fdd..48ed5179 100644 --- a/platform-logic/restapi-templates/pom.xml +++ b/platform-logic/restapi-templates/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> diff --git a/platform-logic/restconfapi-yang/pom.xml b/platform-logic/restconfapi-yang/pom.xml new file mode 100644 index 00000000..38874aa9 --- /dev/null +++ b/platform-logic/restconfapi-yang/pom.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>odlparent-lite</artifactId> + <version>1.1.1-SNAPSHOT</version> + <relativePath /> + </parent> + + <groupId>org.onap.sdnc.oam</groupId> + <artifactId>platform-logic-restconfapi-yang</artifactId> + <version>1.4.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>sdnc-oam :: platform-logic :: ${project.artifactId}</name> + <description>Contains Restconf API YANG</description> + + <build> + <plugins> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>copy-version</id> + <goals> + <goal>copy-resources</goal> + </goals><!-- here the phase you need --> + <phase>validate</phase> + <configuration> + <outputDirectory>../target/restconfapi/yang</outputDirectory> + <resources> + <resource> + <directory>src/main/yang</directory> + <includes> + <include>*.yang</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/platform-logic/restconfapi-yang/src/main/yang/ietf-eth-tran-service@2018-03-01.yang b/platform-logic/restconfapi-yang/src/main/yang/ietf-eth-tran-service@2018-03-01.yang new file mode 100644 index 00000000..cb7c8f05 --- /dev/null +++ b/platform-logic/restconfapi-yang/src/main/yang/ietf-eth-tran-service@2018-03-01.yang @@ -0,0 +1,572 @@ +module ietf-eth-tran-service { + + namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-service"; + + prefix "ethtsvc"; + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-te-types { + prefix "te-types"; + } + + import ietf-eth-tran-types { + prefix "etht-types"; + } + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + " + WG List: <mailto:ccamp@ietf.org> + ID-draft editor: + Haomian Zheng (zhenghaomian@huawei.com); + Italo Busi (italo.busi@huawei.com); + Aihua Guo (aihuaguo@huawei.com); + Yunbin Xu (xuyunbin@ritt.cn); + Yang Zhao (zhaoyangyjy@chinamobile.com); + Xufeng Liu (Xufeng_Liu@jabil.com); + Giuseppe Fioccola (giuseppe.fioccola@telecomitalia.it); + "; + + description + "This module defines a YANG data model for describing + the Ethernet transport services."; + + revision 2018-03-01 { + description + "Initial revision"; + reference + "draft-zheng-ccamp-client-signal-yang"; + } + + /* + Groupings + */ + + grouping vlan-classification { + description + "A grouping which represents classification on an 802.1Q VLAN tag."; + + leaf tag-type { + type etht-types:eth-tag-classify; + description + "The tag type used for VLAN classification."; + } + choice individual-bundling-vlan { + description + "VLAN based classification can be individual + or bundling."; + case individual-vlan { + leaf vlan-value { + type etht-types:vlanid; + description + "VLAN ID value."; + } + } + + case vlan-bundling { + leaf vlan-range { + type etht-types:vid-range-type; + description + "List of VLAN ID values."; + } + } + } + } + + grouping vlan-write { + description + "A grouping which represents push/pop operations + of an 802.1Q VLAN tag."; + + leaf tag-type { + type etht-types:eth-tag-type; + description + "The VLAN tag type to push/swap."; + } + leaf vlan-value { + type etht-types:vlanid; + description + "The VLAN ID value to push/swap."; + } + } + + grouping vlan-operations { + description + "A grouping which represents VLAN operations."; + + leaf pop-tags { + type uint8 { + range "1..2"; + } + description + "The number of VLAN tags to pop (or swap if used in + conjunction with push-tags)"; + } + container push-tags { + description + "The VLAN tags to push (or swap if used in + conjunction with pop-tags)"; + + container outer-tag { + presence + "Indicates existence of the outermost VLAN tag to + push/swap"; + + description + "The outermost VLAN tag to push/swap."; + + uses vlan-write; + } + container second-tag { + must + '../outer-tag/tag-type = "s-vlan-tag-type" and ' + + 'tag-type = "c-vlan-tag-type"' + { + + error-message + " + When pushing/swapping two tags, the outermost tag must + be specified and of S-VLAN type and the second + outermost tag must be of C-VLAN tag type. + "; + description + " + For IEEE 802.1Q interoperability, when pushing/swapping + two tags, it is required that the outermost tag exists + and is an S-VLAN, and the second outermost tag is a + C-VLAN. + "; + } + + presence + "Indicates existence of a second outermost VLAN tag to + push/swap"; + + description + "The second outermost VLAN tag to push/swap."; + + uses vlan-write; + } + } + } + + grouping bandwidth-profiles { + description + "A grouping which represent bandwidth profile configuration."; + + choice direction { + description + "Whether the bandwidth profiles are symmetrical or + asymmetrical"; + case symmetrical { + description + "The same bandwidth profile is used to describe the ingress + and the egress bandwidth profile."; + + leaf ingress-egress-bandwidth-profile-name { + type "string"; + description + "Name of the bandwidth profile."; + } + } + case asymmetrical { + description + "Ingress and egress bandwidth profiles can be specified."; + leaf ingress-bandwidth-profile-name { + type "string"; + description + "Name of the bandwidth profile used in + the ingress direction."; + } + leaf egress-bandwidth-profile-name { + type "string"; + description + "Name of the bandwidth profile used in + the egress direction."; + } + } + } + } + + grouping etht-svc-access-parameters { + description + "ETH transport services access parameters"; + + leaf access-node-id { + type te-types:te-node-id; + description + "The identifier of the access node in + the ETH transport topology."; + } + leaf access-ltp-id { + type te-types:te-tp-id; + description + "The TE link termination point identifier, used + together with access-node-id to identify the + access LTP."; + } + leaf service-classification-type { + type identityref { + base etht-types:service-classification-type; + } + description + "Service classification type."; + } + + choice service-classification { + description + "Access classification can be port-based or + VLAN based."; + + case port-classification { + /* no additional information */ + } + + case vlan-classification { + container outer-tag { + presence "The outermost VLAN tag exists"; + description + "Classifies traffic using the outermost VLAN tag."; + + uses vlan-classification; + } + container second-tag { + must + '../outer-tag/tag-type = "classify-s-vlan" and ' + + 'tag-type = "classify-c-vlan"' + { + + error-message + " + When matching two tags, the outermost tag must be + specified and of S-VLAN type and the second + outermost tag must be of C-VLAN tag type. + "; + description + " + For IEEE 802.1Q interoperability, when matching two + tags, it is required that the outermost tag exists + and is an S-VLAN, and the second outermost tag is a + C-VLAN. + "; + } + presence "The second outermost VLAN tag exists"; + + description + "Classifies traffic using the second outermost VLAN tag."; + + uses vlan-classification; + } + } + } + +/* + Open issue: can we constraints it to be used only with mp services? +*/ + leaf split-horizon-group { + type string; + description "Identify a split horizon group"; + } + + uses bandwidth-profiles; + + container vlan-operations { + description + "include parameters for vlan-operation"; + choice direction { + description + "Whether the VLAN operations are symmetrical or + asymmetrical"; + case symmetrical { + container symmetrical-operation { + uses vlan-operations; + description + "Symmetrical operations. + Expressed in the ingress direction, but + the reverse operation is applied to egress traffic"; + } + } + case asymmetrical { + container asymmetrical-operation { + description "Asymmetrical operations"; + container ingress { + uses vlan-operations; + description "Ingress operations"; + } + container egress { + uses vlan-operations; + description "Egress operations"; + } + } + } + } + } + } + + grouping etht-svc-tunnel-parameters { + description + "ETH transport services tunnel parameters"; + + leaf tunnel-name { + type string; + description + "TE service tunnel instance name."; + } + choice svc-multiplexing-tag { + description + "Service multiplexing is optional and flexible."; + + case other { + /* + placeholder to support proprietary multiplexing + (for further discussion) + */ + } + + case none { + /* no additional information is needed */ + } + + case vlan-tag { + /* + No additional information is needed + The C-Tag or S-Tag used for service mulitplexing is defined + by the VLAN classification and operations configured in the + etht-svc-access-parameters grouping + */ + } + + case pw { + /* to be completed (for further discussion) */ + } + } + +/* + Open issue: can we constraints it to be used only with mp services? +*/ + leaf src-split-horizon-group { + type string; + description "Identify a split horizon group at the Tunnel source TTP"; + } + leaf dst-split-horizon-group { + type string; + description "Identify a split horizon group at the Tunnel destination TTP"; + } + } + + grouping te-topology-identifier { + description + "An identifier to uniquely identify the TE topology."; + leaf access-provider-id { + type te-types:te-global-id; + description + "An identifier to uniquely identify a provider."; + } + leaf access-client-id { + type te-types:te-global-id; + description + "An identifier to uniquely identify a client."; + } + leaf access-topology-id { + type te-types:te-topology-id; + description + "Identifies the topology the + service access ports belong to."; + } + } + + grouping etht-svc-pm-threshold_config { + description + "Configuraiton parameters for Ethernet service PM thresholds."; + + leaf sending-rate-high { + type uint64; + description + "High threshold of packet sending rate in kbps."; + } + leaf sending-rate-low { + type uint64; + description + "Low threshold of packet sending rate in kbps."; + } + leaf receiving-rate-high { + type uint64; + description + "High threshold of packet receiving rate in kbps."; + } + leaf receiving-rate-low { + type uint64; + description + "Low threshold of packet receiving rate in kbps."; + } + } + + grouping etht-svc-pm-stats { + description + "Ethernet service PM statistics."; + + leaf sending-rate-too-high { + type uint32; + description + "Counter that indicates the number of times the sending rate is above the high threshold"; + } + leaf sending-rate-too-low { + type uint32; + description + "Counter that indicates the number of times the sending rate is below the low threshold"; + } + leaf receiving-rate-too-high { + type uint32; + description + "Counter that indicates the number of times the receiving rate is above the high threshold"; + } + leaf receiving-rate-too-low { + type uint32; + description + "Counter that indicates the number of times the receiving rate is below the low threshold"; + } + } + + grouping etht-svc-instance_config { + description + "Configuraiton parameters for Ethernet services."; + + leaf etht-svc-name { + type string; + description + "Name of the p2p ETH transport service."; + } + + leaf etht-svc-descr { + type string; + description + "Description of the ETH transport service."; + } + + leaf etht-svc-type { + type etht-types:service-type; + description + "Type of Ethernet service (p2p, mp2mp or rmp)."; + /* Add default as p2p */ + } + + uses te-topology-identifier; + + list etht-svc-access-ports { + key access-port-id; + min-elements "1"; +/* + Open Issue: + Is it possible to limit the max-elements only for p2p services? + max-elements "2"; +*/ + description + "List of the ETH trasport services access port instances."; + + leaf access-port-id { + type uint16; + description + "ID of the service access port instance"; + } + uses etht-svc-access-parameters; + } + list etht-svc-tunnels { + key tunnel-name; + description + "List of the TE Tunnels supporting the ETH + transport service."; + + uses etht-svc-tunnel-parameters; + } + container pm-config { + description + "ETH service performance monitoring"; + + leaf pm-enable { + type boolean; + description + "Boolean value indicating whether PM is enabled."; + } + uses etht-svc-pm-threshold_config; + } + leaf admin-status { + type identityref { + base te-types:tunnel-state-type; + } + default te-types:tunnel-state-up; + description "ETH service administrative state."; + } + } + + grouping etht-svc-instance_state { + description + "State parameters for Ethernet services."; + + leaf operational-state { + type identityref { + base te-types:tunnel-state-type; + } + default te-types:tunnel-state-up; + description "ETH service operational state."; + } + leaf provisioning-state { + type identityref { + base te-types:lsp-state-type; + } + description "ETH service provisioning state."; + } + leaf creation-time { + type yang:date-and-time; + description + "Time of ETH service creation."; + } + leaf last-updated-time { + type yang:date-and-time; + description + "Time of ETH service last update."; + } + uses etht-svc-pm-stats; + } + + /* + Data nodes + */ + + container etht-svc { + description + "ETH transport services."; + + container globals { + description + "ETH profile information."; + list etht-svc-bandwidth-profiles { + key bandwidth-profile-name; + description + "List of bandwidth profile templates used by + Ethernet services."; + + uses etht-types:etht-bandwidth-profiles; + } + } + + list etht-svc-instances { + key etht-svc-name; + description + "The list of p2p ETH transport service instances"; + + uses etht-svc-instance_config; + + container state { + config false; + description + "Ethernet Service states."; + + uses etht-svc-instance_state; + } + } + } +}
\ No newline at end of file diff --git a/platform-logic/restconfapi-yang/src/main/yang/ietf-eth-tran-types@2018-05-24.yang b/platform-logic/restconfapi-yang/src/main/yang/ietf-eth-tran-types@2018-05-24.yang new file mode 100644 index 00000000..3775f36b --- /dev/null +++ b/platform-logic/restconfapi-yang/src/main/yang/ietf-eth-tran-types@2018-05-24.yang @@ -0,0 +1,303 @@ +module ietf-eth-tran-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-types"; + prefix "etht-types"; + + organization + "Internet Engineering Task Force (IETF) CCAMP WG"; + contact + " + WG List: <mailto:ccamp@ietf.org> + ID-draft editor: + Haomian Zheng (zhenghaomian@huawei.com); + Italo Busi (italo.busi@huawei.com); + Aihua Guo (aihuaguo@huawei.com); + Yunbin Xu (xuyunbin@ritt.cn); + Yang Zhao (zhaoyangyjy@chinamobile.com); + Xufeng Liu (Xufeng_Liu@jabil.com); + Giuseppe Fioccola (giuseppe.fioccola@telecomitalia.it); + "; + + description + "This module defines the ETH transport types."; + + revision 2018-05-24 { + description + "Initial revision"; + reference + "draft-zheng-ccamp-client-signal-yang"; + } + + /* + * Identities + */ + + identity eth-vlan-tag-type { + description + "ETH VLAN tag type."; + } + + identity c-vlan-tag-type { + base eth-vlan-tag-type; + description + "802.1Q Customer VLAN"; + } + + identity s-vlan-tag-type { + base eth-vlan-tag-type; + description + "802.1Q Service VLAN (QinQ)"; + } + + identity service-classification-type { + description + "Service classification."; + } + + identity port-classification { + base service-classification-type; + description + "Port classification."; + } + + identity vlan-classification { + base service-classification-type; + description + "VLAN classification."; + } + + identity eth-vlan-tag-classify { + description + "VLAN tag classification."; + } + + identity classify-c-vlan { + base eth-vlan-tag-classify; + description + "Classify 802.1Q Customer VLAN tag. + Only C-tag type is accepted"; + } + + identity classify-s-vlan { + base eth-vlan-tag-classify; + description + "Classify 802.1Q Service VLAN (QinQ) tag. + Only S-tag type is accepted"; + } + + identity classify-s-or-c-vlan { + base eth-vlan-tag-classify; + description + "Classify S-VLAN or C-VLAN tag-classify. + Either tag is accepted"; + } + + identity bandwidth-profile-type { + description + "Bandwidth Profile Types"; + } + + identity mef-10-bwp { + base bandwidth-profile-type; + description + "MEF 10 Bandwidth Profile"; + } + identity rfc-2697-bwp { + base bandwidth-profile-type; + description + "RFC 2697 Bandwidth Profile"; + } + + identity rfc-2698-bwp { + base bandwidth-profile-type; + description + "RFC 2698 Bandwidth Profile"; + } + + identity rfc-4115-bwp { + base bandwidth-profile-type; + description + "RFC 4115 Bandwidth Profile"; + } + + identity service-type { + description + "Type of Ethernet service."; + } + + identity p2p-svc { + base service-type; + description + "Ethernet point-to-point service (EPL, EVPL)."; + } + + identity rmp-svc { + base service-type; + description + "Ethernet rooted-multitpoint service (E-TREE, EP-TREE)."; + } + + identity mp2mp-svc { + base service-type; + description + "Ethernet multipoint-to-multitpoint service (E-LAN, EP-LAN)."; + } + + /* + * Type Definitions + */ + + typedef eth-tag-type { + type identityref { + base eth-vlan-tag-type; + } + description + "Identifies a specific ETH VLAN tag type."; + } + + typedef eth-tag-classify { + type identityref { + base eth-vlan-tag-classify; + } + description + "Identifies a specific VLAN tag classification."; + } + + typedef vlanid { + type uint16 { + range "1..4094"; + } + description + "The 12-bit VLAN-ID used in the VLAN Tag header."; + } + + typedef vid-range-type { + type string { + pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?" + + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)"; + } + description + "A list of VLAN Ids, or non overlapping VLAN ranges, in + ascending order, between 1 and 4094. + This type is used to match an ordered list of VLAN Ids, or + contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the + range 1 to 4094, and included in the list in non overlapping + ascending order. + For example: 1,10-100,50,500-1000"; + } + + typedef bandwidth-profile-type { + type identityref { + base bandwidth-profile-type; + } + description + "Identifies a specific Bandwidth Profile type."; + } + + typedef service-type { + type identityref { + base service-type; + } + description + "Identifies the type of Ethernet service."; + } + + /* + * Grouping Definitions + */ + + grouping etht-bandwidth-profiles { + description + "Bandwidth profile configuration paramters."; + + leaf bandwidth-profile-name { + type string; + description + "Name of the bandwidth profile."; + } + leaf bandwidth-profile-type { + type etht-types:bandwidth-profile-type; + description + "The type of bandwidth profile."; + } + leaf CIR { + type uint64; + description + "Committed Information Rate in Kbps"; + } + leaf CBS { + type uint64; + description + "Committed Burst Size in in KBytes"; + } + leaf EIR { + type uint64; +/* + * Open Issue: need to indicate that EIR is not supported by RFC 2697 + * must + * '../bw-profile-type = "mef-10-bwp" or ' + + * '../bw-profile-type = "rfc-2698-bwp" or ' + + * '../bw-profile-type = "rfc-4115-bwp"' + * + * must + * '../bw-profile-type != "rfc-2697-bwp"' +*/ + description + "Excess Information Rate in Kbps + In case of RFC 2698, PIR = CIR + EIR"; + } + leaf EBS { + type uint64; + description + "Excess Burst Size in KBytes. + In case of RFC 2698, PBS = CBS + EBS"; + } + leaf color-aware { + type boolean; + description + "Indicates weather the color-mode is color-aware or color-blind."; + } + leaf coupling-flag { + type boolean; +/* + * Open issue: need to indicate that Coupling Flag is defined only for MEF 10 + * + * must + * '../bw-profile-type = "mef-10-bwp"' + */ + description + "Coupling Flag."; + } + } + + grouping eth-bandwidth { + leaf eth-bandwidth { + type uint64 { + range "0..10000000000"; + } + units "Kbps"; + description + "Available bandwith value expressed in kilobits per second"; + } + } + + grouping eth-label-restriction { + container eth-label-restriction { + leaf tag-type { + type etht-types:eth-tag-type; + description "VLAN tag type."; + } + leaf priority { + type uint8; + description "priority."; + } + } + } + + grouping eth-label { + leaf vlanid { + type etht-types:vlanid; + description + "VLAN tag id."; + } + } +}
\ No newline at end of file diff --git a/platform-logic/restconfapi-yang/src/main/yang/ietf-inet-types.yang b/platform-logic/restconfapi-yang/src/main/yang/ietf-inet-types.yang new file mode 100644 index 00000000..c4033b80 --- /dev/null +++ b/platform-logic/restconfapi-yang/src/main/yang/ietf-inet-types.yang @@ -0,0 +1,430 @@ +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 Kessens + <mailto:david.kessens@nsn.com> + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + 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) 2013 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 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + 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 ipv6-flow-label type represents the 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 types related to autonomous systems ***/ + + 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 ASes. 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 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + 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 representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + 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 textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + 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-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + 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 to 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, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** 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 + explicitly or 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 A-labels as per RFC 5890."; + 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 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + 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)"; + } + +}
\ No newline at end of file diff --git a/platform-logic/restconfapi-yang/src/main/yang/ietf-routing-types@2017-10-13.yang b/platform-logic/restconfapi-yang/src/main/yang/ietf-routing-types@2017-10-13.yang new file mode 100644 index 00000000..e33c4bc7 --- /dev/null +++ b/platform-logic/restconfapi-yang/src/main/yang/ietf-routing-types@2017-10-13.yang @@ -0,0 +1,733 @@ +module ietf-routing-types { + namespace "urn:ietf:params:xml:ns:yang:ietf-routing-types"; + prefix rt-types; + + import ietf-yang-types { + prefix yang; + } + import ietf-inet-types { + prefix inet; + } + + organization + "IETF RTGWG - Routing Area Working Group"; + contact + "WG Web: <http://tools.ietf.org/wg/rtgwg/> + WG List: <mailto:rtgwg@ietf.org> + Editor: Xufeng Liu + <mailto:Xufeng_Liu@jabail.com> + Yingzhen Qu + <mailto:yingzhen.qu@huawei.com> + Acee Lindem + <mailto:acee@cisco.com> + Christian Hopps + <mailto:chopps@chopps.org> + Lou Berger + <mailto:lberger@labn.com>"; + description + "This module contains a collection of YANG data types + considered generally useful for routing protocols. + Copyright (c) 2017 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."; + reference "RFC XXXX"; + + revision 2017-10-13 { + description "Initial revision."; + reference "RFC TBD: Routing YANG Data Types"; + } + + /*** Identities related to MPLS/GMPLS ***/ + + identity mpls-label-special-purpose-value { + description + "Base identity for deriving identities describing + special-purpose Multiprotocol Label Switching (MPLS) label + values."; + reference + "RFC7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + identity ipv4-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv4 Explicit NULL Label."; + reference "RFC3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity router-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Router Alert Label."; + reference "RFC3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity ipv6-explicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the IPv6 Explicit NULL Label."; + reference "RFC3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity implicit-null-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Implicit NULL Label."; + reference "RFC3032: MPLS Label Stack Encoding. Section 2.1."; + } + + identity entropy-label-indicator { + base mpls-label-special-purpose-value; + description + "This identity represents the Entropy Label Indicator."; + reference + "RFC6790: The Use of Entropy Labels in MPLS Forwarding. + Sections 3 and 10.1."; + } + + identity gal-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Generic Associated Channel + Label (GAL)."; + reference + "RFC5586: MPLS Generic Associated Channel. + Sections 4 and 10."; + } + + identity oam-alert-label { + base mpls-label-special-purpose-value; + description + "This identity represents the OAM Alert Label."; + reference + "RFC3429: Assignment of the 'OAM Alert Label' for + Multiprotocol Label Switching Architecture (MPLS) + Operation and Maintenance (OAM) Functions. + Sections 3 and 6."; + } + + identity extension-label { + base mpls-label-special-purpose-value; + description + "This identity represents the Extension Label."; + reference + "RFC7274: Allocating and Retiring Special-Purpose MPLS + Labels. Sections 3.1 and 5."; + } + + /*** Collection of types related to routing ***/ + + typedef router-id { + type yang:dotted-quad; + description + "A 32-bit number in the dotted quad format assigned to each + router. This number uniquely identifies the router within + an Autonomous System."; + } + + /*** Collection of types related to VPN ***/ + + typedef route-target { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A route target is an 8-octet BGP extended community + initially identifying a set of sites in a BGP + VPN (RFC 4364). However, it has since taken on a more + general role in BGP route filtering. + A route target consists of two or three fields: + a 2-octet type field, an administrator field, + and, optionally, an assigned number field. + According to the data formats for type 0, 1, 2, and 6 + defined in RFC4360, RFC5668, and RFC7432, the encoding + pattern is defined as: + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number. + 6:6-octet-mac-address. + Additionally, a generic pattern is defined for future + route target types: + 2-octet-other-hex-number:6-octet-hex-number + Some valid examples are: 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203 and 6:26:00:08:92:78:00"; + reference + "RFC4360: BGP Extended Communities Attribute. + RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs) + RFC5668: 4-Octet AS Specific BGP Extended Community. + RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + typedef ipv6-route-target { + 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]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 route target is a 20-octet BGP IPv6 address + specific extended community serving the same function + as a standard 8-octet route target only allowing for + an IPv6 address as the global administrator. The format + is <ipv6-address:2-octet-number>. + Some valid examples are: 2001:DB8::1:6544 and + 2001:DB8::5eb1:791:6b37:17958"; + reference + "RFC5701: IPv6 Address Specific BGP Extended Community + Attribute"; + } + + typedef route-target-type { + type enumeration { + enum "import" { + value 0; + description + "The route target applies to route import."; + } + enum "export" { + value 1; + description + "The route target applies to route export."; + } + enum "both" { + value 2; + description + "The route target applies to both route import and + route export."; + } + } + description + "Indicates the role a route target takes + in route filtering."; + reference "RFC4364: BGP/MPLS IP Virtual Private Networks + (VPNs)."; + } + + typedef route-distinguisher { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A route distinguisher is an 8-octet value used to + distinguish routes from different BGP VPNs (RFC 4364). + As per RFC 4360, a route distinguisher will have the same + format as a route target and will consist of two or three + fields including a 2-octet type field, an administrator + field, and, optionally, an assigned number field. + According to the data formats for type 0, 1, 2, and 6 + defined in RFC4360, RFC5668, and RFC7432, the encoding + pattern is defined as: + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number. + 6:6-octet-mac-address. + Additionally, a generic pattern is defined for future + route discriminator types: + 2-octet-other-hex-number:6-octet-hex-number + Some valid examples are: 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203 and 6:26:00:08:92:78:00"; + reference + "RFC4360: BGP Extended Communities Attribute. + RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs) + RFC5668: 4-Octet AS Specific BGP Extended Community. + RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + typedef route-origin { + type string { + pattern + '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|' + + '42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|' + + '42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|' + + '42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|' + + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|' + + '25[0-5])\.){3}([0-9]|[1-9][0-9]|' + + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|' + + '655[0-2][0-9]|' + + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(2:(429496729[0-5]|42949672[0-8][0-9]|' + + '4294967[01][0-9]{2}|' + + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|' + + '4294[0-8][0-9]{5}|' + + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|' + + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|' + + '(6(:[a-fA-F0-9]{2}){6})|' + + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):' + + '[0-9a-fA-F]{1,12})'; + } + description + "A route origin is an 8-octet BGP extended community + identifying the set of sites where the BGP route + originated (RFC 4364). A route target consists of two + or three fields: a 2-octet type field, an administrator + field, and, optionally, an assigned number field. + According to the data formats for type 0, 1, 2, and 6 + defined in RFC4360, RFC5668, and RFC7432, the encoding + pattern is defined as: + 0:2-octet-asn:4-octet-number + 1:4-octet-ipv4addr:2-octet-number + 2:4-octet-asn:2-octet-number. + 6:6-octet-mac-address. + Additionally, a generic pattern is defined for future + route origin types: + 2-octet-other-hex-number:6-octet-hex-number + Some valid examples are: 0:100:100, 1:1.1.1.1:100, + 2:1234567890:203 and 6:26:00:08:92:78:00"; + reference + "RFC4360: BGP Extended Communities Attribute. + RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs) + RFC5668: 4-Octet AS Specific BGP Extended Community. + RFC7432: BGP MPLS-Based Ethernet VPN"; + } + + typedef ipv6-route-origin { + 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]|1[0-9]{2}|[1-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + pattern '((([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))' + + ':' + + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|' + + '6[0-4][0-9]{3}|' + + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)'; + } + description + "An IPv6 route origin is a 20-octet BGP IPv6 address + specific extended community serving the same function + as a standard 8-octet route only allowing for + an IPv6 address as the global administrator. The format + is <ipv6-address:2-octet-number>. + Some valid examples are: 2001:DB8::1:6544 and + 2001:DB8::5eb1:791:6b37:17958"; + reference + "RFC5701: IPv6 Address Specific BGP Extended Community + Attribute"; + } + + /*** Collection of types common to multicast ***/ + + typedef ipv4-multicast-group-address { + type inet:ipv4-address { + pattern '(2((2[4-9])|(3[0-9]))\.).*'; + } + description + "This type represents an IPv4 multicast group address, + which is in the range from 224.0.0.0 to 239.255.255.255."; + reference "RFC1112: Host Extensions for IP Multicasting."; + } + + typedef ipv6-multicast-group-address { + type inet:ipv6-address { + pattern + '(([fF]{2}[0-9a-fA-F]{2}):).*'; + } + description + "This type represents an IPv6 multicast group address, + which is in the range of FF00::/8."; + reference + "RFC4291: IP Version 6 Addressing Architecture. Sec 2.7. + RFC7346: IPv6 Multicast Address Scopes."; + } + + typedef ip-multicast-group-address { + type union { + type ipv4-multicast-group-address; + type ipv6-multicast-group-address; + } + description + "This type represents a version-neutral IP multicast group + address. The format of the textual representation implies + the IP version."; + } + + typedef ipv4-multicast-source-address { + type union { + type enumeration { + enum "*" { + description + "Any source address."; + } + } + type inet:ipv4-address; + } + description + "Multicast source IPv4 address type."; + } + + typedef ipv6-multicast-source-address { + type union { + type enumeration { + enum "*" { + description + "Any source address."; + } + } + type inet:ipv6-address; + } + description + "Multicast source IPv6 address type."; + } + + /*** Collection of types common to protocols ***/ + + typedef bandwidth-ieee-float32 { + type string { + pattern + '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([0-9a-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01][0-9]|0?[0-9]?[0-9])?)'; + } + description + "Bandwidth in IEEE 754 floating point 32-bit binary format: + (-1)**(S) * 2**(Exponent-127) * (1 + Fraction), + where Exponent uses 8 bits, and Fraction uses 23 bits. + The units are octets per second. + The encoding format is the external hexadecimal-significant + character sequences specified in IEEE 754 and C99. The + format is restricted to be normalized, non-negative, and + non-fraction: 0x1.hhhhhhp{+}d, 0X1.HHHHHHP{+}D, or 0x0p0, + where 'h' and 'H' are hexadecimal digits and'd' and 'D' are + integers in the range of [0..127]. + When six hexadecimal digits are used for 'hhhhhh' or + 'HHHHHH', the least significant digit must be an even + number. 'x' and 'X' indicate hexadecimal; 'p' and 'P' + indicate power of two. Some examples are: 0x0p0, 0x1p10, and + 0x1.abcde2p+20"; + reference + "IEEE Std 754-2008: IEEE Standard for Floating-Point + Arithmetic."; + } + + typedef link-access-type { + type enumeration { + enum "broadcast" { + description + "Specify broadcast multi-access network."; + } + enum "non-broadcast-multiaccess" { + description + "Specify Non-Broadcast Multi-Access (NBMA) network."; + } + enum "point-to-multipoint" { + description + "Specify point-to-multipoint network."; + } + enum "point-to-point" { + description + "Specify point-to-point network."; + } + } + description + "Link access type."; + } + + typedef timer-multiplier { + type uint8; + description + "The number of timer value intervals that should be + interpreted as a failure."; + } + + typedef timer-value-seconds16 { + type union { + type uint16 { + range "1..65535"; + } + type enumeration { + enum "infinity" { + description + "The timer is set to infinity."; + } + enum "not-set" { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (16-bit range)."; + } + + typedef timer-value-seconds32 { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum "infinity" { + description + "The timer is set to infinity."; + } + enum "not-set" { + description + "The timer is not set."; + } + } + } + units "seconds"; + description + "Timer value type, in seconds (32-bit range)."; + } + typedef timer-value-milliseconds { + type union { + type uint32 { + range "1..4294967295"; + } + type enumeration { + enum "infinity" { + description + "The timer is set to infinity."; + } + enum "not-set" { + description + "The timer is not set."; + } + } + } + units "milliseconds"; + description + "Timer value type, in milliseconds."; + } + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value"; + } + + typedef timeticks64 { + type uint64; + description + "This type is based on the timeticks type defined in + RFC 6991, but with 64-bit width. It represents the time, + modulo 2^64, in hundredths of a second between two epochs."; + reference "RFC 6991 - Common YANG Data Types"; + } + + typedef uint24 { + type uint32 { + range "0 .. 16777215"; + } + description + "24-bit unsigned integer"; + } + + /*** Collection of types related to MPLS/GMPLS ***/ + + typedef generalized-label { + type binary; + description + "Generalized label. Nodes sending and receiving the + Generalized Label are aware of the link-specific + label context and type."; + reference "RFC3471: Section 3.2"; + } + + typedef mpls-label-special-purpose { + type identityref { + base mpls-label-special-purpose-value; + } + description + "This type represents the special-purpose Multiprotocol Label + Switching (MPLS) label values."; + reference + "RFC3032: MPLS Label Stack Encoding. + RFC7274: Allocating and Retiring Special-Purpose MPLS + Labels."; + } + + typedef mpls-label-general-use { + type uint32 { + range "16..1048575"; + } + description + "The 20-bit label values in an MPLS label stack entry, + specified in RFC3032. This label value does not include + the encodings of Traffic Class and TTL (time to live). + The label range specified by this type is for general use, + with special-purpose MPLS label values excluded."; + reference "RFC3032: MPLS Label Stack Encoding."; + } + + typedef mpls-label { + type union { + type mpls-label-special-purpose; + type mpls-label-general-use; + } + description + "The 20-bit label values in an MPLS label stack entry, + specified in RFC3032. This label value does not include + the encodings of Traffic Class and TTL (time to live)."; + reference "RFC3032: MPLS Label Stack Encoding."; + } + + /*** Groupings **/ + grouping mpls-label-stack { + description + "This grouping specifies an MPLS label stack. The label + stack is encoded as a list of label stack entries. The + list key is an identifier which indicates relative + ordering of each entry, with the lowest value identifier + corresponding to the top of the label stack."; + container mpls-label-stack { + description + "Container for a list of MPLS label stack entries."; + list entry { + key "id"; + description + "List of MPLS label stack entries."; + leaf id { + type uint8; + description + "Identifies the entry in a sequence of MPLS label + stack entries. An entry with a smaller identifier + value precedes an entry with a larger identifier + value in the label stack. The value of this ID has + no semantic meaning other than relative ordering + and referencing the entry."; + } + leaf label { + type rt-types:mpls-label; + description + "Label value."; + } + leaf ttl { + type uint8; + description + "Time to Live (TTL)."; + reference "RFC3032: MPLS Label Stack Encoding."; + } + leaf traffic-class { + type uint8 { + range "0..7"; + } + description + "Traffic Class (TC)."; + reference + "RFC5462: Multiprotocol Label Switching (MPLS) Label + Stack Entry: 'EXP' Field Renamed to 'Traffic Class' + Field."; + } + } + } + } + + grouping vpn-route-targets { + description + "A grouping that specifies Route Target import-export rules + used in the BGP enabled Virtual Private Networks (VPNs)."; + reference + "RFC4364: BGP/MPLS IP Virtual Private Networks (VPNs). + RFC4664: Framework for Layer 2 Virtual Private Networks + (L2VPNs)"; + list vpn-target { + key "route-target"; + description + "List of Route Targets."; + leaf route-target { + type rt-types:route-target; + description + "Route Target value"; + } + leaf route-target-type { + type rt-types:route-target-type; + mandatory true; + description + "Import/export type of the Route Target."; + } + } + } +}
\ No newline at end of file diff --git a/platform-logic/restconfapi-yang/src/main/yang/ietf-subscribed-notifications.yang b/platform-logic/restconfapi-yang/src/main/yang/ietf-subscribed-notifications.yang new file mode 100644 index 00000000..f7e01be5 --- /dev/null +++ b/platform-logic/restconfapi-yang/src/main/yang/ietf-subscribed-notifications.yang @@ -0,0 +1,21 @@ +module ietf-subscribed-notifications { + yang-version 1; + namespace "ietf:subscribed:notifications:huawei"; + prefix "notif"; + + revision 2018-09-08; + + rpc establish-subscription { + input { + leaf encoding { + type string; + } + } + + output { + leaf identifier { + type int16; + } + } + } +}
\ No newline at end of file diff --git a/platform-logic/restconfapi-yang/src/main/yang/ietf-te-types@2018-07-01.yang b/platform-logic/restconfapi-yang/src/main/yang/ietf-te-types@2018-07-01.yang new file mode 100644 index 00000000..7a50210e --- /dev/null +++ b/platform-logic/restconfapi-yang/src/main/yang/ietf-te-types@2018-07-01.yang @@ -0,0 +1,2457 @@ +module ietf-te-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-te-types"; + + /* Replace with IANA when assigned */ + prefix "te-types"; + + import ietf-inet-types { + prefix inet; + } + + import ietf-yang-types { + prefix "yang"; + } + + import ietf-routing-types { + prefix "rt-types"; + } + + organization + "IETF Traffic Engineering Architecture and Signaling (TEAS) + Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/teas/> + WG List: <mailto:teas@ietf.org> + WG Chair: Lou Berger + <mailto:lberger@labn.net> + WG Chair: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + Editor: Tarek Saad + <mailto:tsaad@cisco.com> + Editor: Rakesh Gandhi + <mailto:rgandhi@cisco.com> + Editor: Vishnu Pavan Beeram + <mailto:vbeeram@juniper.net> + Editor: Himanshu Shah + <mailto:hshah@ciena.com> + Editor: Xufeng Liu + <mailto:xufeng.liu@ericsson.com> + Editor: Igor Bryskin + <mailto:Igor.Bryskin@huawei.com>"; + + description + "This module contains a collection of generally + useful TE specific YANG data type defintions."; + + revision "2018-07-01" { + description "Latest revision of TE types"; + reference "RFC3209"; + } + + /* + * Identities + */ + identity association-type { + description "Base identity for tunnel association"; + reference "RFC6780, RFC4872, RFC4873"; + } + identity association-type-recovery { + base association-type; + description + "Association Type Recovery used to association LSPs of + same tunnel for recovery"; + reference "RFC4872"; + } + identity association-type-resource-sharing { + base association-type; + description + "Association Type Resource Sharing used to enable resource + sharing during make-before-break."; + reference "RFC4873"; + } + identity association-type-double-sided-bidir { + base association-type; + description + "Association Type Double Sided bidirectional used to associate + two LSPs of two tunnels that are independently configured on + either endpoint"; + reference "RFC7551"; + } + identity association-type-single-sided-bidir { + base association-type; + description + "Association Type Single Sided bidirectional used to associate + two LSPs of two tunnels, where a tunnel is configured on one + side/endpoint, and the other tunnel is dynamically created on + the other endpoint"; + reference "RFC7551"; + } + + identity objective-function-type { + description "Base objective function type"; + reference "RFC4657"; + } + identity of-minimize-cost-path { + base objective-function-type; + description + "Mimimuze cost of path objective function"; + } + identity of-minimize-load-path { + base objective-function-type; + description + "Minimize the load on path(s) objective + function"; + } + identity of-maximize-residual-bandwidth { + base objective-function-type; + description + "Maximize the residual bandwidth objective + function"; + } + identity of-minimize-agg-bandwidth-consumption { + base objective-function-type; + description + "minimize the aggregate bandwidth consumption + objective function"; + } + identity of-minimize-load-most-loaded-link { + base objective-function-type; + description + "Minimize the load on the most loaded link + objective function"; + } + identity of-minimize-cost-path-set { + base objective-function-type; + description + "Minimize the cost on a path set objective + function"; + } + + identity path-computation-method { + description + "base identity for supported path computation + mechanisms"; + } + + identity path-locally-computed { + base path-computation-method; + description + "indicates a constrained-path LSP in which the + path is computed by the local LER"; + } + + identity path-externally-queried { + base path-computation-method; + description + "Constrained-path LSP in which the path is + obtained by querying an external source, such as a PCE server. + In the case that an LSP is defined to be externally queried, it + may also have associated explicit definitions (provided + to the external source to aid computation); and the path that is + returned by the external source is not required to provide a + wholly resolved path back to the originating system - that is to + say, some local computation may also be required"; + } + + identity path-explicitly-defined { + base path-computation-method; + description + "constrained-path LSP in which the path is + explicitly specified as a collection of strict or/and loose + hops"; + } + /** + * Typedefs + */ + + typedef te-bandwidth { + type string { + pattern + '0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+' + + '(,(0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' + + '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' + + '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}|\d+))*'; + } + description + "This is the generic bandwidth type that is a string containing + a list of numbers separated by commas, with each of these + number can be non-negative decimal, hex integer, or hex float: + (dec | hex | float)[*(','(dec | hex | float))] + For packet switching type, a float number is used, such as + 0x1p10. + For OTN switching type, a list of integers can be used, such + as '0,2,3,1', indicating 2 odu0's and 1 odu3. + For DWDM, a list of pairs of slot number and width can be + used, such as '0, 2, 3, 3', indicating a frequency slot 0 with + slot width 2 and a frequency slot 3 with slot width 3."; + } // te-bandwidth + + typedef te-ds-class { + type uint8 { + range "0..7"; + } + description + "The Differentiatied Class-Type of traffic."; + reference "RFC4124: section-4.3.1"; + } + + typedef te-link-direction { + type enumeration { + enum INCOMING { + description + "explicit route represents an incoming link on a node"; + } + enum OUTGOING { + description + "explicit route represents an outgoing link on a node"; + } + } + description + "enumerated type for specifying direction of link on a node"; + } + + typedef te-label-direction { + type enumeration { + enum FORWARD { + description + "Label allocated for the forward LSP direction"; + } + enum REVERSE { + description + "Label allocated for the reverse LSP direction"; + } + } + description + "enumerated type for specifying the forward or reverse + label"; + } + + typedef te-hop-type { + type enumeration { + enum LOOSE { + description + "loose hop in an explicit path"; + } + enum STRICT { + description + "strict hop in an explicit path"; + } + } + description + "enumerated type for specifying loose or strict + paths"; + reference "RFC3209: section-4.3.2"; + } + + identity LSP_METRIC_TYPE { + description + "Base identity for types of LSP metric specification"; + } + + identity LSP_METRIC_RELATIVE { + base LSP_METRIC_TYPE; + description + "The metric specified for the LSPs to which this identity refers + is specified as a relative value to the IGP metric cost to the + LSP's tail-end."; + } + + identity LSP_METRIC_ABSOLUTE { + base LSP_METRIC_TYPE; + description + "The metric specified for the LSPs to which this identity refers + is specified as an absolute value"; + } + + identity LSP_METRIC_INHERITED { + base LSP_METRIC_TYPE; + description + "The metric for for the LSPs to which this identity refers is + not specified explicitly - but rather inherited from the IGP + cost directly"; + } + + identity tunnel-type { + description + "Base identity from which specific tunnel types are + derived."; + } + + identity tunnel-p2p { + base tunnel-type; + description + "TE point-to-point tunnel type."; + } + + identity tunnel-p2mp { + base tunnel-type; + description + "TE point-to-multipoint tunnel type."; + reference "RFC4875"; + } + + identity tunnel-action-type { + description + "Base identity from which specific tunnel action types + are derived."; + } + + identity tunnel-action-resetup { + base tunnel-action-type; + description + "TE tunnel action resetup. Tears the + tunnel's current LSP (if any) and + attempts to re-establish a new LSP"; + } + + identity tunnel-action-reoptimize { + base tunnel-action-type; + description + "TE tunnel action reoptimize. + Reoptimizes placement of the tunnel LSP(s)"; + } + + identity tunnel-action-switchpath { + base tunnel-action-type; + description + "TE tunnel action reoptimize + Switches the tunnel's LSP to use the specified path"; + } + + identity te-action-result { + description + "Base identity from which specific TE action results + are derived."; + } + + identity te-action-success { + base te-action-result; + description "TE action successul."; + } + + identity te-action-fail { + base te-action-result; + description "TE action failed."; + } + + identity tunnel-action-inprogress { + base te-action-result; + description "TE action inprogress."; + } + + identity tunnel-admin-state-type { + description + "Base identity for TE tunnel admin states"; + } + + identity tunnel-admin-state-up { + base tunnel-admin-state-type; + description "Tunnel administratively state up"; + } + + identity tunnel-admin-state-down { + base tunnel-admin-state-type; + description "Tunnel administratively state down"; + } + + identity tunnel-state-type { + description + "Base identity for TE tunnel states"; + } + + identity tunnel-state-up { + base tunnel-state-type; + description "Tunnel state up"; + } + + identity tunnel-state-down { + base tunnel-state-type; + description "Tunnel state down"; + } + + identity lsp-state-type { + description + "Base identity for TE LSP states"; + } + + identity lsp-path-computing { + base lsp-state-type; + description + "State path compute in progress"; + } + + identity lsp-path-computation-ok { + base lsp-state-type; + description + "State path compute successful"; + } + + identity lsp-path-computatione-failed { + base lsp-state-type; + description + "State path compute failed"; + } + + identity lsp-state-setting-up { + base lsp-state-type; + description + "State setting up"; + } + + identity lsp-state-setup-ok { + base lsp-state-type; + description + "State setup successful"; + } + + identity lsp-state-setup-failed { + base lsp-state-type; + description + "State setup failed"; + } + + identity lsp-state-up { + base lsp-state-type; + description "State up"; + } + + identity lsp-state-tearing-down { + base lsp-state-type; + description + "State tearing down"; + } + + identity lsp-state-down { + base lsp-state-type; + description "State down"; + } + + identity path-invalidation-action-type { + description + "Base identity for TE path invalidation action types"; + } + + identity path-invalidation-action-drop-type { + base path-invalidation-action-type; + description + "TE path invalidation action drop"; + } + + identity path-invalidation-action-drop-tear { + base path-invalidation-action-type; + description + "TE path invalidation action tear"; + } + + identity lsp-restoration-type { + description + "Base identity from which LSP restoration types are + derived."; + } + + identity lsp-restoration-restore-any { + base lsp-restoration-type; + description + "Restores when any of the LSPs is affected by a failure"; + } + + identity lsp-restoration-restore-all { + base lsp-restoration-type; + description + "Restores when all the tunnel LSPs are affected by failure"; + } + + identity restoration-scheme-type { + description + "Base identity for LSP restoration schemes"; + reference "RFC4872"; + } + + identity restoration-scheme-preconfigured { + base restoration-scheme-type; + description + "Restoration LSP is preconfigured prior to the failure"; + } + + identity restoration-scheme-precomputed { + base restoration-scheme-type; + description + "Restoration LSP is precomputed prior to the failure"; + } + + identity restoration-scheme-presignaled { + base restoration-scheme-type; + description + "Restoration LSP is presignaledd prior to the failure"; + } + + identity lsp-protection-type { + description + "Base identity from which LSP protection types are + derived."; + } + + identity lsp-protection-unprotected { + base lsp-protection-type; + description + "LSP protection 'Unprotected'"; + reference "RFC4872"; + } + + identity lsp-protection-reroute-extra { + base lsp-protection-type; + description + "LSP protection '(Full) Rerouting'"; + reference "RFC4872"; + } + + identity lsp-protection-reroute { + base lsp-protection-type; + description + "LSP protection 'Rerouting without Extra-Traffic'"; + reference "RFC4872"; + } + + identity lsp-protection-1-for-n { + base lsp-protection-type; + description + "LSP protection '1:N Protection with Extra-Traffic'"; + reference "RFC4872"; + } + + identity lsp-protection-unidir-1-to-1 { + base lsp-protection-type; + description + "LSP protection '1+1 Unidirectional Protection'"; + reference "RFC4872"; + } + + identity lsp-protection-bidir-1-to-1 { + base lsp-protection-type; + description + "LSP protection '1+1 Bidirectional Protection'"; + reference "RFC4872"; + } + + identity lsp-protection-extra-traffic { + base lsp-protection-type; + description + "LSP protection 'Extra-Traffic'"; + reference + "ITU-T G.808, RFC 4427."; + } + + identity lsp-protection-state { + description + "Base identity of protection states for reporting + purposes."; + } + + identity normal { + base lsp-protection-state; + description "Normal state."; + } + + identity signal-fail-of-protection { + base lsp-protection-state; + description + "There is a SF condition on the protection transport + entity which has higher priority than the FS command."; + reference + "ITU-T G.873.1, G.8031, G.8131"; + } + + identity lockout-of-protection { + base lsp-protection-state; + description + "A Loss of Protection (LoP) command is active."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity forced-switch { + base lsp-protection-state; + description + "A forced switch (FS) command is active."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity signal-fail { + base lsp-protection-state; + description + "There is a SF condition on either the working + or the protection path."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity signal-degrade { + base lsp-protection-state; + description + "There is an SD condition on either the working or the + protection path."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity manual-switch { + base lsp-protection-state; + description + "A manual switch (MS) command is active."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity wait-to-restore { + base lsp-protection-state; + description + "A wait time to restore (WTR) is running."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity do-not-revert { + base lsp-protection-state; + description + "A DNR condition is active because of a non-revertive + behavior."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity failure-of-protocol { + base lsp-protection-state; + description + "The protection is not working because of a failure of + protocol condition."; + reference + "ITU-T G.873.1, G.8031, G.8131"; + } + + identity protection-external-commands { + description + "Protection external commands for trouble shooting + purposes."; + } + + identity action-freeze { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to prevent any switch action to be taken and as such + freezes the current state."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity clear-freeze { + base protection-external-commands; + description + "An action that clears the active freeze state."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity action-lockout-of-normal { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the normal traffic is not allowed + to use the protection transport entity."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity clear-lockout-of-normal { + base protection-external-commands; + description + "An action that clears the active lockout of normal state."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity action-lockout-of-protection { + base protection-external-commands; + description + "A temporary configuration action initiated by an operator + command to ensure that the protection transport entity is + temporarily not available to transport a traffic signal + (either normal or extra traffic)."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity action-forced-switch { + base protection-external-commands; + description + "A switch action initiated by an operator command to swith + the extra traffic signal, the normal traffic signal, or the + null signal to the protection transport entity, unless an + equal or higher priority switch command is in effect."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity action-manual-switch { + base protection-external-commands; + description + "A switch action initiated by an operator command to swith + the extra traffic signal, the normal traffic signal #i, or + the null signal to the protection transport entity, unless + a fault condition exists on other transport entities or an + equal or higher priority switch command is in effect."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity action-exercise { + base protection-external-commands; + description + "An action to start testing if the APS communication is + operating correctly. It is lower priority than any other + state or command."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity clear { + base protection-external-commands; + description + "An action that clears the active near-end lockout of + protection, forced switch, manual switch, WTR state, + or exercise command."; + reference + "ITU-T G.808, RFC 4427"; + } + + identity switching-capabilities { + description + "Base identity for interface switching capabilities"; + reference "RFC3471"; + } + + identity switching-psc1 { + base switching-capabilities; + description + "Packet-Switch Capable-1 (PSC-1)"; + reference "RFC3471"; + } + + identity switching-evpl { + base switching-capabilities; + description + "Ethernet Virtual Private Line (EVPL)"; + } + + identity switching-l2sc { + base switching-capabilities; + description + "Layer-2 Switch Capable (L2SC)"; + reference "RFC3471"; + } + + identity switching-tdm { + base switching-capabilities; + description + "Time-Division-Multiplex Capable (TDM)"; + reference "RFC3471"; + } + + identity switching-otn { + base switching-capabilities; + description + "OTN-TDM capable"; + } + + identity switching-dcsc { + base switching-capabilities; + description + "Data Channel Switching Capable (DCSC)"; + } + + identity switching-lsc { + base switching-capabilities; + description + "Lambda-Switch Capable (LSC)"; + reference "RFC3471"; + } + + identity switching-fsc { + base switching-capabilities; + description + "Fiber-Switch Capable (FSC)"; + reference "RFC3471"; + } + + identity lsp-encoding-types { + description + "Base identity for encoding types"; + reference "RFC3471"; + } + + identity lsp-encoding-packet { + base lsp-encoding-types; + description + "Packet LSP encoding"; + reference "RFC3471"; + } + + identity lsp-encoding-ethernet { + base lsp-encoding-types; + description + "Ethernet LSP encoding"; + reference "RFC3471"; + } + + identity lsp-encoding-pdh { + base lsp-encoding-types; + description + "ANSI/ETSI LSP encoding"; + reference "RFC3471"; + } + + identity lsp-encoding-sdh { + base lsp-encoding-types; + description + "SDH ITU-T G.707 / SONET ANSI T1.105 LSP encoding"; + reference "RFC3471"; + } + + identity lsp-encoding-digital-wrapper { + base lsp-encoding-types; + description + "Digital Wrapper LSP encoding"; + reference "RFC3471"; + } + + identity lsp-encoding-lambda { + base lsp-encoding-types; + description + "Lambda (photonic) LSP encoding"; + reference "RFC3471"; + } + + identity lsp-encoding-fiber { + base lsp-encoding-types; + description + "Fiber LSP encoding"; + reference "RFC3471"; + } + + identity lsp-encoding-fiber-channel { + base lsp-encoding-types; + description + "FiberChannel LSP encoding"; + reference "RFC3471"; + } + + identity lsp-encoding-oduk { + base lsp-encoding-types; + description + "G.709 ODUk (Digital Path)LSP encoding"; + } + + identity lsp-encoding-optical-channel { + base lsp-encoding-types; + description + "Line (e.g., 8B/10B) LSP encoding"; + } + + identity lsp-encoding-line { + base lsp-encoding-types; + description + "Line (e.g., 8B/10B) LSP encoding"; + } + + identity path-signaling-type { + description + "base identity from which specific LSPs path + setup types are derived"; + } + + identity path-setup-static { + base path-signaling-type; + description + "Static LSP provisioning path setup"; + } + + identity path-setup-rsvp { + base path-signaling-type; + description + "RSVP-TE signaling path setup"; + reference "RFC3209"; + } + + identity path-setup-sr { + base path-signaling-type; + description + "Segment-routing path setup"; + } + + identity path-scope-type { + description + "base identity from which specific path + scope types are derived"; + } + + identity path-scope-segment { + base path-scope-type; + description + "Path scope segment"; + } + + identity path-scope-end-to-end { + base path-scope-type; + description + "Path scope end to end"; + } + + /* TE basic features */ + feature p2mp-te { + description + "Indicates support for P2MP-TE"; + reference "RFC4875"; + } + + feature frr-te { + description + "Indicates support for TE FastReroute (FRR)"; + reference "RFC4090"; + } + + feature extended-admin-groups { + description + "Indicates support for TE link extended admin + groups."; + reference "RFC7308"; + } + + feature named-path-affinities { + description + "Indicates support for named path affinities"; + } + + feature named-extended-admin-groups { + description + "Indicates support for named extended admin groups"; + } + + feature named-srlg-groups { + description + "Indicates support for named SRLG groups"; + } + + feature named-path-constraints { + description + "Indicates support for named path constraints"; + } + + feature path-optimization-metric { + description + "Indicates support for path optimization metric"; + } + + feature path-optimization-objective-function { + description + "Indicates support for path optimization objective function"; + } + + identity route-usage-type { + description + "Base identity for route usage"; + } + + identity route-include-ero { + base route-usage-type; + description + "Include ERO from route"; + } + + identity route-exclude-ero { + base route-usage-type; + description + "Exclude ERO from route"; + } + + identity route-exclude-srlg { + base route-usage-type; + description + "Exclude SRLG from route"; + } + + identity path-metric-type { + description + "Base identity for path metric type"; + } + + identity path-metric-te { + base path-metric-type; + description + "TE path metric"; + reference "RFC3785"; + } + + identity path-metric-igp { + base path-metric-type; + description + "IGP path metric"; + reference "RFC3785"; + } + + identity path-metric-hop { + base path-metric-type; + description + "Hop path metric"; + } + + identity path-metric-delay-average { + base path-metric-type; + description + "Unidirectional average link delay"; + reference "RFC7471"; + } + + identity path-metric-residual-bandwidth { + base path-metric-type; + description + "Unidirectional Residual Bandwidth, which is defined to be + Maximum Bandwidth [RFC3630] minus the bandwidth currently + allocated to LSPs."; + reference "RFC7471"; + } + identity path-metric-optimize-includes { + base path-metric-type; + description + "A metric that optimizes the number of included resources + specified in a set"; + } + + identity path-metric-optimize-excludes { + base path-metric-type; + description + "A metric that optimizes the number of excluded resources + specified in a set"; + } + + identity path-tiebreaker-type { + description + "Base identity for path tie-breaker type"; + } + + identity path-tiebreaker-minfill { + base path-tiebreaker-type; + description + "Min-Fill LSP path placement"; + } + + identity path-tiebreaker-maxfill { + base path-tiebreaker-type; + description + "Max-Fill LSP path placement"; + } + + identity path-tiebreaker-randoom { + base path-tiebreaker-type; + description + "Random LSP path placement"; + } + + identity bidir-provisioning-mode { + description + "Base identity for bidirectional provisioning + mode."; + reference "RFC7551"; + } + + identity bidir-provisioning-single-sided { + base bidir-provisioning-mode; + description + "Single-sided bidirectional provioning mode"; + reference "RFC7551"; + } + + identity bidir-provisioning-double-sided { + base bidir-provisioning-mode; + description + "Double-sided bidirectional provioning mode"; + reference "RFC7551"; + } + + identity bidir-association-type { + description + "Base identity for bidirectional association type"; + reference "RFC7551"; + } + + identity bidir-assoc-corouted { + base bidir-association-type; + description + "Co-routed bidirectional association type"; + reference "RFC7551"; + } + + identity bidir-assoc-non-corouted { + base bidir-association-type; + description + "Non co-routed bidirectional association type"; + reference "RFC7551"; + } + + identity resource-affinities-type { + description + "Base identity for resource affinities"; + reference "RFC2702"; + } + + identity resource-aff-include-all { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel all of which must be present for a link + to be acceptable"; + reference "RFC2702 and RFC3209"; + } + + identity resource-aff-include-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel any of which must be present for a link + to be acceptable"; + reference "RFC2702 and RFC3209"; + } + + identity resource-aff-exclude-any { + base resource-affinities-type; + description + "The set of attribute filters associated with a + tunnel any of which renders a link unacceptable"; + reference "RFC2702 and RFC3209"; + } + + typedef optimization-goal { + type enumeration { + enum minimize { + description "Pick lowest path metric goal"; + } + enum maximize { + description "Pick highest path metric goal"; + } + enum randomize { + description + "Pick a path at random from list of + equally favorable ones"; + } + } + description "TE optimization goal"; + } + + identity te-optimization-criterion { + description + "Base identity for TE optimization criterion."; + reference + "RFC3272: Overview and Principles of Internet Traffic + Engineering."; + } + + identity not-optimized { + base te-optimization-criterion; + description "Optimization is not applied."; + } + + identity cost { + base te-optimization-criterion; + description "Optimized on cost."; + } + identity delay { + base te-optimization-criterion; + description "Optimized on delay."; + } + + /* + * Typedefs + */ + + typedef percentage { + type uint8 { + range "0..100"; + } + description + "Integer indicating a percentage value"; + } + + typedef performance-metric-normality { + type enumeration { + enum "unknown" { + value 0; + description + "Unknown."; + } + enum "normal" { + value 1; + description + "Normal."; + } + enum "abnormal" { + value 2; + description + "Abnormal. The anomalous bit is set."; + } + } + description + "Indicates whether a performance metric is normal, abnormal, or + unknown."; + reference + "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions. + RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions. + RFC7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + } + + typedef te-admin-status { + type enumeration { + enum up { + description + "Enabled."; + } + enum down { + description + "Disabled."; + } + enum testing { + description + "In some test mode."; + } + enum preparing-maintenance { + description + "Resource is disabled in the control plane to prepare for + graceful shutdown for maintenance purposes."; + reference + "RFC5817: Graceful Shutdown in MPLS and Generalized MPLS + Traffic Engineering Networks"; + } + enum maintenance { + description + "Resource is disabled in the data plane for maintenance + purposes."; + } + } + description + "Defines a type representing the administrative status of + a TE resource."; + } + + typedef te-global-id { + type uint32; + description + "An identifier to uniquely identify an operator, which can be + either a provider or a client. + The definition of this type is taken from RFC6370 and RFC5003. + This attribute type is used solely to provide a globally + unique context for TE topologies."; + } + + typedef te-link-access-type { + type enumeration { + enum point-to-point { + description + "The link is point-to-point."; + } + enum multi-access { + description + "The link is multi-access, including broacast and NBMA."; + } + } + description + "Defines a type representing the access type of a TE link."; + reference + "RFC3630: Traffic Engineering (TE) Extensions to OSPF + Version 2."; + } + + typedef te-node-id { + type yang:dotted-quad; + description + "An identifier for a node in a topology. + The identifier is represented as 32-bit unsigned integer in + the dotted-quad notation. + This attribute is mapped to Router ID in + RFC3630, RFC5329, RFC5305, and RFC6119."; + } + + typedef te-oper-status { + type enumeration { + enum up { + description + "Operational up."; + } + enum down { + description + "Operational down."; + } + enum testing { + description + "In some test mode."; + } + enum unknown { + description + "Status cannot be determined for some reason."; + } + enum preparing-maintenance { + description + "Resource is disabled in the control plane to prepare for + graceful shutdown for maintenance purposes."; + reference + "RFC5817: Graceful Shutdown in MPLS and Generalized MPLS + Traffic Engineering Networks"; + } + enum maintenance { + description + "Resource is disabled in the data plane for maintenance + purposes."; + } + } + description + "Defines a type representing the operational status of + a TE resource."; + } + + typedef te-path-disjointness { + type bits { + bit node { + position 0; + description "Node disjoint."; + } + bit link { + position 1; + description "Link disjoint."; + } + bit srlg { + position 2; + description "SRLG (Shared Risk Link Group) disjoint."; + } + } + description + "Type of the resource disjointness for a TE tunnel path."; + reference + "RFC4872: RSVP-TE Extensions in Support of End-to-End + Generalized Multi-Protocol Label Switching (GMPLS) + Recovery"; + } // te-path-disjointness + + typedef te-recovery-status { + type enumeration { + enum normal { + description + "Both the recovery and working spans are fully + allocated and active, data traffic is being + transported over (or selected from) the working + span, and no trigger events are reported."; + } + enum recovery-started { + description + "The recovery action has been started, but not completed."; + } + enum recovery-succeeded { + description + "The recovery action has succeeded. The working span has + reported a failure/degrade condition and the user traffic + is being transported (or selected) on the recovery span."; + } + enum recovery-failed { + description + "The recovery action has failed."; + } + enum reversion-started { + description + "The reversion has started."; + } + enum reversion-failed { + description + "The reversion has failed."; + } + enum recovery-unavailable { + description + "The recovery is unavailable -- either as a result of an + operator Lockout command or a failure condition detected + on the recovery span."; + } + enum recovery-admin { + description + "The operator has issued a command switching the user + traffic to the recovery span."; + } + enum wait-to-restore { + description + "The recovery domain is recovering from a failuer/degrade + condition on the working span that is being controlled by + the Wait-to-Restore (WTR) timer."; + } + } + description + "Defines the status of a recovery action."; + reference + "RFC4427: Recovery (Protection and Restoration) Terminology + for Generalized Multi-Protocol Label Switching (GMPLS). + RFC6378: MPLS Transport Profile (MPLS-TP) Linear Protection"; + } + + typedef te-template-name { + type string { + pattern '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + description + "A type for the name of a TE node template or TE link + template."; + } + + typedef te-topology-event-type { + type enumeration { + enum "add" { + value 0; + description + "A TE node or te-link has been added."; + } + enum "remove" { + value 1; + description + "A TE node or te-link has been removed."; + } + enum "update" { + value 2; + description + "A TE node or te-link has been updated."; + } + } + description "TE Event type for notifications"; + } // te-topology-event-type + + typedef te-topology-id { + type string { + pattern + '([a-zA-Z0-9\-_.]+:)*' + + '/?([a-zA-Z0-9\-_.]+)(/[a-zA-Z0-9\-_.]+)*'; + } + description + "An identifier for a topology. + It is optional to have one or more prefixes at the begining, + separated by colons. The prefixes can be the network-types, + defined in ietf-network.yang, to help user to understand the + topology better before further inquiry."; + } + + typedef te-tp-id { + type union { + type uint32; // Unnumbered + type inet:ip-address; // IPv4 or IPv6 address + } + description + "An identifier for a TE link endpoint on a node. + This attribute is mapped to local or remote link identifier in + RFC3630 and RFC5305."; + } + typedef admin-group { + type binary { + length 4; + } + description + "Administrative group/Resource class/Color."; + reference "RFC3630 and RFC5305"; + } + + typedef extended-admin-group { + type binary; + description + "Extended administrative group/Resource class/Color."; + reference "RFC7308"; + } + + typedef admin-groups { + type union { + type admin-group; + type extended-admin-group; + } + description "TE administrative group derived type"; + } + + typedef srlg { + type uint32; + description "SRLG type"; + reference "RFC4203 and RFC5307"; + } + + identity path-computation-srlg-type { + description + "Base identity for SRLG path computation"; + } + + identity srlg-ignore { + base path-computation-srlg-type; + description + "Ignores SRLGs in path computation"; + } + + identity srlg-strict { + base path-computation-srlg-type; + description + "Include strict SRLG check in path computation"; + } + + identity srlg-preferred { + base path-computation-srlg-type; + description + "Include preferred SRLG check in path computation"; + } + + identity srlg-weighted { + base path-computation-srlg-type; + description + "Include weighted SRLG check in path computation"; + } + + typedef te-metric { + type uint32; + description + "TE link metric"; + reference "RFC3785"; + } + + /** + * TE bandwidth groupings + **/ + identity otn-rate-type { + description + "Base type to identify OTN bit rates of various information + structures."; + reference "RFC7139"; + } + identity odu0 { + base otn-rate-type; + description + "ODU0 bit rate."; + } + identity odu1 { + base otn-rate-type; + description + "ODU1 bit rate."; + } + identity odu2 { + base otn-rate-type; + description + "ODU2 bit rate."; + } + identity odu3 { + base otn-rate-type; + description + "ODU3 bit rate."; + } + identity odu4 { + base otn-rate-type; + description + "ODU4 bit rate."; + } + identity odu2e { + base otn-rate-type; + description + "ODU2e bit rate."; + } + identity oduc { + base otn-rate-type; + description + "ODUCn bit rate."; + } + identity oduflex { + base otn-rate-type; + description + "ODUflex bit rate."; + } + + identity wdm-spectrum-type { + description + "Base type to identify WDM spectrum type."; + } + identity cwdm { + base wdm-spectrum-type; + description "CWDM."; + reference "RFC6205"; + } + identity dwdm { + base wdm-spectrum-type; + description "DWDM."; + reference "RFC6205"; + } + identity flexible-grid { + base wdm-spectrum-type; + description "Flexible grid."; + reference "RFC6205"; + } + + grouping te-bandwidth { + description + "This grouping defines the generic TE bandwidth. + For some known data plane technologies, specific modeling + structures are specified. The string encoded te-bandwidth + type is used for un-specified technologies. + The modeling structure can be augmented later for other + technologies."; + container te-bandwidth { + description + "Container that specifies TE bandwidth."; + choice technology { + default generic; + description + "Data plane technology type."; + case generic { + leaf generic { + type te-bandwidth; + description + "Bandwidth specified in a generic format."; + } + } + } + } + } + + /** + * TE label groupings + **/ + grouping te-label { + description + "This grouping defines the generic TE label. + The modeling structure can be augmented for each technology. + For un-specified technologies, rt-types:generalized-label + is used."; + container te-label { + description + "Container that specifies TE label."; + choice technology { + default generic; + description + "Data plane technology type."; + case generic { + leaf generic { + type rt-types:generalized-label; + description + "TE label specified in a generic format."; + } + } + } + leaf direction { + type te-label-direction; + description "Label direction"; + } + } + } + /** + * TE performance metric groupings + **/ + grouping performance-metric-container { + description + "A container containing performance metric attributes."; + container performance-metric { + description + "Link performance information in real time."; + reference + "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions. + RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions. + RFC7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + container measurement { + description + "Measured performance metric values. Static configuration + and manual overrides of these measurements are also + allowed."; + uses performance-metric-attributes; + } + container normality + { + description + "Performance metric normality values."; + uses performance-metric-normality-attributes; + } + uses performance-metric-throttle-container; + } + } // performance-metric-container + + grouping te-topology-identifier { + description + "Augmentation for TE topology."; + container te-topology-identifier { + description "TE topology identifier container"; + leaf provider-id { + type te-types:te-global-id; + description + "An identifier to uniquely identify a provider."; + } + leaf client-id { + type te-types:te-global-id; + description + "An identifier to uniquely identify a client."; + } + leaf topology-id { + type te-types:te-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."; + } + } + } + + grouping performance-metric-attributes { + description + "Link performance information in real time."; + reference + "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions. + RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions. + RFC7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + leaf unidirectional-delay { + type uint32 { + range 0..16777215; + } + description "Delay or latency in micro seconds."; + } + leaf unidirectional-min-delay { + type uint32 { + range 0..16777215; + } + description "Minimum delay or latency in micro seconds."; + } + leaf unidirectional-max-delay { + type uint32 { + range 0..16777215; + } + description "Maximum delay or latency in micro seconds."; + } + leaf unidirectional-delay-variation { + type uint32 { + range 0..16777215; + } + description "Delay variation in micro seconds."; + } + leaf unidirectional-packet-loss { + type decimal64 { + fraction-digits 6; + range "0 .. 50.331642"; + } + description + "Packet loss as a percentage of the total traffic sent + over a configurable interval. The finest precision is + 0.000003%."; + } + leaf unidirectional-residual-bandwidth { + type rt-types:bandwidth-ieee-float32; + description + "Residual bandwidth that subtracts tunnel + reservations from Maximum Bandwidth (or link capacity) + [RFC3630] and provides an aggregated remainder across QoS + classes."; + } + leaf unidirectional-available-bandwidth { + type rt-types:bandwidth-ieee-float32; + description + "Available bandwidth that is defined to be residual + bandwidth minus the measured bandwidth used for the + actual forwarding of non-RSVP-TE LSP packets. For a + bundled link, available bandwidth is defined to be the + sum of the component link available bandwidths."; + } + leaf unidirectional-utilized-bandwidth { + type rt-types:bandwidth-ieee-float32; + description + "Bandwidth utilization that represents the actual + utilization of the link (i.e. as measured in the router). + For a bundled link, bandwidth utilization is defined to + be the sum of the component link bandwidth + utilizations."; + } + } // performance-metric-attributes + + grouping performance-metric-normality-attributes { + description + "Link performance metric normality attributes."; + reference + "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions. + RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions. + RFC7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + leaf unidirectional-delay { + type te-types:performance-metric-normality; + description "Delay normality."; + } + leaf unidirectional-min-delay { + type te-types:performance-metric-normality; + description "Minimum delay or latency normality."; + } + leaf unidirectional-max-delay { + type te-types:performance-metric-normality; + description "Maximum delay or latency normality."; + } + leaf unidirectional-delay-variation { + type te-types:performance-metric-normality; + description "Delay variation normality."; + } + leaf unidirectional-packet-loss { + type te-types:performance-metric-normality; + description "Packet loss normality."; + } + leaf unidirectional-residual-bandwidth { + type te-types:performance-metric-normality; + description "Residual bandwidth normality."; + } + leaf unidirectional-available-bandwidth { + type te-types:performance-metric-normality; + description "Available bandwidth normality."; + } + leaf unidirectional-utilized-bandwidth { + type te-types:performance-metric-normality; + description "Bandwidth utilization normality."; + } + } // performance-metric-normality-attributes + + grouping performance-metric-throttle-container { + description + "A container controlling performance metric throttle."; + container throttle { + must "suppression-interval >= measure-interval" { + error-message + "suppression-interval cannot be less then + measure-interval."; + description + "Constraint on suppression-interval and + measure-interval."; + } + description + "Link performance information in real time."; + reference + "RFC7471: OSPF Traffic Engineering (TE) Metric Extensions. + RFC7810: IS-IS Traffic Engineering (TE) Metric Extensions. + RFC7823: Performance-Based Path Selection for Explicitly + Routed Label Switched Paths (LSPs) Using TE Metric + Extensions"; + leaf unidirectional-delay-offset { + type uint32 { + range 0..16777215; + } + description + "Offset value to be added to the measured delay value."; + } + leaf measure-interval { + type uint32; + default 30; + description + "Interval in seconds to measure the extended metric + values."; + } + leaf advertisement-interval { + type uint32; + description + "Interval in seconds to advertise the extended metric + values."; + } + leaf suppression-interval { + type uint32 { + range "1 .. max"; + } + default 120; + description + "Interval in seconds to suppress advertising the extended + metric values."; + } + container threshold-out { + uses performance-metric-attributes; + description + "If the measured parameter falls outside an upper bound + for all but the min delay metric (or lower bound for + min-delay metric only) and the advertised value is not + already outside that bound, anomalous announcement will be + triggered."; + } + container threshold-in { + uses performance-metric-attributes; + description + "If the measured parameter falls inside an upper bound + for all but the min delay metric (or lower bound for + min-delay metric only) and the advertised value is not + already inside that bound, normal (anomalous-flag cleared) + announcement will be triggered."; + } + container threshold-accelerated-advertisement { + description + "When the difference between the last advertised value and + current measured value exceed this threshold, anomalous + announcement will be triggered."; + uses performance-metric-attributes; + } + } + } // performance-metric-throttle-container + + /** + * TE tunnel generic groupings + **/ + + /* Tunnel path selection parameters */ + grouping explicit-route-hop { + description + "The explicit route subobject grouping"; + leaf index { + type uint32; + description "ERO subobject index"; + } + choice type { + description + "The explicit route subobject type"; + case num-unnum-hop { + container num-unnum-hop { + leaf node-id { + type te-types:te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf link-tp-id { + type te-types:te-tp-id; + description + "TE link termination point identifier. The combination + of TE link ID and the TE node ID is used to identify an + unnumbered TE link."; + } + leaf hop-type { + type te-hop-type; + description "strict or loose hop"; + } + leaf direction { + type te-link-direction; + description "Unnumbered Link ERO direction"; + } + description + "Numbered and Unnumbered link/node explicit route + subobject"; + reference + "RFC3209: section 4.3 for EXPLICIT_ROUTE in RSVP-TE + RFC3477: Signalling Unnumbered Links in RSVP-TE"; + } + } + case as-number { + container as-number-hop { + leaf as-number { + type binary { + length 16; + } + description "AS number"; + } + leaf hop-type { + type te-hop-type; + description + "strict or loose hop"; + } + description + "Autonomous System explicit route subobject"; + } + } + case label { + container label-hop { + description "Label hop type"; + uses te-label; + } + description + "The Label ERO subobject"; + } + } + } + + grouping record-route-subobject_state { + description + "The record route subobject grouping"; + leaf index { + type uint32; + description "RRO subobject index"; + } + choice type { + description + "The record route subobject type"; + case numbered { + leaf address { + type te-types:te-tp-id; + description + "Numbered link TE termination point address."; + } + leaf ip-flags { + type binary { + length 8; + } + description + "RRO IP address sub-object flags"; + reference "RFC3209"; + } + } + case unnumbered { + leaf node-id { + type te-types:te-node-id; + description + "The identifier of a node in the TE topology."; + } + leaf link-tp-id { + type te-types:te-tp-id; + description + "TE link termination point identifier, used + together with te-node-id to identify the + link termination point"; + } + description + "Unnumbered link record route subobject"; + reference + "RFC3477: Signalling Unnumbered Links in + RSVP-TE"; + } + case label { + container label-hop { + description "Label hop type"; + uses te-label; + leaf label-flags { + type binary { + length 8; + } + description + "Label sub-object flags"; + reference "RFC3209"; + } + } + description + "The Label RRO subobject"; + } + } + } + + grouping label-restriction-info { + description "Label set item info"; + leaf restriction { + type enumeration { + enum inclusive { + description "The label or label range is inclusive."; + } + enum exclusive { + description "The label or label range is exclusive."; + } + } + description + "Whether the list item is inclusive or exclusive."; + } + leaf index { + type uint32; + description + "Then index of the label restriction list entry."; + } + container label-start { + description + "This is the starting label if a label range is specified. + This is the label value if a single label is specified, + in which case, attribute 'label-end' is not set."; + uses te-label; + } + container label-end { + description + "The ending label if a label range is specified; + This attribute is not set, If a single label is + specified."; + uses te-label; + } + leaf range-bitmap { + type binary; + description + "When there are gaps between label-start and label-end, + this attribute is used to specified the possitions + of the used labels."; + } + } + + grouping label-set-info { + description + "Grouping for List of label restrictions specifying what labels + may or may not be used on a link connectivity."; + container label-restrictions { + description + "The label restrictions container"; + list label-restriction { + key "index"; + description + "The absence of label-set implies that all labels are + acceptable; otherwise only restricted labels are + available."; + reference + "RFC7579: General Network Element Constraint Encoding + for GMPLS-Controlled Networks"; + uses label-restriction-info; + } + } + } + + /*** End of TE tunnel groupings ***/ + grouping optimizations_config { + description "Optimization metrics configuration grouping"; + leaf metric-type { + type identityref { + base te-types:path-metric-type; + } + description "TE path metric type"; + } + leaf weight { + type uint8; + description "TE path metric normalization weight"; + } + container explicit-route-exclude-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-excludes'"; + description + "Container for the exclude route object list"; + uses path-route-exclude-objects; + } + container explicit-route-include-objects { + when "../metric-type = " + + "'te-types:path-metric-optimize-includes'"; + description + "Container for the include route object list"; + uses path-route-include-objects; + } + } + + grouping common-constraints_config { + description + "Common constraints grouping that can be set on + a constraint set or directly on the tunnel"; + + uses te-types:te-bandwidth { + description + "A requested bandwidth to use for path computation"; + } + + leaf setup-priority { + type uint8 { + range "0..7"; + } + description + "TE LSP requested setup priority"; + reference "RFC3209"; + } + leaf hold-priority { + type uint8 { + range "0..7"; + } + description + "TE LSP requested hold priority"; + reference "RFC3209"; + } + leaf signaling-type { + type identityref { + base te-types:path-signaling-type; + } + description "TE tunnel path signaling type"; + } + } + + grouping tunnel-constraints_config { + description + "Tunnel constraints grouping that can be set on + a constraint set or directly on the tunnel"; + uses te-types:te-topology-identifier; + uses te-types:common-constraints_config; + } + + grouping path-metrics-bounds_config { + description "TE path metric bounds grouping"; + leaf metric-type { + type identityref { + base te-types:path-metric-type; + } + description "TE path metric type"; + } + leaf upper-bound { + type uint64; + description "Upper bound on end-to-end TE path metric"; + } + } + + grouping path-objective-function_config { + description "Optimization metrics configuration grouping"; + leaf objective-function-type { + type identityref { + base te-types:objective-function-type; + } + description + "Objective function entry"; + } + } + + /** + * TE interface generic groupings + **/ + grouping path-route-objects { + description + "List of EROs to be included or excluded when performing + the path computation."; + container explicit-route-objects { + description + "Container for the exclude route object list"; + list route-object-exclude-always { + key index; + description + "List of explicit route objects to always exclude + from path computation"; + uses te-types:explicit-route-hop; + } + list route-object-include-exclude { + key index; + description + "List of explicit route objects to include or + exclude in path computation"; + leaf explicit-route-usage { + type identityref { + base te-types:route-usage-type; + } + description "Explicit-route usage."; + } + uses te-types:explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description "SRLG container"; + leaf srlg { + type uint32; + description "SRLG value"; + } + } + description "An SRLG value to be included or excluded"; + } + description + "Augmentation to generic explicit route for SRLG + exclusion"; + } + } + } + } + } + + grouping path-route-include-objects { + description + "List of EROs to be included when performing + the path computation."; + list route-object-include-object { + key index; + description + "List of explicit route objects to be included + in path computation"; + uses te-types:explicit-route-hop; + } + } + + grouping path-route-exclude-objects { + description + "List of EROs to be included when performing + the path computation."; + list route-object-exclude-object { + key index; + description + "List of explicit route objects to be excluded + in path computation"; + uses te-types:explicit-route-hop { + augment "type" { + case srlg { + container srlg { + description "SRLG container"; + leaf srlg { + type uint32; + description "SRLG value"; + } + } + description "An SRLG value to be included or excluded"; + } + description + "Augmentation to generic explicit route for SRLG exclusion"; + } + } + } + } + + grouping generic-path-metric-bounds { + description "TE path metric bounds grouping"; + container path-metric-bounds { + description "TE path metric bounds container"; + list path-metric-bound { + key metric-type; + description "List of TE path metric bounds"; + uses path-metrics-bounds_config; + } + } + } + + grouping generic-path-optimization { + description "TE generic path optimization grouping"; + + container optimizations { + description + "The objective function container that includes + attributes to impose when computing a TE path"; + + choice algorithm { + description "Optimizations algorithm."; + case metric { + if-feature path-optimization-metric; + /* Optimize by metric */ + list optimization-metric { + key "metric-type"; + description "TE path metric type"; + uses optimizations_config; + } + /* Tiebreakers */ + container tiebreakers { + description + "The list of tiebreaker criterion to apply + on an equally favored set of paths to pick best"; + list tiebreaker { + key "tiebreaker-type"; + description + "The list of tiebreaker criterion to apply + on an equally favored set of paths to pick best"; + leaf tiebreaker-type { + type identityref { + base te-types:path-metric-type; + } + description "The objective function"; + } + } + } + } + case objective-function { + if-feature path-optimization-objective-function; + /* Objective functions */ + container objective-function { + description + "The objective function container that includes + attributes to impose when computing a TE path"; + uses path-objective-function_config; + } + } + } + } + } + + grouping generic-path-affinities { + description + "Path affinities grouping"; + container path-affinities { + description + "Path affinities container"; + list constraint { + key "usage"; + description + "List of named affinity constraints"; + leaf usage { + type identityref { + base resource-affinities-type; + } + description "Affinities usage"; + } + leaf value { + type admin-groups; + description "Affinity value"; + } + } + } + } + + grouping generic-path-srlgs { + description + "Path SRLG grouping"; + container path-srlgs { + description + "Path SRLG properties container"; + leaf usage { + type identityref { + base te-types:route-exclude-srlg; + } + description "SRLG usage"; + } + leaf-list values { + type srlg; + description "SRLG value"; + } + } + } + + grouping generic-path-disjointness { + description "Path disjointness grouping"; + leaf disjointness { + type te-types:te-path-disjointness; + description + "The type of resource disjointness. + Under primary path, disjointness level applies to + all secondary LSPs. Under secondary, disjointness + level overrides the one under primary"; + } + } + + grouping common-path-constraints-attributes { + description + "Common path constraints configuration grouping"; + uses common-constraints_config; + uses generic-path-metric-bounds; + uses generic-path-affinities; + uses generic-path-srlgs; + } + + grouping generic-path-constraints { + description + "Global named path constraints configuration + grouping"; + container path-constraints { + description "TE named path constraints container"; + uses common-path-constraints-attributes; + uses generic-path-disjointness; + } + } + + grouping generic-path-properties { + description "TE generic path properties grouping"; + container path-properties { + config false; + description "The TE path properties"; + list path-metric { + key metric-type; + description "TE path metric type"; + leaf metric-type { + type identityref { + base te-types:path-metric-type; + } + description "TE path metric type"; + } + leaf accumulative-value { + type uint64; + description "TE path metric accumulative value"; + } + } + uses generic-path-affinities; + uses generic-path-srlgs; + container path-route-objects { + description + "Container for the list of route objects either returned by + the computation engine or actually used by an LSP"; + list path-route-object { + key index; + description + "List of route objects either returned by the computation + engine or actually used by an LSP"; + uses explicit-route-hop; + } + } + } + } +}
\ No newline at end of file diff --git a/platform-logic/restconfapi-yang/src/main/yang/ietf-yang-types.yang b/platform-logic/restconfapi-yang/src/main/yang/ietf-yang-types.yang new file mode 100644 index 00000000..5231f6a3 --- /dev/null +++ b/platform-logic/restconfapi-yang/src/main/yang/ietf-yang-types.yang @@ -0,0 +1,438 @@ +module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + 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 Kessens + <mailto:david.kessens@nsn.com> + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types. + Copyright (c) 2013 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 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + (a) The date-and-time type does not allow negative years. + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + The associated timeticks schema node must be specified + in the description of any schema node using this type. + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + + + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + 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])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +}
\ No newline at end of file diff --git a/platform-logic/setup/pom.xml b/platform-logic/setup/pom.xml index 5728399a..1efbef1e 100644 --- a/platform-logic/setup/pom.xml +++ b/platform-logic/setup/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> diff --git a/platform-logic/vnfapi/pom.xml b/platform-logic/vnfapi/pom.xml index 433b10f2..a94e0149 100644 --- a/platform-logic/vnfapi/pom.xml +++ b/platform-logic/vnfapi/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.1.0-SNAPSHOT</version> + <version>1.1.1-SNAPSHOT</version> <relativePath /> </parent> |