diff --git a/demo-mts91/.classpath b/demo-mts91/.classpath new file mode 100644 index 0000000000000000000000000000000000000000..1a821310bdcec4dfe87ffa01160cdbeba54719a9 --- /dev/null +++ b/demo-mts91/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/demo-mts91/.project b/demo-mts91/.project new file mode 100644 index 0000000000000000000000000000000000000000..b612fefd01369f836880ebcd923af1985b3d9778 --- /dev/null +++ b/demo-mts91/.project @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>demo-mts91</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> + <nature>org.etsi.mts.tdl.nature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.PluginNature</nature> + </natures> +</projectDescription> diff --git a/demo-mts91/.settings/org.eclipse.jdt.core.prefs b/demo-mts91/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..d4540a53f99538f9581908771a4f427927cd2bfd --- /dev/null +++ b/demo-mts91/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/demo-mts91/META-INF/MANIFEST.MF b/demo-mts91/META-INF/MANIFEST.MF new file mode 100644 index 0000000000000000000000000000000000000000..9b1640621331658215ccdf9a876e50caa57bb931 --- /dev/null +++ b/demo-mts91/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Automatic-Module-Name: demo-mts91 +Bundle-ManifestVersion: 2 +Bundle-Name: demo-mts91 +Bundle-Vendor: My Company +Bundle-Version: 1.0.0.qualifier +Bundle-SymbolicName: demo-mts91; singleton:=true +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-17 diff --git a/demo-mts91/build.properties b/demo-mts91/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..cc91072ececda9eed9b500b1567c6271c353acbd --- /dev/null +++ b/demo-mts91/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/demo-mts91/src/samples/ietf/ietf-inet-types@2013-07-15.yang b/demo-mts91/src/samples/ietf/ietf-inet-types@2013-07-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..eacefb6363de1beb543567a0fa705571b7dc57a2 --- /dev/null +++ b/demo-mts91/src/samples/ietf/ietf-inet-types@2013-07-15.yang @@ -0,0 +1,458 @@ +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)"; + } + +} diff --git a/demo-mts91/src/samples/ietf/ietf-restconf@2017-01-26.yang b/demo-mts91/src/samples/ietf/ietf-restconf@2017-01-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..1370ed54800db12c4c20327e56bb5ac3362407b8 --- /dev/null +++ b/demo-mts91/src/samples/ietf/ietf-restconf@2017-01-26.yang @@ -0,0 +1,278 @@ +module ietf-restconf { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-restconf"; + prefix "rc"; + + organization + "IETF NETCONF (Network Configuration) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netconf/> + WG List: <mailto:netconf@ietf.org> + + Author: Andy Bierman + <mailto:andy@yumaworks.com> + + Author: Martin Bjorklund + <mailto:mbj@tail-f.com> + + Author: Kent Watsen + <mailto:kwatsen@juniper.net>"; + + description + "This module contains conceptual YANG specifications + for basic RESTCONF media type definitions used in + RESTCONF protocol messages. + + Note that the YANG definitions within this module do not + represent configuration data of any kind. + The 'restconf-media-type' YANG extension statement + provides a normative syntax for XML and JSON + message-encoding purposes. + + 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 8040; see + the RFC itself for full legal notices."; + + revision 2017-01-26 { + description + "Initial revision."; + reference + "RFC 8040: RESTCONF Protocol."; + } + + extension yang-data { + argument name { + yin-element true; + } + description + "This extension is used to specify a YANG data template that + represents conceptual data defined in YANG. It is + intended to describe hierarchical data independent of + protocol context or specific message-encoding format. + Data definition statements within a yang-data extension + specify the generic syntax for the specific YANG data + template, whose name is the argument of the 'yang-data' + extension statement. + + Note that this extension does not define a media type. + A specification using this extension MUST specify the + message-encoding rules, including the content media type. + + The mandatory 'name' parameter value identifies the YANG + data template that is being defined. It contains the + template name. + + This extension is ignored unless it appears as a top-level + statement. It MUST contain data definition statements + that result in exactly one container data node definition. + An instance of a YANG data template can thus be translated + into an XML instance document, whose top-level element + corresponds to the top-level container. + The module name and namespace values for the YANG module using + the extension statement are assigned to instance document data + conforming to the data definition statements within + this extension. + + The substatements of this extension MUST follow the + 'data-def-stmt' rule in the YANG ABNF. + + The XPath document root is the extension statement itself, + such that the child nodes of the document root are + represented by the data-def-stmt substatements within + this extension. This conceptual document is the context + for the following YANG statements: + + - must-stmt + - when-stmt + - path-stmt + - min-elements-stmt + - max-elements-stmt + - mandatory-stmt + - unique-stmt + - ordered-by + - instance-identifier data type + + The following data-def-stmt substatements are constrained + when used within a 'yang-data' extension statement. + + - The list-stmt is not required to have a key-stmt defined. + - The if-feature-stmt is ignored if present. + - The config-stmt is ignored if present. + - The available identity values for any 'identityref' + leaf or leaf-list nodes are limited to the module + containing this extension statement and the modules + imported into that module. + "; + } + + rc:yang-data yang-errors { + uses errors; + } + + rc:yang-data yang-api { + uses restconf; + } + + grouping errors { + description + "A grouping that contains a YANG container + representing the syntax and semantics of a + YANG Patch error report within a response message."; + + container errors { + description + "Represents an error report returned by the server if + a request results in an error."; + + list error { + description + "An entry containing information about one + specific error that occurred while processing + a RESTCONF request."; + reference + "RFC 6241, Section 4.3."; + + leaf error-type { + type enumeration { + enum transport { + description + "The transport layer."; + } + enum rpc { + description + "The rpc or notification layer."; + } + enum protocol { + description + "The protocol operation layer."; + } + enum application { + description + "The server application layer."; + } + } + mandatory true; + description + "The protocol layer where the error occurred."; + } + + leaf error-tag { + type string; + mandatory true; + description + "The enumerated error-tag."; + } + + leaf error-app-tag { + type string; + description + "The application-specific error-tag."; + } + + leaf error-path { + type instance-identifier; + description + "The YANG instance identifier associated + with the error node."; + } + + leaf error-message { + type string; + description + "A message describing the error."; + } + +// anydata error-info { +// description +// "This anydata value MUST represent a container with +// zero or more data nodes representing additional +// error information."; +// } + } + } + } + + grouping restconf { + description + "Conceptual grouping representing the RESTCONF + root resource."; + + container restconf { + description + "Conceptual container representing the RESTCONF + root resource."; + + container data { + description + "Container representing the datastore resource. + Represents the conceptual root of all state data + and configuration data supported by the server. + The child nodes of this container can be any data + resources that are defined as top-level data nodes + from the YANG modules advertised by the server in + the 'ietf-yang-library' module."; + } + + container operations { + description + "Container for all operation resources. + + Each resource is represented as an empty leaf with the + name of the RPC operation from the YANG 'rpc' statement. + + For example, the 'system-restart' RPC operation defined + in the 'ietf-system' module would be represented as + an empty leaf in the 'ietf-system' namespace. This is + a conceptual leaf and will not actually be found in + the module: + + module ietf-system { + leaf system-reset { + type empty; + } + } + + To invoke the 'system-restart' RPC operation: + + POST /restconf/operations/ietf-system:system-restart + + To discover the RPC operations supported by the server: + + GET /restconf/operations + + In XML, the YANG module namespace identifies the module: + + <system-restart + xmlns='urn:ietf:params:xml:ns:yang:ietf-system'/> + + In JSON, the YANG module name identifies the module: + + { 'ietf-system:system-restart' : [null] } + "; + } + leaf yang-library-version { + type string { + pattern '\d{4}-\d{2}-\d{2}'; + } + config false; + mandatory true; + description + "Identifies the revision date of the 'ietf-yang-library' + module that is implemented by this RESTCONF server. + Indicates the year, month, and day in YYYY-MM-DD + numeric format."; + } + } + } + +} diff --git a/demo-mts91/src/samples/ietf/ietf-yang-types@2013-07-15.yang b/demo-mts91/src/samples/ietf/ietf-yang-types@2013-07-15.yang new file mode 100644 index 0000000000000000000000000000000000000000..ee58fa3ab0042120d5607b8713d21fa0ba845895 --- /dev/null +++ b/demo-mts91/src/samples/ietf/ietf-yang-types@2013-07-15.yang @@ -0,0 +1,474 @@ +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."; + } +} diff --git a/demo-mts91/src/samples/json/model.json b/demo-mts91/src/samples/json/model.json new file mode 100644 index 0000000000000000000000000000000000000000..9f9f33b054d838035714977f83039eaa30bd3311 --- /dev/null +++ b/demo-mts91/src/samples/json/model.json @@ -0,0 +1,39 @@ +{ + "authors": [ + { + "name": "Alfonso" + }, + { + "name": "Alfred" + } + ], + "books": [ + { + "title": "Book One", + "authors": [ + { + "name": "Author One" + }, + { + "name": "Author Two" + } + ] + }, + { + "title": "Book Two", + "authors": [ + { + "name": "Alfonso" + } + ] + }, + { + "title": "Book Three", + "authors": [ + { + "name": "Alfred" + } + ] + } + ] +} \ No newline at end of file diff --git a/demo-mts91/src/samples/mwt/iana-if-type@2023-01-26.yang b/demo-mts91/src/samples/mwt/iana-if-type@2023-01-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..036e1f9145d2092f6218b85f7d8553cfed1d6c95 --- /dev/null +++ b/demo-mts91/src/samples/mwt/iana-if-type@2023-01-26.yang @@ -0,0 +1,1852 @@ +module iana-if-type { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:iana-if-type"; + prefix ianaift; + + import ietf-interfaces { + prefix if; + } + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States + + Tel: +1 310 301 5800 + <mailto:iana@iana.org>"; + description + "This YANG module defines YANG identities for IANA-registered + interface types. + + This YANG module is maintained by IANA and reflects the + 'ifType definitions' registry. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2014 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). + + The initial version of this YANG module is part of RFC 7224; + see the RFC itself for full legal notices."; + reference + "IANA 'ifType definitions' registry. + <http://www.iana.org/assignments/smi-numbers>"; + + revision 2023-01-26 { + description + "Fix incorrect quotation for previous 3 revision statements."; + } + + revision 2022-08-24 { + description + "Updated reference for ifType 303."; + } + + revision 2022-08-17 { + description + "Changed gpon description to refer to G.984."; + } + + revision 2022-03-07 { + description + "Coalesced revision history entries for 2018-06-28."; + } + + revision 2021-06-21 { + description + "Corrected reference for ifType 303."; + } + + revision 2021-05-17 { + description + "Registered ifType 303."; + } + + revision 2021-04-22 { + description + "Registered ifType 302."; + } + + revision 2021-04-01 { + description + "Updated reference for 301."; + } + + revision 2021-02-18 { + description + "Registered ifType 301."; + } + + revision 2020-08-27 { + description + "Added missing references."; + } + + revision 2020-07-13 { + description + "Added identity cpri."; + } + + revision 2020-07-10 { + description + "Registered ifType 300."; + } + + revision 2020-01-10 { + description + "Registered ifType 299."; + } + + revision 2019-10-16 { + description + "Registered ifType 298."; + } + revision 2019-07-16 { + description + "Registered ifType 297."; + } + revision 2019-06-21 { + description + "Updated reference associated with ifTypes 295-296."; + } + + revision 2019-02-08 { + description + "Corrected formatting issue."; + } + + revision 2019-01-31 { + description + "Registered ifTypes 295-296."; + } + + revision 2018-07-03 { + description + "Corrected revision date."; + } + + revision 2018-06-29 { + description + "Corrected formatting issue."; + } + + revision 2018-06-28 { + description + "Registered ifTypes 293 and 294."; + } + + revision 2018-06-22 { + description + "Registered ifType 292."; + } + + revision 2018-06-21 { + description + "Registered ifType 291."; + } + + revision 2017-03-30 { + description + "Registered ifType 290."; + } + + revision 2017-01-19 { + description + "Registered ifType 289."; + } + + revision 2016-11-23 { + description + "Registered ifTypes 283-288."; + } + + revision 2016-06-09 { + description + "Registered ifType 282."; + } + revision 2016-05-03 { + description + "Registered ifType 281."; + } + revision 2015-06-12 { + description + "Corrected formatting issue."; + } + revision 2014-09-24 { + description + "Registered ifType 280."; + } + revision 2014-09-19 { + description + "Registered ifType 279."; + } + revision 2014-07-03 { + description + "Registered ifTypes 277-278."; + } + revision 2014-05-19 { + description + "Updated the contact address."; + } + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + identity iana-interface-type { + base if:interface-type; + description + "This identity is used as a base for all interface types + defined in the 'ifType definitions' registry."; + } + + identity other { + base iana-interface-type; + } + identity regular1822 { + base iana-interface-type; + } + identity hdh1822 { + base iana-interface-type; + } + identity ddnX25 { + base iana-interface-type; + } + identity rfc877x25 { + base iana-interface-type; + reference + "RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer"; + } + identity ethernetCsmacd { + base iana-interface-type; + description + "For all Ethernet-like interfaces, regardless of speed, + as per RFC 3635."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88023Csmacd { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88024TokenBus { + base iana-interface-type; + } + identity iso88025TokenRing { + base iana-interface-type; + } + identity iso88026Man { + base iana-interface-type; + } + identity starLan { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity proteon10Mbit { + base iana-interface-type; + } + identity proteon80Mbit { + base iana-interface-type; + } + identity hyperchannel { + base iana-interface-type; + } + identity fddi { + base iana-interface-type; + reference + "RFC 1512 - FDDI Management Information Base"; + } + identity lapb { + base iana-interface-type; + reference + "RFC 1381 - SNMP MIB Extension for X.25 LAPB"; + } + identity sdlc { + base iana-interface-type; + } + identity ds1 { + base iana-interface-type; + description + "DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity e1 { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity basicISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity primaryISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity propPointToPointSerial { + base iana-interface-type; + description + "Proprietary serial."; + } + identity ppp { + base iana-interface-type; + } + identity softwareLoopback { + base iana-interface-type; + } + identity eon { + base iana-interface-type; + description + "CLNP over IP."; + } + identity ethernet3Mbit { + base iana-interface-type; + } + identity nsip { + base iana-interface-type; + description + "XNS over IP."; + } + identity slip { + base iana-interface-type; + description + "Generic SLIP."; + } + identity ultra { + base iana-interface-type; + description + "Ultra Technologies."; + } + identity ds3 { + base iana-interface-type; + description + "DS3-MIB."; + reference + "RFC 3896 - Definitions of Managed Objects for the + DS3/E3 Interface Type"; + } + identity sip { + base iana-interface-type; + description + "SMDS, coffee."; + reference + "RFC 1694 - Definitions of Managed Objects for SMDS + Interfaces using SMIv2"; + } + identity frameRelay { + base iana-interface-type; + description + "DTE only."; + reference + "RFC 2115 - Management Information Base for Frame Relay + DTEs Using SMIv2"; + } + identity rs232 { + base iana-interface-type; + reference + "RFC 1659 - Definitions of Managed Objects for RS-232-like + Hardware Devices using SMIv2"; + } + identity para { + base iana-interface-type; + description + "Parallel-port."; + reference + "RFC 1660 - Definitions of Managed Objects for + Parallel-printer-like Hardware Devices using + SMIv2"; + } + identity arcnet { + base iana-interface-type; + description + "ARCnet."; + } + identity arcnetPlus { + base iana-interface-type; + description + "ARCnet Plus."; + } + identity atm { + base iana-interface-type; + description + "ATM cells."; + } + identity miox25 { + base iana-interface-type; + reference + "RFC 1461 - SNMP MIB extension for Multiprotocol + Interconnect over X.25"; + } + identity sonet { + base iana-interface-type; + description + "SONET or SDH."; + } + identity x25ple { + base iana-interface-type; + reference + "RFC 2127 - ISDN Management Information Base using SMIv2"; + } + identity iso88022llc { + base iana-interface-type; + } + identity localTalk { + base iana-interface-type; + } + identity smdsDxi { + base iana-interface-type; + } + identity frameRelayService { + base iana-interface-type; + description + "FRNETSERV-MIB."; + reference + "RFC 2954 - Definitions of Managed Objects for Frame + Relay Service"; + } + identity v35 { + base iana-interface-type; + } + identity hssi { + base iana-interface-type; + } + identity hippi { + base iana-interface-type; + } + identity modem { + base iana-interface-type; + description + "Generic modem."; + } + identity aal5 { + base iana-interface-type; + description + "AAL5 over ATM."; + } + identity sonetPath { + base iana-interface-type; + } + identity sonetVT { + base iana-interface-type; + } + identity smdsIcip { + base iana-interface-type; + description + "SMDS InterCarrier Interface."; + } + identity propVirtual { + base iana-interface-type; + description + "Proprietary virtual/internal."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity propMultiplexor { + base iana-interface-type; + description + "Proprietary multiplexing."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity ieee80212 { + base iana-interface-type; + description + "100BaseVG."; + } + identity fibreChannel { + base iana-interface-type; + description + "Fibre Channel."; + } + identity hippiInterface { + base iana-interface-type; + description + "HIPPI interfaces."; + } + identity frameRelayInterconnect { + base iana-interface-type; + status obsolete; + description + "Obsolete; use either + frameRelay(32) or frameRelayService(44)."; + } + identity aflane8023 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.3."; + } + identity aflane8025 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.5."; + } + identity cctEmul { + base iana-interface-type; + description + "ATM Emulated circuit."; + } + identity fastEther { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity isdn { + base iana-interface-type; + description + "ISDN and X.25."; + reference + "RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN + in the Packet Mode"; + } + identity v11 { + base iana-interface-type; + description + "CCITT V.11/X.21."; + } + identity v36 { + base iana-interface-type; + description + "CCITT V.36."; + } + identity g703at64k { + base iana-interface-type; + description + "CCITT G703 at 64Kbps."; + } + identity g703at2mb { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + } + identity qllc { + base iana-interface-type; + description + "SNA QLLC."; + } + identity fastEtherFX { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity channel { + base iana-interface-type; + description + "Channel."; + } + identity ieee80211 { + base iana-interface-type; + description + "Radio spread spectrum."; + } + identity ibm370parChan { + base iana-interface-type; + description + "IBM System 360/370 OEMI Channel."; + } + identity escon { + base iana-interface-type; + description + "IBM Enterprise Systems Connection."; + } + identity dlsw { + base iana-interface-type; + description + "Data Link Switching."; + } + identity isdns { + base iana-interface-type; + description + "ISDN S/T interface."; + } + identity isdnu { + base iana-interface-type; + description + "ISDN U interface."; + } + identity lapd { + base iana-interface-type; + description + "Link Access Protocol D."; + } + identity ipSwitch { + base iana-interface-type; + description + "IP Switching Objects."; + } + identity rsrb { + base iana-interface-type; + description + "Remote Source Route Bridging."; + } + identity atmLogical { + base iana-interface-type; + description + "ATM Logical Port."; + reference + "RFC 3606 - Definitions of Supplemental Managed Objects + for ATM Interface"; + } + identity ds0 { + base iana-interface-type; + description + "Digital Signal Level 0."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity ds0Bundle { + base iana-interface-type; + description + "Group of ds0s on the same ds1."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity bsc { + base iana-interface-type; + description + "Bisynchronous Protocol."; + } + identity async { + base iana-interface-type; + description + "Asynchronous Protocol."; + } + identity cnr { + base iana-interface-type; + description + "Combat Net Radio."; + } + identity iso88025Dtr { + base iana-interface-type; + description + "ISO 802.5r DTR."; + } + identity eplrs { + base iana-interface-type; + description + "Ext Pos Loc Report Sys."; + } + identity arap { + base iana-interface-type; + description + "Appletalk Remote Access Protocol."; + } + identity propCnls { + base iana-interface-type; + description + "Proprietary Connectionless Protocol."; + } + identity hostPad { + base iana-interface-type; + description + "CCITT-ITU X.29 PAD Protocol."; + } + identity termPad { + base iana-interface-type; + description + "CCITT-ITU X.3 PAD Facility."; + } + identity frameRelayMPI { + base iana-interface-type; + description + "Multiproto Interconnect over FR."; + } + identity x213 { + base iana-interface-type; + description + "CCITT-ITU X213."; + } + identity adsl { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop."; + } + identity radsl { + base iana-interface-type; + description + "Rate-Adapt. Digital Subscriber Loop."; + } + identity sdsl { + base iana-interface-type; + description + "Symmetric Digital Subscriber Loop."; + } + identity vdsl { + base iana-interface-type; + description + "Very H-Speed Digital Subscrib. Loop."; + } + identity iso88025CRFPInt { + base iana-interface-type; + description + "ISO 802.5 CRFP."; + } + identity myrinet { + base iana-interface-type; + description + "Myricom Myrinet."; + } + identity voiceEM { + base iana-interface-type; + description + "Voice recEive and transMit."; + } + identity voiceFXO { + base iana-interface-type; + description + "Voice Foreign Exchange Office."; + } + identity voiceFXS { + base iana-interface-type; + description + "Voice Foreign Exchange Station."; + } + identity voiceEncap { + base iana-interface-type; + description + "Voice encapsulation."; + } + identity voiceOverIp { + base iana-interface-type; + description + "Voice over IP encapsulation."; + } + identity atmDxi { + base iana-interface-type; + description + "ATM DXI."; + } + identity atmFuni { + base iana-interface-type; + description + "ATM FUNI."; + } + identity atmIma { + base iana-interface-type; + description + "ATM IMA."; + } + identity pppMultilinkBundle { + base iana-interface-type; + description + "PPP Multilink Bundle."; + } + identity ipOverCdlc { + base iana-interface-type; + description + "IBM ipOverCdlc."; + } + identity ipOverClaw { + base iana-interface-type; + description + "IBM Common Link Access to Workstn."; + } + identity stackToStack { + base iana-interface-type; + description + "IBM stackToStack."; + } + identity virtualIpAddress { + base iana-interface-type; + description + "IBM VIPA."; + } + identity mpc { + base iana-interface-type; + description + "IBM multi-protocol channel support."; + } + identity ipOverAtm { + base iana-interface-type; + description + "IBM ipOverAtm."; + reference + "RFC 2320 - Definitions of Managed Objects for Classical IP + and ARP Over ATM Using SMIv2 (IPOA-MIB)"; + } + identity iso88025Fiber { + base iana-interface-type; + description + "ISO 802.5j Fiber Token Ring."; + } + identity tdlc { + base iana-interface-type; + description + "IBM twinaxial data link control."; + } + identity gigabitEthernet { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity hdlc { + base iana-interface-type; + description + "HDLC."; + } + identity lapf { + base iana-interface-type; + description + "LAP F."; + } + identity v37 { + base iana-interface-type; + description + "V.37."; + } + identity x25mlp { + base iana-interface-type; + description + "Multi-Link Protocol."; + } + identity x25huntGroup { + base iana-interface-type; + description + "X25 Hunt Group."; + } + identity transpHdlc { + base iana-interface-type; + description + "Transp HDLC."; + } + identity interleave { + base iana-interface-type; + description + "Interleave channel."; + } + identity fast { + base iana-interface-type; + description + "Fast channel."; + } + identity ip { + base iana-interface-type; + description + "IP (for APPN HPR in IP networks)."; + } + identity docsCableMaclayer { + base iana-interface-type; + description + "CATV Mac Layer."; + } + identity docsCableDownstream { + base iana-interface-type; + description + "CATV Downstream interface."; + } + identity docsCableUpstream { + base iana-interface-type; + description + "CATV Upstream interface."; + } + identity a12MppSwitch { + base iana-interface-type; + description + "Avalon Parallel Processor."; + } + identity tunnel { + base iana-interface-type; + description + "Encapsulation interface."; + } + identity coffee { + base iana-interface-type; + description + "Coffee pot."; + reference + "RFC 2325 - Coffee MIB"; + } + identity ces { + base iana-interface-type; + description + "Circuit Emulation Service."; + } + identity atmSubInterface { + base iana-interface-type; + description + "ATM Sub Interface."; + } + identity l2vlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using 802.1Q."; + } + identity l3ipvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IP."; + } + identity l3ipxvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IPX."; + } + identity digitalPowerline { + base iana-interface-type; + description + "IP over Power Lines."; + } + identity mediaMailOverIp { + base iana-interface-type; + description + "Multimedia Mail over IP."; + } + identity dtm { + base iana-interface-type; + description + "Dynamic synchronous Transfer Mode."; + } + identity dcn { + base iana-interface-type; + description + "Data Communications Network."; + } + identity ipForward { + base iana-interface-type; + description + "IP Forwarding Interface."; + } + identity msdsl { + base iana-interface-type; + description + "Multi-rate Symmetric DSL."; + } + identity ieee1394 { + base iana-interface-type; + + description + "IEEE1394 High Performance Serial Bus."; + } + identity if-gsn { + base iana-interface-type; + description + "HIPPI-6400."; + } + identity dvbRccMacLayer { + base iana-interface-type; + description + "DVB-RCC MAC Layer."; + } + identity dvbRccDownstream { + base iana-interface-type; + description + "DVB-RCC Downstream Channel."; + } + identity dvbRccUpstream { + base iana-interface-type; + description + "DVB-RCC Upstream Channel."; + } + identity atmVirtual { + base iana-interface-type; + description + "ATM Virtual Interface."; + } + identity mplsTunnel { + base iana-interface-type; + description + "MPLS Tunnel Virtual Interface."; + } + identity srp { + base iana-interface-type; + description + "Spatial Reuse Protocol."; + } + identity voiceOverAtm { + base iana-interface-type; + description + "Voice over ATM."; + } + identity voiceOverFrameRelay { + base iana-interface-type; + description + "Voice Over Frame Relay."; + } + identity idsl { + base iana-interface-type; + description + "Digital Subscriber Loop over ISDN."; + } + identity compositeLink { + base iana-interface-type; + description + "Avici Composite Link Interface."; + } + identity ss7SigLink { + base iana-interface-type; + description + "SS7 Signaling Link."; + } + identity propWirelessP2P { + base iana-interface-type; + description + "Prop. P2P wireless interface."; + } + identity frForward { + base iana-interface-type; + description + "Frame Forward Interface."; + } + identity rfc1483 { + base iana-interface-type; + description + "Multiprotocol over ATM AAL5."; + reference + "RFC 1483 - Multiprotocol Encapsulation over ATM + Adaptation Layer 5"; + } + identity usb { + base iana-interface-type; + description + "USB Interface."; + } + identity ieee8023adLag { + base iana-interface-type; + description + "IEEE 802.3ad Link Aggregate."; + } + identity bgppolicyaccounting { + base iana-interface-type; + description + "BGP Policy Accounting."; + } + identity frf16MfrBundle { + base iana-interface-type; + description + "FRF.16 Multilink Frame Relay."; + } + identity h323Gatekeeper { + base iana-interface-type; + description + "H323 Gatekeeper."; + } + identity h323Proxy { + base iana-interface-type; + description + "H323 Voice and Video Proxy."; + } + identity mpls { + base iana-interface-type; + description + "MPLS."; + } + identity mfSigLink { + base iana-interface-type; + description + "Multi-frequency signaling link."; + } + identity hdsl2 { + base iana-interface-type; + description + "High Bit-Rate DSL - 2nd generation."; + } + identity shdsl { + base iana-interface-type; + description + "Multirate HDSL2."; + } + identity ds1FDL { + base iana-interface-type; + description + "Facility Data Link (4Kbps) on a DS1."; + } + identity pos { + base iana-interface-type; + description + "Packet over SONET/SDH Interface."; + } + identity dvbAsiIn { + base iana-interface-type; + description + "DVB-ASI Input."; + } + identity dvbAsiOut { + base iana-interface-type; + description + "DVB-ASI Output."; + } + identity plc { + base iana-interface-type; + description + "Power Line Communications."; + } + identity nfas { + base iana-interface-type; + description + "Non-Facility Associated Signaling."; + } + identity tr008 { + base iana-interface-type; + description + "TR008."; + } + identity gr303RDT { + base iana-interface-type; + description + "Remote Digital Terminal."; + } + identity gr303IDT { + base iana-interface-type; + description + "Integrated Digital Terminal."; + } + identity isup { + base iana-interface-type; + description + "ISUP."; + } + identity propDocsWirelessMaclayer { + base iana-interface-type; + description + "Cisco proprietary Maclayer."; + } + identity propDocsWirelessDownstream { + base iana-interface-type; + description + "Cisco proprietary Downstream."; + } + identity propDocsWirelessUpstream { + base iana-interface-type; + description + "Cisco proprietary Upstream."; + } + identity hiperlan2 { + base iana-interface-type; + description + "HIPERLAN Type 2 Radio Interface."; + } + identity propBWAp2Mp { + base iana-interface-type; + description + "PropBroadbandWirelessAccesspt2Multipt (use of this value + for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f + is deprecated, and ieee80216WMAN(237) should be used + instead)."; + } + identity sonetOverheadChannel { + base iana-interface-type; + description + "SONET Overhead Channel."; + } + identity digitalWrapperOverheadChannel { + base iana-interface-type; + description + "Digital Wrapper."; + } + identity aal2 { + base iana-interface-type; + description + "ATM adaptation layer 2."; + } + identity radioMAC { + base iana-interface-type; + description + "MAC layer over radio links."; + } + identity atmRadio { + base iana-interface-type; + description + "ATM over radio links."; + } + identity imt { + base iana-interface-type; + description + "Inter-Machine Trunks."; + } + identity mvl { + base iana-interface-type; + description + "Multiple Virtual Lines DSL."; + } + identity reachDSL { + base iana-interface-type; + description + "Long Reach DSL."; + } + identity frDlciEndPt { + base iana-interface-type; + description + "Frame Relay DLCI End Point."; + } + identity atmVciEndPt { + base iana-interface-type; + description + "ATM VCI End Point."; + } + identity opticalChannel { + base iana-interface-type; + description + "Optical Channel."; + } + identity opticalTransport { + base iana-interface-type; + description + "Optical Transport."; + } + identity propAtm { + base iana-interface-type; + description + "Proprietary ATM."; + } + identity voiceOverCable { + base iana-interface-type; + description + "Voice Over Cable Interface."; + } + identity infiniband { + base iana-interface-type; + description + "Infiniband."; + } + identity teLink { + base iana-interface-type; + description + "TE Link."; + } + identity q2931 { + base iana-interface-type; + description + "Q.2931."; + } + identity virtualTg { + base iana-interface-type; + description + "Virtual Trunk Group."; + } + identity sipTg { + base iana-interface-type; + description + "SIP Trunk Group."; + } + identity sipSig { + base iana-interface-type; + description + "SIP Signaling."; + } + identity docsCableUpstreamChannel { + base iana-interface-type; + description + "CATV Upstream Channel."; + } + identity econet { + base iana-interface-type; + description + "Acorn Econet."; + } + identity pon155 { + base iana-interface-type; + description + "FSAN 155Mb Symetrical PON interface."; + } + identity pon622 { + base iana-interface-type; + description + "FSAN 622Mb Symetrical PON interface."; + } + identity bridge { + base iana-interface-type; + description + "Transparent bridge interface."; + } + identity linegroup { + base iana-interface-type; + description + "Interface common to multiple lines."; + } + identity voiceEMFGD { + base iana-interface-type; + description + "Voice E&M Feature Group D."; + } + identity voiceFGDEANA { + base iana-interface-type; + description + "Voice FGD Exchange Access North American."; + } + identity voiceDID { + base iana-interface-type; + description + "Voice Direct Inward Dialing."; + } + identity mpegTransport { + base iana-interface-type; + description + "MPEG transport interface."; + } + identity sixToFour { + base iana-interface-type; + status deprecated; + description + "6to4 interface (DEPRECATED)."; + reference + "RFC 4087 - IP Tunnel MIB"; + } + identity gtp { + base iana-interface-type; + description + "GTP (GPRS Tunneling Protocol)."; + } + identity pdnEtherLoop1 { + base iana-interface-type; + description + "Paradyne EtherLoop 1."; + } + identity pdnEtherLoop2 { + base iana-interface-type; + description + "Paradyne EtherLoop 2."; + } + identity opticalChannelGroup { + base iana-interface-type; + description + "Optical Channel Group."; + } + identity homepna { + base iana-interface-type; + description + "HomePNA ITU-T G.989."; + } + identity gfp { + base iana-interface-type; + description + "Generic Framing Procedure (GFP)."; + } + identity ciscoISLvlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using Cisco ISL."; + } + identity actelisMetaLOOP { + base iana-interface-type; + description + "Acteleis proprietary MetaLOOP High Speed Link."; + } + identity fcipLink { + base iana-interface-type; + description + "FCIP Link."; + } + identity rpr { + base iana-interface-type; + description + "Resilient Packet Ring Interface Type."; + } + identity qam { + base iana-interface-type; + description + "RF Qam Interface."; + } + identity lmp { + base iana-interface-type; + description + "Link Management Protocol."; + reference + "RFC 4327 - Link Management Protocol (LMP) Management + Information Base (MIB)"; + } + identity cblVectaStar { + base iana-interface-type; + description + "Cambridge Broadband Networks Limited VectaStar."; + } + identity docsCableMCmtsDownstream { + base iana-interface-type; + description + "CATV Modular CMTS Downstream Interface."; + } + identity adsl2 { + base iana-interface-type; + status deprecated; + description + "Asymmetric Digital Subscriber Loop Version 2 + (DEPRECATED/OBSOLETED - please use adsl2plus(238) + instead)."; + reference + "RFC 4706 - Definitions of Managed Objects for Asymmetric + Digital Subscriber Line 2 (ADSL2)"; + } + identity macSecControlledIF { + base iana-interface-type; + description + "MACSecControlled."; + } + identity macSecUncontrolledIF { + base iana-interface-type; + description + "MACSecUncontrolled."; + } + identity aviciOpticalEther { + base iana-interface-type; + description + "Avici Optical Ethernet Aggregate."; + } + identity atmbond { + base iana-interface-type; + description + "atmbond."; + } + identity voiceFGDOS { + base iana-interface-type; + description + "Voice FGD Operator Services."; + } + identity mocaVersion1 { + base iana-interface-type; + description + "MultiMedia over Coax Alliance (MoCA) Interface + as documented in information provided privately to IANA."; + } + identity ieee80216WMAN { + base iana-interface-type; + description + "IEEE 802.16 WMAN interface."; + } + identity adsl2plus { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop Version 2 - + Version 2 Plus and all variants."; + } + identity dvbRcsMacLayer { + base iana-interface-type; + description + "DVB-RCS MAC Layer."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbTdm { + base iana-interface-type; + description + "DVB Satellite TDM."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbRcsTdma { + base iana-interface-type; + description + "DVB-RCS TDMA."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity x86Laps { + base iana-interface-type; + description + "LAPS based on ITU-T X.86/Y.1323."; + } + identity wwanPP { + base iana-interface-type; + description + "3GPP WWAN."; + } + identity wwanPP2 { + base iana-interface-type; + description + "3GPP2 WWAN."; + } + identity voiceEBS { + base iana-interface-type; + description + "Voice P-phone EBS physical interface."; + } + identity ifPwType { + base iana-interface-type; + description + "Pseudowire interface type."; + reference + "RFC 5601 - Pseudowire (PW) Management Information Base (MIB)"; + } + identity ilan { + base iana-interface-type; + description + "Internal LAN on a bridge per IEEE 802.1ap."; + } + identity pip { + base iana-interface-type; + description + "Provider Instance Port on a bridge per IEEE 802.1ah PBB."; + } + identity aluELP { + base iana-interface-type; + description + "Alcatel-Lucent Ethernet Link Protection."; + } + identity gpon { + base iana-interface-type; + description + "Gigabit-capable passive optical networks (G-PON) as per + ITU-T G.984."; + } + identity vdsl2 { + base iana-interface-type; + description + "Very high speed digital subscriber line Version 2 + (as per ITU-T Recommendation G.993.2)."; + reference + "RFC 5650 - Definitions of Managed Objects for Very High + Speed Digital Subscriber Line 2 (VDSL2)"; + } + identity capwapDot11Profile { + base iana-interface-type; + description + "WLAN Profile Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapDot11Bss { + base iana-interface-type; + description + "WLAN BSS Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapWtpVirtualRadio { + base iana-interface-type; + description + "WTP Virtual Radio Interface."; + reference + "RFC 5833 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Base MIB"; + } + identity bits { + base iana-interface-type; + description + "bitsport."; + } + identity docsCableUpstreamRfPort { + base iana-interface-type; + description + "DOCSIS CATV Upstream RF Port."; + } + identity cableDownstreamRfPort { + base iana-interface-type; + description + "CATV downstream RF Port."; + } + identity vmwareVirtualNic { + base iana-interface-type; + description + "VMware Virtual Network Interface."; + } + identity ieee802154 { + base iana-interface-type; + description + "IEEE 802.15.4 WPAN interface."; + reference + "IEEE 802.15.4-2006"; + } + identity otnOdu { + base iana-interface-type; + description + "OTN Optical Data Unit."; + } + identity otnOtu { + base iana-interface-type; + description + "OTN Optical channel Transport Unit."; + } + identity ifVfiType { + base iana-interface-type; + description + "VPLS Forwarding Instance Interface Type."; + } + identity g9981 { + base iana-interface-type; + description + "G.998.1 bonded interface."; + } + identity g9982 { + base iana-interface-type; + description + "G.998.2 bonded interface."; + } + identity g9983 { + base iana-interface-type; + description + "G.998.3 bonded interface."; + } + + identity aluEpon { + base iana-interface-type; + description + "Ethernet Passive Optical Networks (E-PON)."; + } + identity aluEponOnu { + base iana-interface-type; + description + "EPON Optical Network Unit."; + } + identity aluEponPhysicalUni { + base iana-interface-type; + description + "EPON physical User to Network interface."; + } + identity aluEponLogicalLink { + base iana-interface-type; + description + "The emulation of a point-to-point link over the EPON + layer."; + } + identity aluGponOnu { + base iana-interface-type; + description + "GPON Optical Network Unit."; + reference + "ITU-T G.984.2"; + } + identity aluGponPhysicalUni { + base iana-interface-type; + description + "GPON physical User to Network interface."; + reference + "ITU-T G.984.2"; + } + identity vmwareNicTeam { + base iana-interface-type; + description + "VMware NIC Team."; + } + identity docsOfdmDownstream { + base iana-interface-type; + description + "CATV Downstream OFDM interface."; + reference + "Cable Modem Operations Support System Interface + Specification"; + } + identity docsOfdmaUpstream { + base iana-interface-type; + description + "CATV Upstream OFDMA interface."; + reference + "Cable Modem Operations Support System Interface + Specification"; + } + identity gfast { + base iana-interface-type; + description + "G.fast port."; + reference + "ITU-T G.9701"; + } + identity sdci { + base iana-interface-type; + description + "SDCI (IO-Link)."; + reference + "IEC 61131-9 Edition 1.0 2013-09"; + } + identity xboxWireless { + base iana-interface-type; + description + "Xbox wireless."; + } + identity fastdsl { + base iana-interface-type; + description + "FastDSL."; + reference + "BBF TR-355"; + } + identity docsCableScte55d1FwdOob { + base iana-interface-type; + description + "Cable SCTE 55-1 OOB Forward Channel."; + reference + "ANSI/SCTE 55-1 2009"; + } + identity docsCableScte55d1RetOob { + base iana-interface-type; + description + "Cable SCTE 55-1 OOB Return Channel."; + reference + "ANSI/SCTE 55-1 2009"; + } + identity docsCableScte55d2DsOob { + base iana-interface-type; + description + "Cable SCTE 55-2 OOB Downstream Channel."; + reference + "ANSI/SCTE 55-2 2008"; + } + identity docsCableScte55d2UsOob { + base iana-interface-type; + description + "Cable SCTE 55-2 OOB Upstream Channel."; + reference + "ANSI/SCTE 55-2 2008"; + } + identity docsCableNdf { + base iana-interface-type; + description + "Cable Narrowband Digital Forward."; + } + identity docsCableNdr { + base iana-interface-type; + description + "Cable Narrowband Digital Return."; + } + identity ptm { + base iana-interface-type; + description + "Packet Transfer Mode."; + reference + "IEEE G.993.1, Annex H; IEEE G.993.2; IEEE G.9701"; + } + identity ghn { + base iana-interface-type; + description + "G.hn port."; + reference + "IEEE G.9961"; + } + identity otnOtsi { + base iana-interface-type; + description + "Optical Tributary Signal."; + reference + "ITU-T G.959.1"; + } + identity otnOtuc { + base iana-interface-type; + description + "OTN OTUCn."; + reference + "ITU-T G.709/Y.1331"; + } + identity otnOduc { + base iana-interface-type; + description + "OTN ODUC."; + reference + "ITU-T G.709"; + } + identity otnOtsig { + base iana-interface-type; + description + "OTN OTUC Signal."; + reference + "ITU-T G.709"; + } + identity microwaveCarrierTermination { + base iana-interface-type; + description + "air interface of a single microwave carrier."; + reference + "RFC 8561 - A YANG Data Model for Microwave Radio Link"; + } + identity microwaveRadioLinkTerminal { + base iana-interface-type; + description + "radio link interface for one or several aggregated microwave carriers."; + reference + "RFC 8561 - A YANG Data Model for Microwave Radio Link"; + } + identity ieee8021axDrni { + base iana-interface-type; + description + "IEEE 802.1AX Distributed Resilient Network Interface."; + reference + "IEEE 802.1AX-Rev-d2-0"; + } + identity ax25 { + base iana-interface-type; + description + "AX.25 network interfaces."; + reference + "AX.25 Link Access Protocol for Amateur Packet Radio version 2.2"; + } + identity ieee19061nanocom { + base iana-interface-type; + description + "Nanoscale and Molecular Communication."; + reference + "IEEE 1906.1-2015"; + } + identity cpri { + base iana-interface-type; + description + "Common Public Radio Interface."; + reference + "CPRI v7.0"; + } + identity omni { + base iana-interface-type; + description + "Overlay Multilink Network Interface (OMNI)."; + reference + "draft-templin-6man-omni-00"; + } + identity roe { + base iana-interface-type; + description + "Radio over Ethernet Interface."; + reference + "1914.3-2018 - IEEE Standard for Radio over Ethernet Encapsulations and Mappings"; + } + identity p2pOverLan { + base iana-interface-type; + description + "Point to Point over LAN interface."; + reference + "RFC 9296 - ifStackTable for the Point-to-Point (P2P) Interface over a LAN Type: Definition and Examples"; + } +} diff --git a/demo-mts91/src/samples/mwt/ieee802-dot1q-bridge.yang b/demo-mts91/src/samples/mwt/ieee802-dot1q-bridge.yang new file mode 100644 index 0000000000000000000000000000000000000000..2c7d9f9d55ee877fbd50739a15c7f799d8cb735f --- /dev/null +++ b/demo-mts91/src/samples/mwt/ieee802-dot1q-bridge.yang @@ -0,0 +1,1795 @@ +module ieee802-dot1q-bridge { + yang-version "1.1"; + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge; + prefix dot1q; + import ieee802-types { + prefix ieee; + } + import ietf-yang-types { + prefix yang; + } + import ietf-interfaces { + prefix if; + } + import iana-if-type { + prefix ianaif; + } + import ieee802-dot1q-types { + prefix dot1qtypes; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "This YANG module describes the bridge configuration model for the + following IEEE 802.1Q Bridges: + 1) Two Port MAC Relays + 2) Customer VLAN Bridges + 3) Provider Bridges. + + Copyright (C) IEEE (2022). + + This version of this YANG module is part of IEEE Std 802.1Q; see the + standard itself for full legal notices."; + revision 2022-05-06 { + description + "Rebase Qrev with Qcw updates."; + reference + "IEEE Std 802.1Q-2022, Bridges and Bridged Networks."; + } + revision 2022-01-19 { + description + "Published as part of IEEE Std 802.1Q-2022."; + reference + "IEEE Std 802.1Q-2022, Bridges and Bridged Networks."; + } + revision 2020-11-06 { + description + "Published as part of IEEE Std 802.1Qcr-2020. Third version."; + reference + "IEEE Std 802.1Qcr-2020, Bridges and Bridged Networks - + Asynchronous Traffic Shaping."; + } + revision 2020-06-04 { + description + "Published as part of IEEE Std 802.1Qcx-2020. Second version."; + reference + "IEEE Std 802.1Qcx-2020, Bridges and Bridged Networks - YANG Data + Model for Connectivity Fault Management."; + } + revision 2018-03-07 { + description + "Published as part of IEEE Std 802.1Q-2018. Initial version."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + feature ingress-filtering { + description + "Each Port may support an Enable Ingress Filtering parameter. A + frame received on a Port that is not in the member set (8.8.10) + associated with the frames VID shall be discarded if this + parameter is set. The default value for this parameter is reset, + i.e., Disable Ingress Filtering, for all Ports. Any Port that + supports setting this parameter shall also support resetting it. + The parameter may be configured by the management operations + defined in Clause 12."; + reference + "8.6.2 of IEEE Std 802.1Q-2022"; + } + feature extended-filtering-services { + description + "Extended Filtering Services support the filtering behavior + required for regions of a network in which potential recipients of + multicast frames exist, and where both the potential recipients of + frames and the Bridges are able to support dynamic configuration + of filtering information for group MAC addresses. In order to + integrate this extended filtering behavior with the needs of + regions of the network that support only Basic Filtering Services, + Bridges that support Extended Filtering Services can be statically + and dynamically configured to modify their filtering behavior on a + per-group MAC address basis, and also on the basis of the overall + filtering service provided by each outbound Port with regard to + multicast frames. The latter capability permits configuration of + the Ports default forwarding or filtering behavior with regard to + group MAC addresses for which no specific static or dynamic + filtering information has been configured."; + reference + "8.8.4, Clause 10 of IEEE Std 802.1Q-2022"; + } + feature port-and-protocol-based-vlan { + description + "A VLAN-aware bridge component implementation in conformance to + the provisions of this standard for Port-and-Protocol-based VLAN + classification (5.4.1) shall 1) Support one or more of the + following Protocol Classifications and Protocol Template formats: + Ethernet, RFC_1042, SNAP_8021H, SNAP_Other, or LLC_Other (6.12); + and may 2) Support configuration of the contents of the Protocol + Group Database."; + reference + "5.4.1.2 of IEEE Std 802.1Q-2022"; + } + feature flow-filtering { + description + "Flow filtering support enables Bridges to distinguish frames + belonging to different client flows and to use this information in + the forwarding process. Information related to client flows may be + used at the boundary of an SPT Domain to generate a flow hash + value. The flow hash, carried in an F-TAG, serves to distinguish + frames belonging to different flows and can be used in the + forwarding process to distribute frames over equal cost paths. + This provides for finer granularity load spreading while + maintaining frame order for each client flow."; + reference + "44.2 of IEEE Std 802.1Q-2022"; + } + feature simple-bridge-port { + description + "A simple bridge port allows underlying (MAC) layers to share the + same Interface as the Bridge Port."; + } + feature flexible-bridge-port { + description + "A flexible bridge port supports an Interface that is a Bridge + Port to be a separate Interface from the underlying (MAC) layer."; + } + identity type-of-bridge { + description + "Represents the configured Bridge type."; + } + identity customer-vlan-bridge { + base type-of-bridge; + description + "Base identity for a Customer VLAN Bridge."; + } + identity provider-bridge { + base type-of-bridge; + description + "Base identity for a Provider Bridge (PB)."; + } + identity provider-edge-bridge { + base type-of-bridge; + description + "Base identity for a Provider Edge Bridge (PEB)."; + } + identity two-port-mac-relay-bridge { + base type-of-bridge; + description + "Base identity for a Two Port MAC Relay (TPMR)."; + } + identity type-of-component { + description + "Represents the type of Component."; + } + identity c-vlan-component { + base type-of-component; + description + "Base identity for a C-VLAN component."; + } + identity s-vlan-component { + base type-of-component; + description + "Base identity for a S-VLAN component."; + } + identity d-bridge-component { + base type-of-component; + description + "Base identity for a VLAN unaware component."; + } + identity edge-relay-component { + base type-of-component; + description + "Base identity for an EVB station ER component."; + } + identity type-of-port { + description + "Represents the type of Bridge port."; + } + identity c-vlan-bridge-port { + base type-of-port; + description + "Indicates the port can be a C-TAG aware port of an enterprise + VLAN aware Bridge."; + } + identity provider-network-port { + base type-of-port; + description + "Indicates the port can be an S-TAG aware port of a Provider + Bridge or Backbone Edge Bridge used for connections within a PBN + (Provider Bridged Network) or PBBN (Provider Backbone Bridged + Network)."; + } + identity customer-network-port { + base type-of-port; + description + "Indicates the port can be an S-TAG aware port of a Provider + Bridge or Backbone Edge Bridge used for connections to the + exterior of a PBN (Provider Bridged Network) or PBBN (Provider + Backbone Bridged Network)."; + } + identity customer-edge-port { + base type-of-port; + description + "Indicates the port can be a C-TAG aware port of a Provider Bridge + used for connections to the exterior of a PBN (Provider Bridged + Network) or PBBN (Provider Backbone Bridged Network)."; + } + identity d-bridge-port { + base type-of-port; + description + "Indicates the port can be a VLAN-unaware member of an 802.1Q + Bridge."; + } + identity remote-customer-access-port { + base type-of-port; + description + "Indicates the port can be an S-TAG aware port of a Provider + Bridge capable of providing Remote Customer Service Interfaces."; + } + identity bridge-interface { + description + "Generic interface property that represents any interface that can + be associated with an IEEE 802.1Q compliant Bridge component. Any + new Interface types would derive from this identity to + automatically pick up Bridge related configuration or operational + data."; + } + container bridges { + description + "Contains the Bridge(s) configuration information."; + list bridge { + key "name"; + unique "address"; + description + "Provides configuration data in support of the Bridge + Configuration resources. There is a single bridge data node per + Bridge."; + leaf name { + type dot1qtypes:name-type; + description + "A text string associated with the Bridge, of locally + determined significance."; + reference + "12.4 of IEEE Std 802.1Q-2022"; + } + leaf address { + type ieee:mac-address; + mandatory true; + description + "The MAC address for the Bridge from which the Bridge + Identifiers used by the STP, RSTP, and MSTP are derived."; + reference + "12.4 of IEEE Std 802.1Q-2022"; + } + leaf bridge-type { + type identityref { + base type-of-bridge; + } + mandatory true; + description + "The type of Bridge."; + } + leaf ports { + type uint16 { + range "1..4095"; + } + config false; + description + "The number of Bridge Ports (MAC Entities)"; + reference + "12.4 of IEEE Std 802.1Q-2022"; + } + leaf up-time { + type yang:zero-based-counter32; + units "seconds"; + config false; + description + "The count in seconds of the time elapsed since the Bridge was + last reset or initialized."; + reference + "12.4 of IEEE Std 802.1Q-2022"; + } + leaf components { + type uint32; + config false; + description + "The number of components associated with the Bridge."; + } + list component { + key "name"; + description + "The set of components associated with a given Bridge. For + example, - A TPMR is associated with a single VLAN unaware + component. - A Customer VLAN Bridge is associated with a + single VLAN aware component. - A Provider Bridge is associated + with a single S-VLAN component and zero or more C-VLAN + components."; + reference + "Item 1)a in 12.4.1.5 of IEEE Std 802.1Q-2022"; + leaf name { + type string; + description + "The name of the Component."; + } + leaf id { + type uint32; + description + "Unique identifier for a particular Bridge component within + the system."; + reference + "Item l) in 12.3 of IEEE Std 802.1Q-2022"; + } + leaf type { + type identityref { + base type-of-component; + } + mandatory true; + description + "The type of component used to classify a particular Bridge + component within a Bridge system comprising multiple + components."; + reference + "Item m) in 12.3 of IEEE Std 802.1Q-2022"; + } + leaf address { + type ieee:mac-address; + description + "Unique EUI-48 Universally Administered MAC address assigned + to a Bridge component."; + reference + "13.24, 8.13.8 of IEEE Std 802.1Q-2022"; + } + leaf traffic-class-enabled { + type boolean; + default "true"; + description + "Indication of Traffic Classes enablement associated with + the Bridge Component. A value of True indicates that Traffic + Classes are enabled on this Bridge Component. A value of + False indicates that the Bridge Component operates with a + single priority level for all traffic."; + reference + "12.4.1.5.1 of IEEE Std 802.1Q-2022"; + } + leaf ports { + type uint16 { + range "1..4095"; + } + config false; + description + "The number of Bridge Ports associated with the Bridge + Component."; + reference + "Item c) in 12.4.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf-list bridge-port { + type if:interface-ref; + config false; + description + "List of bridge-port references."; + } + container capabilities { + config false; + description + "Array of Boolean values of the feature capabilities + associated with a given Bridge Component."; + reference + "Item b) in 12.10.1.1.3, 12.4.1.5.2 of IEEE Std 802.1Q-2022"; + leaf extended-filtering { + type boolean; + default "false"; + description + "Can perform filtering on individual multicast addresses + controlled by MMRP."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2022"; + } + leaf traffic-classes { + type boolean; + default "false"; + description + "Can map priority to multiple traffic classes."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2022"; + } + leaf static-entry-individual-port { + type boolean; + default "false"; + description + "Static entries per port."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2022"; + } + leaf ivl-capable { + type boolean; + default "true"; + description + "Independent VLAN Learning (IVL)."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2022"; + } + leaf svl-capable { + type boolean; + default "false"; + description + "Shared VLAN Learning (SVL)."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2022"; + } + leaf hybrid-capable { + type boolean; + default "false"; + description + "Both IVL and SVL simultaneously."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2022"; + } + leaf configurable-pvid-tagging { + type boolean; + default "false"; + description + "Whether the implementation supports the ability to + override the default PVID setting and its egress status + (VLAN-tagged or Untagged) on each port."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2022"; + } + leaf local-vlan-capable { + type boolean; + default "false"; + description + "Can support multiple local Bridges, outside the scope of + 802.1Q defined VLANs."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2022"; + } + } + container filtering-database { + when + "not(derived-from-or-self(../../bridge-type, "+ + "'two-port-mac-relay-bridge'))" { + description + "Applies to non TPMRs."; + } + description + "Contains filtering information used by the Forwarding + Process in deciding through which Ports of the Bridge frames + should be forwarded."; + reference + "12.7 of IEEE Std 802.1Q-2022"; + leaf aging-time { + type uint32 { + range "10..10000000"; + } + units "seconds"; + default "300"; + description + "The timeout period in seconds for aging out + dynamically-learned forwarding information."; + reference + "12.7, 8.8.3 of IEEE Std 802.1Q-2022"; + } + leaf size { + type yang:gauge32; + config false; + description + "The maximum number of entries that can be held in the + FDB."; + reference + "12.7 of IEEE Std 802.1Q-2022"; + } + leaf static-entries { + type yang:gauge32; + config false; + description + "The number of Static Filtering entries currently in the + FDB."; + reference + "12.7, 8.8.1 of IEEE Std 802.1Q-2022"; + } + leaf dynamic-entries { + type yang:gauge32; + config false; + description + "The number of Dynamic Filtering entries currently in the + FDB."; + reference + "12.7, 8.8.3 of IEEE Std 802.1Q-2022"; + } + leaf static-vlan-registration-entries { + type yang:gauge32; + config false; + description + "The number of Static VLAN Registration entries currently + in the FDB."; + reference + "12.7, 8.8.2 of IEEE Std 802.1Q-2022"; + } + leaf dynamic-vlan-registration-entries { + type yang:gauge32; + config false; + description + "The number of Dynamic VLAN Registration entries currently + in the FDB."; + reference + "12.7, 8.8.5 of IEEE Std 802.1Q-2022"; + } + leaf mac-address-registration-entries { + if-feature "extended-filtering-services"; + type yang:gauge32; + config false; + description + "The number of MAC Address Registration entries currently + in the FDB."; + reference + "12.7, 8.8.4 of IEEE Std 802.1Q-2022"; + } + list filtering-entry { + key "database-id vids address"; + description + "Information for the entries associated with the Permanent + Database."; + leaf database-id { + type uint32; + description + "The identity of this Filtering Database."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf address { + type ieee:mac-address; + description + "A MAC address (unicast, multicast, broadcast) for which + the device has forwarding and/or filtering information."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf vids { + type dot1qtypes:vid-range-type; + description + "The set of VLAN identifiers to which this entry + applies."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf entry-type { + type enumeration { + enum static { + description + "Static entry type"; + } + enum dynamic { + description + "Dynamic/learnt entry type"; + } + } + description + "The type of filtering entry. Whether static or dynamic. + Static entries can be created, deleted, and retrieved. + However, dynamic entries can only be deleted or + retrieved by the management entity. Consequently, a + Bridge is not required to accept a command that can + alter the dynamic entries except delete a dynamic entry."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + uses dot1qtypes:port-map-grouping; + leaf status { + type enumeration { + enum other { + description + "None of the following. This may include the case + where some other object is being used to determine + if and how frames addressed to the value of the + corresponding instance of 'address' are being + forwarded."; + } + enum invalid { + description + "This entry is no longer valid (e.g., it was learned + but has since aged out), but has not yet been + flushed from the table."; + } + enum learned { + description + "The value of the corresponding instance of the port + node was learned and is being used."; + } + enum self { + description + "The value of the corresponding instance of the + address node representing one of the devices + address."; + } + enum mgmt { + description + "The value of the corresponding instance of address + node that is also the value of an existing instance."; + } + } + config false; + description + "The status of this entry."; + } + } + list vlan-registration-entry { + key "database-id vids"; + description + "The VLAN Registration Entries models the operations that + can be performed on a single VLAN Registration Entry in + the FDB. The set of VLAN Registration Entries within the + FDB changes under management control and also as a result + of MVRP exchanges"; + reference + "12.7.5 of IEEE Std 802.1Q-2022"; + leaf database-id { + type uint32; + description + "The identity of this Filtering Database."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf vids { + type dot1qtypes:vid-range-type; + description + "The set of VLAN identifiers to which this entry + applies."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf entry-type { + type enumeration { + enum static { + description + "Static entry type"; + } + enum dynamic { + description + "Dynamic/learnt entry type"; + } + } + description + "The type of filtering entry. Whether static or dynamic. + Static entries can be created, deleted, and retrieved. + However, dynamic entries can only be deleted or + retrieved by the management entity. Consequently, a + Bridge is not required to accept a command that can + alter the dynamic entries except delete a dynamic entry."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + uses dot1qtypes:port-map-grouping; + } + } + container permanent-database { + description + "The Permanent Database container models the operations that + can be performed on, or affect, the Permanent Database. + There is a single Permanent Database per FDB."; + leaf size { + type yang:gauge32; + config false; + description + "The maximum number of entries that can be held in the + FDB."; + reference + "12.7.6 of IEEE Std 802.1Q-2022"; + } + leaf static-entries { + type yang:gauge32; + config false; + description + "The number of Static Filtering entries currently in the + FDB."; + reference + "12.7.6 of IEEE Std 802.1Q-2022"; + } + leaf static-vlan-registration-entries { + type yang:gauge32; + config false; + description + "The number of Static VLAN Registration entries currently + in the FDB."; + reference + "12.7.6 of IEEE Std 802.1Q-2022"; + } + list filtering-entry { + key "database-id vids address"; + description + "Information for the entries associated with the Permanent + Database."; + leaf database-id { + type uint32; + description + "The identity of this Filtering Database."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf address { + type ieee:mac-address; + description + "A MAC address (unicast, multicast, broadcast) for which + the device has forwarding and/or filtering information."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf vids { + type dot1qtypes:vid-range-type; + description + "The set of VLAN identifiers to which this entry + applies."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf status { + type enumeration { + enum other { + description + "None of the following. This may include the case + where some other object is being used to determine + if and how frames addressed to the value of the + corresponding instance of 'address' are being + forwarded."; + } + enum invalid { + description + "This entry is no longer valid (e.g., it was learned + but has since aged out), but has not yet been + flushed from the table."; + } + enum learned { + description + "The value of the corresponding instance of the port + node was learned and is being used."; + } + enum self { + description + "The value of the corresponding instance of the + address node representing one of the devices + address."; + } + enum mgmt { + description + "The value of the corresponding instance of address + node that is also the value of an existing instance."; + } + } + config false; + description + "The status of this entry."; + } + uses dot1qtypes:port-map-grouping; + } + } + container bridge-vlan { + when + "not(derived-from-or-self(../../bridge-type, "+ + "'two-port-mac-relay-bridge'))" { + description + "Applies to non TPMRs."; + } + description + "The Bridge VLAN container models configuration information + that modify, or inquire about, the overall configuration of + the Bridges VLAN resources. There is a single Bridge VLAN + Configuration managed object per Bridge."; + reference + "12.10 of IEEE Std 802.1Q-2022"; + leaf version { + type uint16; + config false; + description + "The version number supported."; + reference + "12.10.1.3 of IEEE Std 802.1Q-2022"; + } + leaf max-vids { + type uint16; + config false; + description + "The maximum number of VIDs supported."; + reference + "12.10.1.3 of IEEE Std 802.1Q-2022"; + } + leaf override-default-pvid { + type boolean; + default "false"; + config false; + description + "Indicates if the default PVID can be overridden, and its + egress status (VLAN-tagged or untagged) on each port."; + reference + "12.10.1.3 of IEEE Std 802.1Q-2022"; + } + leaf protocol-template { + if-feature "port-and-protocol-based-vlan"; + type dot1qtypes:protocol-frame-format-type; + config false; + description + "The data-link encapsulation format or the + detagged_frame_type in a Protocol Template"; + reference + "12.10.1.7 of IEEE Std 802.1Q-2022"; + } + leaf max-msti { + type uint16; + config false; + description + "The maximum number of MSTIs supported within an MST + region (i.e., the number of spanning tree instances that + can be supported in addition to the CIST), for MST + Bridges. For SST Bridges, this parameter may be either + omitted or reported as 0."; + reference + "12.10.1.7 of IEEE Std 802.1Q-2022"; + } + list vlan { + key "vid"; + description + "List of VLAN related configuration nodes associated with + the Bridge."; + reference + "12.10.2 of IEEE Std 802.1Q-2022"; + leaf vid { + type dot1qtypes:vlan-index-type; + description + "The VLAN identifier to which this entry applies."; + reference + "12.10.2 of IEEE Std 802.1Q-2022"; + } + leaf name { + type dot1qtypes:name-type; + description + "A text string of up to 32 characters of locally + determined significance."; + reference + "12.10.2 of IEEE Std 802.1Q-2022"; + } + leaf-list untagged-ports { + type if:interface-ref; + config false; + description + "The set of ports in the untagged set for this VID."; + reference + "12.10.2.1.3, 8.8.2 of IEEE Std 802.1Q-2022"; + } + leaf-list egress-ports { + type if:interface-ref; + config false; + description + "The set of egress ports in the member set for this VID."; + reference + "12.10.2.1.3, 8.8.10 of IEEE Std 802.1Q-2022"; + } + } + list protocol-group-database { + if-feature "port-and-protocol-based-vlan"; + key "db-index"; + description + "List of the protocol group database entries."; + reference + "12.10.1.7, 6.12.3 of IEEE Std 802.1Q-2022"; + leaf db-index { + type uint16; + description + "The protocol group database index."; + } + leaf frame-format-type { + type dot1qtypes:protocol-frame-format-type; + description + "The data-link encapsulation format or the + detagged_frame_type in a Protocol Template"; + reference + "12.10.1.7 of IEEE Std 802.1Q-2022"; + } + choice frame-format { + description + "The identification of the protocol above the data-link + layer in a Protocol Template. Depending on the frame + type, the octet string will have one of the following + values: - For ethernet, rfc1042 and snap8021H, this is + the 16-bit (2-octet) IEEE 802 Clause 9.3 EtherType + field. - For snapOther, this is the 40-bit (5-octet) + PID. - For llcOther, this is the 2-octet IEEE 802.2 Link + Service Access Point (LSAP) pair: first octet for + Destination Service Access Point (DSAP) and second octet + for Source Service Access Point (SSAP)."; + reference + "12.10.1.7 of IEEE Std 802.1Q-2022"; + case ethernet-rfc1042-snap8021H { + when + "frame-format-type = 'Ethernet' or "+ + "frame-format-type = 'rfc1042' or frame-format-type "+ + "= 'snap8021H'" { + description + "Applies to Ethernet, RFC 1042, SNAP 8021H frame + formats."; + } + description + "Identifier used if Ethenet, RFC1042, or SNAP 8021H."; + leaf ethertype { + type dot1qtypes:ethertype-type; + description + "Format containing the 16-bit IEEE 802 EtherType + field."; + reference + "9.3 of IEEE Std 802-2014"; + } + } + case snap-other { + when + "frame-format-type = 'snapOther'" { + description + "Applies to Snap Other frame formats."; + } + description + "Identifier used if SNAP other."; + leaf protocol-id { + type string { + pattern "[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){4}"; + } + description + "Format containing the 40-bit protocol identifier + (PID). The canonical representation uses uppercase + characters."; + reference + "12.10.1.7.1 of IEEE Std 802.1Q-2022"; + } + } + case llc-other { + when + "frame-format-type = 'llcOther'" { + description + "Applies to LLC Other frame formats"; + } + description + "Identifier used if LLC other."; + container dsap-ssap-pairs { + description + "A pair of ISO/IEC 8802-2 DSAP and SSAP address + field values, for matching frame formats of + LLC_Other."; + leaf llc-address { + type string { + pattern "[0-9a-fA-F]{2}-[0-9a-fA-F]{2}"; + } + description + "A pair of ISO/IEC 8802-2 DSAP and SSAP address + field values, for matching frame formats of + LLC_Other. The canonical representation uses + uppercase characters."; + reference + "12.10.1.7.1 of IEEE Std 802.1Q-2022"; + } + } + } + } + leaf group-id { + type uint32; + description + "Designates a group of protocols in the Protocol Group + Database."; + reference + "6.12.2 of IEEE Std 802.1Q-2022"; + } + } + list vid-to-fid-allocation { + key "vids"; + description + "This list allows inquiries about VID to FID allocations."; + leaf vids { + type dot1qtypes:vid-range-type; + description + "Range of VLAN identifiers."; + reference + "12.10.3 of IEEE Std 802.1Q-2022"; + } + leaf fid { + type uint32; + config false; + description + "The Filtering Database used by a set of VIDs."; + reference + "12.10.3 of IEEE Std 802.1Q-2022"; + } + leaf allocation-type { + type enumeration { + enum undefined { + description + "No allocation defined."; + } + enum fixed { + description + "A fixed allocation to FID is defined."; + } + enum dynamic { + description + "A dynamic allocation to FID is defined."; + } + } + config false; + description + "The type of allocation used"; + reference + "12.10.3 of IEEE Std 802.1Q-2022"; + } + } + list fid-to-vid-allocation { + key "fid"; + description + "The FID to VID allocations managed object models + operations that inquire about FID to VID allocations."; + leaf fid { + type uint32; + description + "The Filtering Database used by a set of VIDs."; + reference + "12.10.3 of IEEE Std 802.1Q-2022"; + } + leaf allocation-type { + type enumeration { + enum undefined { + description + "No allocation defined."; + } + enum fixed { + description + "A fixed allocation to FID is defined."; + } + enum dynamic { + description + "A dynamic allocation to FID is defined."; + } + } + config false; + description + "The type of allocation used"; + reference + "12.10.3 of IEEE Std 802.1Q-2022"; + } + leaf-list vid { + type dot1qtypes:vlan-index-type; + config false; + description + "The VLAN identifier to which this entry applies."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + } + list vid-to-fid { + key "vid"; + description + "Fixed allocation of a VID to an FID. The underlying + system will ensure that subsequent commands that make + changes to the VID to FID mapping can override previous + associations."; + reference + "12.10.3.4, 12.10.3.5 of IEEE Std 802.1Q-2022"; + leaf vid { + type dot1qtypes:vlan-index-type; + description + "A list of VLAN identifier associated with a given + database identifier (i.e., FID)."; + reference + "12.7.7 of IEEE Std 802.1Q-2022"; + } + leaf fid { + type uint32; + description + "The Filtering Database used by this VLAN"; + reference + "12.10.3 of IEEE Std 802.1Q-2022"; + } + } + } + container bridge-mst { + when + "not(derived-from-or-self(../../bridge-type, "+ + "'two-port-mac-relay-bridge'))" { + description + "Applies to non TPMRs."; + } + description + "The Bridge MST container models configuration information + that modify, or inquire about, the overall configuration of + the Bridges MST resources."; + reference + "12.12 of IEEE Std 802.1Q-2022"; + leaf-list mstid { + type dot1qtypes:mstid-type; + description + "The list of MSTID values that are currently supported by + the Bridge"; + } + list fid-to-mstid { + key "fid"; + description + "The FID to MSTID allocation table."; + reference + "12.12.2 of IEEE Std 802.1Q-2022"; + leaf fid { + type uint32; + description + "The Filtering Database identifier."; + reference + "12.12.2 of IEEE Std 802.1Q-2022"; + } + leaf mstid { + type dot1qtypes:mstid-type; + description + "The MSTID to which the FID is to be allocated."; + reference + "12.12.2 of IEEE Std 802.1Q-2022"; + } + } + list fid-to-mstid-allocation { + key "fids"; + description + "The FID to MSTID allocation table"; + leaf fids { + type dot1qtypes:vid-range-type; + description + "Range of FIDs."; + reference + "12.12.2 of IEEE Std 802.1Q-2022"; + } + leaf mstid { + type dot1qtypes:mstid-type; + description + "The MSTID to which the FID is allocated."; + reference + "12.12.2 of IEEE Std 802.1Q-2022"; + } + } + } + } + } + } + augment "/if:interfaces/if:interface" { + when + "derived-from-or-self(if:type,'ianaif:bridge') or "+ + "derived-from-or-self(if:type,'ianaif:ethernetCsmacd') or "+ + "derived-from-or-self(if:type,'ianaif:ieee8023adLag') or "+ + "derived-from-or-self(if:type,'ianaif:ilan')" { + description + "Applies when a Bridge interface."; + } + description + "Augment the interface model with the Bridge Port"; + container bridge-port { + description + "Bridge Port is an extension of the IETF Interfaces model + (RFC7223)."; + leaf bridge-name { + type leafref { + path "/dot1q:bridges/dot1q:bridge/dot1q:name"; + } + // mandatory true; yang 1.1 only + description + "Used to reference configured Bridge node."; + } + leaf component-name { + type leafref { + path "/dot1q:bridges/dot1q:bridge[dot1q:name=current()/../bridge-name]/dot1q:component/dot1q:name"; + } + // mandatory true; yang 1.1 only + description + "Used to reference configured Component node."; + } + leaf port-type { + type identityref { + base type-of-port; + } + description + "The port type. Indicates the capabilities of this port."; + reference + "12.4.2.1 of IEEE Std 802.1Q-2022"; + } + leaf pvid { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + type dot1qtypes:vlan-index-type; + default "1"; + description + "The primary (default) VID assigned to a specific Bridge Port."; + reference + "12.10.1, 5.4, item m) of IEEE Std 802.1Q-2022"; + } + leaf default-priority { + type dot1qtypes:priority-type; + default "0"; + description + "The default priority assigned to a specific Bridge Port."; + reference + "12.6.2 of IEEE Std 802.1Q-2022"; + } + container priority-regeneration { + description + "The Priority Regeneration Table parameters associated with a + specific Bridge Port. A list of Regenerated User Priorities + for each received priority on each port of a Bridge. The + regenerated priority value may be used to index the Traffic + Class Table for each input port. This only has effect on media + that support native priority. The default values for + Regenerated User Priorities are the same as the User + Priorities"; + reference + "12.6.2, 6.9.4 of IEEE Std 802.1Q-2022"; + uses dot1qtypes:priority-regeneration-table-grouping; + } + leaf pcp-selection { + type dot1qtypes:pcp-selection-type; + default "8P0D"; + description + "The Priority Code Point selection assigned to a specific + Bridge Port. This object identifies the rows in the PCP + encoding and decoding tables that are used to remark frames on + this port if this remarking is enabled"; + reference + "12.6.2, 6.9.3 of IEEE Std 802.1Q-2022"; + } + container pcp-decoding-table { + description + "The Priority Code Point Decoding Table parameters associated + with a specific Bridge Port."; + uses dot1qtypes:pcp-decoding-table-grouping; + } + container pcp-encoding-table { + description + "The Priority Code Point Encoding Table parameters associated + with a specific Bridge Port."; + uses dot1qtypes:pcp-encoding-table-grouping; + } + leaf use-dei { + type boolean; + default "false"; + description + "The Drop Eligible Indicator. If it is set to True, then the + drop_eligible parameter is encoded in the DEI of transmitted + frames, and the drop_eligible parameter shall be true(1) for a + received frame if the DEI is set in the VLAN tag or the + Priority Code Point Decoding Table indicates drop_eligible + True for the received PCP value. If this parameter is False, + the DEI shall be transmitted as zero and ignored on receipt."; + reference + "12.6.2, 6.9.3 of IEEE Std 802.1Q-2022"; + } + leaf drop-encoding { + type boolean; + default "false"; + description + "The Drop Encoding parameter. If a Bridge supports encoding or + decoding of drop_eligible from the PCP field of a VLAN tag + (6.7.3) on any of its Ports, then it shall implement a Boolean + parameter Require Drop Encoding on each of its Ports with + default value False. If Require Drop Encoding is True and the + Bridge Port cannot encode particular priorities with + drop_eligible, then frames queued with those priorities and + drop_eligible True shall be discarded and not transmitted."; + reference + "12.6.2, 6.9.3 of IEEE Std 802.1Q-2022"; + } + leaf service-access-priority-selection { + type boolean; + default "false"; + description + "The Service Access Priority selection. Indication of whether + the Service Access Priority Selection function is supported on + the Customer Bridge Port to request priority handling of the + frame from a Port-based service interface."; + reference + "12.6.2, 6.13 of IEEE Std 802.1Q-2022"; + } + container service-access-priority { + description + "The Service Access Priority table parameters. A table that + contains information about the Service Access Priority + Selection function for a Provider Bridge. The use of this + table enables a mechanism for a Customer Bridge attached to a + Provider Bridged Network to request priority handling of + frames."; + reference + "12.6.2, 6.13.1 of IEEE Std 802.1Q-2022"; + uses dot1qtypes:service-access-priority-table-grouping; + } + container traffic-class { + description + "The Traffic Class table parameters. A table mapping evaluated + priority to Traffic Class, for forwarding by the Bridge"; + reference + "12.6.3, 8.6.6 of IEEE Std 802.1Q-2022"; + uses dot1qtypes:traffic-class-table-grouping; + } + container transmission-selection-algorithm-table { + description + "The Transmission Selection Algorithm Table for a given Port + assigns, for each traffic class that the Port supports, the + transmission selection algorithm that is to be used to select + frames for transmission from the corresponding queue. + Transmission Selection Algorithm Tables may be managed, and + allow the identification of vendor-specific transmission + selection algorithms. The transmission selection algorithms + are identified in the Transmission Selection Algorithm Table + by means of integer identifiers."; + reference + "12.20.2, 8.6.8 of IEEE Std 802.1Q-2022"; + uses dot1qtypes:transmission-selection-table-grouping; + } + leaf acceptable-frame { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + type enumeration { + enum admit-only-VLAN-tagged-frames { + description + "Admit only VLAN-tagged frames."; + } + enum admit-only-untagged-and-priority-tagged { + description + "Admit only untagged and priority-tagged frames."; + } + enum admit-all-frames { + description + "Admit all frames."; + } + } + default "admit-all-frames"; + description + "To configure the Acceptable Frame Types parameter associated + with one or more Ports"; + reference + "12.10.1.3, 6.9 of IEEE Std 802.1Q-2022"; + } + leaf enable-ingress-filtering { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + type boolean; + default "false"; + description + "To enable the Ingress Filtering feature associated with one + or more Ports."; + reference + "12.10.1.4, 8.6.2 of IEEE Std 802.1Q-2022"; + } + leaf enable-restricted-vlan-registration { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + type boolean; + default "false"; + description + "To enable the Restricted VLAN Registration associated with + one or more Ports."; + reference + "11.2.3.2.3, 12.10.1.6 of IEEE Std 802.1Q-2022"; + } + leaf enable-vid-translation-table { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + type boolean; + default "false"; + description + "To enable VID Translation table associated with a Bridge + Port. This is not applicable to Bridge Ports that do no + support a VID Translation Table."; + reference + "12.10.1.8, 6.9 of IEEE Std 802.1Q-2022"; + } + leaf enable-egress-vid-translation-table { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + type boolean; + default "false"; + description + "To enable Egress VID Translation table associated with a + Bridge Port. This is not applicable to Ports that do not + support an Egress VID Translation table."; + reference + "12.10.1.8, 6.9 of IEEE Std 802.1Q-2022"; + } + list protocol-group-vid-set { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + if-feature "port-and-protocol-based-vlan"; + key "group-id"; + description + "The list of VID values associated with the Protocol Group + Identifier for this port."; + reference + "12.10.1.1.3 of IEEE Std 802.1Q-2022"; + leaf group-id { + type uint32; + description + "The protocol group identifier"; + reference + "12.10.1.7 of IEEE Std 802.1Q-2022"; + } + leaf-list vid { + type dot1qtypes:vlanid; + description + "The VLAN identifier to which this entry applies."; + reference + "12.10.2 of IEEE Std 802.1Q-2022"; + } + } + leaf admin-point-to-point { + type enumeration { + enum force-true { + value 1; + description + "Indicates that this port should always be treated as if + it is connected to a point-to-point link."; + } + enum force-false { + value 2; + description + "Indicates that this port should be treated as having a + shared media connection."; + } + enum auto { + value 3; + description + "Indicates that this port is considered to have a + point-to-point link if it is an Aggregator and all of its + members are aggregatable, or if the MAC entity is + configured for full duplex operation, either through + auto-negotiation or by management means."; + } + } + description + "For a port running spanning tree, this object represents the + administrative point-to-point status of the LAN segment + attached to this port, using the enumeration values of IEEE + Std 802.1AC. A value of forceTrue(1) indicates that this port + should always be treated as if it is connected to a + point-to-point link. A value of forceFalse(2) indicates that + this port should be treated as having a shared media + connection. A value of auto(3) indicates that this port is + considered to have a point-to-point link if it is an + Aggregator and all of its members are aggregatable, or if the + MAC entity is configured for full duplex operation, either + through auto-negotiation or by management means. Manipulating + this object changes the underlying adminPointToPointMAC."; + reference + "12.4.2, 6.8.2 of IEEE Std 802.1Q-2022"; + } + leaf protocol-based-vlan-classification { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + if-feature "port-and-protocol-based-vlan"; + type boolean; + config false; + description + "A boolean indication indicating if Port-and-Protocol-based + VLAN classification is supported on a given Port."; + reference + "5.4.1.2 of IEEE Std 802.1Q-2022"; + } + leaf max-vid-set-entries { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + if-feature "port-and-protocol-based-vlan"; + type uint16; + config false; + description + "The maximum number of entries supported in the VID set on a + given Port."; + reference + "12.10.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf port-number { + type dot1qtypes:port-number-type; + config false; + description + "An integer that uniquely identifies a Bridge Port."; + reference + "Item i) in 12.3, 17.3.2.2 of IEEE Std 802.1Q-2022"; + } + leaf address { + type ieee:mac-address; + config false; + description + "The specific MAC address of the individual MAC Entity + associated with the Port."; + reference + "12.4.2, Item a) in 12.4.2.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf capabilities { + type bits { + bit tagging { + position 0; + description + "Supports 802.1Q VLAN tagging of frames and MVRP."; + } + bit configurable-acceptable-frame-type { + position 1; + description + "Allows modified values of acceptable frame types"; + } + bit ingress-filtering { + position 2; + description + "Supports the discarding of any frame received on a Port + whose VLAN classification does not include that Port in + its member set."; + } + } + config false; + description + "The feature capabilities associated with port. Indicates the + parts of IEEE 802.1Q that are optional on a per-port basis, + that are implemented by this device, and that are manageable."; + reference + "Item c) in 12.10.1.1.3, 12.4.2 of IEEE Std 802.1Q-2022"; + } + leaf type-capabilties { + type bits { + bit customer-vlan-port { + position 0; + description + "Indicates the port can be a C-TAG aware port of an + enterprise VLAN aware Bridge"; + } + bit provider-network-port { + position 1; + description + "Indicates the port can be an S-TAG aware port of a + Provider Bridge or Backbone Edge Bridge used for + connections within a PBN or PBBN."; + } + bit customer-network-port { + position 2; + description + "Indicates the port can be an S-TAG aware port of a + Provider Bridge or Backbone Edge Bridge used for + connections to the exterior of a PBN or PBBN."; + } + bit customer-edge-port { + position 3; + description + "Indicates the port can be a C-TAG aware port of a + Provider Bridge used for connections to the exterior of a + PBN or PBBN."; + } + bit customer-backbone-port { + position 4; + description + "Indicates the port can be a I-TAG aware port of a + Backbone Edge Bridge's B-component."; + } + bit virtual-instance-port { + position 5; + description + "Indicates the port can be a virtual S-TAG aware port + within a Backbone Edge Bridge's I-component which is + responsible for handling S-tagged traffic for a specific + backbone service instance."; + } + bit d-bridge-port { + position 6; + description + "Indicates the port can be a VLAN-unaware member of an + 802.1Q Bridge."; + } + bit remote-customer-access-port { + position 7; + description + "Indicates the port can be an S-TAG aware port of a + Provider Bridge capable of providing Remote Customer + Service Interfaces."; + } + bit station-facing-bridge-port { + position 8; + description + "Indicates the station-facing Bridge Port in a EVB Bridge."; + } + bit uplink-access-port { + position 9; + description + "Indicates the uplink access port in an EVB Bridge or EVB + station."; + } + bit uplink-relay-port { + position 10; + description + "Indicates the uplink relay port in an EVB station."; + } + } + config false; + description + "The type of feature capabilities supported with port. + Indicates the capabilities of this port."; + reference + "12.4.2 of IEEE Std 802.1Q-2022"; + } + leaf external { + type boolean; + config false; + description + "A boolean indicating whether the port is external. A value of + True means the port is external. A value of False means the + port is internal."; + reference + "12.4.2 of IEEE Std 802.1Q-2022"; + } + leaf oper-point-to-point { + type boolean; + config false; + description + "For a port running spanning tree, this object represents the + operational point-to-point status of the LAN segment attached + to this port. It indicates whether a port is considered to + have a point-to-point connection. + + If admin-point-to-point is set to auto(2), then the value of + oper-point-to-point is determined in accordance with the + specific procedures defined for the MAC entity concerned, as + defined in IEEE Std 802.1AC. + + The value is determined dynamically; that is, it is + re-evaluated whenever the value of admin-point-to-point + changes, and whenever the specific procedures defined for the + MAC entity evaluate a change in its point-to-point status."; + reference + "IEEE Std 802.1AC;" + + "12.4.2 of IEEE Std 802.1Q-2022"; + } + leaf media-dependent-overhead { + type uint8; + units "octets"; + config false; + description + "The portMediaDependentOverhead parameter provides the number + of additional octets for media-dependent framing. The overhead + includes all octets prior the first octet of the Destination + Address field and all octets after the last octet of the frame + check sequence."; + reference + "12.4.2 of IEEE Std 802.1Q-2022"; + } + container statistics { + config false; + description + "Container of operational state node information associated + with the bridge port."; + uses dot1qtypes:bridge-port-statistics-grouping; + leaf discard-on-ingress-filtering { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + if-feature "ingress-filtering"; + type yang:counter64; + description + "The number of frames that were discarded as a result of + Ingress Filtering being enabled. + + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of 'discontinuity-time'."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + } + list vid-translations { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + key "local-vid"; + description + "To configure the VID Translation Table (6.9) associated with + a Port. This object is not applicable to Ports that do not + support a VID Translation Table. The default configuration of + the table has the value of the Relay VID equal to the value of + the Local VID. If no local VID is configured, then it is + assumed that the relay VID is the same value as the local VID. + + If the port supports an Egress VID translation table, the VID + Translation Configuration object configures the Local VID to + Relay VID mapping on ingress only. If an Egress VID + translation is not supported, the VID Translation + Configuration object defines a single bidirectional mapping. + In this case, the Bridge should not allow multiple keys + ('local-vid') mapped to the same 'relay-vid' value."; + leaf local-vid { + type dot1qtypes:vlanid; + description + "The Local VID after translation received at the ISS or + EISS."; + reference + "12.10.1.8, 6.9 of IEEE Std 802.1Q-2022"; + } + leaf relay-vid { + type dot1qtypes:vlanid; + description + "The Relay VID received before translation received at ISS + or EISS."; + reference + "12.10.1.8, 6.9 of IEEE Std 802.1Q-2022"; + } + } + list egress-vid-translations { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()"+ + "/../dot1q:bridge-name]/dot1q:component[name=current()"+ + "/../dot1q:component-name]/dot1q:type != 'dot1q:d-bridge-component'" { + description + "Applies to non TPMRs"; + } + key "relay-vid"; + description + "To configure the Egress VID Translation Table (6.9) + associated with a Port. This object is not applicable to Ports + that do not support an Egress VID Translation Table. The + default configuration of the table has the value of the Local + VID equal to the value of the Relay VID. If no Relay VID is + configured, then it is assumed that the local VID is the same + value as the relay VID."; + leaf relay-vid { + type dot1qtypes:vlanid; + description + "The Relay VID received before translation received at ISS + or EISS."; + reference + "12.10.1.9, 6.9 of IEEE Std 802.1Q-2022"; + } + leaf local-vid { + type dot1qtypes:vlanid; + description + "The Local VID after translation received at the ISS or + EISS."; + reference + "12.10.1.9, 6.9 of IEEE Std 802.1Q-2022"; + } + } + } + } +} \ No newline at end of file diff --git a/demo-mts91/src/samples/mwt/ieee802-dot1q-bridge.yang-generated.tdltx b/demo-mts91/src/samples/mwt/ieee802-dot1q-bridge.yang-generated.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..8e80b62f95a5bf5cd4d667e9e235711237aeb236 --- /dev/null +++ b/demo-mts91/src/samples/mwt/ieee802-dot1q-bridge.yang-generated.tdltx @@ -0,0 +1,467 @@ +Package generated_from_ieee802_dot1q_bridge_yang { + Type String + Type TODO_RESOLVE_REFERENCED + Use "ieee802-dot1q-bridge.yang" as SOURCE_MAPPING + Structure bridge ( + name_type ^name, + mac_address address, + identityref bridge_type, + uint16 ports, + up_time up_time, + uint32 components, + bridge___component_collection ^component + ) + Type name_type extends string + Type string extends string + Type mac_address extends string + Type identityref + Type uint16 extends uint16 + Type up_time extends zero_based_counter32 + Type zero_based_counter32 + Type uint32 + Structure bridge___component ( + string ^name, + uint32 id, + identityref ^type, + mac_address address, + traffic_class_enabled traffic_class_enabled, + uint16 ports, + @LeafRefPath : "/if:interfaces/if:interface/if:name" + interface_ref_collection bridge_port, + component___capabilities capabilities, + component___filtering_database filtering_database, + component___permanent_database permanent_database, + component___bridge_vlan bridge_vlan, + component___bridge_mst bridge_mst + ) + Type traffic_class_enabled extends boolean + Type boolean + Type interface_ref extends leafref + Type leafref + Collection interface_ref_collection of interface_ref + Annotation LeafRefPath + Structure component___capabilities ( + extended_filtering extended_filtering, + traffic_classes traffic_classes, + static_entry_individual_port static_entry_individual_port, + ivl_capable ivl_capable, + svl_capable svl_capable, + hybrid_capable hybrid_capable, + configurable_pvid_tagging configurable_pvid_tagging, + local_vlan_capable local_vlan_capable + ) + Type extended_filtering extends boolean + Type traffic_classes extends boolean + Type static_entry_individual_port extends boolean + Type ivl_capable extends boolean + Type svl_capable extends boolean + Type hybrid_capable extends boolean + Type configurable_pvid_tagging extends boolean + Type local_vlan_capable extends boolean + Structure component___filtering_database ( + aging_time aging_time, + gauge32 ^size, + gauge32 static_entries, + gauge32 dynamic_entries, + gauge32 static_vlan_registration_entries, + gauge32 dynamic_vlan_registration_entries, + gauge32 mac_address_registration_entries, + filtering_database___filtering_entry_collection filtering_entry, + filtering_database___vlan_registration_entry_collection vlan_registration_entry + ) + Type aging_time extends uint32 + Type gauge32 extends uint32 + Structure filtering_database___filtering_entry ( + uint32 database_id, + mac_address address, + vid_range_type vids, + enumeration entry_type, + filtering_entry___port_map_collection port_map, + enumeration status + ) + Type vid_range_type extends string + Type enumeration + Structure filtering_entry___port_map ( + port_number_type port_ref, + port_map___map_type map_type + ) + Type port_number_type extends uint32 + Structure port_map___map_type ( + map_type___static_filtering_entries static_filtering_entries, + map_type___static_vlan_registration_entries static_vlan_registration_entries, + map_type___mac_address_registration_entries mac_address_registration_entries, + map_type___dynamic_vlan_registration_entries dynamic_vlan_registration_entries, + map_type___dynamic_reservation_entries dynamic_reservation_entries, + map_type___dynamic_filtering_entries dynamic_filtering_entries + ) + Structure map_type___static_filtering_entries ( + static_filtering_entries___static_filtering_entries static_filtering_entries + ) + Structure static_filtering_entries___static_filtering_entries ( + enumeration control_element, + port_number_type connection_identifier + ) + Structure map_type___static_vlan_registration_entries ( + static_vlan_registration_entries___static_vlan_registration_entries static_vlan_registration_entries + ) + Structure static_vlan_registration_entries___static_vlan_registration_entries ( + enumeration registrar_admin_control, + enumeration vlan_transmitted + ) + Structure map_type___mac_address_registration_entries ( + mac_address_registration_entries___mac_address_registration_entries mac_address_registration_entries + ) + Structure mac_address_registration_entries___mac_address_registration_entries ( + enumeration control_element + ) + Structure map_type___dynamic_vlan_registration_entries ( + dynamic_vlan_registration_entries___dynamic_vlan_registration_entries dynamic_vlan_registration_entries + ) + Structure dynamic_vlan_registration_entries___dynamic_vlan_registration_entries ( + enumeration control_element + ) + Structure map_type___dynamic_reservation_entries ( + dynamic_reservation_entries___dynamic_reservation_entries dynamic_reservation_entries + ) + Structure dynamic_reservation_entries___dynamic_reservation_entries ( + enumeration control_element + ) + Structure map_type___dynamic_filtering_entries ( + dynamic_filtering_entries___dynamic_filtering_entries dynamic_filtering_entries + ) + Structure dynamic_filtering_entries___dynamic_filtering_entries ( + enumeration control_element + ) + Collection filtering_entry___port_map_collection of filtering_entry___port_map + Collection filtering_database___filtering_entry_collection of filtering_database___filtering_entry + Structure filtering_database___vlan_registration_entry ( + uint32 database_id, + vid_range_type vids, + enumeration entry_type, + vlan_registration_entry___port_map_collection port_map + ) + Structure vlan_registration_entry___port_map ( + port_number_type port_ref, + port_map___map_type map_type + ) + Collection vlan_registration_entry___port_map_collection of vlan_registration_entry___port_map + Collection filtering_database___vlan_registration_entry_collection of filtering_database___vlan_registration_entry + Structure component___permanent_database ( + gauge32 ^size, + gauge32 static_entries, + gauge32 static_vlan_registration_entries, + permanent_database___filtering_entry_collection filtering_entry + ) + Structure permanent_database___filtering_entry ( + uint32 database_id, + mac_address address, + vid_range_type vids, + enumeration status, + filtering_entry___port_map_collection port_map + ) + Collection permanent_database___filtering_entry_collection of permanent_database___filtering_entry + Structure component___bridge_vlan ( + uint16 version, + uint16 max_vids, + override_default_pvid override_default_pvid, + protocol_frame_format_type protocol_template, + uint16 max_msti, + bridge_vlan___vlan_collection vlan, + bridge_vlan___protocol_group_database_collection protocol_group_database, + bridge_vlan___vid_to_fid_allocation_collection vid_to_fid_allocation, + bridge_vlan___fid_to_vid_allocation_collection fid_to_vid_allocation, + bridge_vlan___vid_to_fid_collection vid_to_fid + ) + Type override_default_pvid extends boolean + Enumerated protocol_frame_format_type { + protocol_frame_format_type Ethernet, + protocol_frame_format_type rfc1042, + protocol_frame_format_type snap8021H, + protocol_frame_format_type snapOther, + protocol_frame_format_type llcOther, + protocol_frame_format_type Ethernet, + protocol_frame_format_type rfc1042, + protocol_frame_format_type snap8021H, + protocol_frame_format_type snapOther, + protocol_frame_format_type llcOther + } + Structure bridge_vlan___vlan ( + vlan_index_type vid, + name_type ^name, + @LeafRefPath : "/if:interfaces/if:interface/if:name" + interface_ref_collection untagged_ports, + @LeafRefPath : "/if:interfaces/if:interface/if:name" + interface_ref_collection egress_ports + ) + Type vlan_index_type extends uint32 + Collection bridge_vlan___vlan_collection of bridge_vlan___vlan + Structure bridge_vlan___protocol_group_database ( + uint16 db_index, + protocol_frame_format_type frame_format_type, + protocol_group_database___frame_format frame_format, + uint32 group_id + ) + Structure protocol_group_database___frame_format ( + frame_format___ethernet_rfc1042_snap8021H ethernet_rfc1042_snap8021H, + frame_format___snap_other snap_other, + frame_format___llc_other llc_other + ) + Structure frame_format___ethernet_rfc1042_snap8021H ( + ethertype_type ethertype + ) + Type ethertype_type extends string + Structure frame_format___snap_other ( + string protocol_id + ) + Structure frame_format___llc_other ( + llc_other___dsap_ssap_pairs dsap_ssap_pairs + ) + Structure llc_other___dsap_ssap_pairs ( + string llc_address + ) + Collection bridge_vlan___protocol_group_database_collection of bridge_vlan___protocol_group_database + Structure bridge_vlan___vid_to_fid_allocation ( + vid_range_type vids, + uint32 fid, + enumeration allocation_type + ) + Collection bridge_vlan___vid_to_fid_allocation_collection of bridge_vlan___vid_to_fid_allocation + Structure bridge_vlan___fid_to_vid_allocation ( + uint32 fid, + enumeration allocation_type, + vlan_index_type_collection vid + ) + Collection vlan_index_type_collection of vlan_index_type + Collection bridge_vlan___fid_to_vid_allocation_collection of bridge_vlan___fid_to_vid_allocation + Structure bridge_vlan___vid_to_fid ( + vlan_index_type vid, + uint32 fid + ) + Collection bridge_vlan___vid_to_fid_collection of bridge_vlan___vid_to_fid + Structure component___bridge_mst ( + mstid_type_collection mstid, + bridge_mst___fid_to_mstid_collection fid_to_mstid, + bridge_mst___fid_to_mstid_allocation_collection fid_to_mstid_allocation + ) + Type mstid_type extends uint32 + Collection mstid_type_collection of mstid_type + Structure bridge_mst___fid_to_mstid ( + uint32 fid, + mstid_type mstid + ) + Collection bridge_mst___fid_to_mstid_collection of bridge_mst___fid_to_mstid + Structure bridge_mst___fid_to_mstid_allocation ( + vid_range_type fids, + mstid_type mstid + ) + Collection bridge_mst___fid_to_mstid_allocation_collection of bridge_mst___fid_to_mstid_allocation + Collection bridge___component_collection of bridge___component + Collection bridge_collection of bridge + Structure interface ( + string ^name, + string description, + identityref ^type, + enabled enabled, + enumeration link_up_down_trap_enable, + enumeration admin_status, + enumeration oper_status, + date_and_time last_change, + int32 if_index, + phys_address phys_address, + @LeafRefPath : "/if:interfaces-state/if:interface/if:name" + interface_state_ref_collection higher_layer_if, + @LeafRefPath : "/if:interfaces-state/if:interface/if:name" + interface_state_ref_collection lower_layer_if, + speed speed, + interface___statistics statistics, + interface___bridge_port bridge_port + ) + Type enabled extends boolean + Type date_and_time extends string + Type int32 extends int32 + Type phys_address extends string + Type speed extends gauge64 + Type gauge64 + Structure interface___statistics ( + date_and_time discontinuity_time, + counter64 in_octets, + counter64 in_unicast_pkts, + counter64 in_broadcast_pkts, + counter64 in_multicast_pkts, + counter32 in_discards, + counter32 in_errors, + counter32 in_unknown_protos, + counter64 out_octets, + counter64 out_unicast_pkts, + counter64 out_broadcast_pkts, + counter64 out_multicast_pkts, + counter32 out_discards, + counter32 out_errors + ) + Type counter64 extends uint64 + Type uint64 + Type counter32 extends uint32 + Structure interface___bridge_port ( + @LeafRefPath : "/dot1q:bridges/dot1q:bridge/dot1q:name" + leafref bridge_name, + @LeafRefPath : "/dot1q:bridges/dot1q:bridge[dot1q:name=current()/../bridge-name]/dot1q:component/dot1q:name" + leafref component_name, + identityref port_type, + pvid pvid, + default_priority default_priority, + bridge_port___priority_regeneration priority_regeneration, + pcp_selection pcp_selection, + bridge_port___pcp_decoding_map_collection pcp_decoding_table, + bridge_port___pcp_encoding_map_collection pcp_encoding_table, + use_dei use_dei, + drop_encoding drop_encoding, + service_access_priority_selection service_access_priority_selection, + bridge_port___service_access_priority service_access_priority, + bridge_port___traffic_class_map_collection traffic_class, + bridge_port___transmission_selection_algorithm_map_collection transmission_selection_algorithm_table, + acceptable_frame acceptable_frame, + enable_ingress_filtering enable_ingress_filtering, + enable_restricted_vlan_registration enable_restricted_vlan_registration, + enable_vid_translation_table enable_vid_translation_table, + enable_egress_vid_translation_table enable_egress_vid_translation_table, + bridge_port___protocol_group_vid_set_collection protocol_group_vid_set, + enumeration admin_point_to_point, + boolean protocol_based_vlan_classification, + uint16 max_vid_set_entries, + port_number_type port_number, + mac_address address, + bits capabilities, + bits type_capabilties, + boolean external, + boolean oper_point_to_point, + media_dependent_overhead media_dependent_overhead, + bridge_port___statistics statistics, + bridge_port___vid_translations_collection vid_translations, + bridge_port___egress_vid_translations_collection egress_vid_translations + ) + Type pvid extends vlan_index_type + Type default_priority extends priority_type + Type priority_type + Structure bridge_port___priority_regeneration ( + priority0 priority0, + priority1 priority1, + priority2 priority2, + priority3 priority3, + priority4 priority4, + priority5 priority5, + priority6 priority6, + priority7 priority7 + ) + Type priority0 + Type priority1 + Type priority2 + Type priority3 + Type priority4 + Type priority5 + Type priority6 + Type priority7 + Enumerated pcp_selection { + pcp_selection _1P0D, + pcp_selection _1P1D, + pcp_selection _1P2D, + pcp_selection _1P3D + } + Structure bridge_port___pcp_decoding_map ( + pcp_selection_type pcp, + pcp_decoding_map___priority_map_collection priority_map + ) + Type pcp_selection_type + Structure pcp_decoding_map___priority_map ( + priority_type priority_code_point, + priority_type priority, + boolean drop_eligible + ) + Collection pcp_decoding_map___priority_map_collection of pcp_decoding_map___priority_map + Collection bridge_port___pcp_decoding_map_collection of bridge_port___pcp_decoding_map + Structure bridge_port___pcp_encoding_map ( + pcp_selection_type pcp, + pcp_encoding_map___priority_map_collection priority_map + ) + Structure pcp_encoding_map___priority_map ( + priority_type priority, + boolean dei, + priority_type priority_code_point + ) + Collection pcp_encoding_map___priority_map_collection of pcp_encoding_map___priority_map + Collection bridge_port___pcp_encoding_map_collection of bridge_port___pcp_encoding_map + Type use_dei extends boolean + Type drop_encoding extends boolean + Type service_access_priority_selection extends boolean + Structure bridge_port___service_access_priority ( + priority0 priority0, + priority1 priority1, + priority2 priority2, + priority3 priority3, + priority4 priority4, + priority5 priority5, + priority6 priority6, + priority7 priority7 + ) + Structure bridge_port___traffic_class_map ( + priority_type priority, + traffic_class_map___available_traffic_class_collection available_traffic_class + ) + Structure traffic_class_map___available_traffic_class ( + uint8 num_traffic_class, + traffic_class_type traffic_class + ) + Type uint8 + Type traffic_class_type + Collection traffic_class_map___available_traffic_class_collection of traffic_class_map___available_traffic_class + Collection bridge_port___traffic_class_map_collection of bridge_port___traffic_class_map + Structure bridge_port___transmission_selection_algorithm_map ( + traffic_class_type traffic_class, + identityref transmission_selection_algorithm + ) + Collection bridge_port___transmission_selection_algorithm_map_collection of bridge_port___transmission_selection_algorithm_map + Enumerated acceptable_frame { + acceptable_frame admit_only_VLAN_tagged_frames, + acceptable_frame admit_only_untagged_and_priority_tagged, + acceptable_frame admit_all_frames + } + Type enable_ingress_filtering extends boolean + Type enable_restricted_vlan_registration extends boolean + Type enable_vid_translation_table extends boolean + Type enable_egress_vid_translation_table extends boolean + Structure bridge_port___protocol_group_vid_set ( + uint32 group_id, + vlanid_collection vid + ) + Type vlanid extends uint16 + Collection vlanid_collection of vlanid + Collection bridge_port___protocol_group_vid_set_collection of bridge_port___protocol_group_vid_set + Type bits + Type media_dependent_overhead extends uint8 + Structure bridge_port___statistics ( + counter64 discard_on_ingress_filtering, + counter64 delay_exceeded_discards, + counter64 mtu_exceeded_discards, + counter64 frame_rx, + counter64 octets_rx, + counter64 frame_tx, + counter64 octets_tx, + counter64 discard_inbound, + counter64 forward_outbound, + counter64 discard_lack_of_buffers, + counter64 discard_transit_delay_exceeded, + counter64 discard_on_error + ) + Structure bridge_port___vid_translations ( + vlanid local_vid, + vlanid relay_vid + ) + Collection bridge_port___vid_translations_collection of bridge_port___vid_translations + Structure bridge_port___egress_vid_translations ( + vlanid relay_vid, + vlanid local_vid + ) + Collection bridge_port___egress_vid_translations_collection of bridge_port___egress_vid_translations + Collection interface_collection of interface + Type interface_state_ref extends leafref + Collection interface_state_ref_collection of interface_state_ref +} \ No newline at end of file diff --git a/demo-mts91/src/samples/mwt/ieee802-dot1q-pb.yang b/demo-mts91/src/samples/mwt/ieee802-dot1q-pb.yang new file mode 100644 index 0000000000000000000000000000000000000000..e25b7b060b9a64bf4adbe6c120b154b98dd58e17 --- /dev/null +++ b/demo-mts91/src/samples/mwt/ieee802-dot1q-pb.yang @@ -0,0 +1,221 @@ +module ieee802-dot1q-pb { + yang-version "1.1"; + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-pb; + prefix dot1q-pb; + import ieee802-dot1q-bridge { + prefix dot1q; + } + import ieee802-dot1q-types { + prefix dot1qtypes; + } + import ietf-interfaces { + prefix if; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "This YANG module describes the bridge configuration model for + Provider Bridges. + + Copyright (C) IEEE (2022). + + This version of this YANG module is part of IEEE Std 802.1Q; see the + standard itself for full legal notices."; + revision 2022-05-06 { + description + "Update to rebase on Qcw"; + reference + "IEEE Std 802.1Q-2022, Bridges and Bridged Networks."; + } + revision 2022-01-19 { + description + "Published as part of IEEE Std 802.1Q-2022."; + reference + "IEEE Std 802.1Q-2022, Bridges and Bridged Networks."; + } + revision 2020-06-04 { + description + "Published as part of IEEE Std 802.1Qcx-2020. Second version."; + reference + "IEEE Std 802.1Qcx-2020, Bridges and Bridged Networks - YANG Data + Model for Connectivity Fault Management."; + } + revision 2018-03-07 { + description + "Published as part of IEEE Std 802.1Q-2018. Initial version."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + augment "/if:interfaces/if:interface/dot1q:bridge-port" { + description + "Augment the interface model with 802.1Q Bridge Port configuration + specific nodes."; + leaf svid { + type dot1qtypes:vlanid; + description + "Service VLAN identifier."; + reference + "12.13.2.1 of IEEE Std 802.1Q-2022"; + } + list cvid-registration { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current()" + + "/../dot1q:bridge-name]/dot1q:component[dot1q:name=current()" + + "/../dot1q:component-name]/dot1q:type = 'dot1q:c-vlan-component' and "+ + "../dot1q:port-type = 'dot1q:customer-edge-port'" { + description + "Applies when the component associated with this interface is + a C-VLAN component and the port-type is a customer edge port."; + } + key "cvid"; + description + "The C-VID Registration Table, provides a mapping between a + C-VID and the service instance represented by an S-VID selected + for that C-VLAN. This table provides the equivalent + functionality of + 1) Configuring the PVID of the internal CNP on the S-VLAN + component + 2) Adding the corresponding PEP on the C-VLAN component to + the member set of the C-VLAN + 3) Adding the PEP and/or CEP to the untagged set of the + C-VLAN (if it is desired that frames forwarded to that + port are transmitted untagged for this C-VLAN)."; + leaf cvid { + type dot1qtypes:vlanid; + description + "Customer VLAN identifiers associated with this bridge port."; + reference + "12.13.2.1 of IEEE Std 802.1Q-2022"; + } + leaf svid { + type dot1qtypes:vlanid; + description + "Service VLAN identifier."; + reference + "12.13.2.1 of IEEE Std 802.1Q-2022"; + } + leaf untagged-pep { + type boolean; + default "true"; + description + "A boolean indicating frames for this C-VLAN should be + forwarded untagged through the Provider Edge Port."; + reference + "12.13.2.1 of IEEE Std 802.1Q-2022"; + } + leaf untagged-cep { + type boolean; + default "true"; + description + "A boolean indicating frames for this C-VLAN should be + forwarded untagged through the Customer Edge Port."; + reference + "12.13.2.1 of IEEE Std 802.1Q-2022"; + } + } + list service-priority-regeneration { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current() " + + "/../dot1q:bridge-name]/dot1q:component[dot1q:name=current() " + + "/../dot1q:component-name]/dot1q:type = 'dot1q:c-vlan-component' and "+ + "../dot1q:port-type = 'dot1q:customer-edge-port'" { + description + "Applies when the component associated with this interface is + a C-VLAN component and the port-type is a customer edge port."; + } + key "svid"; + description + "The Service Priority Regeneration Table, which provides the + Priority Regeneration Table (12.6.2) for each internal CNP + connected to the C-VLAN component associated with the CEP."; + leaf svid { + type dot1qtypes:vlanid; + description + "Service VLAN identifier."; + reference + "12.13.2.6 of IEEE Std 802.1Q-2022"; + } + container priority-regeneration { + description + "Contains Service Priority Regeneration table nodal + information."; + reference + "12.13.2.6 of IEEE Std 802.1Q-2022"; + uses dot1qtypes:priority-regeneration-table-grouping; + } + } + list rcap-internal-interface { + when "/dot1q:bridges/dot1q:bridge[dot1q:name=current() " + + "/../dot1q:bridge-name]/dot1q:component[dot1q:name=current() " + + "/../dot1q:component-name]/dot1q:type = 'dot1q:s-vlan-component' and "+ + "../dot1q:port-type = 'dot1q:remote-customer-access-port'" { + description + "Applies when the component associated with this interface is + a C-VLAN component and the port-type is a customer edge port."; + } + key "external-svid"; + description + "Designating an external port as an RCAP automatically creates a + Port-mapping S-VLAN component associated with that port. This + Port-mapping S-VLAN component includes one internal PNP."; + leaf external-svid { + type dot1qtypes:vlanid; + description + "External Service VLAN identifier."; + reference + "12.13.3.2 of IEEE Std 802.1Q-2022"; + } + leaf internal-port-number { + type dot1qtypes:port-number-type; + description + "The number of the RCAP."; + reference + "12.13.3.2 of IEEE Std 802.1Q-2022"; + } + leaf internal-svid { + type dot1qtypes:vlanid; + description + "Internal Service VLAN Identifier (not applicable for a + C-tagged RCSI)."; + reference + "12.13.3.2 of IEEE Std 802.1Q-2022"; + } + leaf internal-interface-type { + type enumeration { + enum port-based-rcsi { + description + "Port-based RCSI"; + } + enum c-tagged-rcsi { + description + "C-tagged RCSI"; + } + enum pnp { + description + "Provider Network Port"; + } + enum discard { + description + "Discard (external S-VID is not associated with an + internal port)."; + } + } + description + "A value indicating the type of internal interface associated + with the external S-VID."; + reference + "12.13.3.2 of IEEE Std 802.1Q-2022"; + } + } + } +} \ No newline at end of file diff --git a/demo-mts91/src/samples/mwt/ieee802-dot1q-types.yang b/demo-mts91/src/samples/mwt/ieee802-dot1q-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..cfc46ed9b6c31709268ea4d4fdd7feadef55f760 --- /dev/null +++ b/demo-mts91/src/samples/mwt/ieee802-dot1q-types.yang @@ -0,0 +1,980 @@ +module ieee802-dot1q-types { + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-types; + prefix dot1q-types; + import ietf-yang-types { + prefix yang; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "Common types used within dot1Q-bridge modules. + + Copyright (C) IEEE (2022). + + This version of this YANG module is part of IEEE Std 802.1Q; see the + standard itself for full legal notices."; + revision 2022-01-19 { + description + "Published as part of IEEE Std 802.1Q-2022."; + reference + "IEEE Std 802.1Q-2022, Bridges and Bridged Networks."; + } + revision 2020-06-04 { + description + "Published as part of IEEE Std 802.1Qcx-2020. Second version."; + reference + "IEEE Std 802.1Qcx-2020, Bridges and Bridged Networks - YANG Data + Model for Connectivity Fault Management."; + } + revision 2018-03-07 { + description + "Published as part of IEEE Std 802.1Q-2018. Initial version."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + identity dot1q-vlan-type { + description + "Base identity from which all 802.1Q VLAN tag types are derived + from."; + } + identity c-vlan { + base dot1q-vlan-type; + description + "An 802.1Q Customer VLAN, using the 81-00 EtherType"; + reference + "5.5 of IEEE Std 802.1Q-2022"; + } + identity s-vlan { + base dot1q-vlan-type; + description + "An 802.1Q Service VLAN, using the 88-A8 EtherType originally + introduced in 802.1ad, and incorporated into 802.1Q (2011)"; + reference + "5.6 of IEEE Std 802.1Q-2022"; + } + identity transmission-selection-algorithm { + description + "Specify the transmission selection algorithms of IEEE Std + 802.1Q-2022 Table 8-6"; + } + identity strict-priority { + base transmission-selection-algorithm; + description + "Indicates the strict priority transmission selection algorithm."; + reference + "Table 8-6 of IEEE Std 802.1Q-2022"; + } + identity credit-based-shaper { + base transmission-selection-algorithm; + description + "Indicates the credit based shaper transmission selection + algorithm."; + reference + "Table 8-6 of IEEE Std 802.1Q-2022"; + } + identity enhanced-transmission-selection { + base transmission-selection-algorithm; + description + "Indicates the enhanced transmission selection algorithm."; + reference + "Table 8-6 of IEEE Std 802.1Q-2022"; + } + identity asynchronous-traffic-shaping { + base transmission-selection-algorithm; + description + "Indicates the asynchronous transmission selection algorithm."; + reference + "Table 8-6 of IEEE Std 802.1Q-2022"; + } + identity vendor-specific { + base transmission-selection-algorithm; + description + "Indicates a vendor specific transmission selection algorithm."; + reference + "Table 8-6 of IEEE Std 802.1Q-2022"; + } + typedef name-type { + type string { + length "0..32"; + } + description + "A text string of up to 32 characters, of locally determined + significance."; + } + typedef port-number-type { + type uint32 { + range "1..4095"; + } + description + "The port number of the Bridge port for which this entry contains + Bridge management information."; + } + typedef priority-type { + type uint8 { + range "0..7"; + } + description + "A range of priorities from 0 to 7 (inclusive). The Priority Code + Point (PCP) is a 3-bit field that refers to the class of service + associated with an 802.1Q VLAN tagged frame. The field specifies a + priority value between 0 and 7, these values can be used by + quality of service (QoS) to prioritize different classes of + traffic."; + } + 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,250,500-1000"; + } + typedef vlanid { + type uint16 { + range "1..4094"; + } + description + "The vlanid type uniquely identifies a VLAN. This is the 12-bit + VLAN-ID used in the VLAN Tag header. The range is defined by the + referenced specification. This type is in the value set and its + semantics equivalent to the VlanId textual convention of the + SMIv2."; + } + typedef vlan-index-type { + type uint32 { + range "1..4094 | 4096..4294967295"; + } + description + "A value used to index per-VLAN tables. Values of 0 and 4095 are + not permitted. The range of valid VLAN indices. If the value is + greater than 4095, then it represents a VLAN with scope local to + the particular agent, i.e., one without a global VLAN-ID assigned + to it. Such VLANs are outside the scope of IEEE 802.1Q, but it is + convenient to be able to manage them in the same way using this + YANG module."; + reference + "9.6 of IEEE Std 802.1Q-2022"; + } + typedef mstid-type { + type uint32 { + range "1..4094"; + } + description + "In an MSTP Bridge, an MSTID, i.e., a value used to identify a + spanning tree (or MST) instance"; + reference + "13.8 of IEEE Std 802.1Q-2022"; + } + typedef pcp-selection-type { + type enumeration { + enum 8P0D { + description + "8 priorities, 0 drop eligible"; + } + enum 7P1D { + description + "7 priorities, 1 drop eligible"; + } + enum 6P2D { + description + "6 priorities, 2 drop eligible"; + } + enum 5P3D { + description + "5 priorities, 3 drop eligible"; + } + } + description + "Priority Code Point selection types."; + reference + "12.6.2.5.3, 6.9.3 of IEEE Std 802.1Q-2022"; + } + typedef protocol-frame-format-type { + type enumeration { + enum Ethernet { + description + "Ethernet frame format"; + } + enum rfc1042 { + description + "RFC 1042 frame format"; + } + enum snap8021H { + description + "SNAP 802.1H frame format"; + } + enum snapOther { + description + "Other SNAP frame format"; + } + enum llcOther { + description + "Other LLC frame format"; + } + } + description + "A value representing the frame format to be matched."; + reference + "12.10.1.7.1 of IEEE Std 802.1Q-2022"; + } + typedef ethertype-type { + type string { + pattern "[0-9a-fA-F]{2}-[0-9a-fA-F]{2}"; + } + description + "The EtherType value represented in the canonical order defined by + IEEE 802. The canonical representation uses uppercase characters."; + reference + "9.2 of IEEE Std 802-2014"; + } + typedef dot1q-tag-type { + type identityref { + base dot1q-vlan-type; + } + description + "Identifies a specific 802.1Q tag type"; + reference + "9.5 IEEE Std 802.1Q-2022"; + } + typedef traffic-class-type { + type uint8 { + range "0..7"; + } + description + "This is the numerical value associated with a traffic class in a + Bridge. Larger values are associated with higher priority traffic + classes."; + reference + "3.273 of IEEE Std 802.1Q-2022"; + } + grouping dot1q-tag-classifier-grouping { + description + "A grouping which represents an 802.1Q VLAN, matching both the + EtherType and a single VLAN Id."; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description + "VLAN type"; + } + leaf vlan-id { + type vlanid; + mandatory true; + description + "VLAN Id"; + } + } + grouping dot1q-tag-or-any-classifier-grouping { + description + "A grouping which represents an 802.1Q VLAN, matching both the + EtherType and a single VLAN Id or 'any' to match on any VLAN Id."; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description + "VLAN type"; + } + leaf vlan-id { + type union { + type vlanid; + type enumeration { + enum any { + value 4095; + description + "Matches 'any' VLAN in the range 1 to 4094 that is not + matched by a more specific VLAN Id match"; + } + } + } + mandatory true; + description + "VLAN Id or any"; + } + } + grouping dot1q-tag-ranges-classifier-grouping { + description + "A grouping which represents an 802.1Q VLAN that matches a range + of VLAN Ids."; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description + "VLAN type"; + } + leaf vlan-ids { + type vid-range-type; + mandatory true; + description + "VLAN Ids"; + } + } + grouping dot1q-tag-ranges-or-any-classifier-grouping { + description + "A grouping which represents an 802.1Q VLAN, matching both the + EtherType and a single VLAN Id, ordered list of ranges, or 'any' + to match on any VLAN Id."; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description + "VLAN type"; + } + leaf vlan-id { + type union { + type vid-range-type; + type enumeration { + enum any { + value 4095; + description + "Matches 'any' VLAN in the range 1 to 4094."; + } + } + } + mandatory true; + description + "VLAN Ids or any"; + } + } + grouping priority-regeneration-table-grouping { + description + "The priority regeneration table provides the ability to map + incoming priority values on a per-Port basis, under management + control."; + reference + "6.9.4 of IEEE Std 802.1Q-2022"; + leaf priority0 { + type priority-type; + default "0"; + description + "Priority 0"; + reference + "12.6.2.3, 6.9.4 of IEEE Std 802.1Q-2022"; + } + leaf priority1 { + type priority-type; + default "1"; + description + "Priority 1"; + reference + "12.6.2.3, 6.9.4 of IEEE Std 802.1Q-2022"; + } + leaf priority2 { + type priority-type; + default "2"; + description + "Priority 2"; + reference + "12.6.2.3, 6.9.4 of IEEE Std 802.1Q-2022"; + } + leaf priority3 { + type priority-type; + default "3"; + description + "Priority 3"; + reference + "12.6.2.3, 6.9.4 of IEEE Std 802.1Q-2022"; + } + leaf priority4 { + type priority-type; + default "4"; + description + "Priority 4"; + reference + "12.6.2.3, 6.9.4 of IEEE Std 802.1Q-2022"; + } + leaf priority5 { + type priority-type; + default "5"; + description + "Priority 5"; + reference + "12.6.2.3, 6.9.4 of IEEE Std 802.1Q-2022"; + } + leaf priority6 { + type priority-type; + default "6"; + description + "Priority 6"; + reference + "12.6.2.3, 6.9.4 of IEEE Std 802.1Q-2022"; + } + leaf priority7 { + type priority-type; + default "7"; + description + "Priority 7"; + reference + "12.6.2.3, 6.9.4 of IEEE Std 802.1Q-2022"; + } + } + grouping pcp-decoding-table-grouping { + description + "The Priority Code Point decoding table enables the decoding of + the priority and drop-eligible parameters from the PCP."; + reference + "6.9.3 of IEEE Std 802.1Q-2022"; + list pcp-decoding-map { + key "pcp"; + description + "This map associates the priority code point field found in the + VLAN to a priority and drop eligible value based upon the + priority code point selection type."; + leaf pcp { + type pcp-selection-type; + description + "The priority code point selection type."; + reference + "12.6.2.7, 6.9.3 of IEEE Std 802.1Q-2022"; + } + list priority-map { + key "priority-code-point"; + description + "This map associated a priority code point value to priority + and drop eligible parameters."; + leaf priority-code-point { + type priority-type; + description + "Priority associated with the pcp."; + reference + "12.6.2.7, 6.9.3 of IEEE Std 802.1Q-2022"; + } + leaf priority { + type priority-type; + description + "Priority associated with the pcp."; + reference + "12.6.2.7, 6.9.3 of IEEE Std 802.1Q-2022"; + } + leaf drop-eligible { + type boolean; + description + "Drop eligible value for pcp"; + reference + "12.6.2.7, 6.9.3 of IEEE Std 802.1Q-2022"; + } + } + } + } + grouping pcp-encoding-table-grouping { + description + "The Priority Code Point encoding table encodes the priority and + drop-eligible parameters in the PCP field of the VLAN tag."; + reference + "12.6.2.9, 6.9.3 of IEEE Std 802.1Q-2022"; + list pcp-encoding-map { + key "pcp"; + description + "This map associated the priority and drop-eligible parameters + to the priority used to encode the PCP of the VLAN based upon + the priority code point selection type."; + leaf pcp { + type pcp-selection-type; + description + "The priority code point selection type."; + reference + "12.6.2.7, 6.9.3 of IEEE Std 802.1Q-2022"; + } + list priority-map { + key "priority dei"; + description + "This map associated the priority and drop-eligible parameters + to the priority code point field of the VLAN tag."; + leaf priority { + type priority-type; + description + "Priority associated with the pcp."; + reference + "12.6.2.7, 6.9.3 of IEEE Std 802.1Q-2022"; + } + leaf dei { + type boolean; + description + "The drop eligible value."; + reference + "12.6.2, 8.6.6 of IEEE Std 802.1Q-2022"; + } + leaf priority-code-point { + type priority-type; + description + "PCP value for priority when DEI value"; + reference + "12.6.2.9, 6.9.3 of IEEE Std 802.1Q-2022"; + } + } + } + } + grouping service-access-priority-table-grouping { + description + "The Service Access Priority Table associates a received priority + with a serice access priority."; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + leaf priority0 { + type priority-type; + default "0"; + description + "Service access priority value for priority 0"; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + } + leaf priority1 { + type priority-type; + default "1"; + description + "Service access priority value for priority 1"; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + } + leaf priority2 { + type priority-type; + default "2"; + description + "Service access priority value for priority 2"; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + } + leaf priority3 { + type priority-type; + default "3"; + description + "Service access priority value for priority 3"; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + } + leaf priority4 { + type priority-type; + default "4"; + description + "Service access priority value for priority 4"; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + } + leaf priority5 { + type priority-type; + default "5"; + description + "Service access priority value for priority 5"; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + } + leaf priority6 { + type priority-type; + default "6"; + description + "Service access priority value for priority 6"; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + } + leaf priority7 { + type priority-type; + default "7"; + description + "Service access priority value for priority 7"; + reference + "12.6.2.17, 6.13.1 of IEEE Std 802.1Q-2022"; + } + } + grouping traffic-class-table-grouping { + description + "The Traffic Class Table models the operations that can be + performed on, or inquire about, the current contents of the + Traffic Class Table (8.6.6) for a given Port."; + reference + "12.6.3, 8.6.6 of IEEE Std 802.1Q-2022"; + list traffic-class-map { + key "priority"; + description + "The priority index into the traffic class table."; + leaf priority { + type priority-type; + description + "The priority of the traffic class entry."; + reference + "8.6.6 of IEEE Std 802.1Q-2022"; + } + list available-traffic-class { + key "num-traffic-class"; + description + "The traffic class index associated with a given priority + within the traffic class table."; + reference + "8.6.6 of IEEE Std 802.1Q-2022"; + leaf num-traffic-class { + type uint8 { + range "1..8"; + } + description + "The available number of traffic classes."; + reference + "8.6.6 of IEEE Std 802.1Q-2022"; + } + leaf traffic-class { + type traffic-class-type; + description + "The traffic class index associated with a given traffic + class entry."; + reference + "8.6.6 of IEEE Std 802.1Q-2022"; + } + } + } + } + grouping transmission-selection-table-grouping { + description + "The Transmission Selection Algorithm Table models the operations + that can be performed on, or inquire about, the current contents + of the Transmission Selection Algorithm Table (12.20.2) for a + given Port."; + reference + "12.20.2, 8.6.8 of IEEE Std 802.1Q-2022"; + list transmission-selection-algorithm-map { + key "traffic-class"; + description + "The traffic class to index into the transmission selection + table."; + leaf traffic-class { + type traffic-class-type; + description + "The traffic class of the entry."; + reference + "8.6.6 of IEEE Std 802.1Q-2022"; + } + leaf transmission-selection-algorithm { + type identityref { + base dot1q-types:transmission-selection-algorithm; + } + description + "Transmission selection algorithm"; + reference + "8.6.8, Table 8-6 of IEEE Std 802.1Q-2022"; + } + } + } + grouping port-map-grouping { + description + "A set of control indicators, one for each Port. A Port Map, + containing a control element for each outbound Port"; + reference + "8.8.1, 8.8.2 of IEEE Std 802.1Q-2022"; + list port-map { + key "port-ref"; + description + "The list of entries composing the port map."; + leaf port-ref { + type port-number-type; + description + "The interface port reference associated with this map."; + reference + "8.8.1 of IEEE Std 802.1Q-2022"; + } + choice map-type { + description + "Type of port map"; + container static-filtering-entries { + description + "Static filtering entries attributes."; + leaf control-element { + type enumeration { + enum forward { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + enum filter { + description + "Filtered, independently of any dynamic filtering + information."; + } + enum forward-filter { + description + "Forwarded or filtered on the basis of dynamic + filtering information, or on the basis of the default + Group filtering behavior for the outbound Port (8.8.6) + if no dynamic filtering information is present + specifically for the MAC address."; + } + } + description + "containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that meets + this specification."; + reference + "8.8.1 of IEEE Std 802.1Q-2022"; + } + leaf connection-identifier { + type port-number-type; + description + "A Port MAP may contain a connection identifier (8.8.12) + for each outbound port. The connection identifier may be + associated with the Bridge Port value maintained in a + Dynamic Filtering Entry of the FDB for Bridge Ports."; + reference + "8.8.1, 8.8.12 of IEEE Std 802.1Q-2022"; + } + } + container static-vlan-registration-entries { + description + "Static VLAN registration entries."; + leaf registrar-admin-control { + type enumeration { + enum fixed-new-ignored { + description + "Registration Fixed (New ignored)."; + } + enum fixed-new-propagated { + description + "Registration Fixed (New propagated."; + } + enum forbidden { + description + "Registration Forbidden."; + } + enum normal { + description + "Normal Registration."; + } + } + description + "The Registrar Administrative Control values for MVRP and + MIRP for the VID."; + reference + "8.8.2 of IEEE Std 802.1Q-2022"; + } + leaf vlan-transmitted { + type enumeration { + enum tagged { + description + "VLAN-tagged"; + } + enum untagged { + description + "VLAN-untagged"; + } + } + description + "Whether frames are to be VLAN-tagged or untagged when + transmitted."; + reference + "8.8.2 of IEEE Std 802.1Q-2022"; + } + } + container mac-address-registration-entries { + description + "MAC address registration entries attributes."; + leaf control-element { + type enumeration { + enum registered { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + enum not-registered { + description + "Filtered, independently of any dynamic filtering + information."; + } + } + description + "containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that meets + this specification."; + reference + "8.8.4 of IEEE Std 802.1Q-2022"; + } + } + container dynamic-vlan-registration-entries { + description + "Dynamic VLAN registration entries attributes."; + leaf control-element { + type enumeration { + enum registered { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + } + description + "containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that meets + this specification."; + reference + "8.8.5 of IEEE Std 802.1Q-2022"; + } + } + container dynamic-reservation-entries { + description + "Dynamic reservation entries attributes."; + leaf control-element { + type enumeration { + enum forward { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + enum filter { + description + "Filtered, independently of any dynamic filtering + information."; + } + } + description + "Containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that meets + this specification."; + reference + "8.8.7 of IEEE Std 802.1Q-2022"; + } + } + container dynamic-filtering-entries { + description + "Dynamic filtering entries attributes."; + leaf control-element { + type enumeration { + enum forward { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + } + description + "Containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that meets + this specification."; + reference + "8.8.3 of IEEE Std 802.1Q-2022"; + } + } + } + } + } + grouping bridge-port-statistics-grouping { + description + "Grouping of bridge port statistics."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + leaf delay-exceeded-discards { + type yang:counter64; + description + "The number of frames discarded by this port due to excessive + transit delay through the Bridge. It is incremented by both + transparent and source route Bridges."; + reference + "12.6.1.1.3, 8.6.6 of IEEE Std 802.1Q-2022"; + } + leaf mtu-exceeded-discards { + type yang:counter64; + description + "The number of frames discarded by this port due to an excessive + size. It is incremented by both transparent and source route + Bridges."; + reference + "Item g) in 12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf frame-rx { + type yang:counter64; + description + "The number of frames that have been received by this port from + its segment. Note that a frame received on the interface + corresponding to this port is only counted by this object if and + only if it is for a protocol being processed by the local + bridging function, including Bridge management frames."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf octets-rx { + type yang:counter64; + description + "The total number of octets in all valid frames received + (including BPDUs, frames addressed to the Bridge as an end + station, and frames that were submitted to the Forwarding + Process)."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf frame-tx { + type yang:counter64; + description + "The number of frames that have been transmitted by this port to + its segment. Note that a frame transmitted on the interface + corresponding to this port is only counted by this object if and + only if it is for a protocol being processed by the local + bridging function, including Bridge management frames."; + } + leaf octets-tx { + type yang:counter64; + description + "The total number of octets that have been transmitted by this + port to its segment."; + } + leaf discard-inbound { + type yang:counter64; + description + "Count of received valid frames that were discarded (i.e., + filtered) by the Forwarding Process."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf forward-outbound { + type yang:counter64; + description + "The number of frames forwarded to the associated MAC Entity + (8.5)."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf discard-lack-of-buffers { + type yang:counter64; + description + "The count of frames that were to be transmitted through the + associated Port but were discarded due to lack of buffers."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf discard-transit-delay-exceeded { + type yang:counter64; + description + "The number of frames discarded by this port due to excessive + transit delay through the Bridge. It is incremented by both + transparent and source route Bridges."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + leaf discard-on-error { + type yang:counter64; + description + "The number of frames that were to be forwarded on the + associated MAC but could not be transmitted (e.g., frame would + be too large, 6.5.8)."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2022"; + } + } +} diff --git a/demo-mts91/src/samples/mwt/ieee802-types.yang b/demo-mts91/src/samples/mwt/ieee802-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..f7bce9974e0d04c7dba82729dd3642d349747896 --- /dev/null +++ b/demo-mts91/src/samples/mwt/ieee802-types.yang @@ -0,0 +1,287 @@ +module ieee802-types { + namespace urn:ieee:std:802.1Q:yang:ieee802-types; + prefix ieee; + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "This module contains a collection of generally useful derived data + types for IEEE YANG models. + + Copyright (C) IEEE (2022). + + This version of this YANG module is part of IEEE Std 802.1Q; see the + standard itself for full legal notices."; + revision 2022-05-19 { + description + "Published as part of IEEE Std 802.1Q-2022."; + reference + "IEEE Std 802.1Q-2022, Bridges and Bridged Networks."; + } + revision 2021-08-25 { + description + "Published as part of IEEE Std 802.1ABcu"; + reference + "IEEE Std 802.1AB-2016"; + } + revision 2020-06-04 { + description + "Published as part of IEEE Std 802.1Qcx-2020. Second version."; + reference + "IEEE Std 802.1Qcx-2020, Bridges and Bridged Networks - YANG Data + Model for Connectivity Fault Management."; + } + revision 2018-03-07 { + description + "Published as part of IEEE Std 802.1Q-2018. Initial version."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + typedef mac-address { + type string { + pattern "[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}"; + } + description + "The mac-address type represents a MAC address in the canonical + format and hexadecimal format specified by IEEE Std 802. The + hexidecimal representation uses uppercase characters."; + reference + "3.1, 8.1 of IEEE Std 802-2014"; + } + typedef chassis-id-subtype-type { + type enumeration { + enum chassis-component { + value 1; + description + "Represents a chassis identifier based on the value of + entPhysicalAlias object (defined in IETF RFC 2737) for a + chassis component (i.e., an entPhysicalClass value of + chassis(3))"; + } + enum interface-alias { + value 2; + description + "Represents a chassis identifier based on the value of ifAlias + object (defined in IETF RFC 2863) for an interface on the + containing chassis."; + } + enum port-component { + value 3; + description + "Represents a chassis identifier based on the value of + entPhysicalAlias object (defined in IETF RFC 2737) for a port + or backplane component (i.e., entPhysicalClass value of + port(10) or backplane(4)), within the containing chassis."; + } + enum mac-address { + value 4; + description + "Represents a chassis identifier based on the value of a + unicast source address (encoded in network byte order and IEEE + 802.3 canonical bit order), of a port on the containing + chassis as defined in IEEE Std 802-2001."; + } + enum network-address { + value 5; + description + "Represents a chassis identifier based on a network address, + associated with a particular chassis. The encoded address is + actually composed of two fields. The first field is a single + octet, representing the IANA AddressFamilyNumbers value for + the specific address type, and the second field is the network + address value."; + } + enum interface-name { + value 6; + description + "Represents a chassis identifier based on the value of ifName + object (defined in IETF RFC 2863) for an interface on the + containing chassis."; + } + enum local { + value 7; + description + "Represents a chassis identifier based on a locally defined + value."; + } + } + description + "The source of a chassis identifier."; + reference + "IEEE Std 802-2014;" + + "IETF RFC 2737;" + + "IETF RFC 2863"; + } + typedef chassis-id-type { + type string { + length "1..255"; + } + description + "The format of a chassis identifier string. Objects of this type + are always used with an associated lldp-chassis-is-subtype object, + which identifies the format of the particular lldp-chassis-id + object instance. + + If the associated lldp-chassis-id-subtype object has a value of + chassis-component, then the octet string identifies a particular + instance of the entPhysicalAlias object (defined in IETF RFC 2737) + for a chassis component (i.e., an entPhysicalClass value of + chassis(3)). + + If the associated lldp-chassis-id-subtype object has a value of + interface-alias, then the octet string identifies a particular + instance of the ifAlias object (defined in IETF RFC 2863) for an + interface on the containing chassis. If the particular ifAlias + object does not contain any values, another chassis identifier + type should be used. + + If the associated lldp-chassis-id-subtype object has a value of + port-component, then the octet string identifies a particular + instance of the entPhysicalAlias object (defined in IETF RFC 2737) + for a port or backplane component within the containing chassis. + + If the associated lldp-chassis-id-subtype object has a value of + mac-address, then this string identifies a particular unicast + source address (encoded in network byte order and IEEE 802.3 + canonical bit order), of a port on the containing chassis as + defined in IEEE Std 802-2001. + + If the associated lldp-chassis-id-subtype object has a value of + network-address, then this string identifies a particular network + address, encoded in network byte order, associated with one or + more ports on the containing chassis. The first octet contains the + IANA Address Family Numbers enumeration value for the specific + address type, and octets 2 through N contain the network address + value in network byte order. + + If the associated lldp-chassis-id-subtype object has a value of + interface-name, then the octet string identifies a particular + instance of the ifName object (defined in IETF RFC 2863) for an + interface on the containing chassis. If the particular ifName + object does not contain any values, another chassis identifier + type should be used. + + If the associated lldp-chassis-id-subtype object has a value of + local, then this string identifies a locally assigned Chassis ID."; + reference + "IEEE Std 802-2014;" + + "IETF RFC 2737;" + + "IETF RFC 2863"; + } + typedef port-id-subtype-type { + type enumeration { + enum interface-alias { + value 1; + description + "Represents a port identifier based on the ifAlias MIB object, + defined in IETF RFC 2863."; + } + enum port-component { + value 2; + description + "Represents a port identifier based on the value of + entPhysicalAlias (defined in IETF RFC 2737) for a port + component (i.e., entPhysicalClass value of port(10)), within + the containing chassis."; + } + enum mac-address { + value 3; + description + "Represents a port identifier based on a unicast source + address (encoded in network byte order and IEEE 802.3 + canonical bit order), which has been detected by the agent and + associated with a particular port (IEEE Std 802-2001)."; + } + enum network-address { + value 4; + description + "Represents a port identifier based on a network address, + detected by the agent and associated with a particular port."; + } + enum interface-name { + value 5; + description + "Represents a port identifier based on the ifName MIB object, + defined in IETF RFC 2863."; + } + enum agent-circuit-id { + value 6; + description + "Represents a port identifier based on the agent-local + identifier of the circuit (defined in RFC 3046), detected by + the agent and associated with a particular port."; + } + enum local { + value 7; + description + "Represents a port identifier based on a value locally + assigned."; + } + } + description + "The source of a particular type of port identifier used in the + LLDP YANG module."; + } + typedef port-id-type { + type string { + length "1..255"; + } + description + "The format of a port identifier string. Objects of this type are + always used with an associated port-id-subtype object, which + identifies the format of the particular lldp-port-id object + instance. + + If the associated port-id-subtype object has a value of + interface-alias, then the octet string identifies a particular + instance of the ifAlias object (defined in IETF RFC 2863). If the + particular ifAlias object does not contain any values, another + port identifier type should be used. + + If the associated port-id-subtype object has a value of + port-component, then the octet string identifies a particular + instance of the entPhysicalAlias object (defined in IETF RFC 2737) + for a port or backplane component. + + If the associated port-id-subtype object has a value of + mac-address, then this string identifies a particular unicast + source address (encoded in network byte order and IEEE 802.3 + canonical bit order) associated with the port (IEEE Std 802-2001). + + If the associated port-id-subtype object has a value of + network-address, then this string identifies a network address + associated with the port. The first octet contains the IANA + AddressFamilyNumbers enumeration value for the specific address + type, and octets 2 through N contain the networkAddress address + value in network byte order. + + If the associated port-id-subtype object has a value of + interface-name, then the octet string identifies a particular + instance of the ifName object (defined in IETF RFC 2863). If the + particular ifName object does not contain any values, another port + identifier type should be used. + + If the associated port-id-subtype object has a value of + agent-circuit-id, then this string identifies a agent-local + identifier of the circuit (defined in RFC 3046). + + If the associated port-id-subtype object has a value of + local, then this string identifies a locally assigned port ID."; + reference + "IEEE Std 802-2014;" + + "IETF RFC 2737;" + + "IETF RFC 2863," + + "IETF RFC 3046"; + } +} diff --git a/demo-mts91/src/samples/mwt/ietf-interfaces@2018-02-20.yang b/demo-mts91/src/samples/mwt/ietf-interfaces@2018-02-20.yang new file mode 100644 index 0000000000000000000000000000000000000000..f66c205ce076e65b2ded1d388c944a91829a48b5 --- /dev/null +++ b/demo-mts91/src/samples/mwt/ietf-interfaces@2018-02-20.yang @@ -0,0 +1,1123 @@ +module ietf-interfaces { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; + prefix if; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: <https://datatracker.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + Editor: Martin Bjorklund + <mailto:mbj@tail-f.com>"; + + description + "This module contains a collection of YANG definitions for + managing network interfaces. + + Copyright (c) 2018 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 + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8343; see + the RFC itself for full legal notices."; + + revision 2018-02-20 { + description + "Updated to support NMDA."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + /* + * Typedefs + */ + + typedef interface-ref { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + interfaces."; + } + + /* + * Identities + */ + + identity interface-type { + description + "Base identity from which specific interface types are + derived."; + } + + /* + * Features + */ + + feature arbitrary-names { + description + "This feature indicates that the device allows user-controlled + interfaces to be named arbitrarily."; + } + feature pre-provisioning { + description + "This feature indicates that the device supports + pre-provisioning of interface configuration, i.e., it is + possible to configure an interface whose physical interface + hardware is not present on the device."; + } + feature if-mib { + description + "This feature indicates that the device implements + the IF-MIB."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + + /* + * Data nodes + */ + + container interfaces { + description + "Interface parameters."; + + list interface { + key "name"; + + description + "The list of interfaces on the device. + + The status of an interface is available in this list in the + operational state. If the configuration of a + system-controlled interface cannot be used by the system + (e.g., the interface hardware present does not match the + interface type), then the configuration is not applied to + the system-controlled interface shown in the operational + state. If the configuration of a user-controlled interface + cannot be used by the system, the configured interface is + not instantiated in the operational state. + + System-controlled interfaces created by the system are + always present in this list in the operational state, + whether or not they are configured."; + + leaf name { + type string; + description + "The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + operational state, the server MAY reject the request if + the implementation does not support pre-provisioning of + interfaces or if the name refers to an interface that can + never exist in the system. A Network Configuration + Protocol (NETCONF) server MUST reply with an rpc-error + with the error-tag 'invalid-value' in this case. + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + operational state. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf description { + type string; + description + "A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + configuration."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf enabled { + type boolean; + default "true"; + description + "This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the intended configuration to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + Changes in this leaf in the intended configuration are + reflected in ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf link-up-down-trap-enable { + if-feature if-mib; + type enumeration { + enum enabled { + value 1; + description + "The device will generate linkUp/linkDown SNMP + notifications for this interface."; + } + enum disabled { + value 2; + description + "The device will not generate linkUp/linkDown SNMP + notifications for this interface."; + } + } + description + "Controls whether linkUp/linkDown SNMP notifications + should be generated for this interface. + + If this node is not configured, the value 'enabled' is + operationally used by the server for interfaces that do + not operate on top of any other interface (i.e., there are + no 'lower-layer-if' entries), and 'disabled' otherwise."; + reference + "RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + config false; + mandatory true; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + config false; + mandatory true; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + config false; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + config false; + mandatory true; + description + "The ifIndex value for the ifEntry represented by this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + config false; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-ref; + config false; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-ref; + config false; + + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + config false; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + config false; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + + } + } + + /* + * Legacy typedefs + */ + + typedef interface-state-ref { + type leafref { + path "/if:interfaces-state/if:interface/if:name"; + } + status deprecated; + description + "This type is used by data models that need to reference + the operationally present interfaces."; + } + + /* + * Legacy operational state data nodes + */ + + container interfaces-state { + config false; + status deprecated; + description + "Data nodes for the operational state of interfaces."; + + list interface { + key "name"; + status deprecated; + + description + "The list of interfaces on the device. + + System-controlled interfaces created by the system are + always present in this list, whether or not they are + configured."; + + leaf name { + type string; + status deprecated; + description + "The name of the interface. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + status deprecated; + description + "The type of the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + mandatory true; + status deprecated; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + mandatory true; + status deprecated; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + status deprecated; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + mandatory true; + status deprecated; + description + "The ifIndex value for the ifEntry represented by this + interface."; + + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + status deprecated; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + status deprecated; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + status deprecated; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + status deprecated; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + status deprecated; + + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + status deprecated; + + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + status deprecated; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + } + } +} diff --git a/demo-mts91/src/samples/nfv/etsi-nfv-common.yang b/demo-mts91/src/samples/nfv/etsi-nfv-common.yang new file mode 100644 index 0000000000000000000000000000000000000000..0a1c361eddba042598317e1bec71d6797a287d03 --- /dev/null +++ b/demo-mts91/src/samples/nfv/etsi-nfv-common.yang @@ -0,0 +1,736 @@ +submodule etsi-nfv-common { + yang-version 1.1; + belongs-to etsi-nfv-descriptors { + prefix nfv; + } + organization + "European Telecommunications Standards Institute (ETSI)"; + + description + "Common data types for ETSI data models."; + + revision 2019-04-25 { + description + "Initial revision + + Common data structures to support VNFD and NSD according to: + ETSI GS NFV-IFA 014 Ed261v252 + ETSI GS NFV-IFA 011 Ed261v254"; + } + + /* + * Identities. + */ + identity layer-protocol { + } + identity ethernet { + base layer-protocol; + } + identity mpls { + base layer-protocol; + } + identity odu2 { + base layer-protocol; + } + identity ipv4 { + base layer-protocol; + } + identity ipv6 { + base layer-protocol; + } + identity pseudo-wire { + base layer-protocol; + } + + identity address-type { + description + "Describes the type of the address to be assigned to the CP + instantiated from the parent CPD. + Value: + • MAC address. + • IP address. + • … + The content type shall be aligned with the address type + supported by the layerProtocol attribute of the parent CPD."; + reference + "GS NFV IFA011: Section 7.1.3.3, AddressData information + element."; + } + identity mac-address { + base address-type; + } + identity ip-address { + base address-type; + } + + identity supported-operation { + description + "Indicates which operations are available for this DF via the + VNF LCM interface. Instantiate VNF, Query VNF and Terminate + VNF are supported in all DF and therefore need not be + included in this list."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information element"; + } + identity instantiate-vnf { + base supported-operation; + description + "This operation instantiates a particular DF of a VNF based on + the definition in the VNFD."; + reference + "GS NFV IFA007: Section 7.2.3 Instantiate VNF Operation"; + } + identity scale-vnf { + base supported-operation; + description + "This operation provides methods to request scaling a VNF in + multiple ways: + • horizontal scaling: + - scale out: adding additional VNFC instances to the VNF to + increase capacity + - scale in: removing VNFC instances from the VNF, in order to + release unused capacity"; + reference + "GS NFV IFA007: Section 7.2.4 Scale VNF Operation"; + } + identity scale-vnf-to-level { + base supported-operation; + description + "This operation scales an instantiated VNF of a particular DF to + a target size. The target size is either expressed as an + instantiation level of that DF as defined in the VNFD, or given + as a list of scale levels, one per scaling aspect of that DF. + Instantiation levels and scaling aspects are declared in the + VNFD. Typically, the result of this operation is adding and/or + removing Network Functions Virtualization Infrastructure (NFVI) + resources to/from the VNF."; + reference + "GS NFV IFA007: Section 7.2.5 Scale VNF To Level Operation"; + } + identity change-vnf-flavour { + base supported-operation; + description + "This operation changes the DF of a VNF instance."; + reference + "GS NFV IFA007: Section 7.2.6 Change VNF Flavour Operation"; + } + identity terminate-vnf { + base supported-operation; + description + "This operation terminates a VNF. + + A VNF can be terminated gracefully or forcefully. Graceful + termination means that the VNFM arranges to take the + VNF out of service, e.g. by asking the VNF's EM to take the + VNF out of service, and only after that shuts down the + VNF and releases the resources. Forceful termination means that + the VNFM immediately shuts down the VNF and releases the + resources. A time interval can be specified for taking the VNF + out of service, after which the VNF is shut down if taking it + out of service has not completed."; + reference + "GS NFV IFA007: Section 7.2.7 Terminate VNF Operation"; + } + identity query-vnf { + base supported-operation; + description + "This operation provides information about VNF instances. The + applicable VNF instances can be chosen based on + filtering criteria, and the information can be restricted to + selected attributes."; + reference + "GS NFV IFA007: Section 7.2.9 Query VNF Operation"; + } + identity heal-vnf { + base supported-operation; + description + "This operation enables the NFVO to request a VNFM to perform a + VNF healing procedure."; + reference + "GS NFV IFA007: Section 7.2.10 Heal VNF Operation"; + } + identity operate-vnf { + base supported-operation; + description + "This operation enables requesting to change the state of a VNF + instance, including starting and stopping the VNF instance."; + reference + "GS NFV IFA007: Section 7.2.11 Operate VNF Operation"; + } + identity modify-vnf-information { + base supported-operation; + description + "This operation allows updating information about a VNF + instance."; + reference + "GS NFV IFA007: Section 7.2.12 Modify VNF Operation"; + } + + identity cp-role { + description + "Identifies the role of the port in the context of the traffic + flow patterns in the VNF or parent NS."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + identity root { + base cp-role; + } + identity leaf { + base cp-role; + } + + identity checksum-algorithm { + description + "Identifies the algorithms supported for the purpose of + calculating the checksum."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; + } + + identity sha-224 { + base checksum-algorithm; + description + "SHA-224."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; + } + + identity sha-256 { + base checksum-algorithm; + description + "SHA-256."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; + } + + identity sha-384 { + base checksum-algorithm; + description + "SHA-384."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; + } + + identity sha-512 { + base checksum-algorithm; + description + "SHA-512."; + reference + "GS NFV IFA011: Section 7.1.6.10 Checksum information element."; + } + + identity storage-type { + description + "Base type of storage that identities can derive from."; + } + + identity root-storage { + base storage-type; + description + "Root type of storage."; + } + + identity swap-storage { + base storage-type; + description + "Swap type of storage."; + } + + identity ephemeral-storage { + base storage-type; + description + "Ephemeral type of storage."; + } + + /* + * Typedefs + */ + + typedef flow-pattern { + type enumeration { + enum line; + enum tree; + enum mesh; + } + } + + typedef affinity-type { + type enumeration { + enum "affinity"; + enum "anti-affinity"; + } + } + + typedef affinity-scope { + type enumeration { + enum "nfvi-node"; + enum "zone-group"; + enum "zone"; + enum "nfvi-pop"; + } + } + + typedef internal-lifecycle-management-script-event { + type enumeration { + enum "start-instantiation"; + enum "end-instantiation"; + enum "start-scaling"; + enum "end-scaling"; + enum "start-healing"; + enum "end-healing"; + enum "start-termination"; + enum "end-termination"; + enum "start-vnf-flavour-change"; + enum "end-vnf-flavour-change"; + enum "start-vnf-operation-change"; + enum "end-vnf-operation-change"; + enum "start-vnf-ext-conn-change"; + enum "end-vnf-ext-conn-change"; + enum "start-vnfinfo-modification"; + enum "end-vnfinfo-modification"; + } + } + + grouping local-affinity-or-anti-affinity-rule { + list local-affinity-or-anti-affinity-rule { + key "affinity-type affinity-scope"; + leaf affinity-type { + type affinity-type; + description + "Specifies whether the rule is an affinity rule or an + anti-affinity rule."; + reference + "GS NFV IFA011: Section 7.1.8.11, + LocalAffinityOrAntiAffinityRule information element."; + } + + leaf affinity-scope { + type affinity-scope; + description + "Specifies the scope of the rule, possible values are + 'NFVI-PoP', 'Zone', 'ZoneGroup', 'NFVI-node'."; + reference + "GS NFV IFA011: Section 7.1.8.11, + LocalAffinityOrAntiAffinityRule information element."; + } + } + } + + grouping connectivity-type { + container connectivity-type { + leaf-list layer-protocol { + type identityref { + base layer-protocol; + } + description + "Identifies the protocols that the VL uses (Ethernet, + MPLS, ODU2, IPV4, IPV6, Pseudo-Wire). The top layer + protocol of the VL protocol stack shall always be provided. + The lower layer protocols may be included when there are + specific requirements on these layers."; + reference + "GS NFV IFA011: Section 7.1.7.3, ConnectivityType + information element."; + } + + leaf flow-pattern { + type flow-pattern; + description + "Identifies the flow pattern of the connectivity (Line, + Tree, Mesh)."; + reference + "GS NFV IFA011: Section 7.1.7.3, ConnectivityType + information element."; + } + } + } + + grouping link-bitrate-requirements { + leaf root { + type uint64; + units "Mbps"; + mandatory true; + description + "Specifies the throughput requirement of + the link (e.g. bitrate of E-Line, root bitrate + of E-Tree, aggregate capacity of E-LAN)."; + reference + "GS NFV IFA011: Section 7.1.8.6, LinkBitrateRequirements + information element."; + } + + leaf leaf { + type uint64; + units "Mbps"; + description + "Specifies the throughput requirement of + leaf connections to the link when + applicable to the connectivity type (e.g. for + E-Tree and E-LAN branches)."; + reference + "GS NFV IFA011: Section 7.1.8.6, LinkBitrateRequirements + information element."; + } + } + + grouping monitoring-parameter { + leaf name { + type string; + description + "Human readable name of the monitoring parameter."; + reference + "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter + information element."; + } + leaf performance-metric { + type string; + description + "Performance metric that is monitored. This attribute shall + contain the related 'Measurement Name' value as defined in + clause 7.2 of ETSI GS NFV-IFA 027"; + reference + "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter + information element and Section 7.2 of ETSI GS NFV-IFA 027."; + } + leaf collection-period { + type uint64; + units "ms"; + description + "An attribute that describes the recommended periodicity at + which to collect the performance information. VNFM determines + if this parameter is considered. + + The vendor may provide this information as a guidance for + creating PmJobs if needed."; + reference + "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter + information element."; + } + } + + grouping security-parameters { + leaf signature { + type string; + description + "Provides the signature of the signed part of the + descriptor."; + reference + "GS NFV IFA014: Section 6.2.5, SecurityParameters + information element."; + } + leaf algorithm { + type string; + description + "Identifies the algorithm used to compute the signature."; + reference + "GS NFV IFA014: Section 6.2.5, SecurityParameters + information element."; + } + leaf certificate { + type string; + description + "Provides a certificate or a reference to a certificate to + validate the signature."; + reference + "GS NFV IFA014: Section 6.2.5, SecurityParameters + information element."; + } + } + + grouping cpd { + description + "A Cpd information element describes network + connectivity to a compute resource or a VL."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + + leaf id { + type string; + description + "Identifier of this Cpd information element."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + + leaf-list layer-protocol { + default ethernet; + type identityref { + base layer-protocol; + } + description + "Identifies a protocol that the connection points + corresponding to the CPD support for connectivity purposes + (e.g. Ethernet, MPLS, ODU2, IPV4, IPV6, Pseudo-Wire, etc.)."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + + leaf role { + type identityref { + base cp-role; + } + description + "Identifies the role of the connection points + corresponding to the CPD in the context of the traffic + flow patterns in the VNF, PNF or NS. For example an NS with + a tree flow pattern within the NS will have legal cpRoles + of ROOT and LEAF."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + + leaf description { + type string; + description + "Provides human-readable information on the purpose of the + connection point (e.g. connection point for control plane + traffic)."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + + list protocol { + key "associated-layer-protocol"; + + leaf associated-layer-protocol { + type identityref { + base layer-protocol; + } + description + "One of the values of the attribute layerProtocol of the Cpd + IE."; + reference + "GS NFV IFA011: Section 7.1.6.8 CpProtocolData information + element"; + } + + list address-data { + key "type"; + + leaf type { + type identityref { + base address-type; + } + description + "Describes the type of the address to be assigned to the + CP instantiated from the parent CPD. + Value: + • MAC address. + • IP address. + • Etc. + The content type shall be aligned with the address type + supported by the layerProtocol attribute of the parent + CPD."; + reference + "GS NFV IFA011: Section 7.1.3.3 AddressData information + element"; + } + + container l2-address-data { + when "../type='mac-address'"; + leaf mac-address-assignment { + type boolean; + mandatory true; + description + "Specify if the MAC address assignment is the + responsibility of management and orchestration function + or not. If it is set to True, it is the management and + orchestration function responsibility. If it is set to + False, it will be provided by an external entity, + e.g. OSS/BSS."; + reference + "GS NFV IFA011: Section 7.1.3.5 L2AddressData + information element"; + } + + description + "Provides the information on the MAC addresses to be + assigned to the CP(s) instantiated from the parent CPD. + Shall be present when the addressType is MAC address."; + reference + "GS NFV IFA011: Section 7.1.3.3 AddressData information + element"; + } + + container l3-address-data { + when "../type='ip-address'"; + leaf ip-address-assignment { + type boolean; + mandatory true; + description + "Specify if the address assignment is the responsibility + of management and orchestration function or not. If it + is set to True, it is the management and orchestration + function responsibility. "; + reference + "GS NFV IFA011: Section 7.1.3.4, L3AddressData + information element."; + } + + leaf floating-ip-activated { + type boolean; + mandatory true; + description + "Specify if the floating IP scheme is activated on the CP + or not."; + reference + "GS NFV IFA011: Section 7.1.3.4, L3AddressData + information element."; + } + + leaf ip-address-type { + type enumeration { + enum "ipv4"; + enum "ipv6"; + } + description + "Define address type. The address type should be aligned + with the address type supported by the layerProtocol + attribute of the parent VnfExtCpd."; + reference + "GS NFV IFA011: Section 7.1.3.4, L3AddressData + information element."; + } + + leaf number-of-ip-addresses { + type uint32; + description + "Minimum number of IP addresses to be assigned based on + this L3AddressData information element."; + reference + "GS NFV IFA011: Section 7.1.3.4, L3AddressData + information element."; + } + } + description + "Provides information on the addresses to be assigned to the + CP(s) instantiated from the CPD."; + reference + "GS NFV IFA011: Section 7.1.6.8 CpProtocolData information + element"; + } + description + "Identifies the protocol layering information the CP uses for + connectivity purposes and associated information. There shall + be one cpProtocol for each layer protocol as indicated by the + attribute layerProtocol. When a PnfExtCpd as defined in ETSI + GS NFV-IFA 014 [i.8] is inherited from this Cpd, the + cardinality is set to 0."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + + leaf trunk-mode { + type boolean; + description + "Information about whether the Cp instantiated from this CPD + is in Trunk mode (802.1Q or other). When operating in + 'trunk mode', the Cp is capable of carrying traffic for + several VLANs. A cardinality of 0 implies that trunkMode + is not configured for the Cp i.e. It is equivalent to + Boolean value 'false'."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + } + + grouping security-group-rule { + list security-group-rule { + key "id"; + + leaf id { + type string; + description + "Identifier of this SecurityGroupRule information + element."; + reference + "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule + information element."; + } + + leaf description { + type string; + description + "Human readable description of the security group rule."; + reference + "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule + information element."; + } + + leaf direction { + type enumeration { + enum ingress; + enum egress; + } + default "ingress"; + description + "The direction in which the security group rule is applied. + Permitted values: INGRESS, EGRESS. Defaults to INGRESS."; + reference + "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule + information element."; + } + + leaf ether-type { + type enumeration { + enum ipv4; + enum ipv6; + } + default "ipv4"; + description + "Indicates the protocol carried over the Ethernet layer. + Permitted values: IPV4, IPV6. Defaults to IPV4."; + reference + "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule + information element."; + } + + leaf protocol { + type enumeration { + enum tcp; + enum udp; + enum icmp; + } + default "tcp"; + description + "Indicates the protocol carried over the IP layer. + Permitted values: any protocol defined in the IANA + protocol registry, e.g. TCP, UDP, ICMP, etc. Defaults + to TCP."; + reference + "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule + information element."; + } + + leaf port-range-min { + must ". <= ../port-range-max"; + type uint16; + default "0"; + description + "Indicates minimum port number in the range that is + matched by the security group rule. Defaults to 0."; + reference + "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule + information element."; + } + + leaf port-range-max { + must ". >= ../port-range-min"; + type uint16; + default "65535"; + description + "Indicates maximum port number in the range that is + matched by the security group rule. Defaults to 65535."; + reference + "GS NFV IFA011: Section 7.1.6.9, SecurityGroupRule + information element."; + } + + description + "Defines security group rules to be used by the VNF."; + reference + "GS NFV IFA011: Section 7.1.2, VNFD information element."; + } + } +} diff --git a/demo-mts91/src/samples/nfv/etsi-nfv-descriptors.yang b/demo-mts91/src/samples/nfv/etsi-nfv-descriptors.yang new file mode 100644 index 0000000000000000000000000000000000000000..afedb3b7a4a8daf1178ce22f92df35c9b96188f9 --- /dev/null +++ b/demo-mts91/src/samples/nfv/etsi-nfv-descriptors.yang @@ -0,0 +1,65 @@ +module etsi-nfv-descriptors { + yang-version 1.1; + namespace "urn:etsi:nfv:yang:etsi-nfv-descriptors"; + prefix nfv; + + include etsi-nfv-common; + include etsi-nfv-ns; + include etsi-nfv-vnf; + include etsi-nfv-pnf; + + organization + "European Telecommunications Standards Institute (ETSI)"; + + description + "Network Function Virtualization Descriptors"; + + revision 2019-04-25 { + description + "Initial revision. + NSD and PNFD according to ETSI GS NFV-IFA 014 Ed261v252 + VNFD according to ETSI GS NFV-IFA 011 Ed261v254"; + } + + container nfv { + list vnfd { + key "id"; + description + "A VNF Descriptor (VNFD) is a deployment template which + describes a VNF in terms of deployment and operational + behaviour requirements. It also contains connectivity, + interface and virtualised resource requirements"; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + + uses vnfd; + } + + list nsd { + key "id"; + + description + "The NSD information element is a deployment template whose + instances are used by the NFVO for the lifecycle + management of NSs."; + reference + "GS NFV-IFA014: Section 6.2.2, Network Service Descriptor + information element."; + + uses nsd; + } + + list pnfd { + key "id"; + + description + "The Pnfd information element is a deployment template + enabling on-boarding PNFs and referencing them from an + NSD. It focuses on connectivity aspects only."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element."; + + uses pnfd; + } + } +} diff --git a/demo-mts91/src/samples/nfv/etsi-nfv-ns.yang b/demo-mts91/src/samples/nfv/etsi-nfv-ns.yang new file mode 100644 index 0000000000000000000000000000000000000000..1eb49ce02f133723d16093debe9c6aef98d1397a --- /dev/null +++ b/demo-mts91/src/samples/nfv/etsi-nfv-ns.yang @@ -0,0 +1,1585 @@ +submodule etsi-nfv-ns { + yang-version 1.1; + belongs-to etsi-nfv-descriptors { + prefix nfv; + } + + include etsi-nfv-common; + include etsi-nfv-vnf; + include etsi-nfv-pnf; + + description + "Models for NS according to ETSI GS NFV-IFA 014."; + + revision 2019-04-25 { + description + "Initial revision + Common data structure to support NSD according to: + ETSI GS NFV-IFA 014 Ed261v252"; + + reference + "ETSI GS NFV-IFA 014 Ed261v252"; + } + + grouping resource-handle { + leaf vim-id { + type string; + } + leaf resource-provider-id { + type string; + } + leaf resource-id { + type string; + } + } + + + grouping nsd { + leaf id { + type string; + description + "Identifier of this NSD information element. It Globally + uniquely identifies an instance of the NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + leaf designer { + type string; + description + "Identifies the designer of the NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + leaf version { + type string; + description + "Identifies the version of the NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + leaf name { + type string; + description + "Provides the human readable name of the NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + leaf invariant-id { + type string; + description + "Identifies an NSD in a version independent manner. This + attribute is invariant across versions of the network + service descriptor."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + leaf-list nested-nsd-id { + must ". != ../id"; + type leafref { + path "../../nsd/id"; + } + description + "References the NSD of a constituent nested NS."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + leaf-list vnfd-id { + type leafref { + path "../../vnfd/id"; + } + description + "References the VNFD of a constituent VNF."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + leaf-list pnfd-id { + type leafref { + path "../../pnfd/id"; + } + description + "References the PNFD of a constituent PNF."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + } + + list sapd { + key "id"; + description + "Provides the descriptor of a service access point of the + network service."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + + leaf id { + type string; + description + "Identifier of this Cpd information element."; + reference + "GS NFV IFA014: Section 6.6.3.1 Cpd information element"; + } + + leaf address-assignment { + type boolean; + description + "Specify whether the SAP address assignment is under the + responsibility of management and orchestration functions + or not. If it is set to True, management and + orchestration functions are responsible for assigning + addresses to the access points instantiated from this + SAPD."; + reference + "GS NFV IFA014: Section 6.2.3.2 Sapd information element"; + } + + choice cpd-or-virtual-link { + leaf virtual-link-desc { + type leafref { + path "../../virtual-link-desc/id"; + } + description + "References the descriptor of the NS VL instance to + which the SAP instantiated from this SAPD connects to."; + reference + "GS NFV IFA014: Section 6.2.3.2 Sapd information element"; + } + + choice associated-cpd-id { + container vnf { + leaf vnfd-id { + mandatory true; + type leafref { + path "../../../../vnfd/id"; + } + must "boolean(../../../vnfd-id[.=current()])"; + } + + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../vnfd-id)/../ext-cpd/id"; + } + } + } + + container pnf { + leaf pnfd-id { + mandatory true; + type leafref { + path "../../../../pnfd/id"; + } + must "boolean(../pnfd-id[.=current()])"; + } + + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../pnfd-id)/../ext-cpd/id"; + } + } + } + container ns { + leaf nsd-id { + mandatory true; + type leafref { + path "../../../../nsd/id"; + } + must "boolean(../nsd-id[.=current()])"; + } + + leaf ext-cpd-id { + mandatory true; + type leafref { + path "deref(../nsd-id)/../sapd/id"; + } + } + } + } + } + } + + list virtual-link-desc { + key "id"; + description + "Provides the constituent VLDs."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + leaf id { + type string; + description + "Identifier of the NsVirtualLinkDesc information element. + It uniquely identifies a VLD."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; + } + + uses connectivity-type; + + list df { + key "id"; + + description + "The VirtualLinkDf information element specifies + properties for instantiating a VL according to a + specific flavour."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; + + leaf id { + type string; + description + "Identifies this VirtualLinkDf information element + within a VLD."; + reference + "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf + information element"; + } + + container qos { + presence "VL QoS parameters"; + description + "The QoS information element specifies quality of + service parameters applicable to a VL."; + reference + "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf + information element"; + + leaf latency { + mandatory true; + type uint32; + units "ms"; + description + "Specifies the maximum latency in ms."; + reference + "GS NFV IFA014: Section 6.5.6.2 QoS information + element"; + } + + leaf packet-delay-variation { + mandatory true; + type uint32; + units "ms"; + description + "Specifies the maximum jitter in ms."; + reference + "GS NFV IFA014: Section 6.5.6.2 QoS information + element"; + } + + leaf packet-loss-ratio { + type decimal64 { + fraction-digits "2"; + range "0..1.00"; + } + description + "Specifies the maximum packet loss ratio."; + reference + "GS NFV IFA014: Section 6.5.6.2 QoS information + element"; + } + + leaf priority { + type uint32; + description + "Specifies the priority level in case of + congestion on the underlying physical links."; + reference + "GS NFV IFA014: Section 6.5.6.2 QoS information + element"; + } + } + + leaf service-availability-level { + type enumeration { + enum "level-1"; + enum "level-2"; + enum "level-3"; + } + description + "Specifies one of the three levels defined in ETSI + ETSI GS NFV-REL 001 [i.5] + * Level 1. + * Level 2. + * Level 3."; + reference + "GS NFV IFA014: Section 6.5.4.2 VirtualLinkDf + information element"; + } + } + + leaf test-access { + type enumeration { + enum none; + enum passive-monitoring; + enum active; + } + description + "Specifies test access facilities expected on the VL."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; + } + + leaf description { + type string; + description + "Provides human-readable information on the purpose of + the virtual link (e.g. VL for control plane traffic)."; + reference + "GS NFV IFA014: Section 6.5.2.2 NsVirtualLinkDesc + information element"; + } + uses security-parameters; + } + + list vnffgd { + key "id"; + + description + "Provides the descriptors of the applicable forwarding + graphs."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + + leaf id { + type string; + description + "Identifier of this Vnffgd information element. It + uniquely identifies a VNFFGD."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + leaf-list vnf-profile-id { + type leafref { + path "../../df/vnf-profile/id"; + } + description + "References the VnfProfile of a constituent VNF."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + leaf-list pnf-profile-id { + type leafref { + path "../../df/pnf-profile/id"; + } + description + "References the PnfProfile of a constituent PNF."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + leaf-list nested-ns-profile-id { + type leafref { + path "../../df/ns-profile/id"; + } + description + "References the NsProfile of a nestedNS."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + leaf virtual-link-profile-id { + type leafref { + path "../../df/virtual-link-profile/id"; + } + description + "References the Virtual Link Profile of a constituent + VL."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + } + + list cpd-pool { + key "id"; + + description + "Describes a pool of descriptors of connection points + attached to one of the constituent VNFs and PNFs and/or + one of the SAPs of the parent NS or of a nested NS."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + + leaf id { + type string; + } + + choice constituent-base-element-id { + mandatory "true"; + container vnf-profile { + leaf vnf-profile-id { + must ". = deref(../../vnfd-profile-id)" { + } + type leafref { + path "../../../../../nsd/df/vnf-profile/id"; + } + } + } + container pnf-profile { + leaf pnf-profile-id { + must ". = deref(../../pnfd-profile-id)" { + } + type leafref { + path "../../../../../nsd/df/pnf-profile/id"; + } + } + } + container ns-profile { + leaf ns-profile-id { + must ". = deref(../../ns-profile-id)" { + } + type leafref { + path "../../../../../nsd/df/ns-profile/id"; + } + } + } + description + "Reference to the profile of an NS constituent."; + reference + "GS NFV IFA014: Section 6.4.8 CpdInConstituentElement + information element"; + } + + choice constituent-cpd-id { + container vnf { + leaf vnfd-id { + must ". = deref(../../vnfd-profile-id)/../vnfd-id" { + } + type leafref { + path "../../../../../vnfd/id"; + } + } + leaf cpd-id { + type leafref { + path "deref(../vnfd-id)/../ext-cpd/id"; + } + } + } + container pnf { + leaf pnfd-id { + must ". = deref(../../pnfd-profile-id)/../pnfd-id" { + } + type leafref { + path "../../../../../pnfd/id"; + } + } + leaf pnf-cpd-id { + type leafref { + path "deref(../pnfd-id)/../ext-cpd/id"; + } + } + } + container ns { + leaf nsd-id { + must ". = deref(../../nested-ns-profile-id)/" + + "../nsd-id" { + } + + type leafref { + path "../../../../../nsd/id"; + } + } + leaf sap-cpd-id { + type leafref { + path "deref(../nsd-id)/../sapd/id"; + } + } + } + description + "A reference to the descriptor of a connection point + attached to one of the constituent VNFs and PNFs or to + the descriptor of a NS SAP."; + reference + "GS NFV IFA014: Section 6.4.4.2 CpdPool information + element"; + } + } + + list nfpd { + key "id"; + + description + "The network forwarding path associated to the VNFFG."; + reference + "GS NFV IFA014: Section 6.4.2.2 Vnffgd information + element"; + + leaf id { + type string; + description + "Identifies this nfpd information element within a + VNFFGD."; + reference + "GS NFV IFA014: Section 6.4.3.2 Nfpd information + element"; + } + + leaf rule { + type string; + description + "Provides an NFP classification and selection rule. + The rule may be expressed as a criteria constructed + out of atomic assertions linked by Boolean operators + AND, OR and NOT."; + reference + "GS NFV IFA014: Section 6.4.3.2 Nfpd information + element"; + } + + list position-desc-id { + key "id"; + + description + "Describes a position in the NFP in terms of one or + more CP profiles and rules for distributing the + traffic among CP and SAP instances created from the + CPD or SAPD associated to these profiles. This shall + be connection point profile, which is either a CPD + associated with the VnfProfile of a constituent VNF, + or a CPD associated with the PnfProfile of a + constituent PNF, or a SAPD associated with the + NsProfile of a nested NS. The related VnfProfile, + PnfProfile and NsProfile shall be included in the + parent VNFFGD."; + reference + "GS NFV IFA014: Section 6.4.3.2 Nfpd information + element"; + + leaf id { + type string; + description + "Identifier of this NfpPositionDesc element."; + reference + "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc + information element"; + } + + list cp-profile-id { + key "id"; + + description + "References the profile of a connection point to be + traversed by the traffic flows matching the criteria. + This shall be a connection point attached to one of + the constituent VNFs and PNFs of the parent VNFFG, + or a SAP of one of the constituent nested NSs of the + parent VNFFG."; + reference + "GS NFV IFA014: Section 6.4.5.2 NfpPositionDesc + information element"; + + leaf id { + type string; + description + "Identifier of this CpProfile information element. + It uniquely identifies a CpProfile."; + reference + "GS NFV IFA014: Section 6.4.6.2 CpProfile + information element"; + } + + list constituent-profile-elements { + key "id"; + + description + "Specifies the constituents of the CpProfile."; + reference + "GS NFV IFA014: Section 6.4.6.2 CpProfile + information element"; + + leaf id { + type string; + description + "Specifies the constituents of the CpProfile."; + reference + "GS NFV IFA014: Section 6.4.7.2 + ConstituentProfileElements information element"; + } + + leaf cpd-id { + type string; + description + "References the VNF external CPD for a given + VnfProfile, or the PNF external CPD for a given + PnfProfile, or a NS SAPD for a give NsProfile + identified by the constituentBasedElementId."; + reference + "GS NFV IFA014: Section 6.4.7.2 + ConstituentProfileElements information element"; + } + } + } + } + } + } + + leaf-list autoscale-rule { + type string; + } + list lifecycle-management-script { + key "event"; + leaf event { + type string; + } + leaf script { + type string; + } + } + + list df { + min-elements 1; + must "default-instantiation-level or " + + "count(ns-instantiation-level) = 1" { + error-message + "default-instantiation-level must be present if there " + + "multiple instantion-level"; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + } + + key "id"; + description + "Identifies a DF within the scope of an NSD."; + reference + "GS NFV IFA014: Section 6.2.2.2 Network Service Descriptor + information element"; + + leaf id { + type string; + description + "Identifies this NsDf information element. It identifies + a NS DF within the NSD."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + } + + leaf flavour-key { + type leafref { + path "../monitored-info/id"; + } + description + "Assurance parameter against which this flavour is being + described. + + The key can be a combination of multiple assurance + parameters with a logical relationship between them. + The parameters should be present as a monitoredInfo + attribute in the NSD."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + } + + list vnf-profile { + must "min-number-of-instances <= max-number-of-instances"; + must "boolean(../../vnfd-id[.=current()/vnfd-id])" { + error-message "VNFDs in the profile has to be listed as a " + + "dependency of the network service " + + "descriptor."; + } + key "id"; + description + "VNF profile to be used for the NS flavour."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { + type string; + description + "Identifier of this vnfProfile information element. It + uniquely identifies a VnfProfile."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + } + + leaf vnfd-id { + mandatory true; + type leafref { + path "../../../../vnfd/id"; + } + description + "References a VNFD."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + } + + leaf flavour-id { + mandatory true; + type leafref { + path "deref(../vnfd-id)/../df/id"; + } + description + "Identifies a flavour within the VNFD."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + } + + leaf instantiation-level { + mandatory true; + type leafref { + path "deref(../flavour-id)/../instantiation-level/id"; + } + description + "Identifier of the instantiation level of the VNF DF + to be used for instantiation. If not present, the + default instantiation level as declared in the VNFD + shall be used."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + } + + leaf min-number-of-instances { + default 1; + type uint16; + description + "Minimum number of instances of the VNF based on this + VNFD that is permitted to exist for this VnfProfile."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + } + + leaf max-number-of-instances { + default 1; + type uint16; + description + "Maximum number of instances of the VNF based on this + VNFD that is permitted to exist for this VnfProfile."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + } + + uses local-affinity-or-anti-affinity-rule; + + list affinity-or-anti-affinity-group { + key "id"; + + description + "Identifier(s) of the affinity or anti-affinity + group(s) the VnfProfile belongs to."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + + leaf id { + type leafref { + path "../../../affinity-or-anti-affinity-group/id"; + } + } + } + + list virtual-link-connectivity { + key "virtual-link-profile-id"; + + description + "Defines the connection information of the VNF, it + contains connection relationship between a VNF + connection point and a NS Virtual Link."; + reference + "GS NFV IFA014: Section 6.3.3.2 VnfProfile information + element"; + + leaf virtual-link-profile-id { + type leafref { + path "../../../virtual-link-profile/id"; + } + description + "Reference an NS VL profile."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; + } + + list constituent-cpd-id { + key "constituent-base-element-id"; + + description + "Describes a connection point on a VNF/PNF or a SAP + which connects to virtual links instantiated from + the profile identified in the virtualLinkProfileId + attribute."; + reference + "GS NFV IFA014: Section 6.3.7 + NsVirtualLinkConnectivity information element"; + + leaf constituent-base-element-id { + type leafref { + path "../../../id"; + } + description + "Reference to the profile of an NS constituent."; + reference + "GS NFV IFA014: Section 6.4.8 + CpdInConstituentElement information element"; + } + + leaf constituent-cpd-id { + type leafref { + path "deref(../../../vnfd-id)/../ext-cpd/id"; + } + description + "A reference to the descriptor of a connection point + attached to one of the constituent VNFs and PNFs or to + the descriptor of a NS SAP."; + reference + "GS NFV IFA014: Section 6.4.4.2 CpdPool information + element"; + } + } + } + } + + list pnf-profile { + key "id"; + must "boolean(../../pnfd-id[.=current()/pnfd-id])" { + error-message "PNFDs in the profile has to be listed as a " + + "dependency of the network service " + + "descriptor."; + } + + leaf id { + type string; + description + "Identifier of this PnfProfile information element. + It uniquely identifies a PnfProfile."; + reference + "GS NFV IFA014: Section 6.3.6.2 PnfProfile information + element"; + } + + leaf pnfd-id { + type leafref { + path "../../../../pnfd/id"; + } + description + "References a PNFD."; + reference + "GS NFV IFA014: Section 6.3.6.2 PnfProfile information + element"; + } + + list virtual-link-connectivity { + key "virtual-link-profile-id"; + + description + "Defines the connection information of the PNF, it + contains connection relationship between a PNF + connection point and a NS Virtual Link."; + reference + "GS NFV IFA014: Section 6.3.6.2 PnfProfile information + element"; + + leaf virtual-link-profile-id { + type leafref { + path "../../../virtual-link-profile/id"; + } + description + "Reference an NS VL profile."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; + } + + list constituent-cpd-id { + key "constituent-base-element-id"; + + description + "Describes a connection point on a VNF/PNF or a SAP + which connects to virtual links instantiated from + the profile identified in the virtualLinkProfileId + attribute."; + reference + "GS NFV IFA014: Section 6.3.7 + NsVirtualLinkConnectivity information element"; + + leaf constituent-base-element-id { + type leafref { + path "../../../id"; + } + description + "Reference to the profile of an NS constituent."; + reference + "GS NFV IFA014: Section 6.4.8 + CpdInConstituentElement information element"; + } + + leaf constituent-cpd-id { + type leafref { + path "deref(../../../pnfd-id)/../ext-cpd/id"; + } + description + "A reference to the descriptor of a connection point + attached to one of the constituent VNFs and PNFs or to + the descriptor of a NS SAP."; + reference + "GS NFV IFA014: Section 6.4.4.2 CpdPool information + element"; + } + } + } + } + + list virtual-link-profile { + key "id"; + + description + "VL profile to be used for the NS flavour."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { + type string; + description + "Uniquely identifies this VirtualLinkProfile + information element."; + reference + "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile + information element"; + } + + leaf virtual-link-desc-id { + mandatory true; + type leafref { + path "../../../virtual-link-desc/id"; + } + description + "Uniquely references a VLD."; + reference + "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile + information element"; + } + + leaf flavour-id { + mandatory true; + type leafref { + path "deref(../virtual-link-desc-id)/../df/id"; + } + description + "Identifies a flavour within the VLD."; + reference + "GS NFV IFA014: Section 6.3.2.2 VirtualLinkProfile + information element"; + } + + uses local-affinity-or-anti-affinity-rule; + + list affinity-or-anti-affinity-group { + key "id"; + + description + "Identifies an affinity or anti-affinity group the + VLs instantiated according to the VlProfile belong + to."; + reference + "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile + information element"; + + leaf id { + type leafref { + path "../../../affinity-or-anti-affinity-group/id"; + } + } + } + + container max-bitrate-requirements { + description + "Specifies the maximum bitrate requirements for a VL + instantiated according to this profile."; + reference + "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile + information element"; + uses link-bitrate-requirements; + } + container min-bitrate-requirements { + description + "Specifies the minimum bitrate requirements for a VL + instantiated according to this profile."; + reference + "GS NFV IFA014: Section 6.3.4.2 VirtualLinkProfile + information element"; + uses link-bitrate-requirements; + } + } + + list scaling-aspect { + key "id"; + + description + "The scaling aspects supported by this DF of the NS."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { + type string; + description + "Identifier of this NsScalingAspect information element. + It uniquely identifies the NS scaling aspect in an + NSD."; + reference + "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect + information element"; + } + + leaf name { + type string; + description + "Provides a human readable name of the NS scaling + aspect."; + reference + "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect + information element"; + } + + leaf description { + type string; + description + "Provides a human readable description of the NS + scaling aspect."; + reference + "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect + information element"; + } + + leaf scaling-level { + type leafref { + path "../../ns-instantiation-level/id"; + } + description + "Describes the details of an NS level."; + reference + "GS NFV IFA014: Section 6.7.2.2 NsScalingAspect + information element"; + } + } + + list affinity-or-anti-affinity-group { + key "id"; + + description + "Specifies affinity or anti-affinity relationship + applicable between the VNF instances created using + different VNFDs, the Virtual Link instances created + using different NsVirtualLinkDescs or the nested NS + instances created using different NSDs in the same + affinity or anti-affinity group."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { + type string; + description + "Identifier of Identifier of this + AffinityOrAntiAffinityGroup information element."; + reference + "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity + information element"; + } + + leaf type { + mandatory true; + type affinity-type; + description + "Specifies the type of relationship that the members of + the group have: 'affinity' or 'anti-affinity.'"; + reference + "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity + information element"; + } + + leaf scope { + mandatory true; + type affinity-scope; + description + "Specifies the scope of the affinity or anti-affinity + relationship e.g. a NFVI node, an NFVI PoP, etc."; + reference + "GS NFV IFA014: Section 6.3.5.2 AffinityOrAntiAffinity + information element"; + } + } + + list ns-instantiation-level { + min-elements 1; + key "id"; + + description + "Describes the details of an NS level."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element + GS NFV IFA014: Section 6.7.2.2 NsScaling information + element"; + + leaf id { + type string; + description + "Identifier of this NsLevel information element. It + uniquely identifies an NS level within the DF."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; + } + + leaf description { + type string; + description + "Human readable description of the NS level."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; + } + + list vnf-to-level-mapping { + key "vnf-profile-id"; + + description + "Specifies the profile of the VNFs involved in this NS + level and, for each of them, the required number of + instances."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; + + leaf vnf-profile-id { + type leafref { + path "../../../vnf-profile/id"; + } + description + "Identifies the profile to be used for a VNF + involved in an NS level."; + reference + "GS NFV IFA014: Section 6.7.4.2 VnfToLevelMapping + information element"; + } + + leaf number-of-instances { + default 1; + type uint32; + description + "Specifies the number of VNF instances required for + an NS level."; + reference + "GS NFV IFA014: Section 6.7.4.2 VnfToLevelMapping + information element"; + } + } + + list virtual-link-to-level-mapping { + key "virtual-link-profile-id"; + + description + "Specifies the profile of the VLs involved in this NS + level and, for each of them, the needed bandwidth."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; + + leaf virtual-link-profile-id { + type leafref { + path "../../../virtual-link-profile/id"; + } + description + "Identifies the profile to be used for a VL involved + in an NS level."; + reference + "GS NFV IFA014: Section 6.7.5.2 + VirtualLinkToLevelMapping information element"; + } + + uses link-bitrate-requirements; + } + + list ns-to-level-mapping { + key "ns-profile-id"; + + description + "Specifies the profile of the nested NSs involved in + this NS level and, for each of them, the required + number of instances."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; + + leaf ns-profile-id { + type leafref { + path "../../../ns-profile/id"; + } + description + "Identifies the profile to be used for a nested NS + involved in the NS level."; + reference + "GS NFV IFA014: Section 6.7.6.2 NsToLevel information + element"; + } + + leaf number-of-instances { + default 1; + type uint32; + description + "Specifies the number of nested NS instances required + for the NS scale level."; + reference + "GS NFV IFA014: Section 6.7.6.2 NsToLevel information + element"; + } + } + + must "(count(vnf-to-level-mapping) + " + + "count(virtual-link-to-level-mapping) + " + + "count(ns-to-level-mapping)) > 0" { + error-message + "At least one attribute between " + + "vnf-to-level-mapping, " + + "virtual-link-to-level-mapping and " + + "ns-to-level-mapping shall be present."; + description + "At least one attribute between vnfToLevelMapping, + vlirtualLinkToLevelMapping and nsToLevelMapping shall + be present."; + reference + "GS NFV IFA014: Section 6.3.9.2 NsLevel information + element"; + } + } + + leaf default-instantiation-level { + type leafref { + path "../ns-instantiation-level/id"; + } + description + "Identifies the NS level which represents the default NS + instantiation level for this DF. It shall be present if + there are multiple 'nsIinstantiationLevel' entries."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + } + + list ns-profile { + must "min-number-of-instances <= max-number-of-instances" { + error-message + "min-number-of-instances has to be less than or equal" + + "max-number-of-instances."; + } + must "boolean(../../nested-nsd-id[.=current()/nsd-id])" { + error-message + "PNFDs in the profile has to be listed as a " + + "dependency of the network service " + + "descriptor."; + } + key "id"; + + description + "Specifies a NS Profile supported by this NS DF."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { + type string; + description + "Identifies an NS profile."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + } + + leaf nsd-id { + mandatory true; + type leafref { + path "../../../../nsd/id"; + } + description + "Identifies the NSD applicable to NS instantiated + according to this profile."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + } + + leaf ns-df-id { + mandatory true; + type leafref { + path "deref(../nsd-id)/../df/id"; + } + description + "Identifies the applicable network service DF within + the scope of the NSD."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + } + + leaf instantiation-level-id { + mandatory true; + type leafref { + path "deref(../ns-df-id)/../ns-instantiation-level/id"; + } + description + "Identifies the NS level within the referenced NS DF to + be used in the context of the parent NS instantiation. + If not present, the default NS instantiation level as + declared in the referenced NSD shall be used."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + } + + leaf min-number-of-instances { + type uint16; + default 1; + description + "Minimum number of nested NS instances based on the + referenced NSD that is permitted to exist for this + NsProfile."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + } + + leaf max-number-of-instances { + type uint16; + default 1; + description + "Maximum number of nested NS instances based on the + referenced NSD that is permitted to exist for this + NsProfile."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + } + + list affinity-or-anti-affinity-group-id { + key "id"; + + description + "Identifies an affinity or anti-affinity group the NSs + created according to this NsProfile belongs to."; + reference + "GS NFV IFA014: Section 6.3.11.2 NsProfile information + element"; + + leaf id { + type leafref { + path "../../../affinity-or-anti-affinity-group/id"; + } + } + } + + list virtual-link-connectivity { + key "virtual-link-profile-id"; + + leaf virtual-link-profile-id { + type leafref { + path "../../../virtual-link-profile/id"; + } + description + "Reference an NS VL profile."; + reference + "GS NFV IFA014: Section 6.3.7.2, NsVirutalLinkConnectivity + information element."; + } + + list constituent-cpd-id { + key "constituent-base-element-id"; + + description + "Describes a connection point on a VNF/PNF or a SAP + which connects to virtual links instantiated from + the profile identified in the virtualLinkProfileId + attribute."; + reference + "GS NFV IFA014: Section 6.3.7 + NsVirtualLinkConnectivity information element"; + + leaf constituent-base-element-id { + type leafref { + path "../../../id"; + } + description + "Reference to the profile of an NS constituent."; + reference + "GS NFV IFA014: Section 6.4.8 + CpdInConstituentElement information element"; + } + + leaf constituent-cpd-id { + type leafref { + path "deref(../../../nsd-id)/../sapd/id"; + } + description + "A reference to the descriptor of a connection point + attached to one of the constituent VNFs and PNFs or to + the descriptor of a NS SAP."; + reference + "GS NFV IFA014: Section 6.4.4.2 CpdPool information + element"; + } + } + } + } + + list dependencies { + key "id"; + + description + "Specifies the order in which instances of the VNFs and/or + nested NSs have to be created."; + reference + "GS NFV IFA014: Section 6.3.2.2 NsDf information element"; + + leaf id { + type string; + } + + choice primary-id { + leaf primary-vnf-profile { + type leafref { + path "../../vnf-profile/vnfd-id"; + } + } + leaf primary-ns-profile { + type leafref { + path "../../ns-profile/nsd-id"; + } + } + description + "References a VnfProfile or NsProfile."; + reference + "GS NFV IFA014: Section 6.3.12.2 Dependencies + information element"; + } + + choice secondary-id { + leaf secondary-vnf-profile { + type leafref { + path "../../vnf-profile/vnfd-id"; + } + } + leaf secondary-ns-profile { + type leafref { + path "../../ns-profile/nsd-id"; + } + } + description + "References a VnfProfile or NsProfile."; + reference + "GS NFV IFA014: Section 6.3.12.2 Dependencies + information element"; + } + } + + list monitored-info { + key "id"; + + leaf id { + type string; + } + + container vnf-indicator-info { + leaf vnfd-id { + type leafref { + path "../../../../../vnfd/id"; + } + description + "Identifies a VNFD."; + reference + "GS NFV IFA014: Section 6.2.7.2 VnfIndicatorData + information element"; + } + + leaf vnf-indicator { + mandatory true; + type leafref { + path "deref(../vnfd-id)/../indicator/id"; + } + description + "Identifies a VNF indicator within the VNFD."; + reference + "GS NFV IFA014: Section 6.2.7.2 VnfIndicatorData + information element"; + } + description + "Uniquely identifies this VNF Indicator information + element."; + reference + "GS NFV IFA014: Section 6.2.6.2 MonitoredData + information element"; + } + + // monitoringParameter in IFA014 is defined by MonitoredData + // whereas monitoringParameter in IFA011 is defined by + // MonitoringParameter. + container monitoring-parameter { + leaf id { + type string; + description + "Unique identifier of this monitoring parameter + information element."; + reference + "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter + information element"; + } + + leaf name { + type string; + description + "Human readable name of the monitoring parameter."; + reference + "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter + information element"; + } + + leaf performance-metric { + mandatory true; + type string; + description + "Defines the virtualised resource-related performance + metric."; + reference + "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter + information element"; + } + + leaf collection-period { + type string; + description + "An attribute that describes the periodicity at + which to collect the performance information."; + reference + "GS NFV IFA014: Section 6.2.8.2 MonitoringParameter + information element"; + } + } + } + } + uses security-parameters; + } +} diff --git a/demo-mts91/src/samples/nfv/etsi-nfv-nsd.yang b/demo-mts91/src/samples/nfv/etsi-nfv-nsd.yang new file mode 100644 index 0000000000000000000000000000000000000000..52cd50858104cbfdf6de45381c30bdd3f4dc4fd6 --- /dev/null +++ b/demo-mts91/src/samples/nfv/etsi-nfv-nsd.yang @@ -0,0 +1,62 @@ +module etsi-nfv-nsd { + yang-version 1.1; + namespace "urn:etsi:nfv:yang:etsi-nfv-nsd"; + prefix nsd; + + import etsi-nfv-descriptors { + prefix vnf; + } + + organization + "European Telecommunications Standards Institute (ETSI)"; + + description + "Network Services Descriptors"; + + revision 2019-04-25 { + description + "Initial revision. + NSD according to ETSI GS NFV-IFA 014 Ed261v252."; + } + + container nsd { + list vnfd { + key "id"; + description + "A VNF Descriptor (VNFD) is a deployment template which + describes a VNF in terms of deployment and operational + behaviour requirements. It also contains connectivity, + interface and virtualised resource requirements"; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + + uses vnf:vnfd; + } + + list nsd { + key "id"; + max-elements 1; + uses vnf:nsd; + description + "The NSD information element is a deployment template whose + instances are used by the NFVO for the lifecycle management + of NSs."; + reference + "GS NFV-IFA014: Section 6.2.2, Network Service Descriptor + information element"; + } + + list pnfd { + key "id"; + + description + "The Pnfd information element is a deployment template + enabling on-boarding PNFs and referencing them from an + NSD. It focuses on connectivity aspects only."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element."; + + uses vnf:pnfd; + } + } +} diff --git a/demo-mts91/src/samples/nfv/etsi-nfv-pnf.yang b/demo-mts91/src/samples/nfv/etsi-nfv-pnf.yang new file mode 100644 index 0000000000000000000000000000000000000000..ffe5d064004831f8c62fe68b97f6811f745dfd2a --- /dev/null +++ b/demo-mts91/src/samples/nfv/etsi-nfv-pnf.yang @@ -0,0 +1,121 @@ +submodule etsi-nfv-pnf { + yang-version 1.1; + belongs-to etsi-nfv-descriptors { + prefix nfv; + } + + /* + * Import + */ + include etsi-nfv-common; + + description + "Models for PNFD according to GS NFV-IFA 014."; + + revision 2019-04-25 { + description + "Initial revision. + + Common data structure to support VNFD according to: + ETSI GS NFV-IFA 014 Ed261v252"; + + reference + "ETSI GS NFV-IFA 014 Ed261v252"; + } + + grouping pnfd { + description + "The Pnfd information element is a deployment template + enabling on-boarding PNFs and referencing them from an NSD. + It focuses on connectivity aspects only"; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + + leaf id { + type string; + description + "Identifier of this Pnfd information element. It uniquely + identifies the PNFD."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + + leaf function-description { + type string; + description + "Describes the PNF function."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + + leaf provider { + type string; + description + "Identifies the provider of the PNFD."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + + leaf version { + type string; + mandatory true; + description + "Identifies the version of the PNFD."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + + leaf invariant-id { + type string; + description + "Identifies a PNFD in a version independent manner. This + attribute is invariant across versions of PNFD."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + + leaf name { + type string; + description + "Provides the human readable name of the PNFD."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + + list ext-cpd { + key "id"; + uses cpd; + description + "Specifies the characteristics of one or more connection + points where to connect the PNF to a VL."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + + list security { + key "signature"; + uses security-parameters; + description + "Provides a signature to prevent tampering. + Editor's Note: While IFA014 does specify that the PNFD + includes a security parameter. SOL001 does not have one. + We need to harmonize SOL001 & SOL006 on this point."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + + leaf geographical-location-info { + type string; + description + "It provides information about the geographical location + (e.g. geographic coordinates or address of the building, + etc.) of the PNF. The cardinality 0 is used when the + location is unknown. + Editor's Note: The type is TBD in SOL001. We need to make + a common SOL001/SOL006 decision."; + reference + "GS NFV-IFA014: Section 6.6.2, Pnfd information element"; + } + uses security-group-rule; + } +} diff --git a/demo-mts91/src/samples/nfv/etsi-nfv-pnfd.yang b/demo-mts91/src/samples/nfv/etsi-nfv-pnfd.yang new file mode 100644 index 0000000000000000000000000000000000000000..a365e0189d31d9342ab067369ec328691cd22563 --- /dev/null +++ b/demo-mts91/src/samples/nfv/etsi-nfv-pnfd.yang @@ -0,0 +1,26 @@ +module etsi-nfv-pnfd { + yang-version 1.1; + namespace "urn:etsi:nfv:yang:etsi-nfv-pnfd"; + prefix pnfd; + + import etsi-nfv-descriptors { + prefix vnf; + } + + organization + "European Telecommunications Standards Institute (ETSI)"; + + description + "Physcial Network Function Descriptor."; + + revision 2019-04-25 { + description + "Initial revision. + NSD according to ETSI GS NFV-IFA 014 Ed261v252."; + } + + container pnfd { + presence "PNFD container."; + uses vnf:pnfd; + } +} diff --git a/demo-mts91/src/samples/nfv/etsi-nfv-vnf.yang b/demo-mts91/src/samples/nfv/etsi-nfv-vnf.yang new file mode 100644 index 0000000000000000000000000000000000000000..43c11095fa644be600e48c843e9c5fca838e2be8 --- /dev/null +++ b/demo-mts91/src/samples/nfv/etsi-nfv-vnf.yang @@ -0,0 +1,2795 @@ +submodule etsi-nfv-vnf { + yang-version 1.1; + belongs-to etsi-nfv-descriptors { + prefix nfv; + } + + include etsi-nfv-common; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + description + "Models for VNFD according to GS NFV-IFA 011."; + + revision 2019-03-18 { + description + "Initial revision. + + Common data structure to support VNFD according to: + VNFD according to ETSI GS NFV-IFA 011 Ed261v254"; + + reference + "ETSI GS NFV-IFA 011 Ed261v254"; + } + + grouping virtual-network-interface-requirements { + list virtual-network-interface-requirement { + key "name"; + description + "Specifies requirements on a virtual network interface + realising the CPs instantiated from this CPD."; + reference + "GS NFV-IFA011: Section 7.1.6.4, VduCpd information + element"; + + leaf name { + type string; + description + "Provides a human readable name for the requirement."; + reference + "GS NFV-IFA011: Section 7.1.6.6, + VirtualNetworkInterfaceRequirements information element"; + } + + leaf description { + type string; + description + "Provides a human readable description of the requirement."; + reference + "GS NFV-IFA011: Section 7.1.6.6, + VirtualNetworkInterfaceRequirements information element"; + } + + leaf support-mandatory { + default "false"; + type boolean; + description + "Indicates whether fulfilling the constraint is + mandatory (true) for successful operation or desirable + (false)."; + reference + "GS NFV-IFA011: Section 7.1.6.6, + VirtualNetworkInterfaceRequirements information element"; + } + + list network-interface-requirements { + key "key"; + min-elements "1"; + max-elements "1"; + + leaf key { + type string; + } + leaf value { + type string; + } + description + "The network interface requirements. An element from an + array of key-value pairs that articulate the network + interface deployment requirements."; + reference + "GS NFV-IFA011: Section 7.1.6.6, + VirtualNetworkInterfaceRequirements information element"; + } + } + } + + grouping vnfd { + leaf id { + type string; + description + "Identifier of this VNFD information element. This attribute + shall be globally unique. The format will be defined in the + data model specification phase."; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf provider { + type string; + mandatory true; + description + "Provider of the VNF and of the VNFD"; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf product-name { + type string; + mandatory true; + description + "Name to identify the VNF Product. Invariant for the VNF + Product lifetime."; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf software-version { + type string; + mandatory true; + description + "Software version of the VNF. This is changed when there is + any change to the software that is included in the VNF + Package"; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf version { + type string; + mandatory true; + description + "Identifies the version of the VNFD"; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf product-info-name { + type string; + description + "Human readable name of the VNFD. Can change + during the VNF Product lifetime."; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf product-info-description { + type string; + description + "Human readable description of the VNFD. Can change during + the VNF Product lifetime."; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf-list vnfm-info { + type string; + min-elements 1; + description + "Identifies VNFM(s) compatible with the VNF described in + this version of the VNFD."; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf localization-language { + type string; + description + "Information about the language of the VNF."; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + leaf default-localization-language { + when "../localization-language"; + type string; + description + "Default localization language that is instantiated if no + information about selected localization language is + available. Shall be present if 'localization-language' + is present and shall be absent otherwise."; + reference + "GS NFV-IFA011: Section 7.1.2, VNFD information element"; + } + + list vdu { + key "id"; + min-elements 1; + description + "The Virtualisation Deployment Unit (VDU) is a construct supporting + the description of the deployment and operational behaviour of a + VNF component, or the entire VNF if it was not componentized in + components."; + reference + "GS NFV IFA011: Section 7.1.2, VNFD information element"; + + leaf id { + type string; + description + "Unique identifier of this VDU in VNFD."; + reference + "GS NFV IFA011: Section 7.1.6.2, Vdu information element"; + } + + leaf name { + type string; + mandatory true; + description + "Human readable name of the VDU."; + reference + "GS NFV IFA011: Section 7.1.6.2, Vdu information element"; + } + + leaf description { + type string; + description + "Human readable description of the VDU."; + reference + "GS NFV IFA011: Section 7.1.6.2, Vdu information element"; + } + + list int-cpd { + key "id"; + min-elements 1; + description + "A internal-connection-point element is a type of + connection point and describes network connectivity + between a VDU instance and an internal Virtual Link or + an external connection point."; + reference + "GS NFV IFA011: Section 7.1.6.2, Vdu information element"; + + leaf int-virtual-link-desc { + type leafref { + path "../../../int-virtual-link-desc/id"; + } + description + "Reference of the internal VLD which this internal CPD + connects to."; + reference + "GS NFV IFA011: Section 7.1.6.4, VduCpd information + element"; + } + + leaf bitrate-requirement { + type uint64; + units "Mbps"; + description + "Bitrate requirement on this CP."; + reference + "GS NFV IFA011: Section 7.1.6.4, VduCpd information + element."; + } + uses virtual-network-interface-requirements; + + leaf nicio-requirements { + type leafref { + path "../../../virtual-compute-desc/id"; + } + description + "This references (couples) the CPD with any logical node I/O + requirements (for network devices) that may have been + created. Linking these attributes is necessary so that so + that I/O requirements that need to be articulated at the + logical node level can be associated with the network + interface requirements associated with the CPD."; + reference + "GS NFV-IFA011: Section 7.1.6.6, + VirtualNetworkInterfaceRequirements information element"; + } + + leaf-list order { + type uint32; + description + "The order of the NIC to be assigned on the compute + instance (e.g. 2 for eth2). + + Note: when binding more than one port to a single + compute (aka multi vNICs) and ordering is desired, it + is mandatory that all ports will be set with an order + value. The order values shall represent a positive, + arithmetic progression that starts with 0 (i.e. 0, 1, + 2,..., n). + + If the property is not present, it shall be left to the + VIM to assign a value when creating the instance."; + reference + "GS NFV IFA011: Section 7.1.6.4, VduCpd information + element."; + } + uses cpd; + + leaf security-group-rule-id { + type leafref { + path "../../../security-group-rule/id"; + } + description + "Reference of the security group rules bound to this + CPD."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + } + + leaf virtual-compute-desc { + type leafref { + path "../../virtual-compute-desc/id"; + } + must "../../virtual-compute-desc[id=current()]/" + + "virtual-memory/size >=" + + "../../sw-image-desc[id=current()/" + + "../sw-image-desc]/min-ram" { + } + description + "Describes CPU, Memory and acceleration requirements of + the Virtualisation Container realizing this VDU."; + reference + "GS NFV IFA011: Section 7.1.6.2, VDU information + element, and Section 7.1.9.2.2, VirtualComputeDesc + information element."; + } + + leaf-list virtual-storage-desc { + type leafref { + path "../../virtual-storage-desc/id"; + } + description + "Describes storage requirements for a VirtualStorage + instance attached to the virtualisation container + created from virtualComputeDesc defined for this VDU."; + reference + "GS NFV IFA011: Section 7.1.6.2, VDU information + element, and Section 7.1.9.4, Information elements + related to Virtual Storage."; + } + + list boot-order { + ordered-by user; + key "key"; + + leaf key { + type uint32; + } + + leaf value { + type leafref { + path "../../virtual-storage-desc"; + } + } + description + "The key indicates the boot index (lowest index defines + highest boot priority). The Value references a descriptor + from which a valid boot device is created e.g. + VirtualStorageDesc from which a VirtualStorage instance + is created. + + Editor's note: The boot-order node requires further + study."; + reference + "GS NFV IFA011: Section 7.1.6.2, Vdu information + element."; + } + + leaf sw-image-desc { + type leafref { + path "../../sw-image-desc/id"; + } + description + "Describes the software image which is directly loaded on + the virtualisation container realising this Vdu."; + reference + "GS NFV IFA011: Section 7.1.6.2, Vdu information + element."; + } + + leaf-list nfvi-constraint { + type string; + description + "Describes constraints on the NFVI for the VNFC + instance(s) created from this Vdu. For example, aspects + of a secure hosting environment for the VNFC instance + that involve additional entities or processes."; + reference + "GS NFV IFA011: Section 7.1.6.2, VDU Information + element."; + } + + list monitoring-parameter { + key "id"; + leaf id { + type string; + description + "Unique identifier of the monitoring parameter."; + reference + "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter + information element."; + } + uses monitoring-parameter; + } + + list configurable-properties { + key "key"; + leaf key { + type string; + } + leaf value { + type string; + } + description + "It provides VNFC configurable properties that can be + modified using the ModifyVnfInfo operation."; + reference + "GS NFV IFA011: Section 7.1.6.7, + VnfcConfigurableProperties Information element."; + } + + leaf boot-data { + type string; + description + "Contains a string or a URL to a file contained in the + VNF package used to customize a virtualised compute + resource at boot time. The bootData may contain variable + parts that are replaced by deployment specific values + before being sent to the VIM."; + reference + "GS NFV IFA011: Section 7.1.6.7, + VnfcConfigurableProperties Information element."; + } + } + + list virtual-compute-desc { + key "id"; + description + "Defines descriptors of virtual compute resources to be + used by the VNF."; + leaf id { + type string; + description + "Unique identifier of this VirtualComputeDesc in the + VNFD."; + reference + "GS NFV IFA011: Section 7.1.9.2, Information elements + related to Virtual CPU."; + } + + list logical-node { + key "id"; + + leaf id { + type string; + description + "Identifies this set of logical node requirements."; + reference + "GS NFV IFA011: Section 7.1.9.6, LogicalNodeRequirements + Information elements."; + } + + list requirement-detail { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "The logical node-level compute, memory and I/O + requirements. An array of key-value pairs that + articulate the deployment requirements. + + This could include the number of CPU cores on this + logical node, a memory configuration specific to a + logical node (e.g. such as available in the Linux + kernel via the libnuma library) or a requirement + related to the association of an I/O device with the + logical node."; + reference + "GS NFV IFA011: Section 7.1.9.6, LogicalNodeRequirements + information element."; + } + description + "The logical node requirements."; + reference + "GS NFV IFA011: Section 7.1.9.2, VirtualComputeDesc + information element."; + } + + list request-additional-capability { + key "name"; + + leaf name { + type string; + description + "Identifies a requested additional capability for the + VDU. ETSI GS NFV-IFA 002 [i.1] describes acceleration + capabilities."; + reference + "GS NFV IFA011: Section 7.1.9.5, + RequestedAdditionalCapabilityData Information element."; + } + + leaf support-mandatory { + type boolean; + description + "Indicates whether the requested additional capability + is mandatory for successful operation."; + reference + "GS NFV IFA011: Section 7.1.9.5, + RequestedAdditionalCapabilityData Information + element."; + } + + leaf min-version { + type string; + description + "Identifies the minimum version of the requested + additional capability."; + reference + "GS NFV IFA011: Section 7.1.9.5, + RequestedAdditionalCapabilityData Information element."; + } + + leaf preferred-version { + type string; + description + "Identifies the preferred version of the requested + additional capability."; + reference + "GS NFV IFA011: Section 7.1.9.5, + RequestedAdditionalCapabilityData Information element."; + } + + list target-performance-parameters { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "Identifies specific attributes, dependent on the + requested additional capability type."; + reference + "GS NFV IFA011: Section 7.1.9.5, + RequestedAdditionalCapabilityData Information element."; + } + } + + leaf compute-requirements { + type string; + description + "Specifies compute requirements."; + reference + "GS NFV IFA011: Section 7.1.9.2.2, VirtualComputeDesc + Information element."; + } + + container virtual-memory { + leaf size { + type decimal64 { + fraction-digits 1; + range "0..max"; + } + units "GB"; + default 1; + description + "Amount of virtual memory in GB."; + reference + "GS NFV IFA011: Section 7.1.9.3, Information elements + related to Virtual Memory."; + } + + leaf over-subscription-policy { + type string; + description + "The memory core oversubscription policy in terms of + virtual memory to physical memory on the platform. + The cardinality can be 0 during the allocation + request, if no particular value is requested."; + reference + "GS NFV IFA011: Section 7.1.9.3, Information elements + related to Virtual Memory."; + } + + list vdu-mem-requirements { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "Array of key-value pair requirements on the memory for + the VDU."; + reference + "GS NFV IFA011: Section 7.1.9.3.2, VirtualMemoryData + information element."; + } + + leaf numa-enabled { + type boolean; + description + "It specifies the memory allocation to be cognisant of + the relevant process/core allocation. The cardinality + can be 0 during the allocation request, if no + particular value is requested."; + reference + "GS NFV IFA011: Section 7.1.9.3, Information elements + related to Virtual Memory."; + } + description + "The virtual memory of the virtualised compute."; + reference + "GS NFV IFA011: Section 7.1.9.2.2, VirtualComputeDesc + Information element."; + } + + container virtual-cpu { + description + "The virtual CPU(s)of the virtualised compute."; + reference + "GS NFV IFA011: Section 7.1.9.2.2, VirtualComputeDesc + Information element."; + + leaf cpu-architecture { + type string; + description + "CPU architecture type. Examples are x86, ARM. The + cardinality can be 0 during the allocation request, + if no particular CPU architecture type is requested."; + reference + "GS NFV IFA011: Section 7.1.9.2.3, VirtualCpuData + information elements."; + } + + leaf num-virtual-cpu { + type uint16 { + range "1..max"; + } + default 1; + description + "Number of virtual CPUs."; + reference + "GS NFV IFA011: Section 7.1.9.2.3, VirtualCpuData + information elements."; + } + + leaf clock { + type uint32; + units "MHz"; + description + "Minimum virtual CPU clock rate (e.g. in MHz). The + cardinality can be 0 during the allocation request, + if no particular value is requested."; + reference + "GS NFV IFA011: Section 7.1.9.2.3, VirtualCpuData + information elements."; + } + + leaf oversubscription-policy { + type string; + description + "The CPU core oversubscription policy e.g. the relation + of virtual CPU cores to physical CPU cores/threads. + The cardinality can be 0 during the allocation request, + if no particular value is requested."; + reference + "GS NFV IFA011: Section 7.1.9.2.3, VirtualCpuData + information elements."; + } + + list vdu-cpu-requirements { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "Array of key-value pair requirements on the compute + (CPU) for the VDU."; + reference + "GS NFV IFA011: Section 7.1.9.3.2, VirtualCpuData + information element."; + } + + container pinning { + presence "Set to specify CPU pinning."; + + leaf policy { + default "dynamic"; + type enumeration { + enum "static"; + enum "dynamic"; + } + description + "The policy can take values of 'static' or 'dynamic'. + In case of 'static' the virtual CPU cores are + requested to be allocated to logical CPU cores + according to the rules defined in + virtualCpuPinningRules. In case of 'dynamic' the + allocation of virtual CPU cores to logical CPU cores + is decided by the VIM. (e.g. SMT (Simultaneous + MultiThreading) requirements)."; + reference + "GS NFV IFA011: Section 7.1.9.2.4, + VirtualCpuPinningData information element."; + } + + list rule { + when "../policy = 'static'"; + key "key"; + + leaf key { + type string; + } + leaf value { + type string; + } + description + "A list of rules that should be considered during the + allocation of the virtual CPUs to logical CPUs in case + of 'static' virtualCpuPinningPolicy."; + reference + "GS NFV IFA011: Section 7.1.9.2.4, + VirtualCpuPinningData information element."; + } + description + "The virtual CPU pinning configuration for the + virtualised compute resource."; + reference + "GS NFV IFA011: Section 7.1.9.2.3, + VirtualCpuData information element."; + } + } + } + + list virtual-storage-desc { + key "id"; + description + "Storage requirements for a Virtual Storage instance + attached to the VNFC created from this VDU"; + leaf id { + type string; + description + "Unique identifier of this VirtualStorageDesc in the + VNFD."; + reference + "GS NFV IFA011: Section 7.1.9.4, Information elements + related to Virtual Storage."; + } + + leaf type-of-storage { + // Needed to be able to onboard images + default root-storage; + type identityref { + base storage-type; + } + description + "Type of virtualised storage resource (e.g. volume, + object)."; + reference + "GS NFV IFA011: Section 7.1.9.4, Information elements + related to Virtual Storage."; + } + + leaf size-of-storage { + type uint64; + units "GB"; + default 0; + description + "Size of virtualised storage resource (e.g. size of + volume, in GB)"; + reference + "GS NFV IFA011: Section 7.1.9.4, Information elements + related to Virtual Storage."; + } + + list vdu-storage-requirements { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "Array of key-value pairs that articulate the storage + deployment requirements."; + reference + "GS NFV IFA011: Section 7.1.9.4.2, VirtualStorageDesc + information element."; + } + + leaf rdma-enabled { + type boolean; + description + "Indicate if the storage support RDMA."; + reference + "GS NFV IFA011: Section 7.1.9.4, Information elements + related to Virtual Storage."; + } + + leaf sw-image-desc { + type leafref { + path "../../sw-image-desc/id"; + } + must "../size-of-storage >=" + + "../../sw-image-desc[id=current()]/min-disk" { + } + description + "Software image to be loaded on the VirtualStorage + resource created based on this VirtualStorageDesc."; + reference + "GS NFV IFA011: Section 7.1.9.4, Information elements + related to Virtual Storage."; + } + } + + list sw-image-desc { + key "id"; + description + "Defines descriptors of software images to be used by the + VNF."; + reference + "GS NFV IFA011: Section 7.1.2, VNFD Information element."; + + leaf id { + type string; + description + "The identifier of this software image."; + reference + "GS NFV IFA011: Section 7.1.6.5, SwImageDesc information + element"; + } + + leaf name { + mandatory true; + type string; + description + "The name of this software image."; + reference + "GS NFV IFA011: Section 7.1.6.5 SwImageDesc + information element."; + } + + leaf version { + mandatory true; + type string; + description + "The version of this software image."; + reference + "GS NFV IFA011: Section 7.1.6.5 SwImageDesc + information element."; + } + + container checksum { + + leaf algorithm { + mandatory true; + type identityref { + base checksum-algorithm; + } + description + "Species the algorithm used to obtain the checksum + value."; + reference + "GS NFV IFA011: Section 7.1.6.10 ChecksumData + information element."; + } + + leaf hash { + mandatory true; + type string; + description + "Contains the result of applying the algorithm + indicated by the algorithm attribute to the data to + which this ChecksumData refers."; + reference + "GS NFV IFA011: Section 7.1.6.10 ChecksumData + information element."; + } + description + "The checksum of the software image file."; + reference + "GS NFV IFA011: Section 7.1.6.5 SwImageDesc + information element."; + } + + leaf container-format { + default "bare"; + type enumeration { + enum "aki" { + description + "An Amazon kernel image."; + } + enum "ami" { + description + "An Amazon machine image."; + } + enum "ari" { + description + "An Amazon ramdisk image."; + } + enum "bare" { + description + "The image does not have a container or metadata + envelope."; + } + enum "docker" { + description + "A docker container format."; + } + enum "ova" { + description + "An OVF package in a tarfile."; + } + enum "ovf" { + description + "The OVF container format."; + } + } + description + "The container format describes the container file + format in which software image is provided."; + reference + "GS NFV IFA011: Section 7.1.6.5 SwImageDesc + information element."; + } + + leaf disk-format { + default "qcow2"; + type enumeration { + enum "aki" { + description + "An Amazon kernel image."; + } + enum "ami" { + description + "An Amazon machine image."; + } + enum "ari" { + description + "An Amazon ramdisk image."; + } + enum "iso" { + description + "An archive format for the data contents of an + disk, such as CD-ROM."; + } + enum "qcow2" { + description + "Supported by the QEMU emulator that can expand + dynamically and supports Copy on Write."; + } + enum "raw" { + description + "An unstructured disk image format; if you have a + file without an extension it is possibly a raw + format."; + } + enum "vdi" { + description + "Supported by VirtualBox virtual machine monitor + and the QEMU emulator."; + } + enum "vhd" { + description + "The VHD disk format, a common disk format used by + virtual machine monitors from VMware, Xen, + Microsoft, VirtualBox, and others."; + } + enum "vhdx" { + description + "The VHDX disk format, an enhanced version of the + VHD format, which supports larger disk sizes among + other features."; + } + enum "vmdk" { + description + "Common disk format supported by many common virtual + machine monitors."; + } + } + description + "The disk format of a software image is the format of + the underlying disk image."; + } + + leaf min-disk { + type uint64; + units "GB"; + mandatory true; + description + "The minimal disk size requirement for this software + image. The value of the 'size of storage' attribute + of the VirtualStorageDesc referencing this + SwImageDesc shall not be smaller than the value of + minDisk."; + reference + "GS NFV IFA011: Section 7.1.6.5, SwImageDesc + information element."; + } + + leaf min-ram { + type decimal64 { + fraction-digits 1; + range "0..max"; + } + units "GB"; + default 0; + description + "The minimal RAM requirement for this software image. + The value of the 'size' attribute of + VirtualMemoryData of the Vdu referencing this + SwImageDesc shall not be smaller than the value of + minRam."; + reference + "GS NFV IFA011: Section 7.1.6.5, SwImageDesc + information element."; + } + + leaf size { + mandatory true; + type uint64; + units "GB"; + description + "The size of this software image."; + reference + "GS NFV IFA011: Section 7.1.6.5, SwImageDesc + information element."; + } + + leaf image { + default "."; + type inet:uri; + description + "This is a reference to the actual software image. + The reference can be relative to the root of the VNF + Package or can be a URL"; + reference + "GS NFV IFA011: Section 7.1.6.5, SwImageDesc + information element."; + } + + leaf operating-system { + type string; + description + "Identifies the operating system used in the software + image. This attribute may also identify if a 32 bit + or 64 bit software image is used."; + reference + "GS NFV IFA011: Section 7.1.6.5, SwImageDesc + information element."; + } + + leaf-list supported-virtualization-environment { + type string; + description + "Identifies the virtualisation environments + (e.g. hypervisor) compatible with this software + image."; + reference + "GS NFV IFA011: Section 7.1.6.5, SwImageDesc + information element."; + } + } + + list int-virtual-link-desc { + key "id"; + description + "Represents the type of network connectivity mandated by the + VNF provider between two or more CPs which includes at + least one internal CP."; + reference + "GS NFV IFA011: Section 7.1.2, Vnfd information element."; + + leaf id { + type string; + description + "Unique identifier of this internal VLD in VNFD."; + reference + "GS NFV IFA011: Section 7.1.7.2, VnfVirtualLinkDesc + Information elements."; + } + + list flavour { + key "id"; + description + "Describes a specific flavour of the VL with specific + bitrate requirements."; + reference + "GS NFV IFA011: Section 7.1.7.2, VnfVirtualLinkDesc + Information elements."; + + leaf id { + type string; + description + "Identifies a flavour within a VnfVirtualLinkDesc."; + reference + "GS NFV IFA011: Section 7.1.8.5, VirtualLinkDescFlavour + information element."; + } + + container qos { + presence "VL QoS parameters"; + description + "QoS of the VL."; + reference + "GS NFV IFA011: Section 7.1.8.5, VirtualLinkDescFlavour + information element."; + + leaf latency { + type uint32; + units "ms"; + mandatory true; + description + "Specifies the maximum latency in ms."; + reference + "GS NFV IFA011: Section 7.1.8.10, QoS information + element."; + } + + leaf packet-delay-variation { + type uint32; + units "ms"; + mandatory true; + description + "Specifies the maximum jitter in ms."; + reference + "GS NFV IFA011: Section 7.1.8.10, QoS information + element."; + } + + leaf packet-loss-ratio { + type decimal64 { + fraction-digits "2"; + range "0..1.00"; + } + description + "Specifies the maximum packet loss ratio."; + reference + "GS NFV IFA011: Section 7.1.8.10, QoS information + element."; + } + } + } + + uses connectivity-type; + + leaf-list test-access { + type string; + description + "Specifies test access facilities expected on the VL + (e.g. none, passive monitoring, or active (intrusive) + loopbacks at endpoints."; + reference + "GS NFV IFA011: Section 7.1.7.2, VnfVirtualLinkDesc + information element."; + } + + leaf description { + type string; + description + "Provides human-readable information on the purpose of + the VL (e.g. control plane traffic)."; + reference + "GS NFV IFA011: Section 7.1.7.2, VnfVirtualLinkDesc + information element."; + } + + list monitoring-parameters { + key "id"; + + leaf id { + type string; + description + "Unique identifier of the monitoring parameter."; + reference + "GS NFV IFA011: Section 7.1.11.3, MonitoringParameter + information element."; + } + uses monitoring-parameter; + } + } + + uses security-group-rule; + + list ext-cpd { + key "id"; + min-elements 1; + + description + "Describes an external interface exposed by this VNF enabling + connection with a Virual Link"; + reference + "GS NFV IFA011: Section 7.1.2, VNFD information element."; + + choice cp-connection { + leaf int-virtual-link-desc { + description + "Reference to the internal Virtual Link Descriptor (VLD) + to which CPs instantiated from this external CP + Descriptor (CPD) connect. Either intVirtualLinkDesc or + intCpd shall be present."; + type leafref { + path "../../int-virtual-link-desc/id"; + } + } + + container int-cpd { + leaf vdu-id { + type leafref { + path "../../../vdu/id"; + } + } + + leaf cpd { + type leafref { + path "deref(../vdu-id)/../int-cpd/id"; + } + } + } + } + uses virtual-network-interface-requirements; + + leaf nicio-requirements { + type leafref { + path "../../virtual-compute-desc/id"; + } + description + "This references (couples) the CPD with any logical node I/O + requirements (for network devices) that may have been + created. Linking these attributes is necessary so that so + that I/O requirements that need to be articulated at the + logical node level can be associated with the network + interface requirements associated with the CPD."; + reference + "GS NFV-IFA011: Section 7.1.6.6, + VirtualNetworkInterfaceRequirements information element"; + } + uses cpd; + + leaf security-group-rule-id { + type leafref { + path "../../security-group-rule/id"; + } + description + "Reference of the security group rules bound to this + CPD."; + reference + "GS NFV IFA011: Section 7.1.6.3 Cpd information element"; + } + } + + list df { + must "default-instantiation-level or " + + "count(instantiation-level) = 1"; + key "id"; + min-elements 1; + description + "Describes a specific Deployment Flavour (DF) of a VNF with + specific requirements for capacity and performance."; + reference + "GS NFV IFA011: Section 7.1.2, VNFD information element."; + + leaf id { + type string; + description + "Identifier of this DF within the VNFD."; + reference + "GS NFV IFA011: Section 7.1.8, Information elements + to the DeploymentFlavour."; + } + + leaf description { + type string; + description + "Human readable description of the deployment flavour"; + reference + "GS NFV IFA011: Section 7.1.8, Information elements + to the DeploymentFlavour."; + } + + list vdu-profile { + key "id"; + min-elements 1; + description + "The Vduprofile describes additional instantiation data for + a given VDU used in a deployment flavour."; + reference + "GS NFV IFA011: Section 7.1.8, Information elements + to the DeploymentFlavour."; + + leaf id { + type leafref { + path "../../../vdu/id"; + } + reference + "GS NFV IFA011: Section 7.1.8.3, VduProfile information + element."; + } + + leaf min-number-of-instances { + type uint16; + default 1; + description + "Minimum number of instances of the VNFC based on this + VDU that is permitted to exist for this flavour."; + reference + "GS NFV IFA011: Section 7.1.8.3, VduProfile information + element."; + } + + leaf max-number-of-instances { + type uint16; + default 1; + must ". >= ../min-number-of-instances"; + reference + "GS NFV IFA011: Section 7.1.8.3, VduProfile information + element."; + } + uses local-affinity-or-anti-affinity-rule; + + list affinity-or-anti-affinity-group { + key "id"; + + description + "Identifier(s) of the affinity or anti-affinity + group(s) the VDU belongs to."; + reference + "GS NFV IFA011: Section 7.1.8.3, VduProfile information + element."; + leaf id { + type leafref { + path "../../../" + + "affinity-or-anti-affinity-group/id"; + } + description + "Identifies an affinity or anti-affinity group to + which the affinity or anti-affinity rule applies."; + reference + "GS NFV IFA011: Section 7.1.8.12, AffinityOrAntiAffinity + information element."; + } + } + } + + list virtual-link-profile { + key "id flavour"; + description + "Defines the internal VLD along with additional data which + is used in this DF."; + reference + "GS NFV IFA011: Section 7.1.8.2, VnfDf information + element."; + + leaf id { + type leafref { + path "../../../int-virtual-link-desc/id"; + } + description + "Uniquely identifies a Vnf VLD."; + reference + "GS NFV IFA011: Section 7.1.8.4, VirtualLinkProfile + information element."; + } + + leaf flavour { + type leafref { + path "deref(../../../ext-cpd/int-virtual-link-desc)" + + "/../flavour/id"; + } + description + "Identifies a flavour within the VnfVirtualLinkDesc."; + reference + "GS NFV IFA011: Section 7.1.8.4, VirtualLinkProfile + information element."; + } + uses local-affinity-or-anti-affinity-rule; + + list affinity-or-anti-affinity-group { + key "id"; + leaf id { + type leafref { + path "../../../affinity-or-anti-affinity-group/id"; + } + } + description + "Identifier(s) of the affinity or anti-affinity + group(s) the VnfVirtualLinkDesc belongs to."; + reference + "GS NFV IFA011: Section 7.1.8.4, VirtualLinkProfile + information element."; + } + + container max-bit-rate-requirements { + leaf root { + mandatory "true"; + type uint32; + description + "Throughput requirement of the link (e.g. bitrate of + E-Line, root bitrate of E-Tree, aggregate capacity + of E-LAN)."; + reference + "GS NFV IFA011: Section 7.1.8.6, + LinkBitrateRequirements information element."; + } + + leaf leaf { + type uint32; + description + "Throughput requirement of leaf connections to the + link when applicable to the connectivity type + (e.g. for E-Tree and E-LAN branches)."; + reference + "GS NFV IFA011: Section 7.1.8.6, + LinkBitrateRequirements information element."; + } + description + "Specifies the maximum bitrate requirements for a VL + instantiated according to this profile."; + reference + "GS NFV IFA011: Section 7.1.8.4, VirtualLinkProfile + information element."; + } + + container min-bit-rate-requirements { + leaf root { + mandatory "true"; + type uint32; + description + "Throughput requirement of the link (e.g. bitrate of + E-Line, root bitrate of E-Tree, aggregate capacity + of E-LAN)."; + reference + "GS NFV IFA011: Section 7.1.8.6, + LinkBitrateRequirements information element."; + } + + leaf leaf { + type uint32; + description + "Throughput requirement of leaf connections to the + link when applicable to the connectivity type + (e.g. for E-Tree and E-LAN branches)."; + reference + "GS NFV IFA011: Section 7.1.8.6, + LinkBitrateRequirements information element."; + } + description + "Specifies the minimum bitrate requirements for a VL + instantiated according to this profile."; + reference + "GS NFV IFA011: Section 7.1.8.4, VirtualLinkProfile + information element."; + } + + container virtual-link-protocol-data { + leaf associated-layer-protocol { + type identityref { + base layer-protocol; + } + description + "One of the values of the attribute layerProtocol of + the ConnectivityType IE."; + reference + "GS NFV IFA011: Section 7.1.8.13, + VirtualLinkProtocolData information element."; + } + + container l2-protocol-data { + when "(../associated-layer-protocol = 'Ethernet') or " + + "(../associated-layer-protocol = 'MPLS') or " + + "(../associated-layer-protocol = 'ODU2') or " + + "(../associated-layer-protocol = 'Pseudo-Wire')"; + + leaf name { + type string; + description + "Network name associated with this L2 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.14, + L2ProtocolData information element."; + } + + leaf network-type { + type enumeration { + enum flat; + enum vlan; + enum vxlan; + enum gre; + } + description + "Specifies the network type for this L2 protocol. + Possible values: FLAT, VLAN, VXLAN, GRE."; + reference + "GS NFV IFA011: Section 7.1.8.14, + L2ProtocolData information element."; + } + + leaf vlan-transparent { + type boolean; + description + "Specifies whether to support VLAN transparency for + this L2 protocol or not."; + reference + "GS NFV IFA011: Section 7.1.8.14, + L2ProtocolData information element."; + } + + leaf mtu { + type uint16; + description + "Specifies the maximum transmission unit (MTU) value + for this L2 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.14, + L2ProtocolData information element."; + } + description + "Specifies the L2 protocol data for this virtual link. + Shall be present when the associatedLayerProtocol + attribute indicates a L2 protocol and shall be absent + otherwise."; + reference + "GS NFV IFA011: Section 7.1.8.13, + VirtualLinkProtocolData information element."; + } + + container l3-protocol-data { + when "(../associated-layer-protocol = 'IPv4') or " + + "(../associated-layer-protocol = 'IPv6')"; + + leaf name { + type string; + description + "Network name associated with this L3 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf ip-version { + type enumeration { + enum ipv4; + enum ipv6; + } + default "ipv4"; + description + "Specifies IP version of this L3 protocol. + Value: + • IPV4. + • IPV6."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf cidr { + type string; + description + "Specifies the CIDR (Classless InterDomain Routing) + of this L3 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf-list ip-allocation-pools { + type string; + description + "Specifies the allocation pools with start and end + IP addresses for this L3 protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf gateway-ip { + type inet:ip-address; + description + "Specifies the gateway IP address for this L3 + protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf dhcp-enabled { + type boolean; + default "true"; + description + "Indicates whether DHCP (Dynamic Host Configuration + Protocol) is enabled or disabled for this L3 + protocol."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + + leaf ipv6-address-mode { + when "../ip-version = 'ipv6'"; + type enumeration { + enum slaac; + enum dhcpv6-stateful; + enum dhcpv6-stateless; + } + description + "Specifies IPv6 address mode. Possible values: + • SLAAC. + • DHCPV6-STATEFUL. + • DHCPV6-STATELESS. + May be present when the value of the ipVersion + attribute is 'IPV6' and shall be absent otherwise."; + reference + "GS NFV IFA011: Section 7.1.8.15, + L3ProtocolData information element."; + } + description + "Specifies the L3 protocol data for this virtual link. + Shall be present when the associatedLayerProtocol + attribute indicates a L3 protocol and shall be absent + otherwise."; + reference + "GS NFV IFA011: Section 7.1.8.13, + VirtualLinkProtocolData information element."; + } + description + "Specifies the protocol data for a VL instantiated + according to this profile. Cardinality 0 is used when + no protocol data needs to be specified."; + reference + "GS NFV IFA011: Section 7.1.8.4, VirtualLinkProfile + information element."; + } + } + + list instantiation-level { + key "id"; + min-elements 1; + description + "Describes the various levels of resources that can be + used to instantiate the VNF using this flavour. + Examples: Small, Medium, Large. If there is only one + 'instantiationLevel' entry, it shall be treated as the + default instantiation level for this DF. + + The InstantiationLevel information element describes a + given level of resources to be instantiated within a + deployment flavour in term of the number of VNFC instances + to be created from each VDU. + All the VDUs referenced in the level shall be part of the + corresponding deployment flavour and their number shall + be within the range (min/max) for this deployment flavour."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information element"; + + leaf id { + type string; + description + "Uniquely identifies a level with the DF."; + reference + "GS NFV IFA011: Section 7.1.8.7 InstantiationLevel + information element"; + } + + leaf description { + type string; + description + "Human readable description of the instantiation level"; + reference + "GS NFV IFA011: Section 7.1.8.7 InstantiationLevel + information element"; + } + + list vdu-level { + key "vdu-id"; + min-elements 1; + description + "Sets the number of instances for the VDU in this + instantiation level."; + reference + "GS NFV IFA011: Section 7.1.8.7 InstantiationLevel + information element"; + + leaf vdu-id { + type leafref { + path "../../../../vdu/id"; + } + description + "Uniquely identifies a VDU."; + reference + "GS NFV IFA011: Section 7.1.8.9 VduLevel information + element"; + } + + leaf number-of-instances { + type uint16; + must ". <= ../../../../df/" + + "vdu-profile[id=current()/../vdu-id]/" + + "max-number-of-instances"; + must ". >= ../../../../df/" + + "vdu-profile[id=current()/../vdu-id]/" + + "min-number-of-instances"; + default 1; + description + "Number of instances of VNFC based on this VDU to + deploy for this level."; + reference + "GS NFV IFA011: Section 7.1.8.9 VduLevel information + element"; + } + } + + list scaling-info { + key "scaling-aspect-id"; + description + "The InstantiationLevel information element describes a + given level of resources to be instantiated within a + DF in term of the number of VNFC instances to be + created from each VDU."; + reference + "GS NFV IFA011: Section 7.1.8.7 InstantiationLevel + information element"; + + leaf scaling-aspect-id { + type leafref { + path "../../../scaling-aspect/id"; + } + description + "Identifier of the scaling aspect."; + reference + "GS NFV IFA011: Section 7.1.8.8 ScaleInfo information + element"; + } + + leaf scale-level { + type uint32; + description + "The scale level, greater than or equal to 0."; + reference + "GS NFV IFA011: Section 7.1.8.8 ScaleInfo information + element"; + } + } + } + + leaf default-instantiation-level { + type leafref { + path "../instantiation-level/id"; + } + description + "This attribute references the 'instantiationLevel' + entry which defines the default instantiation level for + this DF. It shall be present if there are multiple + 'instantiationLevel' entries."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + } + + leaf-list supported-operation { + type identityref { + base supported-operation; + } + description + "Indicates which operations are available for this DF via + the VNF LCM interface. Instantiate VNF, Query VNF and + Terminate VNF are supported in all DF and therefore + need not be included in this list."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + } + + container lcm-operations-configuration { + description + "This information element is a container for all + attributes that affect the invocation of the VNF + Lifecycle Management operations, structured by + operation."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + + container instantiate-vnf-op-config { + list parameter { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "Array of KVP requirements for VNF-specific parameters + to be passed when invoking the InstantiateVnf + operation."; + reference + "GS NFV IFA011: Section 7.1.5.3 + InstantiateVnfOpConfig information element"; + } + description + "Configuration parameters for the InstantiateVnf + operation."; + reference + "GS NFV IFA011: Section 7.1.5.2 + VnfLcmOperationsConfiguration information element"; + } + + container scale-vnf-op-config { + description + "Configuration parameters for the ScaleVnf operation."; + reference + "GS NFV IFA011: Section 7.1.5.2 + VnfLcmOperationsConfiguration information element"; + + list parameter { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "Array of KVP requirements for VNFspecific parameters + to be passed when invoking the ScaleVnf operation."; + reference + "GS NFV IFA011: Section 7.1.5.4 ScaleVnfOpConfig + information element"; + } + + leaf scaling-by-more-than-one-step-supported { + type boolean; + default false; + description + "Signals whether passing a value larger than one in + the numScalingSteps parameter of the ScaleVnf + operation is supported by this VNF. + Default is FALSE, i.e. 'not supported'."; + reference + "GS NFV IFA011: Section 7.1.5.4 + ScaleVnfOpConfig information element"; + } + } + + container scale-vnf-to-level-op-config { + description + "This information element defines attributes that + affect the invocation of the ScaleVnfToLevel + operation."; + reference + "GS NFV IFA011: Section 7.1.5.2 + VnfLcmOperationsConfiguration information element"; + + list parameter { + key "key"; + leaf key { + type string; + } + leaf value { + type string; + } + description + "Array of KVP requirements for VNF-specific parameters + to be passed when invoking the ScaleVnfToLevel + operation."; + reference + "GS NFV IFA011: Section 7.1.5.5 + ScaleVnfToLevelOpConfig information element"; + } + + leaf arbitrary-target-levels-supported { + type boolean; + default "false"; + description + "Signals whether scaling according to the parameter + 'scaleInfo' is supported by this VNF."; + reference + "GS NFV IFA011: Section 7.1.5.5 + ScaleVnfToLevelOpConfig information element"; + } + } + + container heal-vnf-op-config { + description + "This information element defines attributes that + affect the invocation of the HealVnf operation."; + reference + "GS NFV IFA011: Section 7.1.5.2 + VnfLcmOperationsConfiguration information element"; + + list parameter { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "Array of KVP requirements for VNF-specific parameters + to be passed when invoking the HealVnf operation."; + reference + "GS NFV IFA011: Section 7.1.5.6 HealVnfOpConfig + information element"; + } + + leaf-list cause { + type string; + description + "Supported 'cause' parameter values."; + reference + "GS NFV IFA011: Section 7.1.5.6 HealVnfOpConfig + information element"; + } + } + + container terminate-vnf-op-config { + description + "This information element defines attributes that + affect the invocation of the TerminateVnf operation."; + reference + "GS NFV IFA011: Section 7.1.5.2 + VnfLcmOperationsConfiguration information element"; + + leaf min-graceful-termination { + type yang:timeticks; + default "1"; + description + "Minimum timeout value for graceful termination of + a VNF instance."; + reference + "GS NFV IFA011: Section 7.1.5.7 + TerminateVnfOpConfig information element"; + } + + leaf max-recommended-graceful-termination { + type yang:timeticks; + description + "Maximum recommended timeout value that can be needed + to gracefully terminate a VNF instance of a + particular type under certain conditions, such as + maximum load condition. This is provided by VNF + provider as information for the operator + facilitating the selection of optimal timeout value. + This value is not used as constraint."; + reference + "GS NFV IFA011: Section 7.1.5.7 + TerminateVnfOpConfig information element"; + } + + list parameter { + key "key"; + leaf key { + type string; + } + leaf value { + type string; + } + description + "Array of KVP requirements for VNF-specific parameters + to be passed when invoking the TerminateVnf + operation."; + reference + "GS NFV IFA011: Section 7.1.5.7 + TerminateVnfOpConfig information element"; + } + } + + container operate-vnf-op-config { + description + "This information element defines attributes that + affect the invocation of the OperateVnf operation."; + reference + "GS NFV IFA011: Section 7.1.5.2 + VnfLcmOperationsConfiguration information element"; + + leaf min-graceful-stop-timeout { + type yang:timeticks; + default "1"; + description + "Minimum timeout value for graceful stop of a VNF + instance."; + reference + "GS NFV IFA011: Section 7.1.5.8 + OperateVnfOpConfig information element"; + } + + leaf max-recommended-graceful-stop-timeout { + type yang:timeticks; + description + "Maximum recommended timeout value that can be + needed to gracefully stop a VNF instance of a + particular type under certain conditions, such as + maximum load condition. This is provided by VNF + provider as information for the operator facilitating + the selection of optimal timeout value. This value + is not used as constraint."; + reference + "GS NFV IFA011: Section 7.1.5.8 + OperateVnfOpConfig information element"; + } + + list parameter { + key "key"; + leaf key { + type string; + } + leaf value { + type string; + } + description + "Array of KVP requirements for VNF-specific parameters + to be passed when invoking the OperateVnf + operation."; + reference + "GS NFV IFA011: Section 7.1.5.8 + OperateVnfOpConfig information element"; + } + } + + container change-vnf-flavour-op-config { + list parameter { + key "key"; + leaf key { + type string; + } + leaf value { + type string; + } + description + "Array of KVP requirements for VNF-specific parameters + to be passed when invoking the OperateVnf + operation."; + reference + "GS NFV IFA011: Section 7.1.5.9 + ChangeVnfFlavour information element"; + } + description + "Configuration parameters for the ChangeVnfFlavour + operation."; + reference + "GS NFV IFA011: Section 7.1.5.2 + VnfLcmOperationsConfiguration information element"; + } + + container change-ext-vnf-connectivity-op-config { + list parameter { + key "key"; + leaf key { + type string; + } + leaf value { + type string; + } + description + "Array of KVP requirements for VNF-specific parameters + to be passed when invoking the + ChangeExtVnfConnectivity operation."; + reference + "GS NFV IFA011: Section 7.1.5.10 + ChangeExtVnfConnectivityOpConfig information + element"; + } + description + "Configuration parameters for the + ChangeExtVnfConnectivity operation."; + reference + "GS NFV IFA011: Section 7.1.5.2 + VnfLcmOperationsConfiguration information element"; + } + } + + list affinity-or-anti-affinity-group { + key "id"; + description + "The AffinityOrAntiAffinityGroup describes the affinity + or anti-affinity relationship applicable between the + virtualization containers to be created based on + different VDUs, or between internal VLs to be created + based on different VnfVirtualLinkDesc(s). + + Per VNF, the affinity/anti-affinity rules defined using + this information element, using the + LocalAffinityOrAntiAffinityRule information element, and + using the placement constraints in the + GrantLifecycleOperation as defined in ETSI GS NFV-IFA + 007 [i.3] should be conflict-free. In case of conflicts, + the placement constraints in the + GrantLifecycleOperation shall take precedence."; + + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + + leaf id { + type string; + description + "Identifies an affinity or anti-affinity group to which + the affinity or anti-affinity rule applies."; + reference + "GS NFV IFA011: Section 7.1.8.12 + AffinityOrAntiAffinityGroup information element"; + } + + leaf type { + mandatory true; + type affinity-type; + description + "Specifies whether the rule is an affinity rule or an + anti-affinity rule."; + reference + "GS NFV IFA011: Section 7.1.8.12 + AffinityOrAntiAffinityGroup information element"; + } + + leaf scope { + mandatory true; + type affinity-scope; + description + "Specifies the scope of the rule, possible values are + 'NFVI-PoP', 'Zone', 'ZoneGroup', 'NFVI-node'."; + reference + "GS NFV IFA011: Section 7.1.8.12 + AffinityOrAntiAffinityGroup information element"; + } + } + + list indicator { + key "id"; + + leaf id { + type string; + description + "Unique identifier."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfIndicator + information element"; + } + + leaf name { + type string; + description + "The human readable name of the VnfIndicator."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfIndicator + information element"; + } + + leaf indicator-value { + type string; + description + "Defines the allowed values or value ranges of this + indicator."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfIndicator + information element"; + } + + leaf source { + type enumeration { + enum vnf; + enum em; + enum both; + } + description + "Describe the source of the indicator. The possible + values are: + • VNF. + • EM. + • Both. + + This tells the consumer where to send the subscription + request."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfIndicator + information element"; + } + + description + "Declares the VNF indicators that are supported by this + VNF (specific to this DF)."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + } + + list supported-vnf-interfaces { + key "name"; + + leaf name { + type enumeration { + enum vnf-configuration; + enum vnf-indicator; + } + description + "Identifies an interface produced by the VNF. Valid + values: + - VNF_CONFIGURATION + - VNF_INDICATOR"; + reference + "GS NFV IFA011: Section 7.1.8.16 VnfInterfaceDetails + information element"; + } + + leaf-list cpd-id { + type leafref { + path "../../../ext-cpd/id"; + } + description + "References one or more CPDs from which to instantiate + external CPs through which interface endpoints on the + VNF side can be reached by the VNFM."; + reference + "GS NFV IFA011: Section 7.1.8.16 VnfInterfaceDetails + information element"; + } + + list interface-details { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + } + + description + "Indicates which interfaces the VNF produces and provides + additional details on how to access the interface + endpoints."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + } + + list monitoring-parameter { + key "id"; + + description + "Defines the virtualised resources monitoring parameters + on VNF level."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + + leaf id { + type string; + description + "Unique identifier of the monitoring parameter."; + reference + "GS NFV IFA011: Section 7.1.11.3 MonitoringParameter + information element"; + } + uses monitoring-parameter; + } + + list scaling-aspect { + key "id"; + + description + "The scaling aspects supported by this DF of the VNF. + scalingAspect shall be present if the VNF supports + scaling."; + reference + "GS NFV IFA011: Section 7.1.8.2 VnfDf information + element"; + + leaf id { + type string; + description + "Unique identifier of this aspect in the VNFD."; + reference + "GS NFV IFA011: Section 7.1.10.2 ScalingAspect + information element"; + } + + leaf name { + type string; + description + "Human readable name of the aspect."; + reference + "GS NFV IFA011: Section 7.1.10.2 ScalingAspect + information element"; + } + + leaf description { + type string; + description + "Human readable description of the aspect."; + reference + "GS NFV IFA011: Section 7.1.10.2 ScalingAspect + information element"; + } + + leaf max-scale-level { + type uint32 { + range "1..max"; + } + description + "The maximum scaleLevel for total number of scaling + steps that can be applied w.r.t. this aspect. The + value of this attribute corresponds to the number of + scaling steps can be applied to this aspect when + scaling it from the minimum scale level (i.e. 0) to the + maximum scale level defined by this attribute."; + reference + "GS NFV IFA011: Section 7.1.10.2 ScalingAspect + information element"; + } + + container aspect-delta-details { + list deltas { + key "id"; + min-elements 1; + + leaf id { + type string; + description + "Identifier of this scaling delta."; + reference + "GS NFV IFA011: Section 7.1.10.4 ScalingDelta + information element"; + } + + list vdu-delta { + key "id"; + + leaf id { + type leafref { + path "../../../../../../vdu/id"; + } + description + "Uniquely identifies a VDU."; + reference + "GS NFV IFA011: Section 7.1.8.9 VduLevel + information element"; + } + + leaf number-of-instances { + type uint32 { + range "0..max"; + } + description + "Number of instances of VNFC based on this VDU to + deploy for an instantiation level or for a + scaling delta. Shall be zero or greater."; + reference + "GS NFV IFA011: Section 7.1.8.9 VduLevel + information element"; + } + description + "The number of VNFC instances based on particular + VDUs to be created or removed."; + reference + "GS NFV IFA011: Section 7.1.10.4 ScalingDelta + information element"; + } + + list virtual-link-bit-rate-delta { + key "id"; + + leaf id { + type string; + description + "Uniquely identifies a VnfVirtualLinkDesc."; + reference + "GS NFV IFA011: Section 7.1.10.5 + VirtualLinkBitRateLevel information element"; + } + + container bit-rate-requirements { + leaf root { + type uint32; + units bits/sec; + mandatory true; + description + "Throughput requirement of the link (e.g. + bitrate of E-Line, root bitrate of E-Tree, + aggregate capacity of E-LAN)."; + reference + "GS NFV IFA011: Section 7.1.8.6 + LinkBitrateRequirements information element"; + } + + leaf leaf { + type uint32; + units bits/sec; + description + "Throughput requirement of leaf connections to + the link when applicable to the connectivity + type (e.g. for E-Tree and E-LAN branches)."; + reference + "GS NFV IFA011: Section 7.1.8.6 + LinkBitrateRequirements information element"; + } + description + "Bitrate requirements for an instantiation level + or bitrate delta for a scaling step."; + reference + "GS NFV IFA011: Section 7.1.10.5 + VirtualLinkBitRateLevel information element"; + } + description + "The bitrate to be added or removed to virtual links + created from particular virtual link descriptors."; + reference + "GS NFV IFA011: Section 7.1.10.4 ScalingDelta + information element"; + } + description + "Declares different scaling deltas, each of which is + applied for one or more scaling steps of this + aspect."; + reference + "GS NFV IFA011: Section 7.1.10.3 AspectDeltaDetails + information element"; + } + + leaf step-deltas { + type leafref { + path "../deltas/id"; + } + description + "Identifiers of the individual scaling deltas to be + applied for the subsequent scaling steps of this + aspect. The first entry in the array shall correspond + to the first scaling step (between scale levels 0 to + 1) and the last entry in the array shall correspond + to the last scaling step (between maxScaleLevel-1 + and maxScaleLevel). + + Each referenced scaling delta shall be declared in + the 'deltas' attribute."; + reference + "GS NFV IFA011: Section 7.1.10.3 AspectDeltaDetails + information element"; + } + description + "A specification of the deltas in terms of number of + instances of VNFCs and virtual link bit rates that + correspond to the scaling steps of this aspect. A + cardinality of zero indicates that this mapping has to + be specified in a lifecycle management script or be + otherwise known to the VNFM. The information in this + attribute, if provided, shall be consistent with the + information provided in the 'InstantiationLevel' + information element. If this attribute is provided, it + shall be provided for all scaling aspects."; + reference + "GS NFV IFA011: Section 7.1.10.2 ScalingAspect + information element"; + } + } + } + + container configurable-properties { + description + "Describes the configurable properties of the VNF + (e.g. related to auto scaling and auto healing)."; + reference + "GS NFV IFA011: Section 7.1.2 VNFD information element"; + + leaf is-auto-scalable-enabled { + type boolean; + description + "It permits to enable (TRUE) / disable (FALSE) the + auto-scaling functionality."; + reference + "GS NFV IFA011: Section 7.1.12 VnfConfigurableProperties + information element"; + } + + leaf is-auto-heal-enabled { + type boolean; + description + "It permits to enable (TRUE) / disable (FALSE) the + auto-healing functionality."; + reference + "GS NFV IFA011: Section 7.1.12 VnfConfigurableProperties + information element"; + } + + list additional-configurable-property { + key "key"; + + leaf key { + type string; + } + + leaf value { + type string; + } + description + "It provides VNF specific configurable properties that can + be modified using the ModifyVnfConfiguration operation."; + reference + "GS NFV IFA011: Section 7.1.12 VnfConfigurableProperties + information element"; + } + } + + container modifiable-attributes { + description + "Describes the modifiable attributes of the VNF."; + reference + "GS NFV IFA011: Section 7.1.2 VNFD information element"; + + leaf-list extension { + type string; + description + "Additional VNF-specific attributes of VnfInfo that + affect the lifecycle management of a VNF instance and + that are writeable. + + For each VNF instance, these attributes are stored + persistently by the VNFM and can be queried and + modified through the VNFM. + + These attributes are intended to be consumed by the + VNFM or by the lifecycle management scripts during the + execution of VNF lifecycle management operations. + + Modifying these values has no direct effect on the VNF + instance; however, modified values can be considered + during subsequent VNF lifecycle management operations, + which means that the modified values can indirectly + affect the configuration of the VNF instance."; + reference + "GS NFV IFA011: Section 7.1.14 VnfInfoModifiableAttributes + information element"; + } + + leaf-list metadata { + type string; + description + "Additional VNF-specific attributes of VnfInfo that are + writeable and that provide metadata describing the VNF + instance. + + For each VNF instance, these attributes are stored + persistently by the VNFM and can be queried and modified + through the VNFM. + + These attributes are intended to provide information to + functional blocks external to the VNFM and will not be + used by the VNFM or the VNF lifecycle management + scripts when executing lifecycle management operations. + + Modifying these attributes has no effect on the VNF + instance. It only affects the attribute values stored by + the VNFM."; + reference + "GS NFV IFA011: Section 7.1.14 VnfInfoModifiableAttributes + information element"; + } + } + + list lifecycle-management-script { + key "id"; + description + "Includes a list of events and corresponding management + scripts performed for the VNF."; + reference + "GS NFV IFA011: Section 7.1.2 VNFD information element"; + + leaf id { + type string; + description + "A unique string that identfies the script in question."; + } + + leaf-list event { + type internal-lifecycle-management-script-event; + description + "Describes VNF lifecycle event(s) or an external stimulus + detected on a VNFM reference point."; + reference + "GS NFV IFA011: Section 7.1.13 LifeCycleManagementScript + information element"; + } + + leaf-list lcm-transition-event { + type string; + description + "Describes the transition VNF lifecycle event(s) that + cannot be mapped to any of the enumerated values + defined for the event attribute."; + reference + "GS NFV IFA011: Section 7.1.13 LifeCycleManagementScript + information element"; + } + + leaf script { + type string; + description + "Includes a VNF LCM script (e.g. written in a DSL as + specified in requirement VNF_PACK.LCM.001) triggered to + react to one of the events listed in the event + attribute."; + reference + "GS NFV IFA011: Section 7.1.13 LifeCycleManagementScript + information element"; + } + + leaf script-dsl { + type string; + description + "Defines the domain specific language (i.e. the type) of + script that is provided. Types of scripts could include + bash, python, etc."; + reference + "GS NFV IFA011: Section 7.1.13 LifeCycleManagementScript + information element"; + } + + list script-input { + key "key"; + + leaf key { + type string; + description + "Includes a VNF LCM script (e.g. written in a DSL as + specified in requirement VNF_PACK.LCM.001) triggered to + react to one of the events listed in the event + attribute. + + The string value specified here is a path to a file in + the VNF package."; + reference + "GS NFV IFA011: Section 7.1.13 LifeCycleManagementScript + information element"; + } + + leaf value { + type string; + } + description + "Array of KVP requirements with the key as the parameter + name and the value as the parameter that need to be + passed as an input to the script."; + reference + "GS NFV IFA011: Section 7.1.13 LifeCycleManagementScript + information element"; + } + } + + list element-group { + key "id"; + description + "Describes the associated elements of a VNFD for a certain + purpose during VNF lifecycle management."; + reference + "GS NFV IFA011: Section 7.1.2 VNFD information element"; + + leaf id { + type string; + description + "Unique identifier of this group in the VNFD."; + reference + "GS NFV IFA011: Section 7.1.4 VnfdElementGroup + information element"; + } + + leaf description { + type string; + description + "Human readable description of the group."; + reference + "GS NFV IFA011: Section 7.1.4 VnfdElementGroup + information element"; + } + + leaf-list vdu { + type leafref { + path "../../vdu/id"; + } + description + "References to Vdus that are part of this group."; + reference + "GS NFV IFA011: Section 7.1.4 VnfdElementGroup + information element"; + } + + leaf-list virtual-link-desc { + type leafref { + path "../../int-virtual-link-desc/id"; + } + description + "References to VnfVirtualLinkDesc that are part of this + group."; + reference + "GS NFV IFA011: Section 7.1.4 VnfdElementGroup + information element"; + } + } + + list indicator { + key "id"; + description + "Declares the VNF indicators that are supported by this + VNF."; + reference + "GS NFV IFA011: Section 7.1.2 VNFD information element"; + + leaf id { + type string; + description + "Unique identifier"; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfdIndicator + information element"; + } + + leaf name { + type string; + description + "The human readable name of the VnfIndicator."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfdIndicator + information element"; + } + + leaf-list indicator-value { + type string; + description + "Defines the allowed values or value ranges of this + indicator."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfdIndicator + information element"; + } + + leaf source { + type enumeration { + enum "vnf"; + enum "em"; + enum "both"; + } + description + "Describe the source of the indicator. The possible values + are: + • VNF. + • EM. + • Both. + This tells the consumer where to send the subscription + request."; + reference + "GS NFV IFA011: Section 7.1.11.2 VnfdIndicator + information element"; + } + } + + leaf-list auto-scale { + type string; + description + "Rule that determines when a scaling action needs to be + triggered on a VNF instance e.g. based on certain VNF + indicator values or VNF indicator value changes or a + combination of VNF indicator value(s) and monitoring + parameter(s)."; + reference + "GS NFV IFA011: Section 7.1.2 VNFD information element"; + } + } +} diff --git a/demo-mts91/src/samples/nfv/etsi-nfv-vnfd.yang b/demo-mts91/src/samples/nfv/etsi-nfv-vnfd.yang new file mode 100644 index 0000000000000000000000000000000000000000..5ded801b6d367dece55ad824c3fbef16c1c53f0a --- /dev/null +++ b/demo-mts91/src/samples/nfv/etsi-nfv-vnfd.yang @@ -0,0 +1,26 @@ +module etsi-nfv-vnfd { + yang-version 1.1; + namespace "urn:etsi:nfv:yang:etsi-nfv-vnfd"; + prefix vnfd; + + import etsi-nfv-descriptors { + prefix vnf; + } + + organization + "European Telecommunications Standards Institute (ETSI)"; + + description + "Virtual Network Function Descriptor."; + + revision 2019-03-18 { + description + "Initial revision. + VNFD according to ETSI GS NFV-IFA 011 Ed261v254."; + } + + container vnfd { + presence "VNFD container."; + uses vnf:vnfd; + } +} diff --git a/demo-mts91/src/samples/simple.tdltx b/demo-mts91/src/samples/simple.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..109df319d292451cc302c60b0b948c16a0d1f30a --- /dev/null +++ b/demo-mts91/src/samples/simple.tdltx @@ -0,0 +1,204 @@ +Package generated_from_simple { + Type String + Type TODO_RESOLVE_REFERENCED + Use "simple" as SOURCE_MAPPING + Structure system ( + string host_name, + string_collection domain_search, + system___login login + ) + Type string + Collection string_collection of string + Structure system___login ( + string message, + login___user_collection user + ) + Structure login___user ( + string ^name, + string full_name, + string class + ) + Collection login___user_collection of login___user + Structure parent_container ( + parent_container___parent_ordered_list_collection child_container + ) + Structure parent_container___parent_ordered_list ( + string parent_key_leaf, + string parent_ordinary_leaf, + parent_ordered_list___child_ordered_list_collection child_ordered_list + ) + Structure parent_ordered_list___child_ordered_list ( + string child_key_leaf, + string child_ordinary_leaf + ) + Collection parent_ordered_list___child_ordered_list_collection of parent_ordered_list___child_ordered_list + Collection parent_container___parent_ordered_list_collection of parent_container___parent_ordered_list + Structure sports ( + sports___person_collection person, + sports___team_collection team, + sports___protocol_collection protocol + ) + Structure sports___person ( + string ^name, + date_and_time birthday + ) + Type date_and_time extends string + Collection sports___person_collection of sports___person + Structure sports___team ( + string ^name, + team___player_collection player, + protocol protocol + ) + Structure team___player ( + @LeafRefPath : "/sports/person/name" + leafref ^name, + season season, + uint16 number, + scores scores, + uint16_collection score_list + ) + Type leafref + Annotation LeafRefPath + Type season extends string + Type uint16 + Type scores extends uint16 + Collection uint16_collection of uint16 + Collection team___player_collection of team___player + Enumerated protocol { + protocol tcp, + protocol udp, + protocol icmp + } + Collection sports___team_collection of sports___team + Structure sports___protocol ( + string associated_layer_protocol, + protocoly protocoly, + protocol___ext_cpd_collection ext_cpd, + protocol___case_ext_cpd_collection case_ext_cpd, + string protocolz, + protocol___port_map_collection port_map + ) + Enumerated protocoly { + protocoly tcp, + protocoly udp, + protocoly icmp + } + Structure protocol___ext_cpd ( + string k, + ext_cpd___cp_connection cp_connection + ) + Structure ext_cpd___cp_connection ( + cp_connection___int_virtual_link_desc int_virtual_link_desc, + cp_connection___int_cpd int_cpd + ) + Structure cp_connection___int_virtual_link_desc ( + string int_virtual_link_desc + ) + Structure cp_connection___int_cpd ( + int_cpd___int_cpd int_cpd + ) + Structure int_cpd___int_cpd ( + string vdu_id, + string cpd + ) + Collection protocol___ext_cpd_collection of protocol___ext_cpd + Structure protocol___case_ext_cpd ( + string k, + case_ext_cpd___cp_connection cp_connection + ) + Structure case_ext_cpd___cp_connection ( + cp_connection___a ^a, + cp_connection___b b + ) + Structure cp_connection___a ( + string int_virtual_link_desc + ) + Structure cp_connection___b ( + b___int_cpd int_cpd + ) + Structure b___int_cpd ( + string vdu_id, + string cpd + ) + Collection protocol___case_ext_cpd_collection of protocol___case_ext_cpd + Structure protocol___port_map ( + string port_ref, + port_map___map_type map_type + ) + Structure port_map___map_type ( + map_type___static_filtering_entries static_filtering_entries, + map_type___static_vlan_registration_entries static_vlan_registration_entries + ) + Structure map_type___static_filtering_entries ( + static_filtering_entries___static_filtering_entries static_filtering_entries + ) + Structure static_filtering_entries___static_filtering_entries ( + enumeration control_element, + string connection_identifier + ) + Type enumeration + Structure map_type___static_vlan_registration_entries ( + static_vlan_registration_entries___static_vlan_registration_entries static_vlan_registration_entries + ) + Structure static_vlan_registration_entries___static_vlan_registration_entries ( + enumeration registrar_admin_control + ) + Collection protocol___port_map_collection of protocol___port_map + Collection sports___protocol_collection of sports___protocol + Structure config ( + config___link_collection links, + config___queueDiscipline_collection queueDisciplines, + config___linkLimitation_collection linkLimitations, + config___defaultLink defaultLink + ) + Structure config___link ( + string ^name, + link___flags flags, + mac_address addr, + mac_address brd, + mtu mtu + ) + Structure link___flags ( + empty UP, + empty NOARP, + empty BROADCAST, + empty MULTICAST, + empty LOOPBACK, + empty NOTRAILERS + ) + Type empty + Type mac_address extends string + Type mtu extends uint32 + Type uint32 + Collection config___link_collection of config___link + Structure config___queueDiscipline ( + @LeafRefPath : "/config/links/link/name" + leafref linkName, + QueueDisciplineType ^type, + uint32 length + ) + Enumerated QueueDisciplineType { + QueueDisciplineType pfifo_fast, + QueueDisciplineType noqueue, + QueueDisciplineType noop, + QueueDisciplineType htb + } + Collection config___queueDiscipline_collection of config___queueDiscipline + Structure config___linkLimitation ( + @LeafRefPath : "/config/links/link/name" + leafref linkName, + linkLimitation___limitations limitations + ) + Structure linkLimitation___limitations ( + only10Mbps only10Mbps, + onlyHalfDuplex onlyHalfDuplex + ) + Type only10Mbps extends boolean + Type boolean + Type onlyHalfDuplex extends boolean + Collection config___linkLimitation_collection of config___linkLimitation + Structure config___defaultLink ( + @LeafRefPath : "/config/links/link/name" + leafref linkName + ) +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/acme.yang b/demo-mts91/src/samples/simple/acme.yang new file mode 100644 index 0000000000000000000000000000000000000000..197595e2daaf3ac644c4d085ed3e2664fdcc2231 --- /dev/null +++ b/demo-mts91/src/samples/simple/acme.yang @@ -0,0 +1,47 @@ +// Contents of "acme-system.yang" +module acme-system { + namespace "http://acme.example.com/system"; + prefix "acme"; + + organization "ACME Inc."; + contact "joe@acme.example.com"; + description + "The module for entities implementing the ACME system."; + + revision 2007-06-09 { + description "Initial revision."; + } + + container system { + leaf host-name { + type string; + description "Hostname for this system"; + } + + leaf-list domain-search { + type string; + description "List of domain names to search"; + } + + container login { + leaf message { + type string; + description + "Message given at start of login session"; + } + + list user { + key "name"; + leaf name { + type string; + } + leaf full-name { + type string; + } + leaf class { + type string; + } + } + } + } +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/acme.yang-generated.tdltx b/demo-mts91/src/samples/simple/acme.yang-generated.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..35a3f347539cc0621735d287e5aaea4bd233383d --- /dev/null +++ b/demo-mts91/src/samples/simple/acme.yang-generated.tdltx @@ -0,0 +1,22 @@ +Package generated_from_acme_yang { + Type String + Type TODO_RESOLVE_REFERENCED + Use "acme.yang" as SOURCE_MAPPING + Structure system ( + string host_name, + string_collection domain_search, + system___login login + ) + Type string + Collection string_collection of string + Structure system___login ( + string message, + login___user_collection user + ) + Structure login___user ( + string ^name, + string full_name, + string class + ) + Collection login___user_collection of login___user +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/acme.yang.tdltx b/demo-mts91/src/samples/simple/acme.yang.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..9a0202a2cf0e3938871bde6e479c531d398dd549 --- /dev/null +++ b/demo-mts91/src/samples/simple/acme.yang.tdltx @@ -0,0 +1,27 @@ +Package generated_from_acme_yang { + Type String + Type TODO_RESOLVE_REFERENCED + Use "acme.yang" as SOURCE_MAPPING + Structure system ( + system___host_name host_name, + string_collection domain_search, + system___login login + ) + Type system___host_name + Type string + Collection string_collection of string + Structure system___login ( + login___message message, + login___user_collection user + ) + Type login___message + Structure login___user ( + user___name ^name, + user___full_name full_name, + user___class class + ) + Type user___name + Type user___full_name + Type user___class + Collection login___user_collection of login___user +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/example.yang b/demo-mts91/src/samples/simple/example.yang new file mode 100644 index 0000000000000000000000000000000000000000..d667828fa284eabb7153c74c539e12e959b6e2aa --- /dev/null +++ b/demo-mts91/src/samples/simple/example.yang @@ -0,0 +1,36 @@ +module example-module { + namespace "opendaylight.org/example-module"; + prefix "example"; + + container parent-container { + container child-container { + list parent-ordered-list { + ordered-by user; + + key "parent-key-leaf"; + + leaf parent-key-leaf { + type string; + } + + leaf parent-ordinary-leaf { + type string; + } + + list child-ordered-list { + ordered-by user; + + key "child-key-leaf"; + + leaf child-key-leaf { + type string; + } + + leaf child-ordinary-leaf { + type string; + } + } + } + } + } +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/example.yang.tdltx b/demo-mts91/src/samples/simple/example.yang.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..c53a018db00c0a6f86d616605ab423b05eb81b26 --- /dev/null +++ b/demo-mts91/src/samples/simple/example.yang.tdltx @@ -0,0 +1,26 @@ +Package generated_from_example_yang { + Type String + Type TODO_RESOLVE_REFERENCED + Use "example.yang" as SOURCE_MAPPING + Structure parent_container ( + parent_container___child_container child_container + ) + Structure parent_container___child_container ( + child_container___parent_ordered_list_collection parent_ordered_list + ) + Structure child_container___parent_ordered_list ( + parent_ordered_list___parent_key_leaf parent_key_leaf, + parent_ordered_list___parent_ordinary_leaf parent_ordinary_leaf, + parent_ordered_list___child_ordered_list_collection child_ordered_list + ) + Type parent_ordered_list___parent_key_leaf + Type parent_ordered_list___parent_ordinary_leaf + Structure parent_ordered_list___child_ordered_list ( + child_ordered_list___child_key_leaf child_key_leaf, + child_ordered_list___child_ordinary_leaf child_ordinary_leaf + ) + Type child_ordered_list___child_key_leaf + Type child_ordered_list___child_ordinary_leaf + Collection parent_ordered_list___child_ordered_list_collection of parent_ordered_list___child_ordered_list + Collection child_container___parent_ordered_list_collection of child_container___parent_ordered_list +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/links.yang b/demo-mts91/src/samples/simple/links.yang new file mode 100644 index 0000000000000000000000000000000000000000..8a63709468c7962507b43b082b4a06ca4f6c2f73 --- /dev/null +++ b/demo-mts91/src/samples/simple/links.yang @@ -0,0 +1,111 @@ +module links { + namespace "http://example.com/ns/link"; + prefix link; + + import ietf-yang-types { + prefix yang; + } + + + grouping LinkFlagsType { + leaf UP { + type empty; + } + leaf NOARP { + type empty; + } + leaf BROADCAST { + type empty; + } + leaf MULTICAST { + type empty; + } + leaf LOOPBACK { + type empty; + } + leaf NOTRAILERS { + type empty; + } + } + + typedef QueueDisciplineType { + type enumeration { + enum pfifo_fast; + enum noqueue; + enum noop; + enum htb; + } + } + container config { + container links { + list link { + key name; + unique addr; + max-elements 1024; + leaf name { + type string; + } + container flags { + uses LinkFlagsType; + } + leaf addr { + type yang:mac-address; + mandatory true; + } + leaf brd { + type yang:mac-address; + mandatory true; + } + leaf mtu { + type uint32; + default 1500; + } + } + } + container queueDisciplines { + list queueDiscipline { + key linkName; + max-elements 1024; + leaf linkName { + type leafref { + path "/config/links/link/name"; + } + } + leaf type { + type QueueDisciplineType; + mandatory true; + } + leaf length { + type uint32; + } + } + } + container linkLimitations { + list linkLimitation { + key linkName; + leaf linkName { + type leafref { + path "/config/links/link/name"; + } + } + container limitations { + leaf only10Mbps { + type boolean; + default false; + } + leaf onlyHalfDuplex { + type boolean; + default false; + } + } + } + } + container defaultLink { + leaf linkName { + type leafref { + path "/config/links/link/name"; + } + } + } + } +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/links.yang.tdltx b/demo-mts91/src/samples/simple/links.yang.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..d92705d8472cf48cb28ac7db4f2b8388e6b1021e --- /dev/null +++ b/demo-mts91/src/samples/simple/links.yang.tdltx @@ -0,0 +1,66 @@ +Package generated_from_links_yang { + Type String + Type TODO_RESOLVE_REFERENCED + Use "links.yang" as SOURCE_MAPPING + Structure config ( + config___link_collection links, + config___queueDiscipline_collection queueDisciplines, + config___linkLimitation_collection linkLimitations, + config___defaultLink defaultLink + ) + Structure config___link ( + link___name ^name, + link___flags flags, + link___addr addr, + link___brd brd, + link___mtu mtu + ) + Type link___name + Structure link___flags ( + flags___UP UP, + flags___NOARP NOARP, + flags___BROADCAST BROADCAST, + flags___MULTICAST MULTICAST, + flags___LOOPBACK LOOPBACK, + flags___NOTRAILERS NOTRAILERS + ) + Type flags___UP + Type flags___NOARP + Type flags___BROADCAST + Type flags___MULTICAST + Type flags___LOOPBACK + Type flags___NOTRAILERS + Type link___addr extends string + Type string + Type link___brd extends string + Type link___mtu extends uint32 + Type uint32 + Collection config___link_collection of config___link + Structure config___queueDiscipline ( + queueDiscipline___linkName linkName, + queueDiscipline___type ^type, + queueDiscipline___length length + ) + Type queueDiscipline___linkName + Type queueDiscipline___type extends enumeration + Type enumeration + Type queueDiscipline___length + Collection config___queueDiscipline_collection of config___queueDiscipline + Structure config___linkLimitation ( + linkLimitation___linkName linkName, + linkLimitation___limitations limitations + ) + Type linkLimitation___linkName + Structure linkLimitation___limitations ( + limitations___only10Mbps only10Mbps, + limitations___onlyHalfDuplex onlyHalfDuplex + ) + Type limitations___only10Mbps extends boolean + Type boolean + Type limitations___onlyHalfDuplex extends boolean + Collection config___linkLimitation_collection of config___linkLimitation + Structure config___defaultLink ( + defaultLink___linkName linkName + ) + Type defaultLink___linkName +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/sports.yang b/demo-mts91/src/samples/simple/sports.yang new file mode 100644 index 0000000000000000000000000000000000000000..53c5dc6536bf62fe2bbb82de995084f0ed139ad0 --- /dev/null +++ b/demo-mts91/src/samples/simple/sports.yang @@ -0,0 +1,173 @@ +module example-sports { + + namespace "http://example.com/example-sports"; + prefix sports; + + import ietf-yang-types { + prefix yang; + } + + typedef season { + type string; + description + "The name of a sports season, including the type and the year, e.g, + 'Champions League 2014/2015'."; + } + + container sports { + config true; + + list person { + key "name"; + leaf name { + type string; + } + leaf birthday { + type yang:date-and-time; + mandatory true; + } + } + + list team { + key "name"; + leaf name { + type string; + } + list player { + key "name season"; + unique number; + leaf name { + type leafref { + path "/sports/person/name"; + } + } + leaf season { + type season; + } + leaf number { + type uint16; + mandatory true; + } + leaf scores { + type uint16; + default 0; + } + leaf-list score-list { + type uint16; + } + } + leaf protocol { + type enumeration { + enum tcp; + enum udp; + enum icmp; + } + default "tcp"; + } + } + list protocol { + key "associated-layer-protocol"; + leaf associated-layer-protocol { + type string; + + description + "One of the values of the attribute layerProtocol of the Cpd + IE."; + reference + "GS NFV IFA011: Section 7.1.6.8 CpProtocolData information + element"; + } + uses g1; + uses g2; + } + } + grouping g1 { + leaf protocoly { + type enumeration { + enum tcp; + enum udp; + enum icmp; + } + default "tcp"; + } + list ext-cpd { + key "k"; + leaf k { + type string; + } + choice cp-connection { + // no case + leaf int-virtual-link-desc { + type string; + } + container int-cpd { + leaf vdu-id { + type string; + } + leaf cpd { + type string; + } + } + } + } + list case-ext-cpd { + key "k"; + leaf k { + type string; + } + choice cp-connection { + // case + case a { + leaf int-virtual-link-desc { + type string; + } + } + case b { + + container int-cpd { + leaf vdu-id { + type string; + } + leaf cpd { + type string; + } + } + } + } + } + + } + grouping g2 { + leaf protocolz { + type string; + } + list port-map { + key "port-ref"; + leaf port-ref { + type string; + } + choice map-type { + // no case + container static-filtering-entries { + leaf control-element { + type enumeration { + enum forward; + enum filter; + } + } + leaf connection-identifier { + type string; + } + } + container static-vlan-registration-entries { + leaf registrar-admin-control { + type enumeration { + enum fixed-new-ignored; + enum forbidden; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/sports.yang-generated.tdltx b/demo-mts91/src/samples/simple/sports.yang-generated.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..f29d3495295256ab173c255776a91d6c760270c5 --- /dev/null +++ b/demo-mts91/src/samples/simple/sports.yang-generated.tdltx @@ -0,0 +1,119 @@ +Package generated_from_sports_yang { + Type String + Type TODO_RESOLVE_REFERENCED + Use "sports.yang" as SOURCE_MAPPING + Import all from HTTP.MessageBased + Structure sports extends Body ( + sports___person_collection person, + sports___team_collection team, + sports___protocol_collection protocol + ) + Structure sports___person ( + string ^name, + date_and_time birthday + ) + Type string + Type date_and_time extends string + Collection sports___person_collection of sports___person + Structure sports___team ( + string ^name, + team___player_collection player, + protocol protocol + ) + Structure team___player ( + @LeafRefPath : "/sports/person/name" + leafref ^name, + season season, + uint16 number, + scores scores, + uint16_collection score_list + ) + Type leafref + Annotation LeafRefPath + Type season extends string + Type uint16 + Type scores extends uint16 + Collection uint16_collection of uint16 + Collection team___player_collection of team___player + Enumerated protocol { + tcp, + udp, + icmp + } + Collection sports___team_collection of sports___team + Structure sports___protocol ( + string associated_layer_protocol, + protocoly protocoly, + protocol___ext_cpd_collection ext_cpd, + protocol___case_ext_cpd_collection case_ext_cpd, + string protocolz, + protocol___port_map_collection port_map + ) + Enumerated protocoly { + protocoly tcp, + protocoly udp, + protocoly icmp + } + Structure protocol___ext_cpd ( + string k, + ext_cpd___cp_connection cp_connection + ) + Structure ext_cpd___cp_connection ( + cp_connection___int_virtual_link_desc int_virtual_link_desc, + cp_connection___int_cpd int_cpd + ) + Structure cp_connection___int_virtual_link_desc ( + string int_virtual_link_desc + ) + Structure cp_connection___int_cpd ( + int_cpd___int_cpd int_cpd + ) + Structure int_cpd___int_cpd ( + string vdu_id, + string cpd + ) + Collection protocol___ext_cpd_collection of protocol___ext_cpd + Structure protocol___case_ext_cpd ( + string k, + case_ext_cpd___cp_connection cp_connection + ) + Structure case_ext_cpd___cp_connection ( + cp_connection___a ^a, + cp_connection___b b + ) + Structure cp_connection___a ( + string int_virtual_link_desc + ) + Structure cp_connection___b ( + b___int_cpd int_cpd + ) + Structure b___int_cpd ( + string vdu_id, + string cpd + ) + Collection protocol___case_ext_cpd_collection of protocol___case_ext_cpd + Structure protocol___port_map ( + string port_ref, + port_map___map_type map_type + ) + Structure port_map___map_type ( + map_type___static_filtering_entries static_filtering_entries, + map_type___static_vlan_registration_entries static_vlan_registration_entries + ) + Structure map_type___static_filtering_entries ( + static_filtering_entries___static_filtering_entries static_filtering_entries + ) + Structure static_filtering_entries___static_filtering_entries ( + enumeration control_element, + string connection_identifier + ) + Type enumeration + Structure map_type___static_vlan_registration_entries ( + static_vlan_registration_entries___static_vlan_registration_entries static_vlan_registration_entries + ) + Structure static_vlan_registration_entries___static_vlan_registration_entries ( + enumeration registrar_admin_control + ) + Collection protocol___port_map_collection of protocol___port_map + Collection sports___protocol_collection of sports___protocol +} \ No newline at end of file diff --git a/demo-mts91/src/samples/simple/sports.yang.tdltx b/demo-mts91/src/samples/simple/sports.yang.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..e371cba09475a937f4f42301a2951c4108fac5b0 --- /dev/null +++ b/demo-mts91/src/samples/simple/sports.yang.tdltx @@ -0,0 +1,118 @@ +Package generated_from_sports_yang { + Type String + Type TODO_RESOLVE_REFERENCED + Use "sports.yang" as SOURCE_MAPPING + Structure sports ( + sports___person_collection person, + sports___team_collection team, + sports___protocol_collection protocol + ) + Structure sports___person ( + string ^name, + date_and_time birthday + ) + Type string + Type date_and_time extends string + Collection sports___person_collection of sports___person + Structure sports___team ( + string ^name, + team___player_collection player, + protocol protocol + ) + Structure team___player ( + @LeafRefPath : "/sports/person/name" + leafref ^name, + season season, + uint16 number, + scores scores, + uint16_collection score_list + ) + Type leafref + Annotation LeafRefPath + Type season extends string + Type uint16 + Type scores extends uint16 + Collection uint16_collection of uint16 + Collection team___player_collection of team___player + Enumerated protocol { + protocol tcp, + protocol udp, + protocol icmp + } + Collection sports___team_collection of sports___team + Structure sports___protocol ( + string associated_layer_protocol, + protocoly protocoly, + protocol___ext_cpd_collection ext_cpd, + protocol___case_ext_cpd_collection case_ext_cpd, + string protocolz, + protocol___port_map_collection port_map + ) + Enumerated protocoly { + protocoly tcp, + protocoly udp, + protocoly icmp + } + Structure protocol___ext_cpd ( + string k, + ext_cpd___cp_connection cp_connection + ) + Structure ext_cpd___cp_connection ( + cp_connection___int_virtual_link_desc int_virtual_link_desc, + cp_connection___int_cpd int_cpd + ) + Structure cp_connection___int_virtual_link_desc ( + string int_virtual_link_desc + ) + Structure cp_connection___int_cpd ( + int_cpd___int_cpd int_cpd + ) + Structure int_cpd___int_cpd ( + string vdu_id, + string cpd + ) + Collection protocol___ext_cpd_collection of protocol___ext_cpd + Structure protocol___case_ext_cpd ( + string k, + case_ext_cpd___cp_connection cp_connection + ) + Structure case_ext_cpd___cp_connection ( + cp_connection___a ^a, + cp_connection___b b + ) + Structure cp_connection___a ( + string int_virtual_link_desc + ) + Structure cp_connection___b ( + b___int_cpd int_cpd + ) + Structure b___int_cpd ( + string vdu_id, + string cpd + ) + Collection protocol___case_ext_cpd_collection of protocol___case_ext_cpd + Structure protocol___port_map ( + string port_ref, + port_map___map_type map_type + ) + Structure port_map___map_type ( + map_type___static_filtering_entries static_filtering_entries, + map_type___static_vlan_registration_entries static_vlan_registration_entries + ) + Structure map_type___static_filtering_entries ( + static_filtering_entries___static_filtering_entries static_filtering_entries + ) + Structure static_filtering_entries___static_filtering_entries ( + enumeration control_element, + string connection_identifier + ) + Type enumeration + Structure map_type___static_vlan_registration_entries ( + static_vlan_registration_entries___static_vlan_registration_entries static_vlan_registration_entries + ) + Structure static_vlan_registration_entries___static_vlan_registration_entries ( + enumeration registrar_admin_control + ) + Collection protocol___port_map_collection of protocol___port_map + Collection sports___protocol_collection of sports___protocol +} \ No newline at end of file diff --git a/demo-mts91/src/tdl/HTTP.tdltx b/demo-mts91/src/tdl/HTTP.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..b1a4f2f0302a374641989f934db04e6e73cee91d --- /dev/null +++ b/demo-mts91/src/tdl/HTTP.tdltx @@ -0,0 +1,126 @@ +Package HTTP { + Package MessageBasedConfiguration { + Import all from MessageBased + Message Gate HTTPGate accepts Request,Response + Component API { + //Add variables and timers here or define new component types and configurations + gate HTTPGate http + } + Configuration BasicClientServer { + API client as Tester, + API server as SUT, + connect client::http to server::http + } + + } Note : "Message based types and instances" + + Package MessageBased { + Import all from Standard + + //Generic Method type -> required for generation!!! + Enumerated Method { + Method GET, + Method POST, + Method PUT, + Method PATCH, + Method DELETE + } + + //Generic Request type + Structure Request ( + String uri, + optional Method method, + optional Headers headers, + optional Parameters parameters, + optional Body body + ) + + //Generic Request instances + Request GET ( ) + Request POST ( ) + Request PUT ( ) + Request PATCH ( ) + Request DELETE ( ) + + //Generic Response type + Structure Response ( + optional Integer status, + optional String statusMessage, + optional Headers headers, + optional Body body + ) + + //Generic Response instances, name = status code + + Response r200 (statusMessage = "OK") + Response r201 (statusMessage = "Created") + Response r204 (statusMessage = "No Content") + Response r400 (statusMessage = "Bad Request") + Response r401 (statusMessage = "Not Found") + Response r403 (statusMessage = "Not Authorized") + Response r404 (statusMessage = "Forbidden") + + //Generic Response instances, name = status message + Response OK (status = "200") + Response Created (status = "201") + Response NoContent (status = "204") + Response BadRequest (status = "400") + Response NotFound (status = "404") + Response NotAuthorized (status = "401") + Response Forbidden (status = "403") + + //supporting types + Collection Parameters of Parameter + Structure Parameter ( + Location location, + String ^name, + String ^value + ) + Type Location + Location path + Location query + + //may need a structure, not necessarily relevant in standardized testing + Location cookie + + //separate headers -> not necessary + //Location header; + Collection Headers of Header + Structure Header ( + String ^name, + String ^value + //not relevant in TDL? + //optional contentLength of type Integer, + //optional contentType of type String + ) + + //Base body for extension + Structure Body ( ) + + //Basic string body + Structure StringBody extends Body ( + String text + ) + + //Basic wrapper for collection responses + Structure CollectionBody extends Body ( + Bodies items + ) + + //Any body can be included + //If consistent type is needed, a custom subtype shall be defined and used + Collection Bodies of Body + + //Custom collection data instances can be defined + // - inline in the responses + // - predefined as a separate data element + //Custom collection data instances can be defined + //to enforce type consistency specific for API + + //Basic form body + Structure FormBody extends Body ( + String field, + String content + ) + } +} \ No newline at end of file diff --git a/demo-mts91/src/tdl/Main.tdltx b/demo-mts91/src/tdl/Main.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..8a109bc4c72eb6815108a36984567e123256f4d4 --- /dev/null +++ b/demo-mts91/src/tdl/Main.tdltx @@ -0,0 +1,102 @@ +/* + * This is an example package + */ +Package Main { + Import all from Standard + Import all from HTTP + Import all from HTTP.MessageBased + //import data types + Import all from generated_from_sports_yang + //TODO: import from library bundle (not integrated yet) + + //define additional elements here + + //create or import sample configuration + Configuration tc { + ct sut as SUT, + ct tester as Tester, + connect sut=sut::g to tester=tester::g + } + Message Gate gt accepts sports, String, Response, Request + Component ct { + gate gt g + } + + //define sample objective + Objective to1 { + Description: "Get check sports" + References: "..." + } + + //define sample instance + sports basketball( + person = [ + ( + name = "Jim Tall" + ), + ( + name = "John Short" + ) + ] + ) + + //predefined annotaiton (will be part of standard library) + Annotation PICS + + //define PICS values as boolean instances + Boolean P1 + //..potentially annotated? + @PICS Boolean P2 + + //alternatively use dedicated value? + Type ^PICS extends Boolean + ^PICS P1p + + //define sample test description + Test Purpose Description tpd1 { + Objective: to1 + Configuration: tc + //define PICS as guard - might be changed to dedicated property + PICS: ( P1 or P1p ) + Expected behaviour + ensure that { + when { + tester sends basketball() to sut + tester sends basketball( + person = [ + ( + name = "Jim Normal", + birthday = "24.01.2001" + ) + ] + ) to sut + tester sends basketball( + person[1].name = "Jim Normal", + person[1].birthday = "24.01.2001" + ) to sut + //wrap everything in a request + //meeds the target type to extend Body + //-> import from HTTP.MessageBased + tester sends Request( + uri = "my.sports.club/sports", + body = basketball( + //... + ) + ) to sut + tester sends Request( + //!skip comments from generated output + //!TODO: work with extensions + //!body.person[1].name = "Peter Tall" + body = basketball( + person[1].name = "Jim Normal" + ) + ) to sut + } + then { + tester receives OK() from sut + } + } + } + + +} diff --git a/demo-mts91/src/tdl/Main.tdltx.docx b/demo-mts91/src/tdl/Main.tdltx.docx new file mode 100644 index 0000000000000000000000000000000000000000..a8afa415c6bb6236f2e5fd44326144401f07cf64 Binary files /dev/null and b/demo-mts91/src/tdl/Main.tdltx.docx differ diff --git a/demo-mts91/src/tdl/Standard.tdltx b/demo-mts91/src/tdl/Standard.tdltx new file mode 100644 index 0000000000000000000000000000000000000000..9af8d103a1d6978b245383e27b367805df797040 --- /dev/null +++ b/demo-mts91/src/tdl/Standard.tdltx @@ -0,0 +1,56 @@ +Package Standard { + //TODO: extract to standard library + Constraint length + Constraint minLength + Constraint maxLength + Constraint range + Constraint format + Constraint union + Constraint uniontype + + Type Boolean + Type Integer + Type String + Type Verdict + + //TODO: these do not work at present -> literal values take precedence? +// Boolean true +// Boolean false + Boolean True + Boolean False + + Verdict pass + Verdict fail + Verdict inconclusive + + Time second + + Annotation Master + Annotation MappingName + + //standard annotations for STO + Annotation Initial conditions + Annotation Expected behaviour + Annotation Final conditions + Annotation Test Purpose Description + Annotation when + Annotation then + + Predefined == returns Boolean + Predefined != returns Boolean + Predefined and returns Boolean + Predefined or returns Boolean + Predefined xor returns Boolean + Predefined not returns Boolean + Predefined < returns Boolean + Predefined > returns Boolean + Predefined <= returns Boolean + Predefined >= returns Boolean + Predefined + + Predefined - + Predefined * + Predefined / + Predefined mod + Predefined size returns Integer + +} \ No newline at end of file