From: demx8as6 Date: Sun, 8 Sep 2019 10:38:18 +0000 (+0200) Subject: Analyse 3GPP Network Resource Model X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F12%2F912%2F1;p=oam.git Analyse 3GPP Network Resource Model The yang modules form TS 28.541 v16.1.0 were extracted and provided for further analysis. Issue-ID: OAM-009 Change-Id: Ib1a105b5fb0480ac91c33bfbfd2721f63213f992 Signed-off-by: demx8as6 --- diff --git a/model/yang/3gpp/README.md b/model/yang/3gpp/README.md new file mode 100644 index 0000000..56fdab3 --- /dev/null +++ b/model/yang/3gpp/README.md @@ -0,0 +1,5 @@ +# 3GPP + +This folder contains YANG modules as defined by [3GPP](https://3gpp.org). + +O-RAN-SC wants to be alinged with 3GPP modules, therefore 3GPP Yang modules will be referenced by O-RAN-SC yang modules. diff --git a/model/yang/3gpp/ts-28.541/README.md b/model/yang/3gpp/ts-28.541/README.md new file mode 100644 index 0000000..0e07958 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/README.md @@ -0,0 +1,5 @@ +# 3GPP TS 28.541 Network Resource Model + +This folder contains YANG modules extracted from [3GPP TS 28.541](https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3400). + +O-RAN-SC wants to be alinged with 3GPP modules, therefore 3GPP Yang modules will be referenced by O-RAN-SC yang modules. diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/EP_RP.yang b/model/yang/3gpp/ts-28.541/v16.1.0/EP_RP.yang new file mode 100644 index 0000000..5671035 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/EP_RP.yang @@ -0,0 +1,300 @@ +module EP_RP { + namespace "urn:3gpp:tsg:sa5:nrm:EP_RP"; + prefix "ep-rp"; + + import Top { prefix top; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } +import VsDataContainer {prefix vsData; revision-date "2018-12-18"; } + description "common/basic MF class to be inherited/reused by other child MF classes "; + + revision 2018-07-31 { + description "Initial revision"; + } + + grouping local-address { + leaf ip_address { + type inet:ip-address; + } + leaf vlan_id { + type uint16; + } + } + + grouping EP_RP { + description ""; + uses top:Top; + leaf id { + description ""; + mandatory "true"; + type nrm-type:t_dn; + } + leaf userLabel { + description ""; + mandatory "false"; + type string; + } + leaf farEndEntity { + mandatory "false"; + type nrm-type:t_dn; + } + list vsDataContainer { + min-elements "0"; + uses vsData:VsDataContainer; + } + } + + grouping EP_XX { + description "as all EPs defined in NGRAN and 5GC have same attributes, define a common EP for all endpoints for reusing"; + uses EP_RP; + container localAddress { + presence "true"; + description ""; + uses local-address; + } + leaf remoteAddress { + description ""; + mandatory "false"; + type inet:ip-address; + } + } + + grouping EP_E1 { + description ""; + uses EP_XX; + } + + grouping EP_F1C { + description ""; + uses EP_XX; + } + + grouping EP_F1U { + description ""; + uses EP_XX; + } + + grouping EP_XnC { + description ""; + uses EP_XX; + } + + grouping EP_XnU { + description ""; + uses EP_XX; + } + + grouping EP_NgC { + description ""; + uses EP_XX; + } + + grouping EP_NgU { + description ""; + uses EP_XX; + } + + grouping EP_X2C { + description ""; + uses EP_XX; + } + + grouping EP_X2U { + description ""; + uses EP_XX; + } + + grouping EP_S1U { + description ""; + uses EP_XX; + } + + grouping EP_N2 { + description ""; + uses EP_XX; + } + + grouping EP_N3 { + description ""; + uses EP_XX; + } + + grouping EP_N4 { + description ""; + uses EP_XX; + } + + grouping EP_N5 { + description ""; + uses EP_XX; + } + + grouping EP_N6 { + description ""; + uses EP_XX; + } + + grouping EP_N7 { + description ""; + uses EP_XX; + } + + grouping EP_N8 { + description ""; + uses EP_XX; + } + + grouping EP_N9 { + description ""; + uses EP_XX; + } + + grouping EP_N10 { + description ""; + uses EP_XX; + } + + grouping EP_N11 { + description ""; + uses EP_XX; + } + + grouping EP_N12 { + description ""; + uses EP_XX; + } + + grouping EP_N13 { + description ""; + uses EP_XX; + } + + grouping EP_N14 { + description ""; + uses EP_XX; + } + + grouping EP_N15 { + description ""; + uses EP_XX; + } + + grouping EP_N16 { + description ""; + uses EP_XX; + } + + grouping EP_N17 { + description ""; + uses EP_XX; + } + + grouping EP_N20 { + description ""; + uses EP_XX; + } + + grouping EP_N21 { + description ""; + uses EP_XX; + } + + grouping EP_N22 { + description ""; + uses EP_XX; + } + + grouping EP_N26 { + description ""; + uses EP_XX; + } + + grouping EP_S5C { + description ""; + uses EP_XX; + } + + grouping EP_S5U { + description ""; + uses EP_XX; + } + + grouping EP_Rx { + description ""; + uses EP_XX; + } + + grouping EP_MAP_SMSC { + description ""; + uses EP_XX; + } + + grouping EP_NLS { + description ""; + uses EP_XX; + } + + grouping EP_NLG { + description ""; + uses EP_XX; + } + + grouping EP_N27 { + description ""; + uses EP_XX; + } + + grouping EP_N31 { + description ""; + uses EP_XX; + } + + grouping EP_N32 { + description ""; + uses EP_XX; + } + + grouping EP_SBI_X { + description "It's used for the services consumed by the contol plane function. Far entity and remoteAdress are requied for this endpoint"; + uses EP_XX; + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + } + } + + grouping EP_SBI_IPX { + description "It's used for the SEPP services consumed by the contol plane function. Far entity and remoteAdress are requied for this endpoint"; + uses EP_XX; + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + } + } + + grouping sAP { + leaf dn { + type inet:domain-name; + } + leaf port { + type uint16; + } + } + + grouping EP_NBI_X { + description "The service access point of the control plane function. It's used for the services (including SEPP service) provided by the contol plane function. Far entity and remoteAdress are uncessary for this endpoint "; + uses EP_RP; + container localSAP { + presence "true"; + description ""; + uses sAP; + } + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ManagedElement.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ManagedElement.yang new file mode 100644 index 0000000..36d27e4 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ManagedElement.yang @@ -0,0 +1,73 @@ +module ManagedElement { + namespace "urn:3gpp:tsg:sa5:nrm:ManagedElement"; + prefix "me"; + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import Top { prefix top; revision-date "2018-07-31"; } +import VsDataContainer {prefix vsData; revision-date "2018-12-18"; } + organization "3gpp SA5"; + description "define basic ManagedElement which will be augmented by other IOCs"; + + revision 2018-07-31 { + description "Initial revision"; + } + + grouping ManagedElement { + uses top:Top; + leaf id { + mandatory "true"; + config "false"; + description ""; + type nrm-type:t_dn; + } + leaf vendorName { + mandatory "true"; + config "false"; + description ""; + type string; + } + leaf userDefinedState { + mandatory "true"; + config "true"; + description ""; + type string; + } + leaf swVersion { + mandatory "true"; + config "false"; + description ""; + type string; + } + leaf dnPrefix { + mandatory "true"; + config "false"; + description ""; + type string; + } + leaf userLabel { + description ""; + mandatory "true"; + config "true"; + type string; + } + leaf locationName { + mandatory "true"; + config "false"; + type string; + } + leaf-list managedBy { + description ""; + config "false"; + type nrm-type:t_dn; + } + leaf-list managedElementTypeList { + min-elements "1"; + config "false"; + description ""; + type string; + } + list vsDataContainer { + min-elements "0"; + uses vsData:VsDataContainer; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ManagedFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ManagedFunction.yang new file mode 100644 index 0000000..e894b73 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ManagedFunction.yang @@ -0,0 +1,107 @@ +module ManagedFunction { + namespace "urn:3gpp:tsg:sa5:nrm:ManagedFunction"; + prefix "mf"; + import Top { prefix top; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } +import VsDataContainer {prefix vsData; revision-date "2018-12-18"; } + description "common/basic MF class to be inherited/reused by other child MF classes "; + + revision 2018-07-31 { + description "Initial revision"; + } + + grouping ManagedFunction { + description ""; + + uses top:Top; + leaf id { + description ""; + mandatory "true"; + config "false"; + type nrm-type:t_dn; + } + leaf userLabel { + mandatory "false"; + config "true"; + type string; + } + container vnfParametersList { + description "It shall be supported if the MF instance is realized by one or more VNF instance(s). Otherwise this attribute shall be absent "; + leaf vnfInstanceId { + mandatory "true"; + type string; + } + leaf vnfdId { + type string; + } + leaf flavourId { + description "Identifier of the VNF Deployment Flavour applied to this VNF instance"; + reference "clause 9.4.3 of ETSI GS NFV-IFA 008 "; + type string; + } + leaf autoScalable { + description "Indicator of whether the auto-scaling of this VNF instance is enabled or disabled. The type is Boolean"; + type boolean; + } + } + container peeParametersList { + description "It shall be supported if the control and monitoring of PEE parameters is supported by the ManagedFunction or sub-class instance."; + leaf siteIdentification { + mandatory "true"; + description "The identification of the site where the ManagedFunction resides."; + type string; + } + leaf siteLatitude { + description "The latitude of the site where the ManagedFunction instance resides, based on World Geodetic System (1984 version) global referenceframe (WGS 84). Positive values correspond to the northern hemisphere. This attribute is optional in case of BTSFunction and RNCFunction instance(s). allowedValues: -90.0000 to +90.0000 "; + when "contains(../../objectClass,'BTSFunction') or contains(../../objectClass,'RNCFunction')"; + type decimal64 { + fraction-digits 4; + range "-90.0000 .. 90.0000"; + } + } + leaf siteLongitude { + description "The longitude of the site where the ManagedFunction instance resides, based on World Geodetic System (1984 version) global reference frame (WGS 84). Positive values correspond to degrees east of 0 degrees longitude. This attribute is optional in case of BTSFunction and RNCFunction instance(s). allowedValues: -180.0000to +180.0000 "; + when "contains(../../objectClass,'BTSFunction') or contains(../../objectClass,'RNCFunction')"; + type decimal64 { + fraction-digits 4; + range "-180.0000 .. 180.0000"; + } + } + leaf siteDescription { + mandatory "true"; + description "An operator defined description of the site where the ManagedFunction instance resides."; + type string; + } + leaf equipmentType { + mandatory "true"; + description "The type of equipment where the managedFunction instance resides. allowedValues: see clause 4.4.1 of ETSI ES 202 336-12 [18]. "; + type enumeration { + enum RRU; + enum BBU; + enum Wide-area-BS-cabinet; + enum Medium-range-BS; + } + } + leaf environmentType { + mandatory "true"; + description "The type of environment where the managedFunction instance resides. allowedValues: see clause 4.4.1 of ETSI ES 202 336-12 [18]. "; + type enumeration { + enum Indoor; + enum Outdoor; + } + } + leaf powerInterface { + mandatory "true"; + description "The type of power. allowedValues: see clause 4.4.1 of ETSI ES202 336-12 [18]. "; + type enumeration { + enum AC; + enum DC; + } + } + } + list vsDataContainer { + min-elements "0"; + uses vsData:VsDataContainer; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ManagementNode.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ManagementNode.yang new file mode 100644 index 0000000..a556973 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ManagementNode.yang @@ -0,0 +1,60 @@ +module ManagementNode { + namespace "urn:3gpp:tsg:sa5:nrm:ManagedElement"; + prefix "managementNode"; + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import Top { prefix top; revision-date "2018-07-31"; } + import VsDataContainer {prefix vsData; revision-date "2018-12-18"; } + organization "3gpp SA5"; + + revision 2018-12-18 { + description "15.1.0"; + } + + container ManagementNode { + uses top:Top; + leaf id { + mandatory "true"; + config "false"; + description ""; + type nrm-type:t_dn; + } + leaf userLabel { + description ""; + mandatory "true"; + config "true"; + type string; + } + leaf-list managedElements { + description ""; + config "false"; + type nrm-type:t_dn; + } + leaf vendorName { + mandatory "true"; + config "false"; + description ""; + type string; + } + leaf locationName { + mandatory "true"; + config "false"; + type string; + } + leaf userDefinedState { + mandatory "true"; + config "true"; + description ""; + type string; + } + leaf swVersion { + mandatory "true"; + config "false"; + description ""; + type string; + } + list vsDataContainer { + min-elements "0"; + uses vsData:VsDataContainer; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/MeContext.yang b/model/yang/3gpp/ts-28.541/v16.1.0/MeContext.yang new file mode 100644 index 0000000..4e33974 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/MeContext.yang @@ -0,0 +1,28 @@ +module MeContext { + namespace "urn:3gpp:tsg:sa5:nrm:MeContext"; + prefix "meContext"; + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import Top { prefix top; revision-date "2018-07-31"; } + organization "3gpp SA5"; + + revision 2018-12-18 { + description "Initial Version"; + } + + container MeContext { + uses top:Top; + leaf id { + mandatory "true"; + config "false"; + description "derived from top_"; + type nrm-type:t_dn; + } + leaf dnPrefix { + mandatory "true"; + config "false"; + description "derived from domain_"; + type string; + } + + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/NFProfile.yang b/model/yang/3gpp/ts-28.541/v16.1.0/NFProfile.yang new file mode 100644 index 0000000..2c52c96 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/NFProfile.yang @@ -0,0 +1,347 @@ +submodule NFProfile { + + belongs-to ngc { prefix ngc; } + + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + revision 2018-08-08 { + description "Initial revision"; + } + + + grouping UdrInfo { + leaf groupId { + type string; + } + + list supiRange { + key "start end pattern"; + uses nrm-type:SupiRange; + } + + + list gpsiRange { + key "start end pattern"; + uses nrm-type:IdentityRange; + } + + list externalGroupIdentifiersRange { + key "start end pattern"; + uses nrm-type:IdentityRange; + } + + leaf-list supportedDataSet { + type nrm-type:DataSetId; + } + + } + + grouping UdmInfo { + leaf groupId { + type string; + } + + list supiRange { + key "start end pattern"; + uses nrm-type:SupiRange; + } + + + list gpsiRange { + key "start end pattern"; + uses nrm-type:IdentityRange; + } + + list externalGroupIdentifiersRange { + key "start end pattern"; + uses nrm-type:IdentityRange; + } + + leaf routingIndicator { + type string; + } + } + + grouping AusfInfo { + leaf groupId { + type string; + } + + list supiRange { + key "start end pattern"; + uses nrm-type:SupiRange; + } + + leaf routingIndicator { + type string; + } + } + + grouping AmfInfo { + leaf amfRegionId { + type string; + } + + leaf amfSetId { + type string; + } + + list guami { + //FFS to use embedded identifier + key k_id; + leaf k_id { + type string; + } + uses nrm-type:Guami; + } + + list tai { + //FFS to use embedded identifier + key k_id; + leaf k_id { + type string; + } + uses nrm-type:Tai; + } + + list backupInfoAmfFailure { + //FFS to use embedded identifier + key k_id; + leaf k_id { + type string; + } + uses nrm-type:Guami; + } + + list backupInfoAmfRemoval { + //FFS to use embedded identifier + key k_id; + leaf k_id { + type string; + } + uses nrm-type:Guami; + } + + } + + grouping SmfInfo { + leaf-list dnn { + type nrm-type:t_Dnn; + } + + list tai { + //FFS to use embedded identifier + key k_id; + leaf k_id { + type string; + } + uses nrm-type:Tai; + } + + leaf pgwFqdn { + type inet:domain-name; + } + } + + grouping UpfInfo { + list sNssaiUpfInfo { + key sNssai; + uses nrm-type:SnssaiUpfInfoItem; + } + + leaf smfServingArea { + type string; + } + + list interfaceUpfInfo { + //FFS to use "choiced" identifier + key k_id; + leaf k_id { + type string; + } + //key "interfaceType address"; + uses nrm-type:InterfaceUpfInfoItem; + } + } + + grouping PcfInfo { + leaf-list dnn { + type nrm-type:t_Dnn; + } + } + + grouping BsfInfo { + list ipv4AddressRange { + key "start end"; + uses nrm-type:Ipv4AddressRange; + } + list ipv6PrefixRange { + key "start end"; + uses nrm-type:Ipv6PrefixRange; + } + } + + + grouping NFService { + + leaf serviceInstanceID { + description ""; + mandatory "true"; + type string; + } + + leaf serviceName { + mandatory "true"; + type string; + } + + container version { uses nrm-type:NFServiceVersion; } + + leaf schema { + mandatory "true"; + type string; + } + + leaf fqdn { + type inet:domain-name; + } + + leaf interPlmnFqdn { + type inet:domain-name; + } + + list ipEndPoint { + //FFS to use "choiced" identifier + key k_id; + leaf k_id { + type string; + } +// key "address port"; + uses nrm-type:ipEndPoint; + } + + leaf apiPrefix { + type string; + } + + list defaultNotificationSubscription { + key notificationType; + uses nrm-type:defaultNotificationSubscription; + } + + list allowedPlmn { + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf-list allowedNfType { + type nrm-type:NFType; + } + + leaf-list allowedDomain { + type string; + } + + leaf-list allowedNssais { + type nrm-type:t_s-NSSAI; + } + + leaf capacity { + type uint8; + } + + leaf load { + type nrm-type:t_Load; + } + + leaf supportedFeatures { + type nrm-type:SupportedFeatures; + } + + } + + grouping NFProfile { + + leaf nfInstanceId { + mandatory "true"; + type string; + } + + leaf nfType { + mandatory "true"; + type nrm-type:NFType; + } + + leaf nfStatus { + mandatory "true"; + type nrm-type:NFStatus; + } + + container plmn { + uses nrm-type:pLMNId; + } + + leaf-list sNssais { + type nrm-type:t_s-NSSAI; + } + + leaf-list nsi { + type string; + } + + leaf fqdn { + type inet:domain-name; + } + + leaf interPlmnFqdn { + type inet:domain-name; + } + + leaf-list ipv4Address { + type inet:ipv4-address; + } + + leaf-list ipv6Address { + type inet:ipv6-address; + } + + leaf-list ipv6Prefix { + type inet:ipv6-prefix; + } + + leaf capacity { + type uint8; + } + + leaf load { + type nrm-type:t_Load; + } + + leaf locality { + type string; + } + + leaf priority { + type uint8; + } + + container udrInfo { uses UdrInfo; } + container udmInfo { uses UdmInfo; } + container ausfInfo { uses AusfInfo; } + container amfInfo { uses AmfInfo; } + container smfInfo { uses SmfInfo; } + container upfInfo { uses UpfInfo; } + container pcfInfo { uses PcfInfo; } + container bsfInfo { uses BsfInfo; } + + list nfService { + min-elements "0"; + description ""; + key serviceInstanceID; + uses NFService; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/NetworkSlice.yang b/model/yang/3gpp/ts-28.541/v16.1.0/NetworkSlice.yang new file mode 100644 index 0000000..cfba59b --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/NetworkSlice.yang @@ -0,0 +1,52 @@ +module NetworkSlice { + namespace "urn:3gpp:tsg:sa5:nrm:NetworkSlice"; + prefix "ns"; + + import SubNetwork { prefix subnet; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + include ServiceProfile; + + + description ""; + + + revision 2018-08-09 { + description "Initial revision"; + } + + container NetworkSlice { + uses subnet:SubNetwork; + + leaf nSSIId { + mandatory "true"; + config "false"; + description ""; + type nrm-type:t_dn; + } + + leaf operationalState { + mandatory "true"; + config "false"; + description ""; + type nrm-type:t_operationalState; + } + + leaf administrativeState { + mandatory "true"; + config "true"; + description ""; + type nrm-type:t_administrativeState; + } + + list serviceProfile { + min-elements "1"; + config "true"; + description ""; + key serviceProfileId; + uses ServiceProfile; + } + + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/NetworkSliceSubnet.yang b/model/yang/3gpp/ts-28.541/v16.1.0/NetworkSliceSubnet.yang new file mode 100644 index 0000000..ec9af6d --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/NetworkSliceSubnet.yang @@ -0,0 +1,68 @@ +module NetworkSliceSubnet { + namespace "urn:3gpp:tsg:sa5:nrm:NetworkSliceSubnet"; + prefix "nss"; + + import SubNetwork { prefix subnet; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + include SliceProfile; + + description ""; + + + revision 2018-08-09 { + description "Initial revision"; + } + + container NetworkSliceSubnet { + uses subnet:SubNetwork; + + leaf-list mFId { + min-elements "0"; + config "false"; + description ""; + type nrm-type:t_dn; + } + + + leaf-list constituentNSSIIdList { + min-elements "0"; + config "false"; + description ""; + type nrm-type:t_dn; + } + + leaf operationalState { + mandatory "true"; + config "false"; + description ""; + type nrm-type:t_operationalState; + } + + leaf administrativeState { + mandatory "true"; + config "true"; + description ""; + type nrm-type:t_administrativeState; + } + + leaf nsInfo { + mandatory "false"; + config "false"; + description ""; + type nrm-type:t_dn; + } + + list sliceProfile { + min-elements "1"; + config "true"; + description ""; + key sliceProfileId; + uses SliceProfile; + } + + + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/README.md b/model/yang/3gpp/ts-28.541/v16.1.0/README.md new file mode 100644 index 0000000..1782d62 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/README.md @@ -0,0 +1,13 @@ +# 3GPP TS 28.541 Network Resource Model V16.1.0 + +This folder contains all YANG modules extracted from [3GPP TS 28.541 V16.1.0](http://www.3gpp.org/ftp//Specs/archive/28_series/28.541/28541-g10.zip). + +O-RAN-SC wants to be alinged with 3GPP modules, therefore 3GPP Yang modules will be referenced by O-RAN-SC yang modules. + +## Validation + +For yang validation the tool [pyang](https://github.com/mbj4668/pyang) could be used. +``` +pyang --strict --path ../../../imports *.yang +``` + diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ServiceProfile.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ServiceProfile.yang new file mode 100644 index 0000000..603dfd4 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ServiceProfile.yang @@ -0,0 +1,94 @@ +submodule ServiceProfile { + + belongs-to NetworkSlice { prefix ns; } + + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import perfReq { prefix perf; revision-date "2018-08-10"; } + + + + revision 2018-08-09 { + description "Initial revision"; + } + + grouping ServiceProfile { + + leaf serviceProfileId { + mandatory "true"; + description ""; + type nrm-type:t_dn; + } + + leaf-list s-NSSAI { + min-elements "1"; + config "true"; + description ""; + type nrm-type:t_s-NSSAI; + } + + list pLMNId { + min-elements "1"; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + container perfReq { + config "true"; + description ""; + uses perf:perfReq; + } + + leaf maxNumberofUEs { + mandatory "false"; + config "true"; + description ""; + type uint64; + } + + leaf-list coverageAreaTA { + min-elements "1"; + config "true"; + description ""; + type nrm-type:t_tAC; + } + + leaf latency { + mandatory "false"; + config "true"; + description ""; + type uint16; + } + + leaf uEMobilityLevel { + mandatory "false"; + config "true"; + description ""; + type nrm-type:t_uEMobilityLevel; + } + + leaf resourceSharingLevel { + mandatory "false"; + config "true"; + description ""; + type nrm-type:t_resourceSharingLevel; + } + + leaf sST { + mandatory "true"; + config "true"; + description ""; + type nrm-type:t_SST; + } + + leaf availability { + mandatory "false"; + config "true"; + description ""; + type decimal64; + } + + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/SliceProfile.yang b/model/yang/3gpp/ts-28.541/v16.1.0/SliceProfile.yang new file mode 100644 index 0000000..f1c5d6d --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/SliceProfile.yang @@ -0,0 +1,79 @@ +submodule SliceProfile { + + belongs-to NetworkSliceSubnet { prefix nss; } + + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import perfReq { prefix perf; revision-date "2018-08-10"; } + + + revision 2018-08-09 { + description "Initial revision"; + } + + grouping SliceProfile { + + leaf sliceProfileId { + mandatory "true"; + description ""; + type nrm-type:t_dn; + } + + leaf-list s-NSSAI { + min-elements "1"; + config "true"; + description ""; + type nrm-type:t_s-NSSAI; + } + + list pLMNId { + min-elements "1"; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + container perfReq { + config "true"; + description ""; + uses perf:perfReq; + } + + leaf maxNumberofUEs { + mandatory "false"; + config "true"; + description ""; + type uint64; + } + + leaf-list coverageAreaTA { + min-elements "1"; + config "true"; + description ""; + type nrm-type:t_tAC; + } + + leaf latency { + mandatory "false"; + config "true"; + description ""; + type uint16; + } + + leaf uEMobilityLevel { + mandatory "false"; + config "true"; + description ""; + type nrm-type:t_uEMobilityLevel; + } + + leaf resourceSharingLevel { + mandatory "false"; + config "true"; + description ""; + type nrm-type:t_resourceSharingLevel; + } + + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/SubNetwork.yang b/model/yang/3gpp/ts-28.541/v16.1.0/SubNetwork.yang new file mode 100644 index 0000000..4c9f631 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/SubNetwork.yang @@ -0,0 +1,60 @@ +module SubNetwork { + namespace "urn:3gpp:tsg:sa5:nrm:SubNetwork"; + prefix "subnet"; + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import Top { prefix top; revision-date "2018-07-31"; } +import VsDataContainer {prefix vsData; revision-date "2018-12-18"; } +organization "3gpp SA5"; + description "define basic SubNetwork which will be augmented by other IOCs"; + + revision 2018-07-31 { + description "Initial revision"; + } + + grouping SubNetwork { + uses top:Top; + leaf id { + mandatory "true"; + config "false"; + description "derived from top_"; + type nrm-type:t_dn; + } + leaf dnPrefix { + mandatory "true"; + config "false"; + description "derived from domain_"; + type string; + } + + leaf userLabel { + description "derived from domain_"; + mandatory "true"; + config "true"; + type string; + } + leaf userDefinedNetworkType { + description "derived from domain_"; + mandatory "true"; + config "true"; + type string; + + } + leaf-list setOfMcc { + min-elements "0"; + description ""; + + config "false"; + type nrm-type:t_mcc; + + } + list vsDataContainer { + min-elements "0"; + uses vsData:VsDataContainer; + } + } + + + container SubNetwork { + uses SubNetwork; + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/Top.yang b/model/yang/3gpp/ts-28.541/v16.1.0/Top.yang new file mode 100644 index 0000000..5a6c290 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/Top.yang @@ -0,0 +1,30 @@ +module Top { + namespace "urn:3gpp:tsg:sa5:nrm:Top"; + prefix "top"; + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + organization "3gpp SA5"; + description "root class to be inherited/reused by other child class including ME, MF, EP, etc."; + reference "28.622"; + + revision 2018-07-31 { + description "Initial revision"; + } + + grouping Top { + leaf objectClass { + mandatory "true"; + config "false"; + description ""; + type string; + } + leaf objectInstance { + mandatory "true"; + config "false"; + description ""; + type nrm-type:t_dn; + } + + + description ""; + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/VsDataContainer.yang b/model/yang/3gpp/ts-28.541/v16.1.0/VsDataContainer.yang new file mode 100644 index 0000000..fd0a8d2 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/VsDataContainer.yang @@ -0,0 +1,37 @@ +module VsDataContainer { + namespace "urn:3gpp:tsg:sa5:nrm::VsDataContainer"; + prefix "vsData"; + import Top { prefix top; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + revision 2018-12-18 { + description "Initial revision"; + } + grouping VsDataContainer { + uses top:Top; + leaf id { + mandatory "true"; + config "false"; + description "derived from top_"; + type nrm-type:t_dn; + } + leaf vsDataType { + mandatory "true"; + config "true"; + description ""; + type string; + } + leaf vsDataFormatVersion { + mandatory "true"; + config "false"; + description ""; + type string; + } + anydata vsData; + list vsDataContainer { + min-elements "0"; + uses VsDataContainer; + } + + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFFunction.yang new file mode 100644 index 0000000..be7ec95 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFFunction.yang @@ -0,0 +1,86 @@ +submodule ngc-AMFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "AMFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping AMFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + container aMFIdentifier { + presence "true"; + config "true"; + description ""; + uses nrm-type:aMFI; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description " "; + type inet:domain-name; + } + + leaf-list sBIService { + description ""; + min-elements "1"; + config "false"; + type string; + + } + + leaf weightFactor { + mandatory "true"; + config "true"; + description ""; + type uint8; + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + + list EP_N2 { uses ep-rp:EP_N2; } + list EP_N8 { uses ep-rp:EP_N8; } + list EP_N11 { uses ep-rp:EP_N11; } + list EP_N12 { uses ep-rp:EP_N12; } + list EP_N14 { uses ep-rp:EP_N14; } + list EP_N15 { uses ep-rp:EP_N15; } + list EP_N17 { uses ep-rp:EP_N17; } + list EP_N20 { uses ep-rp:EP_N20; } + list EP_N22 { uses ep-rp:EP_N22; } + list EP_N26 { uses ep-rp:EP_N26; } + list EP_NLS { uses ep-rp:EP_NLS; } + list EP_NLG { uses ep-rp:EP_NLS; } + list EP_SBI_X { + uses ep-rp:EP_SBI_X; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFRegion.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFRegion.yang new file mode 100644 index 0000000..fc87c70 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFRegion.yang @@ -0,0 +1,57 @@ +submodule ngc-AMFRegion { + + belongs-to ngc { prefix ngc; } + + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + revision 2018-12-18 { + description "initial verison"; + } + + grouping AMFRegion { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf aMFRegionId { + config "true"; + description ""; + type nrm-type:t_aMF-Region-id; + } + + leaf-list tAC { + min-elements "1"; + config "false"; + type nrm-type:t_tAC; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + leaf-list aMFSet { + description "AMF Set list in the aMFRegion"; + min-elements "0"; + config "true"; + type nrm-type:t_dn; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFSet.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFSet.yang new file mode 100644 index 0000000..a67b70c --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AMFSet.yang @@ -0,0 +1,62 @@ +submodule ngc-AMFSet { + + belongs-to ngc { prefix ngc; } + + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + revision 2018-12-18 { + description "initial verison"; + } + + grouping AMFSet { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf aMFSetId { + config "true"; + description ""; + type nrm-type:t_aMF-Set-id; + } + + leaf-list tAC { + min-elements "1"; + config "false"; + type nrm-type:t_tAC; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + leaf-list aMFSetMember { + description "AMF funciton list in the aMFSet"; + min-elements "0"; + config "true"; + type nrm-type:t_dn; + } + + leaf aMFRegion { + description "associated aMFRegion the aMFSet belong to"; + type nrm-type:t_dn; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AUSFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AUSFFunction.yang new file mode 100644 index 0000000..8b4934c --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-AUSFFunction.yang @@ -0,0 +1,62 @@ +submodule ngc-AUSFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "AUSFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping AUSFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description ""; + type inet:domain-name; + } + + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + + list EP_N12 { uses ep-rp:EP_N12; } + list EP_N13 { uses ep-rp:EP_N13; } + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-LMFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-LMFFunction.yang new file mode 100644 index 0000000..f78886a --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-LMFFunction.yang @@ -0,0 +1,29 @@ +submodule ngc-LMFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + description "LMFFunction derived from basic ManagedFunction"; + + revision 2018-12-18 { + description "15.1.0"; + } + + grouping LMFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + list EP_NLS { uses ep-rp:EP_NLS; } + + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-N3IWFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-N3IWFFunction.yang new file mode 100644 index 0000000..a2f418c --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-N3IWFFunction.yang @@ -0,0 +1,29 @@ +submodule ngc-N3IWFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + description "N3IWFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping N3IWFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + list EP_N2 { uses ep-rp:EP_N2; } + list EP_N3 { uses ep-rp:EP_N3; } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NGEIRFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NGEIRFunction.yang new file mode 100644 index 0000000..ef99bc7 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NGEIRFunction.yang @@ -0,0 +1,61 @@ +submodule ngc-NGEIRFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "NGEIRFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping NGEIRFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description ""; + type inet:domain-name; + } + + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + + list EP_N17 { uses ep-rp:EP_N17; } + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NRFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NRFFunction.yang new file mode 100644 index 0000000..d5ce339 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NRFFunction.yang @@ -0,0 +1,80 @@ +submodule ngc-NRFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + include NFProfile; + + description "NRFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping NRFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description " "; + type inet:domain-name; + } + + leaf-list sBIService { + description ""; + min-elements "1"; + config "false"; + type string; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + list nFProfile { + description "CM only required when NF profile is registered and deregistered by management system."; + min-elements "1"; + config "true"; + key nfInstanceId; + uses NFProfile; + + } + + leaf-list nSIId { + description "Is it really needed if network slicing feature enabled Seems it's only required for NSSF"; + min-elements "1"; + config "false"; + type nrm-type:t_NsiId; + + } + + + list EP_N27 { uses ep-rp:EP_N26; } + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NSSFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NSSFFunction.yang new file mode 100644 index 0000000..b556f0c --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NSSFFunction.yang @@ -0,0 +1,71 @@ +submodule ngc-NSSFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "NSSFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping NSSFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description " "; + type inet:domain-name; + } + + leaf-list sBIService { + description " "; + min-elements "1"; + config "false"; + type string; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + leaf-list nSIId { + description "Is it really needed if network slicing feature enabled Seems it's only required for NSSF"; + min-elements "1"; + config "false"; + type nrm-type:t_NsiId; + + } + + + list EP_N22 { uses ep-rp:EP_N22; } + list EP_N31 { uses ep-rp:EP_N31; } + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NWDAFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NWDAFunction.yang new file mode 100644 index 0000000..3efe5ce --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-NWDAFunction.yang @@ -0,0 +1,59 @@ +submodule ngc-NWDAFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "NWDAFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping NWDAFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description ""; + type inet:domain-name; + } + + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-PCFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-PCFFunction.yang new file mode 100644 index 0000000..e610950 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-PCFFunction.yang @@ -0,0 +1,64 @@ +submodule ngc-PCFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "PCFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping PCFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description ""; + type inet:domain-name; + } + + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + + list EP_N5 { uses ep-rp:EP_N5; } + list EP_N7 { uses ep-rp:EP_N7; } + list EP_N15 { uses ep-rp:EP_N15; } + list EP_N16 { uses ep-rp:EP_N16; } + list EP_Rx { uses ep-rp:EP_Rx; } + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SEPPFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SEPPFunction.yang new file mode 100644 index 0000000..d959416 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SEPPFunction.yang @@ -0,0 +1,49 @@ +submodule ngc-SEPPFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "SEPPFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping SEPPFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description ""; + type inet:domain-name; + } + + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + + } + + container EP_N32 { uses ep-rp:EP_N32; } + list EP_SBI_IPX { + key id; + uses ep-rp:EP_SBI_IPX; + } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SMFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SMFFunction.yang new file mode 100644 index 0000000..b41b610 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SMFFunction.yang @@ -0,0 +1,72 @@ +submodule ngc-SMFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "SMFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping SMFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description ""; + type inet:domain-name; + } + + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + + } + + leaf-list tAC { + min-elements "1"; + config "false"; + type nrm-type:t_tAC; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + + list EP_N4 { uses ep-rp:EP_N4; } + list EP_N7 { uses ep-rp:EP_N7; } + list EP_N10 { uses ep-rp:EP_N10; } + list EP_N11 { uses ep-rp:EP_N11; } + list EP_N16 { uses ep-rp:EP_N16; } + list EP_S5C { uses ep-rp:EP_S5C; } + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SMSFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SMSFFunction.yang new file mode 100644 index 0000000..9550e63 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-SMSFFunction.yang @@ -0,0 +1,30 @@ +submodule ngc-SMSFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + description "SMSFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping SMSFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + list EP_N20 { uses ep-rp:EP_N20; } + list EP_N21 { uses ep-rp:EP_N21; } + list EP_MAP_SMSC { uses ep-rp:EP_MAP_SMSC; } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UDRFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UDRFunction.yang new file mode 100644 index 0000000..b691e8f --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UDRFunction.yang @@ -0,0 +1,56 @@ +submodule ngc-UDRFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "UDRFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping UDRFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description ""; + type inet:domain-name; + } + + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UDSFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UDSFFunction.yang new file mode 100644 index 0000000..4eca6ab --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UDSFFunction.yang @@ -0,0 +1,56 @@ +submodule ngc-UDSFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + + description "UDSFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping UDSFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf sBIFQDN { + mandatory "true"; + config "true"; + description ""; + type inet:domain-name; + } + + leaf-list sBIService { + min-elements "1"; + config "false"; + type string; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + list EP_SBI_X { + key id; + uses ep-rp:EP_SBI_X; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UPFFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UPFFunction.yang new file mode 100644 index 0000000..ca8ac42 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc-UPFFunction.yang @@ -0,0 +1,51 @@ +submodule ngc-UPFFunction { + + belongs-to ngc { prefix ngc; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + description "UPFFunction derived from basic ManagedFunction"; + + revision 2018-08-07 { + description "Initial revision"; + } + + grouping UPFFunction { + uses mf:ManagedFunction; + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + + leaf-list tAC { + min-elements "1"; + config "false"; + type nrm-type:t_tAC; + + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable + of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPP + TS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + list EP_N3 { uses ep-rp:EP_N4; } + list EP_N4 { uses ep-rp:EP_N7; } + list EP_N9 { uses ep-rp:EP_N10; } + list EP_N6 { uses ep-rp:EP_N11; } + list EP_S5U { uses ep-rp:EP_S5C; } + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngc.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngc.yang new file mode 100644 index 0000000..53151c7 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngc.yang @@ -0,0 +1,55 @@ +module ngc { + namespace "urn:3gpp:tsg:sa5:nrm:ngc"; + prefix "ngc"; + import SubNetwork { prefix subnet; revision-date "2018-07-31"; } + import ManagedElement { prefix me; revision-date "2018-07-31"; } + include ngc-AMFFunction; + include ngc-SMFFunction; + include ngc-UPFFunction; + include ngc-N3IWFFunction; + include ngc-PCFFunction; + include ngc-AUSFFunction; + include ngc-UDMFunction; + include ngc-UDRFunction; + include ngc-UDSFFunction; + include ngc-NRFFunction; + include ngc-NSSFFunction; + include ngc-SMSFFunction; + include ngc-LMFFunction; + include ngc-NGEIRFunction; + include ngc-SEPPFunction; + include ngc-NWDAFunction; + include NFProfile; + + revision 2018-08-07 { + description "Initial revision"; + } + + container SubNetwork { + + uses subnet:SubNetwork; + list ManagedElement { + uses me:ManagedElement; + list AMFFunction { uses AMFFunction; } + list SMFFunction { uses SMFFunction; } + list UPFFunction { uses UPFFunction; } + list N3IWFFunction { uses N3IWFFunction; } + list PCFFunction { uses PCFFunction; } + list AUSFFunction { uses AUSFFunction; } + list UDMFunction { uses UDMFunction; } + list UDRFunction { uses UDRFunction; } + list UDSFFunction { uses UDSFFunction; } + list NRFFunction { uses NRFFunction; } + list NSSFFunction { uses NSSFFunction; } + list SMSFFunction { uses SMSFFunction; } + list LMFFunction { uses LMFFunction; } + list NGEIRFunction { uses NGEIRFunction; } + list SEPPFunction { uses SEPPFunction; } + list NWDAFunction { uses NWDAFunction; } + } + list AMFSet { uses AMFSet; } + list AMFRegion { uses AMFRegion; } + + } + +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngran-bWP.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-bWP.yang new file mode 100644 index 0000000..30979a1 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-bWP.yang @@ -0,0 +1,50 @@ +submodule ngran-bWP { + + belongs-to ngran { prefix ngran; } + + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + + description "BWP"; + + revision 2018-09-28 { + description "Initial revision"; + } + + grouping BWP { + description ""; + uses mf:ManagedFunction; + + leaf bwpContext { + mandatory "true"; + config "true"; + type nrm-type:BwpContext; + } + leaf isInitialBwp { + mandatory "true"; + config "false"; + description ""; + type nrm-type:IsInitialBwp; + } + leaf subCarrierSpacing { + mandatory "true"; + config "true"; + type uint32; + } + leaf cyclicPrefix { + mandatory "true"; + config "true"; + type nrm-type:t_cyclicPrefix; + } + leaf startRB { + mandatory "true"; + config "true"; + type uint32; + } + leaf numberOfRBs { + mandatory "true"; + config "true"; + type uint32; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBCUCPFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBCUCPFunction.yang new file mode 100644 index 0000000..df6c29b --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBCUCPFunction.yang @@ -0,0 +1,65 @@ +submodule ngran-gNBCUCPFunction { + + belongs-to ngran { prefix ngran; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + include ngran-nRCellCU; + + description "GNBCUCPFunction derived from basic ManagedFunction, for 3 split deployment mode only"; + + revision 2018-08-02 { + description "15.0.2"; + } + + grouping GNBCUCPFunction { + uses mf:ManagedFunction; + + leaf gNBCUName { + description "PrintableString(SIZE(1..150,))"; + mandatory "false"; + config "true"; + type string { + length "1..150"; + } + } + leaf gNBId { + description "It identifies a gNB within a PLMN. See gNB Identifier (gNB ID) of subclause 8.2 of 3GPP TS 38.300 [3]). See Global gNB ID in subclause 9.3.1.6 of 3GPP TS 38.413 [5]. "; + mandatory "true"; + config "false"; + type uint32; + } + leaf gNBIdLength { + description "It indicates the number of bits for encoding the gNB ID."; + mandatory "true"; + config "false"; + type uint32 { + range "22..32"; + } + } + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + choice gNB-type { + case gNB { + list EP-NgC { uses ep-rp:EP_NgC; } + list EP-XnC { uses ep-rp:EP_XnC; } + } + case en-gNB { + container EP-X2C { uses ep-rp:EP_X2C; } + } + } + + list EP_F1C { uses ep-rp:EP_F1C; } + list EP_E1 { uses ep-rp:EP_E1; } + + list NRCellCU { uses NRCellCU; } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBCUUPFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBCUUPFunction.yang new file mode 100644 index 0000000..dde8e2b --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBCUUPFunction.yang @@ -0,0 +1,54 @@ +submodule ngran-gNBCUUPFunction { + + belongs-to ngran { prefix ngran; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + + description "GNBCUUPFunction derived from basic ManagedFunction, for 3 split deployment mode only"; + + revision 2018-08-02 { + description "15.0.2"; + } + + grouping GNBCUUPFunction { + uses mf:ManagedFunction; + + leaf gNBId { + description "It identifies a gNB within a PLMN. See gNB Identifier (gNB ID) of subclause 8.2 of 3GPP TS 38.300 [3]). See Global gNB ID in subclause 9.3.1.6 of 3GPP TS 38.413 [5]. "; + mandatory "true"; + config "false"; + type uint32; + } + leaf gNBIdLength { + description "It indicates the number of bits for encoding the gNB ID."; + mandatory "true"; + config "false"; + type uint32 { + range "22..32"; + } + } + + list pLMNId { + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key "MCC MNC"; + uses nrm-type:pLMNId; + } + list EP_F1U { uses ep-rp:EP_F1U; } + + container EP_E1 { uses ep-rp:EP_E1; } + choice gNB-type { + case gNB { + list EP_NgU { uses ep-rp:EP_NgU; } + list EP_XnU { uses ep-rp:EP_XnU; } + } + case en-gNB { + list EP_X2U { uses ep-rp:EP_X2U; } + list EP_S1U { uses ep-rp:EP_S1U; } + } + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBDUFunction.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBDUFunction.yang new file mode 100644 index 0000000..5306e60 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-gNBDUFunction.yang @@ -0,0 +1,62 @@ +submodule ngran-gNBDUFunction { + + belongs-to ngran { prefix ngran; } + + import EP_RP { prefix ep-rp; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + + include ngran-nRCellDU; + include ngran-nRSectorCarrier; + + description "GNBDUFunction derived from basic ManagedFunction, for 3 split deployment mode only"; + + revision 2018-08-02 { + description "15.0.2"; + } + + grouping GNBDUFunction { + uses mf:ManagedFunction; + + leaf gNBDUId { + description "It uniquely identifies the DU at least within a gNB. See gNB-DU ID in subclause 9.3.1.9 of 3GPP TS 38.473 "; + mandatory "true"; + config "true"; + type uint32; + } + leaf gNBDUName { + description "PrintableString(SIZE(1..150,))"; + mandatory "false"; + config "true"; + type string { + length "1..150"; + } + } + leaf gNBId { + description "It identifies a gNB within a PLMN. See gNB Identifier (gNB ID) of subclause 8.2 of 3GPP TS 38.300 [3]). See Global gNB ID in subclause 9.3.1.6 of 3GPP TS 38.413 [5]. "; + mandatory "true"; + config "false"; + type uint32; + } + leaf gNBIdLength { + description "It indicates the number of bits for encoding the gNB ID."; + mandatory "true"; + config "false"; + type uint32 { + range " 22..32"; + } + } + + container EP_F1C { uses ep-rp:EP_F1C; } + list EP_F1U { uses ep-rp:EP_F1U; } + + list NRCellDU { + uses NRCellDU; + } + list NRSectorCarrier { + uses NRSectorCarrier; + } + list BWP { + uses BWP; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRCellCU.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRCellCU.yang new file mode 100644 index 0000000..f3f8498 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRCellCU.yang @@ -0,0 +1,68 @@ +submodule ngran-nRCellCU { + + belongs-to ngran { prefix ngran; } + + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + description "NRCellCU derived from basic ManagedFunction"; + + revision 2018-08-02 { + description "Initial revision"; + } + + grouping NRCellCU { + uses mf:ManagedFunction; + + leaf nCI { + config "true"; + description "It uniquely identifies a NR cell within a PLMN."; + reference "See NR Cell identifier (NCI) subclause 8.2 of 3GPP + TS 38.300 [3]."; + type nrm-type:t_NCI; + } + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key MCC; + uses nrm-type:pLMNId; + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + description "It represents the list of S-NSSAI the managed object is capable of supporting, an S-NSSAI is comprised of a SST (Slice/Service + type) and an optional SD (Slice Differentiator) field, (Ref. 3GPPTS 23.003 [13]). "; + reference "3GPP TS 23.003"; + type nrm-type:t_s-NSSAI; + } + + leaf rRMPolicyType { + config "true"; + type uint16; + } + + leaf rRMPolicyNSSIId { + config "true"; + type nrm-type:t_dn; + } + + leaf rRMPolicyRatio { + config "true"; + type uint8 { range 0..100; } + } + + leaf rRMPolicy { + description "It represents RRM policy which includes guidance for split of radio resources between multiple slices the cell supports. The RRM policy is implementation dependent."; + config "true"; + type string; + } + container rRMPolicyRatio2 { + presence "true"; + config "true"; + uses nrm-type:RRMPolicyRatio2; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRCellDU.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRCellDU.yang new file mode 100644 index 0000000..9c4fc7d --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRCellDU.yang @@ -0,0 +1,108 @@ +submodule ngran-nRCellDU { + + belongs-to ngran { prefix ngran; } + + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + + description "NRCellDU derived from basic ManagedFunction"; + + revision 2018-08-02 { + description "Initial revision"; + } + + grouping NRCellDU { + uses mf:ManagedFunction; + + leaf nCI { + config "true"; + description "It uniquely identifies a NR cell within a PLMN."; + reference "See NR Cell identifier (NCI) subclause 8.2 of 3GPP TS 38.300 [3]."; + type nrm-type:t_NCI; + } + + list pLMNId { + min-elements "1"; + description "a list of PLMN-Id, PLMN-Id= Mobile Country Codes (MCC)|| Mobile Network Codes(MNC) "; + config "true"; + key MCC; + uses nrm-type:pLMNId; + } + + leaf-list s-NSSAI { + min-elements "0"; + config "true"; + type nrm-type:t_s-NSSAI; + } + + leaf operationalState { + config "false"; + description "CM, It indicates the operational state of the NRCellDU instance. It describes whether the resource is installed and partially or fully operable (Enabled) or the resource is not installed or not operable (Disabled)."; + type nrm-type:t_operationalState; + } + leaf administrativeState { + description "CM, It indicates the administrative state of the NRCellDU. It describes the permission to use or prohibition against using the cell, imposed through the OAM services."; + config "true"; + type nrm-type:t_administrativeState; + } + + leaf cellState { + description "It indicates the usage state of the NRCellDU instance. It describes whether the cell is not currently in use (Idle), or currently in use but not configured to carry traffic (Inactive) or is currently in use and is configured to carry traffic (Active)"; + mandatory "true"; + config "false"; + type nrm-type:t_cellState; + } + leaf nRPCI { + description ""; + mandatory "true"; + config "true"; + type nrm-type:t_nRPCI; + } + leaf nRTAC { + mandatory "true"; + config "true"; + type nrm-type:t_tAC; + } + leaf arfcnDL { + mandatory "true"; + config "true"; + type uint32; + } + leaf arfcnUL { + config "true"; + type uint32; + } + leaf arfcnSUL { + config "true"; + type uint32; + } + leaf bSChannelBwDL { + mandatory "true"; + config "true"; + type uint32; + } + leaf bSChannelBwUL { + config "true"; + type uint32; + } + leaf bSChannelBwSUL { + config "true"; + type uint32; + } + + //refer to nRSectorCarrier + leaf-list NRSectorCarrier { + min-elements "0"; + description ""; + config "true"; + type nrm-type:t_dn; + } + //refer to bwp + leaf-list bWP { + min-elements "0"; + description ""; + config "true"; + type nrm-type:t_dn; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRSectorCarrier.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRSectorCarrier.yang new file mode 100644 index 0000000..8837b9a --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngran-nRSectorCarrier.yang @@ -0,0 +1,53 @@ +submodule ngran-nRSectorCarrier { + + belongs-to ngran { prefix ngran; } + + import nrm-types-3gpp { prefix nrm-type; revision-date "2018-07-31"; } + import ManagedFunction { prefix mf; revision-date "2018-07-31"; } + + description "NRSectorCarrier"; + + revision 2018-08-02 { + description "Initial revision"; + } + + grouping NRSectorCarrier { + description ""; + uses mf:ManagedFunction; + + leaf txDirection { + mandatory "true"; + config "true"; + type nrm-type:TxDirection; + } + leaf configuredMaxTxPower { + mandatory "true"; + config "false"; + description ""; + type uint16; + } + leaf arfcnDL { + config "true"; + type uint32; + } + leaf arfcnUL { + config "true"; + type uint32; + } + leaf bSChannelBwDL { + config "true"; + type uint32; + } + leaf bSChannelBwUL { + config "true"; + type uint32; + } + leaf sectorEquipmentFunction { + mandatory "true"; + config "true"; + description "fqBand for NR should be defined"; + reference "23.622"; + type nrm-type:t_dn; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/ngran.yang b/model/yang/3gpp/ts-28.541/v16.1.0/ngran.yang new file mode 100644 index 0000000..7640199 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/ngran.yang @@ -0,0 +1,33 @@ +module ngran { + + namespace "urn:3gpp:tsg:sa5:nrm:ngran"; + prefix "ngran"; + + import ManagedElement { prefix me; revision-date "2018-07-31"; } + + include ngran-nRCellCU; + include ngran-nRCellDU; + include ngran-nRSectorCarrier; + include ngran-gNBDUFunction; + include ngran-gNBCUCPFunction; + include ngran-gNBCUUPFunction; + + organization "3gpp SA5"; + description "Main YANG module for the NRM NG-RAN Defined gNB as ManagedElement + (subclass of ME) for overaching all other functions supported + ngran Define constitued MFs and EPs as container in submodule"; + + revision 2018-07-27 { + description "15.0.2"; + } + + + container ManagedElement { + description "list constituted MF and EP below, let's discuss if umbrella ManagedElement needed for NR + if it's not required, we can just remove the me and keep the container below"; + uses me:ManagedElement; + list GNBDUFunction { uses GNBDUFunction; } + list GNBCUCPFunction { uses GNBCUCPFunction; } + list GNBCUUPFunction { uses GNBCUUPFunction; } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/nrm-types-3gpp.yang b/model/yang/3gpp/ts-28.541/v16.1.0/nrm-types-3gpp.yang new file mode 100644 index 0000000..60b80ea --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/nrm-types-3gpp.yang @@ -0,0 +1,521 @@ +module nrm-types-3gpp { + + namespace "urn:3gpp:tsg:sa5:nrm:types"; + prefix "nrm-type"; + import ietf-inet-types { prefix inet; revision-date "2010-09-24"; } + import ietf-yang-types { prefix yang; revision-date "2010-09-24"; } + + revision 2018-07-31 { + description + "Initial revision."; + + } + + typedef t_dn { + type string; + description + "The dn type represents a Distinguish Name of the object."; + } + + typedef t_mcc { + description "The mobile country code consists of three decimal digits, The first digit of the mobile country code identifies the geographic region (the digits 1 and 8 are not used):"; + type string { + pattern '[02-79][0-9][0-9]'; + } + } + + typedef t_mnc { + description "the mobile network code consists of two or three decimal digits (for example: MNC of 001 is not the same as MNC of 01)"; + type string { + pattern '[0-9][0-9][0-9]|[0-9][0-9]'; + } + } + + grouping pLMNId { + leaf MCC { + type t_mcc; + } + leaf MNC { + type t_mnc; + } + } + + typedef t_NCI { + description "The NCI shall be of fixed length of 36 bits and shall be coded using full hexadecimal representation. The exact coding of the NCI is the responsibility of each PLMN operator"; + reference "23.003"; + type union { + type string { + length 36; + pattern '[01]*'; + } + type string { + length 9; + pattern '[a-fA-F0-9]*'; + } + } + } + + + typedef t_operationalState { + type enumeration { + enum "Enabled"; + enum "Disabled"; + } + } + + typedef t_administrativeState { + type enumeration { + enum "Locked"; + enum "Shutdown"; + enum "Unlocked"; + } + } + + typedef t_availabilityStatus { + type enumeration { + enum "IN TEST"; + enum "FAILED"; + enum "POWER OFF"; + enum "OFF LINE"; + enum "OFF DUTY"; + enum "DEPENDENCY"; + enum "DEGRADED"; + enum "NOT INSTALLED"; + enum "LOG FULL"; + } + } + + typedef t_cellState { + type enumeration { + enum "Idle"; + enum "Inactive"; + enum "Active"; + } + } + + typedef t_s-NSSAI { + type union { + type uint8; + type uint32; + } + } + + typedef t_SST { + type uint8; + } + + typedef t_nRPCI { + type uint32; + } + + typedef t_tAC { + type union { + type string { + length 4; + pattern '[a-fA-F0-9]*'; + } + type string { + length 6; + pattern '[a-fA-F0-9]*'; + } + } + } + + typedef t_subcarrierSpacing { + type enumeration { + enum 15; + enum 30; + enum 60; + enum 120; + } + } + + typedef t_cyclicPrefix { + type enumeration { + enum "Normal"; + enum "Extended"; + } + } + + typedef t_aMF-Region-id { + type string { + length 8; + pattern '[01]*'; + } + } + + typedef t_aMF-Set-id { + type string { + length 10; + pattern '[01]*'; + } + } + + typedef t_aMF-Pointer { + type string { + length 6; + pattern '[01]*'; + } + } + + + grouping aMFI { + + leaf AMF-Region-id { + type t_aMF-Region-id; + } + leaf AMF-Set-id { + type t_aMF-Set-id; + } + leaf AMF-Pointer { + type t_aMF-Pointer; + } + + } + + typedef t_TransportProtocol { + type enumeration { + enum "TCP"; + enum "STCP"; + enum "UDP"; + } + } + +// type definition especially for core NF + + typedef NFType { + type enumeration { + enum "NRF"; + enum "UDM"; + enum "AMF"; + enum "SMF"; + enum "AUSF"; + enum "NEF"; + enum "PCF"; + enum "SMSF"; + enum "NSSF"; + enum "UDR"; + enum "LMF"; + enum "GMLC"; + enum "5G_EIR"; + enum "SEPP"; + enum "UPF"; + enum "N3IWF"; + enum "AF"; + enum "UDSF"; + enum "BSF"; + enum "CHF"; + } + } + + typedef NFStatus { + type enumeration { + enum "REGISTERED"; + enum "SUSPENDED"; + } + } + + typedef NotificationType { + type enumeration { + enum "N1_MESSAGES"; + enum "N2_INFORMATION"; + enum "LOCATION_NOTIFICATION"; + } + } + + typedef NotificationEventType { + type enumeration { + enum "NF_REGISTERED"; + enum "NF_DEREGISTERED"; + enum "NF_PROFILE_CHANGED"; + } + } + + typedef DataSetId { + type enumeration { + enum "SUBSCRIPTION"; + enum "POLICY"; + enum "EXPOSURE"; + enum "APPLICATION"; + } + } + + typedef UPInterfaceType { + type enumeration { + enum "N3"; + enum "N6"; + enum "N9"; + } + } + + typedef N1MessageClass { + type enumeration { + enum "5GMM"; + enum "SM"; + enum "LPP"; + enum "SMS"; + } + } + + typedef N2InformationClass { + type enumeration { + enum "SM"; + enum "NRPPa"; + enum "PWS"; + enum "PWS-BCAL"; + enum "PWS-RF"; + } + } + + typedef t_Load { + description "Latest known load information of the NF ranged from 0 to 100 in percentage "; + type uint8 { + range 0..100; + } + } + + typedef SupportedFeatures { + type string { + pattern '[A-Fa-f0-9]*'; + } + } + + grouping SupiRange { + leaf start { + type string; + } + + leaf end { + type string; + } + + leaf pattern { + type string; + } + } + + grouping IdentityRange { + leaf start { + type string; + } + + leaf end { + type string; + } + + leaf pattern { + type string; + } + } + + grouping Guami { + container plmnId { uses pLMNId; } + container amfId { uses aMFI; } + } + + grouping Tai { + container plmnId { uses pLMNId; } + leaf tac { type t_tAC; } + } + + typedef t_Dnn { + type string; + } + + grouping DnnUpfInfoItem { + leaf dnn { + type t_Dnn; + } + } + + grouping SnssaiUpfInfoItem { + leaf sNssai { + type t_s-NSSAI; + } + + list dnnUpfInfo { + key dnn; + uses DnnUpfInfoItem; + } + + } + + grouping NFServiceVersion { + description ""; + leaf apiVersionInUri { + description ""; + type string; + } + + leaf apiFullVersion { + type string; + description ""; + } + + leaf expiry { + description ""; + type yang:date-and-time; + } + + } + + grouping ipEndPoint { + choice address { + leaf ipv4Address { + type inet:ipv4-address; + } + leaf ipv6Address { + type inet:ipv6-address; + } + leaf ipv6Prefix { + type inet:ipv6-prefix; + } + } + + leaf transport { + type t_TransportProtocol; + } + + leaf port { + type uint16; + } + } + + grouping defaultNotificationSubscription { + + leaf notificationType { + type NotificationType; + } + + leaf callbackUri { + type inet:uri; + } + + leaf n1MessageClass { + type N1MessageClass; + } + + leaf n2InformationClass { + type N2InformationClass; + } + } + + grouping InterfaceUpfInfoItem { + + leaf interfaceType { + type UPInterfaceType; + } + + choice address { + leaf ipv4Address { + type inet:ipv4-address; + } + leaf ipv6Address { + type inet:ipv6-address; + } + leaf ipv6Prefix { + type inet:ipv6-prefix; + } + leaf endpointFqdn { + type inet:domain-name; + } + } + + leaf networkInstance { + type string; + } + + } + + grouping Ipv4AddressRange { + leaf start { + type inet:ipv4-address; + } + leaf end { + type inet:ipv4-address; + } + } + + grouping Ipv6PrefixRange { + leaf start { + type inet:ipv6-prefix; + } + leaf end { + type inet:ipv6-prefix; + } + } + + typedef t_NsiId { + type string; + } + + typedef t_uEMobilityLevel { + type enumeration { + enum "stationary"; + enum "nomadic"; + enum "restricted mobility"; + enum "fully mobility"; + } + } + + typedef t_resourceSharingLevel { + type enumeration { + enum "shared"; + enum "not-shared"; + } + } + + typedef TxDirection { + type enumeration { + enum "DL"; + enum "UL"; + enum "DL and UL"; + } + } + + typedef BwpContext { + type enumeration { + enum "DL"; + enum "UL"; + enum "SUL"; + } + } + + typedef IsInitialBwp { + type enumeration { + enum "INITIAL"; + enum "OTHER"; + } + } + + typedef t_quotaType { + type enumeration { + enum "strict"; + enum "float"; + } + } + + grouping RRMPolicyRatio2{ + leaf groupId { + type uint16; + } + leaf-list sNSSAI { + type t_s-NSSAI; + } + leaf quotaType { + type t_quotaType; + } + leaf rRMPolicyMaxRation { + type uint8; + } + leaf rRMPolicyMarginMaxRation { + type uint8; + } + leaf rRMPolicyMinRation { + type uint8; + } + leaf rRMPolicyMarginMinRation { + type uint8; + } + } +} \ No newline at end of file diff --git a/model/yang/3gpp/ts-28.541/v16.1.0/perfReq.yang b/model/yang/3gpp/ts-28.541/v16.1.0/perfReq.yang new file mode 100644 index 0000000..b12d398 --- /dev/null +++ b/model/yang/3gpp/ts-28.541/v16.1.0/perfReq.yang @@ -0,0 +1,47 @@ +module perfReq { + namespace "urn:3gpp:tsg:sa5:nrm:perfReq"; + prefix "perf"; + + revision 2018-08-10 { + description "Initial revision"; + } + + + grouping perfReq { + choice SST { + case eMBB { + leaf expDataRateDL { type uint16; } + leaf expDataRateU {type uint16; } + leaf areaTrafficCapDL { type uint16; } + leaf areaTrafficCapUL { type uint16; } + leaf userDensity { type uint16; } + leaf activityFactor { type uint16; } + leaf uESpeed { type uint16; } + leaf coverage { type string; } + } + case uRLLC { + leaf e2eLatency { type uint16; } + leaf jitter {type uint16; } + leaf survivalTime { type uint16; } + leaf cSAvailability { + type decimal64 { + fraction-digits 4; + range 1..99.9999; + } + } + leaf reliability { + type decimal64 { + fraction-digits 4; + range 1..99.9999; + } + } + leaf expDataRate { type uint16; } + leaf payloadSize { type string; } + leaf trafficDensity { type uint16; } + leaf connDensity { type uint16; } + leaf serviceAreaDimension { type string; } + } + + } + } +} \ No newline at end of file diff --git a/model/yang/imports/ieee802-dot1ab-lldp.yang b/model/yang/imports/ieee802-dot1ab-lldp.yang new file mode 100644 index 0000000..1dc8695 --- /dev/null +++ b/model/yang/imports/ieee802-dot1ab-lldp.yang @@ -0,0 +1,1509 @@ +module ieee802-dot1ab-lldp { + yang-version 1.1; + + /*** NAMESPACE / PREFIX DEFINITION ***/ + namespace "urn:ieee:std:802.1AB:yang:ieee802-dot1ab-lldp"; + prefix "lldp"; + + /*** LINKAGE (IMPORTS / INCLUDES) ***/ + import ietf-routing { prefix "rt"; } + import ietf-yang-types { prefix "yang"; } + import ietf-interfaces { prefix "if"; } + import ieee802-dot1q-bridge { prefix "dot1q"; } + import ieee802-types { prefix "ieee"; } + import iana-if-type { prefix "ianaift"; } + + /*** META INFORMATION ***/ + organization + "Ericsson AB"; + + contact + "Web URL: https://www.ericsson.com + + Contact: Chin Chen + E-mail: chin.chen@ericsson.com"; + + description + "Management Information Base module for LLDP configuration, + statistics, local system data and remote systems data + components. + + This experimental YANG module is an individual contribution, and + does not represent a formally sanctioned YANG module of IEEE. + Therefore, this YANG module will change in incompatible ways + from its current revision to the formally published YANG + module for IEEE Std 802.1AB-2016."; + + revision 2018-01-22 { + description + "Replace augment to bridge with the reference."; + reference + "IEEE Std 802.1AB-2016"; + } + + revision 2017-06-26 { + description + "Module for IEEE Std 802.1AB-2016"; + reference + "IEEE Std 802.1AB-2016"; + } + + /*** TYPE DEFINITIONS ***/ + typedef bridge-ref { + type leafref { + path "/dot1q:bridges/dot1q:bridge/dot1q:name"; + } + description + "This type is used by data models that need to reference + a configured Bridge."; + } + + typedef port-ref { + type leafref { + path "/lldp:lldp/lldp:port/lldp:name"; + } + description + "This type is used by data models that need to reference port."; + } + + typedef chassis-id-subtype { + type enumeration { + enum chassis-component { + value 1; + description + "The subtype 'chassis-component(1)' 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 + "The subtype 'interface-alias(2)' 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 + "The subtype 'port-component(3)' 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 + "The subtype 'mac-address(4)' 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 + "The subtype 'network-address(5)' 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 address-family value for the + specific address type, and the second field is the network + address value."; + } + enum interface-name { + value 6; + description + "The enumeration 'interface-name(6)' 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 + "The enumeration 'local(7)' represents a chassis identifier + based on a locally defined value."; + } + } + description + "This is the subtype of chassis identifier used in the LLDP MIB."; + reference + "IEEE Std 802.1AB-2016: 8.5.2.2"; + } + + typedef chassis-id-type { + type binary { + length "1..255"; + } + description + "This TC describes the format of a chassis identifier string. + Objects of this type are always used with an associated + chassis-id-subtype object, which identifies the format of + the particular chassis-id object instance. + + If the associated chassis-id-subtype object has a value of + 'chassis-component(1)', 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 chassis-id-subtype object has a value + of 'interface-alias(2)', 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 chassis-id-subtype object has a value + of 'port-component(3)', 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 chassis-id-subtype object has a value of + 'mac-address(4)', 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 chassis-id-subtype object has a value of + 'network-address(5)', 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 chassis-id-subtype object has a value + of 'interface-name(6)', 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 chassis-id-subtype object has a value of + 'local(7)', then this string identifies a locally assigned + Chassis ID."; + reference + "IEEE Std 802.1AB-2016: 8.5.2.3"; + } + + typedef port-id-subtype { + type enumeration { + enum interface-alias { + value 1; + description + "The subtype 'interface-alias(1)' represents a port + identifier based on the ifAlias MIB object, defined in IETF + RFC 2863."; + } + enum port-component { + value 2; + description + "The subtype 'port-component(2)' 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 + "The subtype 'mac-address(3)' 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 + "The subtype 'network-address(4)' 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 + "The subtype 'interface-name(5)' represents a port + identifier based on the ifName MIB object, defined in IETF + RFC 2863."; + } + enum agent-circuit-id { + value 6; + description + "The subtype 'agent-circuit-id(6)' 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 + "The subtype 'local(7)' represents a port identifier + based on a value locally assigned."; + } + } + description + "This is the subtype of port identifier used in the LLDP MIB."; + reference + "IEEE Std 802.1AB-2016: 8.5.3.2"; + } + + typedef port-id-type { + type binary { + length "1..255"; + } + description + "This TC describes 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 port-id object instance. + + If the associated port-id-subtype object has a value of + 'interface-alias(1)', 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(2)', 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(3)', 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(4)', then this string identifies a network + address associated with the port. The first octet contains + the IANA address-family enumeration value for the + specific address type, and octets 2 through N contain the + network-address address value in network byte order. + + If the associated port-id-subtype object has a value of + 'interface-name(5)', 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(6)', 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(7)', then this string identifies a locally + assigned port ID."; + + reference + "IEEE Std 802.1AB-2016: 8.5.3.3"; + } + + typedef man-addr-if-subtype { + type enumeration { + enum unknown { + value 1; + description + "The subtype 'unknown(1)' represents the case where the + interface is not known."; + } + enum port-ref { + value 2; + description + "The subtype 'port-ref(2)' represents interface identifier + based on the port-ref MIB object."; + } + enum system-port-number { + value 3; + description + "The subtype 'system-port-number(3)' represents interface + identifier based on the system port numbering convention."; + } + } + description + "This is the basis of a particular type of + interface associated with the management address."; + + reference + "IEEE Std 802.1AB-2016: 8.5.9.5"; + } + + typedef man-addr-type { + type binary { + length "1..31"; + } + description + "The value of a management address associated with the LLDP + agent that may be used to reach higher layer entities to + assist discovery by network management. + + It should be noted that appropriate security credentials, + such as SNMP engineId, may be required to access the LLDP + agent using a management address. These necessary credentials + should be known by the network management and the objects + associated with the credentials are not included in the + LLDP agent."; + reference + "IEEE Std 802.1AB-2016: 8.5.9.4"; + } + + typedef system-capabilities-map { + type bits { + bit other { + position 0; + description + "This bit indicates that the system has capabilities + other than those listed below."; + } + bit repeater { + position 1; + description + "This bit indicates that the system has repeater + capability."; + } + bit bridge { + position 2; + description + "This bit indicates that the system has bridge + capability."; + } + bit wlan-access-point { + position 3; + description + "This bit indicates that the system has + WLAN access point capability."; + } + bit router { + position 4; + description + "This bit indicates that the system has router + capability."; + } + bit telephone { + position 5; + description + "This bit indicates that the system has telephone + capability."; + } + bit docsis-cable-device { + position 6; + description + "This bit indicates that the system has + DOCSIS Cable Device capability (IETF RFC 4639 & 2670)."; + } + bit station-only { + position 7; + description + "This bit indicates that the system has only + station capability and nothing else."; + } + bit cvlan-component { + position 8; + description + "This bit indicates that the system has + C-VLAN component functionality."; + } + bit svlan-component { + position 9; + description + "This bit indicates that the system has + S-VLAN component functionality."; + } + bit two-port-mac-relay { + position 10; + description + "This bit indicates that the system has + Two-port MAC Relay (TPMR) functionality."; + } + } + description + "This describes system capabilities."; + reference + "IEEE Std 802.1AB-2016: 8.5.8.1"; + + } + + typedef port-list { + type binary { + length "0..512"; + } + description + "Each octet within this value specifies a set of eight ports, + with the first octet specifying ports 1 through 8, the second + octet specifying ports 9 through 16, etc. Within each octet, + the most significant bit represents the lowest numbered port, + and the least significant bit represents the highest numbered + port. Thus, each port of the system is represented by a + single bit within the value of this object. If that bit has + a value of '1' then that port is included in the set of ports; + the port is not included if its bit has a value of '0'."; + reference + "IETF RFC 2674 section 5"; + } + + typedef dest-address-index-type { + type uint32 { + range "1..4096"; + } + description + "An index value used as the key to the list of destination + MAC addresses used both as the destination addresses on + transmitted LLDPDUs and on received LLDPDUs. This index value + is also used as a secondary key in lists that use interface + as a primary key."; + } + + /*** GROUPING DEFINITIONS ***/ + grouping lldp-cfg { + description + "LLDP basic configuration group."; + + leaf message-fast-tx { + type uint32 { + range "1..3600"; + } + default "1"; + description + "This node indicates the time interval in timer + ticks between transmissions during fast transmission + periods(i.e., txFast is non-zero). + + The recommended default value of msgFastTx is 1; + this value can be changed by management to any + value in the range 1 through 3600."; + reference + "IEEE Std 802.1AB-2016: 9.2.5.5"; + } + + leaf message-tx-hold-multiplier { + type uint32 { + range "1..100"; + } + default "4"; + description + "This node is used, as a multiplier of msg-tx-interval, + to determine the value of txTTL that is carried in LLDP + frames transmitted by the LLDP agent. + + The recommended default value of msgTxHold is 4; + this value can be changed by management to any value in + the range 1 through 100."; + reference + "IEEE Std 802.1AB-2016: 9.2.5.6"; + } + + leaf message-tx-interval { + type uint32 { + range "1..3600"; + } + units "second"; + default "30"; + description + "This node indicates the time interval in timer ticks + between transmissions during normal transmission periods + (i.e., txFast is zero). + + The recommended default value for msgTxInterval is 30 s; + this value can be changed by management to any value in + the range 1 through 3600."; + reference + "IEEE Std 802.1AB-2016: 9.2.5.7"; + } + + leaf reinit-delay { + type uint32 { + range "1..10"; + } + units "second"; + default "2"; + description + "The reinit-delay indicates the amount of delay (in units of + seconds) from when admin-status becomes 'disabled' + until re-initialization is attempted. + + The recommended default value for reinit-delay is 2 s."; + reference + "IEEE Std 802.1AB-2016: 9.2.5.10"; + } + + leaf tx-credit-max { + type uint32 { + range "1..10"; + } + default "5"; + description + "The maximum number of consecutive LLDPDUs that can be + transmitted at any time. + + The recommended default value is 5; + this value can be changed by management to any value + in the range 1 through 10."; + reference + "IEEE Std 802.1AB-2016: 9.2.5.17"; + } + + leaf tx-fast-init { + type uint32 { + range "1..8"; + } + default "4"; + description + "This tx-fast-init is used as the initial value for the + fast transmitting LLDPPDU. This value determines the + number of LLDPDUs that are transmitted during a fast + transmission period. + + The recommended default value is 4; + this value can be changed by management to any value in + the range 1 through 8."; + reference + "IEEE Std 802.1AB-2016: 9.2.5.19"; + } + + leaf notification-interval { + type uint32 { + range "1..3600"; + } + units "second"; + default "30"; + description + "This notification-interval controls the transmission + of LLDP notifications. + + If notification transmission is enabled for particular ports, + the suggested default throttling period is 30 seconds. + + The value of this object must be restored from non-volatile + storage after a re-initialization of the management system."; + reference + "IEEE Std 802.1AB-2016: 9.2.5.7"; + } + } + + /*** SCHEMA DEFINITIONS ***/ + container lldp { + description + "Link Layer Discovery Protocol configuration and + operational information."; + + leaf bridge { + type bridge-ref; + description + "A Bridge on which the LLDP is associated with."; + } + + uses lldp-cfg; + + container remote-statistics { + config false; + description "LLDP remote operational statistics data."; + + leaf last-change-time { + type yang:timestamp; + description + "The value of sysUpTime object (defined in IETF RFC 3418) + at the time an entry is created, modified, or deleted in the + in tables associated with the remote-systems-data objects + and all LLDP extension objects associated with remote systems. + + An NMS can use this object to reduce polling of the + remote-systems-data objects."; + } + + leaf remote-inserts { + type yang:zero-based-counter32; + units "table entries"; + description + "The number of times the complete set of information + advertised by a particular MSAP has been inserted into tables + contained in remote-systems-data and lldpExtensions objects. + + The complete set of information received from a particular + MSAP should be inserted into related tables. If partial + information cannot be inserted for a reason such as lack + of resources, all of the complete set of information should + be removed. + + This counter should be incremented only once after the + complete set of information is successfully recorded + in all related tables. Any failures during inserting + information set which result in deletion of previously + inserted information should not trigger any changes in + inserts since the insert is not completed + yet or or in deletes, since the deletion + would only be a partial deletion. If the failure was the + result of lack of resources, the drops + counter should be incremented once."; + } + + leaf remote-deletes { + type yang:zero-based-counter32; + units "table entries"; + description + "The number of times the complete set of information + advertised by a particular MSAP has been deleted from + tables contained in remote-systems-data and lldpExtensions + objects. + + This counter should be incremented only once when the + complete set of information is completely deleted from all + related tables. Partial deletions, such as deletion of + rows associated with a particular MSAP from some tables, + but not from all tables are not allowed, thus should not + change the value of this counter."; + } + + leaf remote-drops { + type yang:zero-based-counter32; + units "table entries"; + description + "The number of times the complete set of information + advertised by a particular MSAP could not be entered into + tables contained in remote-systems-data and lldpExtensions + objects because of insufficient resources."; + } + + leaf remote-ageouts { + type yang:zero-based-counter32; + description + "The number of times the complete set of information + advertised by a particular MSAP has been deleted from tables + contained in remote-systems-data and lldpExtensions objects + because the information timeliness interval has expired. + + This counter should be incremented only once when the complete + set of information is completely invalidated (aged out) + from all related tables. Partial aging, similar to deletion + case, is not allowed, and thus, should not change the value + of this counter."; + } + } + + container local-system-data { + + config false; + description "LLDP local system operational data."; + + leaf chassis-id-subtype { + type lldp:chassis-id-subtype; + description + "The type of encoding used to identify the chassis + associated with the local system."; + reference + "IEEE Std 802.1AB-2016: 8.5.2.2"; + } + + leaf chassis-id { + type lldp:chassis-id-type; + description + "The string value used to identify the chassis component + associated with the local system."; + reference + "IEEE Std 802.1AB-2016: 8.5.2.3"; + } + + leaf system-name { + type string { + length "0..255"; + } + description + "The string value used to identify the system name of the + local system. If the local agent supports IETF RFC 3418, + system-name object should have the same value of sys-name + object."; + reference + "IEEE Std 802.1AB-2016: 8.5.6.2"; + } + + leaf system-description { + type string { + length "0..255"; + } + description + "The string value used to identify the system description + of the local system. If the local agent supports IETF RFC 3418, + system-name object should have the same value of sys-desc + object."; + reference + "IEEE Std 802.1AB-2016: 8.5.7.2"; + } + + leaf system-capabilities-supported { + type lldp:system-capabilities-map; + description + "The bitmap value used to identify which system capabilities + are supported on the local system."; + reference + "IEEE Std 802.1AB-2016: 8.5.8.1"; + } + + leaf system-capabilities-enabled { + type lldp:system-capabilities-map; + description + "The bitmap value used to identify which system capabilities + are enabled on the local system."; + reference + "IEEE Std 802.1AB-2016: 8.5.8.2"; + } + } + + /* LLDP port configuration table */ + list port { + + key "name dest-mac-address"; + description + "LLDP configuration information for a particular port. + + This configuration parameter controls the transmission and + the reception of LLDP frames on those ports whose rows are + created in this table."; + + leaf name { + type if:interface-ref; + must "deref(.)/../type = 'ianaift:ethernetCsmacd'" + + " or deref(.)/../type = 'ianaift:ieee8023adLag'" { + error-message + "The LLDP is only configured on Link Aggreagation + and Ethernet Port."; + } + description + "The port name used to identify the port component + (contained in the local chassis with the LLDP agent) + associated with this entry."; + } + + leaf dest-mac-address { + type ieee:mac-address; + description + "The dest-mac-address specifies the destination MAC + addresses."; + } + + leaf admin-status { + type enumeration { + enum tx-only { + value 1; + description + "If the associated admin-status object has a + value of 'tx-only(1)', then LLDP agent will transmit LLDP + frames on this port and it will not store any information + about the remote systems connected."; + } + enum rx-only { + value 2; + description + "If the associated admin-status object has a + value of 'rx-only(2)', then the LLDP agent will receive, + but it will not transmit LLDP frames on this port."; + } + enum tx-and-rx { + value 3; + description + "If the associated admin-status object has a + value of 'tx-and-rx(3)', then the LLDP agent will transmit + and receive LLDP frames on this port."; + } + enum disabled { + value 4; + description + "If the associated admin-status object has a + value of 'disabled(4)', then LLDP agent will not transmit or + receive LLDP frames on this port. If there is remote systems + information which is received on this port and stored in + other tables, before the port's admin-status + becomes disabled, then the information will naturally age out."; + } + } + default "tx-and-rx"; + + description + "The administratively desired status of the local LLDP agent."; + reference + "IEEE Std 802.1AB-2016: 9.2.5.1"; + } + + leaf notification-enable { + type boolean; + default "false"; + description + "The notification-enable controls, on a per + port basis, whether or not notifications from the agent + are enabled. The value true(1) means that notifications are + enabled; the value false(2) means that they are not."; + } + + leaf tlvs-tx-enable { + type bits { + bit port-desc { + position 0; + description + "The bit 'port-desc(0)' indicates that LLDP agent should + transmit 'Port Description tlv'."; + } + bit sys-name { + position 1; + description + "The bit 'sys-name(1)' indicates that LLDP agent should transmit + 'System Name tlv'."; + } + bit sys-desc { + position 2; + description + "The bit 'sys-desc(2)' indicates that LLDP agent should transmit + 'System Description tlv'."; + } + bit sys-cap { + position 3; + description + "The bit 'sys-cap(3)' indicates that LLDP agent should transmit + 'System Capabilities tlv'."; + } + } + description + "The tlvs-tx-enable, defined as a bitmap, + includes the basic set of LLDP tlvs whose transmission is + allowed on the local LLDP agent by the network management. + Each bit in the bitmap corresponds to a tlv type associated + with a specific optional tlv. + + It should be noted that the organizationally-specific tlvs + are excluded from the lldptlvsTxEnable bitmap. + + LLDP Organization Specific Information Extension MIBs should + have similar configuration object to control transmission + of their organizationally defined tlvs. + + There is no bit reserved for the management address tlv type + since transmission of management address tlvs are controlled + by another object, man-addr-type. + + The default value for tlvs-tx-enable object is + empty set, which means no enumerated values are set. + + The value of this object must be restored from non-volatile + storage after a re-initialization of the management system."; + reference + "IEEE Std 802.1AB-2016 9.1.2.1"; + } + uses lldp-cfg; + + list management-address-tx-port { + key "address-subtype man-address"; + + description + "LLDP configuration information that specifies the set + of ports (represented as a PortList) on which the local + system management address instance will be transmitted. + + This configuration object augments the local-management-address, + therefore it is only present along with the management + address instance contained in the associated + local-management-address entry. + + Each active man-address must be restored from + non-volatile and re-created (along with the corresponding + local-management-address) after a re-initialization of the + management system."; + + leaf address-subtype { + type identityref { + base rt:address-family; + } + description + "The management address subtype field shall contain an + integer value indicating the type of address."; + reference + "IEEE Std 802.1AB-2016 8.5.9.3"; + } + leaf man-address { + type man-addr-type; + description + "The management address field shall contain an octet string + indicating the particular management address associated + with this TLV."; + reference + "IEEE Std 802.1AB-2016 8.5.9.4"; + } + leaf tx-enable { + type boolean; + default "false"; + description + "Specify to enable transmission of system + management address instance on a particular port."; + reference + "IEEE Std 802.1AB-2016 9.1.2.1"; + } + + leaf addr-len { + type uint32; + config false; + description + "The total length of the management address subtype and the + management address fields in LLDPDUs transmitted by the + local LLDP agent. + + The management address length field is needed so that the + receiving systems that do not implement SNMP will not be + required to implement an iana family numbers/address length + equivalency table in order to decode the management adress."; + reference + "IEEE Std 802.1AB-2016: 8.5.9.2"; + } + + leaf if-subtype { + type lldp:man-addr-if-subtype; + config false; + description + "The enumeration value that identifies the interface numbering + method used for defining the interface number, associated + with the local system."; + reference + "IEEE Std 802.1AB-2016: 8.5.9.5"; + } + + leaf if-id { + type uint32; + config false; + description + "The integer value used to identify the interface number + regarding the management address component associated with + the local system."; + reference + "IEEE Std 802.1AB-2016: 8.5.9.6"; + } + + } + + leaf port-id-subtype { + type lldp:port-id-subtype; + config false; + description + "The type of port identifier encoding used in the associated + 'port-id' object."; + reference + "IEEE Std 802.1AB-2016: 8.5.3.2"; + } + + leaf port-id { + type lldp:port-id-type; + config false; + description + "The string value used to identify the port component + associated with a given port in the local system."; + reference + "IEEE Std 802.1AB-2016: 8.5.3.3"; + } + + leaf port-desc { + type string { + length "0..255"; + } + config false; + description + "The string value used to identify the 802 LAN station's port + description associated with the local system. If the local + agent supports IETF RFC 2863, port-desc object should + have the same value of ifDescr object."; + reference + "IEEE Std 802.1AB-2016: 8.5.5.2"; + } + + container tx-statistics { + + config false; + description + "LLDP frame transmission statistics for a particular port. + The port must be contained in the same chassis as the + LLDP agent. + + All counter values in a particular entry shall be + maintained on a continuing basis and shall not be deleted + upon expiration of rxInfoTTL timing counters in the LLDP + remote systems MIB of the receipt of a shutdown frame from + a remote LLDP agent. + + All statistical counters associated with a particular + port on the local LLDP agent become frozen whenever the + adminStatus is disabled for the same port."; + + leaf total-frames { + type yang:counter32; + description + "A count of all LLDP frames transmitted through the port."; + reference + "IEEE Std 802.1AB-2016: 9.2.6.5"; + } + leaf total-length-errors { + type yang:counter32; + description + "A count of all LLDP length errors detected when constructing + LLPDU frames for transmission through the port."; + reference + "IEEE Std 802.1AB-2016: 9.2.7.2"; + } + } + + container rx-statistics { + + config false; + description + "LLDP frame reception statistics for a particular port. + The port must be contained in the same chassis as the + LLDP agent. + + All counter values in a particular entry shall be + maintained on a continuing basis and shall not be deleted + upon expiration of rxInfoTTL timing counters in the LLDP + remote systems MIB of the receipt of a shutdown frame from + a remote LLDP agent. + + All statistical counters associated with a particular + port on the local LLDP agent become frozen whenever the + adminStatus is disabled for the same port."; + + leaf total-ageouts { + type yang:zero-based-counter32; + description + "A count of the times that a neighbor’s information + is deleted from the LLDP remote systems MIB because + of rxInfoTTL timer expiration."; + reference + "IEEE Std 802.1AB-2016: 9.2.6.1"; + } + + leaf total-discarded-frames { + type yang:counter32; + description + "A count of all LLDPDUs received and then discarded."; + reference + "IEEE Std 802.1AB-2016: 9.2.6.2"; + } + + leaf error-frames { + type yang:counter32; + description + "A count of all LLDPDUs received at the port with one or more + detectable errors."; + reference + "IEEE Std 802.1AB-2016: 9.2.6.3"; + } + + leaf total-frames { + type yang:counter32; + description + "A count of all LLDP frames received at the port."; + reference + "IEEE Std 802.1AB-2016: 9.2.6.4"; + } + + leaf total-discarded-tlvs { + type yang:counter32; + description + "A count of all TLVs received at the port and discarded for any + reason."; + reference + "IEEE Std 802.1AB-2016: 9.2.6.5"; + } + + leaf total-unrecognized-tlvs { + type yang:counter32; + description + "This counter provides a count of all TLVs not recognized by + the receiving LLDP local agent."; + reference + "IEEE Std 802.1AB-2016: 9.2.6.6"; + } + } + + list remote-systems-data { + + key "time-mark remote-index"; + config false; + description + "Information about a particular physical network connection. + Entries may be created and deleted in this table by the agent, + if a physical topology discovery process is active."; + + leaf time-mark { + type yang:timeticks; + description + "A TimeFilter for this entry. See the TimeFilter textual + convention in IETF RFC 2021 and + http://www.ietf.org/IESG/Implementations/RFC2021-Implementation.txt + to see how TimeFilter works."; + reference + "IETF RFC 2021 section 6"; + } + + leaf remote-index { + type uint32 { + range "1..2147483647"; + } + description + "This object represents an arbitrary local integer value used + by this agent to identify a particular connection instance, + unique only for the indicated remote system. + + An agent is encouraged to assign monotonically increasing + index values to new entries, starting with one, after each + reboot. It is considered unlikely that the index + will wrap between reboots."; + } + + leaf chassis-id-subtype { + type lldp:chassis-id-subtype; + description + "The type of encoding used to identify the chassis associated + with the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.2.2"; + } + + leaf chassis-id { + type lldp:chassis-id-type; + description + "The string value used to identify the chassis component + associated with the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.2.3"; + } + + leaf port-id-subtype { + type lldp:port-id-subtype; + description + "The type of port identifier encoding used in the associated + 'port-id' object."; + reference + "IEEE Std 802.1AB-2016: 8.5.3.2"; + } + + leaf port-id { + type lldp:port-id-type; + description + "The string value used to identify the port component + associated with the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.3.3"; + } + + leaf port-desc { + type string { + length "0..255"; + } + description + "The string value used to identify the description of + the given port associated with the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.5.2"; + } + + leaf system-name { + type string { + length "0..255"; + } + description + "The string value used to identify the system name of the + remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.6.2"; + } + + leaf system-description { + type string { + length "0..255"; + } + description + "The string value used to identify the system description + of the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.7.2"; + } + + leaf system-capabilities-supported { + type lldp:system-capabilities-map; + description + "The bitmap value used to identify which system + capabilities are supported on the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.8.1"; + } + + leaf system-capabilities-enabled { + type lldp:system-capabilities-map; + description + "The bitmap value used to identify which system capabilities + are enabled on the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.8.2"; + } + + list management-address { + + key "address-subtype address"; + description + "Management address information about a particular chassis + component. There may be multiple management addresses + configured on the remote system identified by a particular + index whose information is received on + port-num of the local system. Each management + address should have distinct 'management address + type' (subtype) and 'management address' + (address.) + + Entries may be created and deleted in this table by the + agent."; + + leaf address-subtype { + type identityref { + base rt:address-family; + } + description + "The type of management address identifier encoding used in + the associated 'lldpRemManagmentAddr' object."; + reference + "IEEE Std 802.1AB-2016: 8.5.9.3"; + } + + leaf address { + type lldp:man-addr-type; + description + "The string value used to identify the management address + component associated with the remote system. The purpose + of this address is to contact the management entity."; + reference + "IEEE Std 802.1AB-2016: 8.5.9.4"; + } + + leaf if-subtype { + type lldp:man-addr-if-subtype; + description + "The enumeration value that identifies the interface numbering + method used for defining the interface number, associated + with the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.9.5"; + } + + leaf if-id { + type uint32; + description + "The integer value used to identify the interface number + regarding the management address component associated with + the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.5.9.6"; + } + } + + list remote-unknown-tlv { + + key "tlv-type"; + description + "Information about an unrecognized tlv received from a + physical network connection. Entries may be created and + deleted in this table by the agent, if a physical topology + discovery process is active."; + + leaf tlv-type { + type uint32 { + range "9..126"; + } + description + "This object represents the value extracted from the type + field of the tlv."; + reference + "IEEE Std 802.1AB-2016: 9.2.7.7.1"; + } + + leaf tlv-info { + type binary { + length "0..511"; + } + description + "This object represents the value extracted from the value + field of the tlv."; + reference + "IEEE Std 802.1AB-2016: 9.2.7.7.1"; + } + } + + list remote-org-defined-info { + + key "info-identifier info-subtype info-index"; + description + "Information about the unrecognized organizationally + defined information advertised by the remote system. + The time-mark, port-num, index, + info-identifier, info-subtype, and + info-index are indexes to this table. If there is + an remote-org-defined-info associated with a particular remote + system identified by the port-num and index, + there must be an remote associated with the same + instance (i.e, using same indexes.) When the remote + for the same index is removed from the lldpRemTable, the + associated remote-org-defined-info should be removed from + the remote-org-defined-infoTable. + + Entries may be created and deleted in this table by the + agent."; + + leaf info-identifier { + type binary { + length "3"; + } + description + "The Organizationally Unique Identifier (OUI), as defined + in IEEE std 802-2001, is a 24 bit (three octets) globally + unique assigned number referenced by various standards, + of the information received from the remote system."; + reference + "IEEE Std 802.1AB-2016: 8.6.1.3"; + } + + leaf info-subtype { + type uint32 { + range "1..255"; + } + description + "The integer value used to identify the subtype of the + organizationally defined information received from the + remote system. + + The subtype value is required to identify different instances + of organizationally defined information that could not be + retrieved without a unique identifier that indicates the + particular type of information contained in the information + string."; + reference + "IEEE Std 802.1AB-2016: 8.6.1.4"; + } + + leaf info-index { + type uint32 { + range "1..2147483647"; + } + description + "This object represents an arbitrary local integer value + used by this agent to identify a particular unrecognized + organizationally defined information instance, unique only + for the info-identifier and info-subtype + from the same remote system. + + An agent is encouraged to assign monotonically increasing + index values to new entries, starting with one, after each + reboot. It is considered unlikely that the + info-index will wrap between reboots."; + } + + leaf remote-info { + type binary { + length "0..507"; + } + description + "The string value used to identify the organizationally + defined information of the remote system. The encoding for + this object should be as defined for SnmpAdminString TC."; + reference + "IEEE Std 802.1AB-2016: 8.6.1.5"; + } + } + + + + + } + } + } + + + notification remote-table-change { + + leaf remote-insert { + type leafref { + path "/lldp:lldp/lldp:remote-statistics/lldp:remote-inserts"; + } + description + "The number of times the complete set of information + advertised by a particular MSAP has been inserted into tables + contained in remote-systems-data and lldpExtensions objects. + + The complete set of information received from a particular + MSAP should be inserted into related tables. If partial + information cannot be inserted for a reason such as lack + of resources, all of the complete set of information should + be removed. + + This counter should be incremented only once after the + complete set of information is successfully recorded + in all related tables. Any failures during inserting + information set which result in deletion of previously + inserted information should not trigger any changes in + inserts since the insert is not completed + yet or or in deletes, since the deletion + would only be a partial deletion. If the failure was the + result of lack of resources, the drops + counter should be incremented once."; + } + + leaf remote-delete { + type leafref { + path "/lldp:lldp/lldp:remote-statistics/lldp:remote-deletes"; + } + description + "The number of times the complete set of information + advertised by a particular MSAP has been deleted from + tables contained in remote-systems-data and lldpExtensions + objects. + + This counter should be incremented only once when the + complete set of information is completely deleted from all + related tables. Partial deletions, such as deletion of + rows associated with a particular MSAP from some tables, + but not from all tables are not allowed, thus should not + change the value of this counter."; + } + + leaf remote-drops { + type leafref { + path "/lldp:lldp/lldp:remote-statistics/lldp:remote-drops"; + } + description + "The number of times the complete set of information + advertised by a particular MSAP could not be entered into + tables contained in remote-systems-data and lldpExtensions + objects because of insufficient resources."; + } + + leaf remote-ageouts { + type leafref { + path "/lldp:lldp/lldp:remote-statistics/lldp:remote-ageouts"; + } + description + "The number of times the complete set of information + advertised by a particular MSAP has been deleted from tables + contained in remote-systems-data and lldpExtensions objects + because the information timeliness interval has expired. + + This counter should be incremented only once when the complete + set of information is completely invalidated (aged out) + from all related tables. Partial aging, similar to deletion + case, is not allowed, and thus, should not change the value + of this counter."; + } + + description + "A rem-table-change notification is sent when the value + of remote-table-last-change-time changes. It can be + utilized by an NMS to trigger LLDP remote systems table + maintenance polls. + + Note that transmission of remote-table-change + notifications are throttled by the agent, as specified by the + 'notification-interval' object."; + + } +} /* end of module ieee802-dot1ab-lldp */ \ No newline at end of file diff --git a/model/yang/imports/ieee802-dot1q-cfm.yang b/model/yang/imports/ieee802-dot1q-cfm.yang new file mode 100755 index 0000000..0d7dd1f --- /dev/null +++ b/model/yang/imports/ieee802-dot1q-cfm.yang @@ -0,0 +1,3188 @@ +module ieee802-dot1q-cfm { + + namespace "urn:ieee:std:802.1X:yang:ieee802-dot1q-cfm"; + prefix "dot1q-cfm"; + + import ieee802-types { prefix "ieee"; } + import ietf-yang-types { prefix "yang"; } + import ietf-interfaces { prefix "if"; } + import ieee802-dot1q-types { prefix "dot1q-types"; } + import ieee802-dot1q-bridge { prefix "dot1q"; } + + organization + "IEEE 802.1 Working Group"; + + contact + "WG-URL: http://www.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 + P.O. Box 1331 + Piscataway + NJ 08855-1331 + USA + + E-mail: STDS-802-1-L@IEEE.ORG"; + + description + "Connectivity Fault Management (CFM) comprises capabilities + for detecting, verifying, and isolating connectivity failures + in Virtual Bridged Local Area Networks. These capabilities + can be used in networks operated by multiple independent + organizations, each wit restricted management access to each others + equipment."; + + revision 2017-12-20 { + description + "Initial creation for Task Group review."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + + /* -------------------------------------------------- + * Type definitions used by 802.1AB -LLDP YANG module + * -------------------------------------------------- + */ + + typedef lldp-chassis-id-subtype { + 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 + "LLDP MIB 20050506"; + } + + typedef lldp-chassis-id { + 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 + "LLDP MIB 20050506"; + } + + typedef lldp-port-id-subtype { + 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 lldp-port-id { + type string { + length "8"; + } + description + "The format of a port identifier string. Objects of this type + are always used with an associated lldp-port-id-subtype object, + which identifies the format of the particular lldp-port-id + object instance. + + If the associated lldp-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 lldp-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 lldp-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 lldp-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 lldp-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 lldp-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 lldp-port-id-subtype object has a value of + local, then this string identifies a locally assigned port ID."; + } + + /* ----------------------------------------------------- + * Type definitions used by RFC 2579 SNMP v2 YANG module + * ----------------------------------------------------- + */ + + typedef transport-service-domain { + type yang:object-identifier; + description + "Denotes a kind of transport service"; + reference + "RFC2579 - Textual Conventions for SMIv2"; + } + + typedef transport-service-address { + type string { + length "1..255"; + } + description + "Denotes a transport service address"; + } + + /* ---------------------------------------------- + * Type definitions used by 802.1Qcx YANG module + * ---------------------------------------------- + */ + + typedef bridge-ref { + type leafref { + path "/dot1q:bridges/dot1q:bridge/dot1q:name"; + } + description + "This type is used by data models that need to reference + a configured Bridge."; + } + + typedef bridge-component-ref { + type leafref { + path "/dot1q:bridges/dot1q:bridge/dot1q:component/dot1q:name"; + } + description + "This type is used by data models that need to reference + a configured Bridge Component."; + } + + typedef md-name-format-type { + type enumeration { + enum ieee-reserved-0 { + value 0; + description + "Reserved for definition by IEEE 802.1 recommend to not + use zero unless absolutely needed."; + } + enum none { + value 1; + description + "No format specified, usually because there is not a + Maintenance Domain Name. In this case, a zero length + OCTET string for the Domain name field is acceptable."; + } + enum dns-like-name { + value 2; + description + "Domain name like string, globally unique text string + derived from a DNS name."; + } + enum mac-address-and-uint { + value 3; + description + "MAC address plus 2-octet (unsigned) integer."; + } + enum char-string { + value 4; + description + "RFC2579 DisplayString, except that the character codes + 0-31 (decimal) are not used."; + } + } + description + "A value that represents a type (and thereby the format) + of a md-name."; + } + + typedef md-name-type { + type string { + length "0..43"; + } + description + "The Maintenance Domain name type"; + } + + typedef ma-name-format-type { + type enumeration { + enum ieee-reserved-0 { + value 0; + description + "Reserved for definition by IEEE 802.1. Recommend not to use + zero unless absolutely needed."; + } + enum primary-vid { + value 1; + description + "Primary VLAN ID. 12 bits represented in a 2-octet integer."; + } + enum char-string { + value 2; + description + "RFC2579 DisplayString, except that the character codes + 0-31 (decimal) are not used. (1..45) octets."; + } + enum unsigned-int16 { + value 3; + description + "2-octet integer/big endian."; + } + enum rfc2865-vpn-id { + value 4; + description + "RFC2685 VPN ID. 3 octet VPN authority Organizationally + Unique Identifier followed by 4 octet VPN index identifying + VPN according to the OUI."; + } + enum icc-format { + value 32; + description + "ICC-based format as specified in ITU-T Y.1731."; + } + } + description + "A value that represents a type (and thereby the format) + of a ma-name."; + } + + typedef ma-name-type { + type string { + length "1..45"; + } + description + "The Maintenance Association name type"; + } + + typedef maintenance-group-type { + type string; + description + "The Maintenance Group type"; + } + + typedef mhf-creation-type { + type enumeration { + enum mhf-none { + value 1; + description + "No MHFs can be created for designated VID(s) or ISID."; + } + enum mhf-default { + value 2; + description + "MHFs can be created for designated VID(s) or ISID on any + Bridge Port through which the VID(s) or ISID can pass, where: + i) There are no lower active MD levels; or + ii) There is a MEP at the next lower active MD level on + the port."; + } + enum mhf-explicit { + value 3; + description + "MHFs can be created for designated VID(s) or ISID only + on Bridge Ports through which the VID(s) or ISID can pass, + and onlyh if there is a MEP at the next lower active + MD level on the port."; + } + enum mhf-defer { + value 4; + description + "In the Maintenance Association only, the control of MHF + creation is deferred to the corresponding variable in + the enclosing Maintenance Domain."; + } + } + description + "Indicates if the Management Entity can create MHFs."; + } + + typedef mp-direction-type { + type enumeration { + enum down { + value 1; + description + "Down maintenance point, where CFM protocol messages + are dispatched away from the MAC Relay entity."; + } + enum up { + value 2; + description + "Up maintenance point, where CFM protocol messages + are dispatched towards the MAC Relay entity."; + } + } + description + "Indicates the direction in which the Maintenance + association (MEP or MIP) faces on the Bridge Port."; + } + + typedef service-selector-type { + type enumeration { + enum ieee-reserved-0 { + value 0; + description + "Reserved for definition by IEEE 802.1 recommend to not + use zero unless absolutely needed."; + } + enum vlan-id { + value 1; + description + "12-bit identifier found in a VLAN tag."; + } + enum isid { + value 2; + description + "24-bit identifier found in an I-TAG."; + } + enum tesid { + value 3; + description + "32-bit identifier"; + } + enum segid { + value 4; + description + "32-bit identifier"; + } + enum path-tesid { + value 5; + description + "32-bit identifier"; + } + enum group-isid { + value 6; + description + "24 bit identifier"; + } + enum ieee-reserved { + value 7; + description + "Reserved for definition by IEEE 802.1"; + } + } + description + "A value that represents a type (and thereby the format) + of a service-selector-value."; + } + + typedef service-selector-value { + type uint32 { + range "1..4294967295"; + } + description + "An integer that uniquely identifies a generic MAC Service, + or none. Examples of service selectors are a VLAN-ID + (IEEE 802.1Q) and an I-SID (IEEE 802.1ah). + + An service-selector-value value is always interpreted + within the context of an service-selector-type value. + Every usage of the service-selector-value textual + convention is required to specify the + service-selector-type object that provides the context. + + The value of an service-selector-value object must + always be consistent with the value of the associated + service-selector-type object. Attempts to set an + service-selector-value object to a value inconsistent + with the associated service-selector-type must fail + with an inconsistent-value error."; + } + + typedef service-selector-value-or-none { + type uint32 { + range "0 | 1..4294967295"; + } + description + "An integer that uniquely identifies a generic MAC Service, + or none. Examples of service selectors are a VLAN-ID + (IEEE 802.1Q) and an I-SID (IEEE 802.1ah). + + An service-selector-value value is always interpreted + within the context of an service-selector-type value. + Every usage of the service-selector-value textual + convention is required to specify the + service-selector-type object that provides the context. + + The value of an service-selector-value object must + always be consistent with the value of the associated + service-selector-type object. Attempts to set an + service-selector-value object to a value inconsistent + with the associated service-selector-type must fail + with an inconsistent-value error. + + The special value of zero is used to indicate that no + service selector is present or used. This can be used in + any situation where an object or a table entry MUST either + refer to a specific service, or not make a selection."; + } + + typedef mep-id-type { + type uint32 { + range "1..8191"; + } + description + "Maintenance association End Point Identifier, which is + unique over a given Maintenance Association."; + } + + typedef mep-id-or-zero-type { + type uint32 { + range "0 | 1..8191"; + } + description + "Maintenance association End Point Identifier, which is + unique over a given Maintenance Association. + + The special value 0 is allowed to indicate a special case when + there is no MEPID configured."; + } + + typedef md-level-type { + type uint32 { + range "0..7"; + } + description + "Integer identifying the Maintenance Domain Level (MD Level). + Higher numbers correspond to higher Maintenance Domains, + those with the greatest physical reach, with the highest + values for customers' CFM PDUs. Lower numbers correspond + to lower Maintenance Domains, those with more limited + physical reach, with the lowest values for CFM PDUs + protecting single bridges or physical links."; + } + + typedef md-level-or-none-type { + type int32 { + range "-1 | 0..7"; + } + description + "Integer identifying the Maintenance Domain Level (MD Level). + Higher numbers correspond to higher Maintenance Domains, + those with the greatest physical reach, with the highest + values for customers CFM packets. Lower numbers correspond + to lower Maintenance Domains, those with more limited + physical reach, with the lowest values for CFM PDUs + protecting single bridges or physical links. + The value (-1) is reserved to indicate that no MA Level has + been assigned."; + } + + typedef component-identifier-type { + type uint32 { + range "1..4294967295"; + } + description + "The component identifier is used to distinguish between the + multiple virtual Bridge instances within a PB or PBB. Each + virtual Bridge instance is called a component. In simple + situations where there is only a single component the default + value is 1. The component is identified by a component + identifier unique within the BEB and by a MAC address unique + within the PBBN. Each component is associated with a Backbone + Edge Bridge (BEB) Configuration managed object."; + } + + typedef port-status-tlv-value { + type enumeration { + enum no-port-state-tlv { + value 0; + description + "Indicates either that no CCM has been received or that + no port status TLV was present in the last CCM received."; + } + enum blocked { + value 1; + description + "Ordinary data cannot pass freely through the port on + which the remote MEP resides."; + } + enum up { + value 2; + description + "Ordinaty data can pass freely through the port on which + the remote MEP resides."; + } + } + description + "An enumerated value from he Port Status TLV from the last CCM + received from the last MEP. It indicates the ability of the + Bridge Port on which the transmitting MEP resides to pass + ordinary data, regardless of the status of the MAC."; + } + + typedef interface-status-tlv-value { + type enumeration { + enum is-no-interface-status-tlv { + value 0; + description + "Indicates either that no CCM has been received or that + no interface status TLV was present in the last CCM + received."; + } + enum is-up { + value 1; + description + "The interface is ready to pass packets."; + } + enum is-down { + value 2; + description + "The interface can not pass packets."; + } + enum is-testing { + value 3; + description + "The interface is in same test mode."; + } + enum is-unknown { + value 4; + description + "The interface status cannot be determined for some + reason."; + } + enum is-dormant { + value 5; + description + "The interface is not in a state to pass packets but is in + a pending state, waiting for some extrnal event."; + } + enum is-not-present { + value 6; + description + "Some component of the interface is mssing."; + } + enum is-lower-layer-down { + value 7; + description + "The interface is down due to state of the lower layer + interface."; + } + } + description + "An enumerated value from the Interface Status TLV from the + last CCM received from the last MEP. It indicates the status + of the Interface within which the MEP transmitting the CCM + is configured, or the next lower Interface in the Interface + Stack, if the MEP is not configured within an Interface."; + } + + typedef highest-defect-priority-type { + type enumeration { + enum none { + value 0; + description + "No defects since Fault Notification Generator state + machine reset."; + } + enum def-rdi-ccm { + value 1; + description + "The last CCM received by this MEP from some remote MEP + contained the RDI bit set."; + } + enum def-mac-status { + value 2; + description + "The last CCM received by this MEP from some remote MEP + indicating that the transmitting MEP's associated MAC is + reporting an error status via the Port Status TLV or + Interface Status TLV is set."; + } + enum def-remote-ccm { + value 3; + description + "This MEP is not receiving CCMs from some other MEP in its + configured list."; + } + enum def-error-ccm { + value 4; + description + "This MEP is receiving invalid CCMs."; + } + enum def-xcon-ccm { + value 5; + description + "This MEP is receiving CCMs that could be from some other + MA."; + } + } + description + "An enumerated value, equal to the contents of the variable + highestDefect (20.35.9 and Table 20-1), indicating the + highest-priority defect that has been present since the MEP + Fault Notification Generator State Machine was last in the + FNG_RESET state."; + } + + typedef lowest-alarm-priority-type { + type enumeration { + enum all-def { + value 1; + description + "Includes def-rid-ccm, def-mac-status, def-remote-ccm, + def-error-ccm, and def-xcon-ccm."; + } + enum mac-remote-error-xcon { + value 2; + description + "Only includes def-mac-status, def-remote-ccm, def-error-ccm, + and def-xcon-ccm."; + } + enum remote-error-xcon { + value 3; + description + "Includes def-remote-ccm, def-error-ccm, and def-xcon-ccm."; + } + enum error-xcon { + value 4; + description + "Includes def-error-ccm and def-xcon-ccm."; + } + enum xcon { + value 5; + description + "Only def-xcon-ccm"; + } + enum no-xcon { + value 6; + description + "No defects def-xcon or lower are to be reported."; + } + } + description + "An integer value specifying the lowest priority defect + that is allowed to generate a Fault Alarm (20.9.5)."; + } + + typedef sender-id-permission-type { + type enumeration { + enum send-id-none { + value 1; + description + "The Sender ID TLV is not to be sent."; + } + enum send-id-chassis { + value 2; + description + "The Chassis ID Length, Chassis ID Subtype, and Chassis ID + fields of te Sender ID TLV are to be sent."; + } + enum send-id-manage { + value 3; + description + "The Management Address Length and Management Address + of the Sender ID TLV are to be sent."; + } + enum send-id-chassis-manage { + value 4; + description + "The Chassis ID Length, Chassis ID Subtype, Chassis ID, + Management Address Length and Management Address fields are + all to be sent."; + } + enum send-id-defer { + value 5; + description + "The content of the Sender ID TLV are determined by the + corresponding Maintenance Domain variable."; + } + } + description + "Indicates what, if anything, is to be included in the Sender + ID TLV transmitted in CCMs, LBMs, LTMs, and LTRs."; + } + + typedef cfm-interval-type { + type enumeration { + enum invalid { + value 0; + description + "No CFM PDUs are to be sent"; + } + enum 300hz { + value 1; + description + "CFM PDUs are sent every 3 1/3 milliseconds (300Hz)."; + } + enum 10ms { + value 2; + description + "CFM PDUs are sent every 10 milliseconds."; + } + enum 100ms { + value 3; + description + "CFM PDUs are sent every 100 milliseconds."; + } + enum 1sec { + value 4; + description + "CFM PDUs are sent every second."; + } + enum 10sec { + value 5; + description + "CFm PDUs are sent every 10 seconds."; + } + enum 1min { + value 6; + description + "CFM PDUs are sent every minute."; + } + enum 10min { + value 7; + description + "CFM PDUs are sent every 10 minutes."; + } + } + description + "Indicates the interval at which CFM PDUs are sent by a MEP."; + } + + typedef fng-state-type { + type enumeration { + enum fng-reset { + value 1; + description + "No defect has been present since the mep-fng-reset-time + timer expired, or since the state machine was last reset."; + } + enum fng-defect { + value 2; + description + "A defect is present, but not for a long enough time to be + reported."; + } + enum fng-report-defect { + value 3; + description + "A momentary state during which the defect is reported by sending a + fault-alarm notification, if that action is enabled."; + } + enum fng-defect-reported { + value 4; + description + "A defect is present, and some defect has been reported."; + } + enum fng-defect-clearing { + value 5; + description + "No defect is present, but the mep-fng-reset-time timer + has not yet expired."; + } + } + description + "Indicates the different states of the MEP Fault Notification + Generator State Machine."; + } + + typedef relay-action-field-value { + type enumeration { + enum relay-hit { + value 1; + description + "The LTM reached a Maintenance Point whose MAC address + matches the target address."; + } + enum relay-fdb { + value 2; + description + "The Egress Port was determined by consulting the Filtering + Database."; + } + enum relay-mpdb { + value 3; + description + "The Egress Port was determined by consulting the MIP CCM + Database."; + } + } + description + "Possible values the Relay action field can take."; + } + + typedef ingress-action-field-value { + type enumeration { + enum ingress-no-tlv { + value 0; + description + "Indicates that no Reply Ingress TLV was returned in the LTM."; + } + enum ingress-ok { + value 1; + description + "The target data frame would be passed through to the MAC + Relay Entity."; + } + enum ingress-down { + value 2; + description + "The Bridge Ports MAC_Operational parameter is false."; + } + enum ingress-blocked { + value 3; + description + "The target data frame would not be forwarded if received on + this Port due to active topology enforcement."; + } + enum ingress-vid { + value 4; + description + "The ingress port is not in the member set of the LTMs VID, + and ingress filtering is enabled, so the target data frame + would be filtered by ingress filtering."; + } + } + description + "Possible values returned in the ingress action field."; + } + + typedef egress-action-field-value { + type enumeration { + enum egress-no-tlv { + value 0; + description + "Indicates that no Reply Egress TLV was returned in the LTM."; + } + enum egress-okay { + value 1; + description + "The targeted data frame would be forwarded."; + } + enum egress-down { + value 2; + description + "The Egress Port can be identified, but that Bridge Port + MAC_Operational parameter is false."; + } + enum egress-blocked { + value 3; + description + "The Egress Port can be identified, but the data frame would + not pass through the Egress Port due to active topology + management (i.e., the Bridge Port is not in the + Forwardin state."; + } + enum egress-vid { + value 4; + description + "The Egress Port can be identified, but the Bridge Port is not + in the LTMs VIDs member set, so would be filtered by + egress filtering."; + } + } + description + "Possible values returned in the egress action field."; + } + + typedef remote-mep-state-type { + type enumeration { + enum rmep-idle { + value 1; + description + "Momentary state during reset."; + } + enum rmep-start { + value 2; + description + "The timer has not expired since the state machine + was reset, and no valid CCM has yet been received."; + } + enum rmep-failed { + value 3; + description + "The timer has expired, both since the state machine was + reset, and since a valid CCM was received."; + } + enum rmep-ok { + value 4; + description + "The timer has not expired since a valid CCM was received."; + } + } + description + "Operational state of the remote MEP state machine. This + state machine monitors the reception of valid CCMs from a + remote MEP with a specific MEPID. It uses a timer that + expires in 3.5 times the length of time indicated by the + ma-ccm-interval object."; + } + + typedef mep-defects-type { + type bits { + bit def-rdi-ccm { + position 0; + description + "A remote MEP reported that RDI bit in its last CCM."; + } + bit def-mac-status { + position 1; + description + "Either some remote MEP is reporting its Interface Status + TLV as not isUp, or all remote MEPs are reporting a Port + Status TLV that contains some value other than psUp."; + } + bit def-remote-ccm { + position 2; + description + "The MEP is not receiving valid VCMs from at least one of + the remote MEPs."; + } + bit def-error-ccm { + position 3; + description + "The MEP has received at least one invalid CCM whose CCM + Interval has not yet timed out."; + } + bit def-xcon-ccm { + position 4; + description + "The MEP has received at last one CCM from either another + MAID or a lower MD level whose CCm Interval has not yet + timed out."; + } + } + description + "A MEP can detect and report a number of defects, and multiple + defects can be present at the same time."; + } + + typedef config-errors { + type bits { + bit cfm-leaf { + position 0; + description + "MA x is associated with a specific VID list, one or more + of the VIDs in MA x can pass through the Bridge Port, + no Down MEP is configured on any Bridge Port for MA x, + and some other MA y, at a higher MD Level than MA x, and + associated with at least one of the VID(s) also in MA x, + does have a MEP configured on the Bridge Port."; + } + bit conflicting-vids { + position 1; + description + "MA x is associated with a specific VID list, an Up MEP is + configured on MA x on the Bridge Port, and some other MA y, + associated with at least one of the VID(s) also in MA x, + also has an Up MEP configured on some Bridge Port."; + } + bit excessive-levels { + position 2; + description + "The number of different MD Levels at which MIPs are to be + created on this port exceeds the Bridge's capabilities."; + } + bit overlapped-levels { + position 3; + description + "A MEP is created for one VID at one MD Level, but a MEP is + configured on another VID at that MD Level or higher, + exceeding the Bridges capabilities."; + } + } + description + "While making the MIP creation evaluation described in + 22.2.3, the management entity can encounter errors in + the configuration."; + } + + typedef mep-tx-ltm-flags-type { + type bits { + bit use-fdb-only { + position 0; + description + "Use FDB only"; + } + } + description + "The flags field for LTMs transmitted by the MEP."; + } + + typedef fault-alarm-address-type { + type enumeration { + enum address { + value 1; + description + "Indicates that a Network address to which Fault Alarms + are to be transmitted should be used."; + } + enum not-specified { + value 2; + description + "Indicates not specified. In the case of a MA, then the + selection used by the MD should be used."; + } + enum not-transmitted { + value 3; + description + "Indicates that Fault alarms are not to be transmitted."; + } + } + description + "The Fault Alarm address indicators."; + } + + + /* ------------------------------------------------- + * Grouping definitions used by 802.1Qcx YANG module + * ------------------------------------------------- + */ + + grouping mac-address-and-uint-type { + description + "The MAC address and uint type grouping."; + container mac-address-and-uint-type { + description + "The MAC address and uint type definition."; + leaf address { + type ieee:mac-address; + description + "The MAC address."; + } + leaf int { + type uint16; + description + "The additional 2-octet (unsigned) integer."; + } + } + } + + grouping service-id { + description + "The list of VIDs, I-SID, or the TE-SID monitored by + this MA, or 0, if the MA is not attached to a VID, or + I-SID, or TE-SID. In the case of a list of VIDs, the + first VID in the list is the MAs Primary VID (default + none). The specification of I-SID is allowed only in + the case of I- or B- components. The TE-SID is allowed + only in the case that PBB-TE is supported."; + choice service-id { + default vid; + description + "The service identifiers types"; + case none { + leaf zero { + type uint32 { + range "0"; + } + description + "Represents no service identifier selected."; + } + } + case vid { + leaf-list vid { + type dot1q-types:vlanid; + description + "12-Bit identifier VLAN identifier."; + } + } + case isid { + leaf isid { + type uint32 { + range "1..16777215"; + } + description + "24-Bit identifier I-SID identifier."; + } + } + case tesid { + leaf tesid { + type uint32 { + range "1..4294967295"; + } + description + "The tesid is used as a service selector for MAs that are + present in Bridges that implement PBB-TE functionality."; + } + } + case segid { + leaf segid { + type uint32 { + range "1..4294967295"; + } + description + "The segid is used as a service selector for MAs that are + present in Bridges that implement IPS functionality."; + } + } + case path-tesid { + leaf path-tesid { + type uint32 { + range "1..4294967295"; + } + description + "The path-tesid is used as a service selector for SPBM + path MAs."; + } + } + case group-isid { + leaf group-isid { + type uint32 { + range "1..4294967295"; + } + description + "The group-isid is used as a service selector for SPBM + group MAs."; + } + } + } + } + + grouping md-name-choice { + description + "The Maintenance Domain name and name format choice."; + choice md-name { + default char-string; + description + "The Maintenance Domain name type."; + case ieee-reserved-0 { + leaf name { + type string { + length "0..43"; + } + default "0"; + description + "Reserved for definition by IEEE 802.1 recommend to not use + zero unless absolutely needed."; + } + } + case none { + leaf none { + type empty; + description + "No format specified, usually because there is not a + Maintenance Domain Name. In this case, a zero length OCTET + string for the Domain name field is acceptable."; + } + } + case dns-like-name { + leaf dns-like-name { + type string { + length "0..43"; + } + description + "Domain name like string, globally unique text string + derived from a DNS name."; + } + } + case mac-address-and-uint { + uses mac-address-and-uint-type; + description + "MAC address plus 2-octet (unsigned) integer."; + } + case char-string { + leaf char-string { + type string { + length "0..43"; + } + default "DEFAULT"; + description + "RFC2579 DisplayString, except that the character codes 0-31 + (decimal) are not used."; + } + } + } + } + + grouping ma-name-choice { + description + "The Maintenance Association name and name format choice."; + choice ma-name { + default char-string; + description + "The Maintenance Association name type."; + case ieee-reserved-0 { + leaf name { + type string { + length "1..45"; + } + default "0"; + description + "Reserved for definition by IEEE 802.1. Recommend not to use + zero unless absolutely needed."; + } + } + case primary-vid { + leaf primary-vid { + type dot1q-types:vlanid; + description + "Primary VLAN ID. 12 bits represented in a 2-octet integer."; + } + } + case char-string { + leaf char-string { + type string { + length "1..45"; + } + description + "RFC2579 DisplayString, except that the character codes 0-31 + (decimal) are not used."; + } + } + case unsigned-int16 { + leaf unsigned-int16 { + type uint16; + description + "2-octet integer/big endian."; + } + } + case rfc2865-vpn-id { + leaf rfc2865-vpn-id { + type string { + length "1..45"; + } + description + "RFC2685 VPN ID. 3 octet VPN authority Organizationally + Unique Identifier followed by 4 octet VPN index identifying + VPN according to the OUI."; + } + } + case icc-format { + leaf icc-format { + type string { + length "1..45"; + } + description + "ICC-based format as specified in ITU-T Y.1731."; + } + } + } + } + + + /* --------------------------------------------------- + * Configuration objects used by 802.1Qcx YANG module + * --------------------------------------------------- + */ + + container cfm { + description + "Connectivity Fault Management configuration and operational + information."; + + choice device-reference { + description + "This type is intended to be used as a generic reference. + An instance of the reference is a pointer to a Bridge object + defined by IEEE 802.1Qcp. + + However, to allow non-802.1Q compliant devices that + wants to utilize IEEE 802.1Q standardized CFM and the + accompanying CFM YANG model, this node can be augmented + with a different device reference. + + For example, another type of device could create a new + device type with reference in their YANG module. Then + they could augment this module, and the cfm/device-reference + in particular to include a new case statement with + their device reference."; + case bridge { + leaf bridge-ref { + type bridge-ref; + description + "A 802.1Q compliant Bridge reference on which the CFM + configuration and operational information are + associated with."; + } + } + //case other-device-ref { + // leaf other-device-ref { + // type other-module:other-device-ref; + // description + // "An other device reference which the CFM configuration + // and operational information are associated with."; + // } + //} + } + + container cfm-stacks { + description + "The CFM Stack contains information about the Maintenance + Points configured on a particular Bridge Port (or + aggregated port). It contains all CFM Stack specific related + configuration and operational data."; + + list cfm-stack { + key "port md-level direction"; + description + "The CFM Stack contains information about the Maintenance + Points configured on a particular Bridge Port (or + aggregated port). It contains all CFM Stack specific related + configuration and operational data. + + Upon a restart of the system, the system SHALL, if necessary, + change the value of this variable, and rearrange the + cfm-stack, so that it indexes the entry in the + interface table with the same value of interface-ref that it + indexed before the system restart. If no such entry exists, + then the system SHALL delete all entries in the + cfm-stack with the interface index."; + leaf port { + type if:interface-ref; + description + "An interface on which maintenance points might be + configured. This object represents the Bridge Port or + aggregated port on which MEPs or MHFs might be + configured."; + reference + "12.14.2.1.2a of IEEE Std 802.1Q-2018"; + } + leaf md-level { + type md-level-type; + description + "The MD level of the maintenance point"; + reference + "12.14.2.1.2b of IEEE Std 802.1Q-2018"; + } + leaf direction { + type mp-direction-type; + description + "The direction in which the maintenance point faces on the + Bridge Port."; + reference + "12.14.2.1.2c of IEEE Std 802.1Q-2018"; + } + container service-id { + description + "A specific VID, I-SID, Traffic Engineering service + instance Identifier (TE-SID), or Segment Identifier + (SEG-ID) associated with an MP, or 0, in the case that + the MP is associated with no VID, I-SID, TE-SID, or SEG-ID"; + uses service-id; + } + leaf maintenance-group { + type maintenance-group-type; + config false; + description + "The maintenance group to which the Maintenance Points + is associated with."; + } + leaf maintenance-domain-index { + type uint32; + config false; + description + "The Maintenance Domain reference to which the Maintenance + Points Maintenance Association is associated. If none, + then 0."; + reference + "12.14.2.1.3b of IEEE Std 802.1Q-2018"; + } + leaf maintenance-association-index { + type uint32; + config false; + description + "The Maintenance Association reference to which the + Maintenance Point is associated. If none, then 0."; + reference + "12.14.2.1.3c of IEEE Std 802.1Q-2018"; + } + leaf mep-id { + type mep-id-or-zero-type; + config false; + description + "The MEP identifier is a MEP is configured. Otherwise is 0."; + reference + "12.14.2.1.3d of IEEE Std 802.1Q-2018"; + } + leaf mac-address { + type ieee:mac-address; + config false; + description + "The MAC address of the maintenance point."; + reference + "12.14.2.1.3e of IEEE Std 802.1Q-2018"; + } + } // cfm-stack + } // cfm-stacks + + container default-md-levels { + description + "There is a single Default MD Level managed object per Bridge + Component. It controls MIP Half Function (MHF) creation for + VIDs or I-SIDs of I- or B-components that are not contained in + the list of VIDs attached to any specific Maintenance + Association managed object, and the transmission of the Sender + ID TLV by those MHFs."; + + list default-md-level { + key "component-id"; + description + "For each bridge component, the Default MD Level Managed + Object controls MHF creation for VIDs that are not attached + to a specific Maintenance Association Managed Object, and + Sender ID TLV transmission by those MHFs. + + For each Bridge Port, and for each VLAN ID whose data can + pass through that Bridge Port, an entry in this table is + used by the algorithm in subclause 22.2.3 only if there is no + entry in the Maintenance Association table defining an MA + for the same VLAN ID and MD Level as this table's entry, and + on which MA an Up MEP is defined. If there exists such an + MA, that MA's objects are used by the algorithm in + subclause 22.2.3 in place of this table entry objects. + + The agent maintains the value of md-status to indicate + whether this entry is overridden by an MA. When first + initialized, the agent creates this table automatically with + entries for all VLAN IDs, with the default values specified + for each object. After this initialization, the writable + objects in this table need to be persistent upon reboot or + restart of a device."; + leaf component-id { + type component-identifier-type; + description + "The Bridge component within the system to which the + information in this entry applies. If the system is not a + Bridge, or if only one component is present in the Bridge, + then this variable (index) MUST be equal to 1."; + reference + "12.3l of IEEE Std 802.1Q-2018"; + } + container primary-service-id { + description + "A vid or isid in an I or B component."; + uses service-id; + reference + "12.14.3.1.2a of IEEE Std 802.1Q-2018"; + } + container associated-service-ids { + description + "A list of VIDs associated with any MHF on the VID, always + including that VID, or the Backbone-SID of the B-component + or VIP-SID of the I-component associated with any MHF on + the I-SID. The first VID is the MAs Primary VID. + + List is empty if no primary VID specified."; + uses service-id; + reference + "12.14.3.1.3a of IEEE Std 802.1Q-2018"; + } + leaf md-status { + type boolean; + config false; + description + "State of this Default MD Level table entry. True if there + is no entry in the Maintenance Association table defining + an MA for the same VLAN ID and MD Level as this tables + entry, and on which MA an Up MEP is defined, else false."; + reference + "12.14.3.1.3b of IEEE Std 802.1Q-2018"; + } + leaf md-level { + type md-level-or-none-type; + default -1; + description + "A value indicating the MD Level at which MHFs are to be + created, and Sender ID TLV transmission by those MHFs is to + be controlled, for the VLAN to which this entry's objects + apply."; + reference + "12.14.3.1.3c, 12.14.3.2.2b of IEEE Std 802.1Q-2018"; + } + leaf mhf-creation { + type mhf-creation-type; + default "mhf-defer"; + description + "A value indicating if the Management entity can create MHFs + (MIP Half Function) for this VID at this MD Level. If this + object has the value mhf-defer, MHF creation for this VLAN + is controlled by md-mhf-creation. The value of this variable + is meaningless if the values of md-status is false."; + reference + "12.14.3.1.3d of IEEE Std 802.1Q-2018"; + + } + leaf id-permission { + type sender-id-permission-type; + default "send-id-defer"; + description + "Enumerated value indicating what, if anything, is to be + included in the Sender ID TLV transmitted by MHFs + created by the Default Maintenance Domain. If this object + has the value send-if-defer, Sender ID TLV transmission + for this VLAN is controlled by md-id-permission-type. The + value of this variable is meaningless if the values of + md-status is false."; + reference + "12.14.3.1.3e, 12.14.3.2.2a of IEEE Std 802.1Q-2018"; + } + } // default-md-level + } // default-md-levels + + container mip { + description + "Maintenance Association Intermediate Point"; + leaf port { + type if:interface-ref; + description + "The interface index of the interface (i.e., Bridge + Port) to which the MEP is attached."; + reference + "12.14.7.1.3b of IEEE Std 802.1Q-2018"; + } + container service-ids { + description + "A list of VIDs associated with any MHF on the VID, always + including that VID, or the Backbone-SID of the B-component + or VIP-SID of the I-component associated with any MHF on + the I-SID. The first VID is the MAs Primary VID."; + uses service-id; + } + leaf md-level { + type md-level-type; + default 0; + description + "A value indicating the MD Level at which MHFs are to be + created, and Sender ID TLV transmission by those MHFs is to + be controlled, for the VLAN to which this entry's objects + apply."; + reference + "12.14.3.1.3c, 12.14.3.2.2b of IEEE Std 802.1Q-2018"; + } + leaf id-permission { + type sender-id-permission-type; + default "send-id-none"; + description + "Enumerated value indicating what, if anything, is to be + included in the Sender ID TLV transmitted by MHFs + created by the Default Maintenance Domain. If this object + has the value send-if-defer, Sender ID TLV transmission + for this VLAN is controlled by md-id-permission-type."; + reference + "12.14.3.1.3e, 12.14.3.2.2a of IEEE Std 802.1Q-2018"; + } + } // mip + + container config-errors { + description + "The Configuration Error List managed object is a list of + {identifier, port} pairs configured in error together with + the identity of the configuration error."; + + list config-error { + key "port"; + description + "The CFM Configuration Error List table provides a list of + Interfaces and VIDs that are incorrectly configured."; + leaf port { + type if:interface-ref; + description + "The interface index of the interface (i.e., Bridge + Port). + + Upon a restart of the system, the system SHALL, if + necessary, change the value of this variable so that it + indexes the entry in the interface table with the same + value of the index that it indexed before the system + restart. If no such entry exists, then the system SHALL + delete any entries in config-error-list indexed by that + interface-ref."; + reference + "12.14.4.1.2b of IEEE Std 802.1Q-2018"; + } + container service-id { + description + "The Service Selector Identifier of the Service with + interfaces in error."; + uses service-id; + reference + "12.14.4.1.2a of IEEE Std 802.1Q-2018"; + } + leaf error-type { + type config-errors; + config false; + description + "vector of Boolean error conditions from 22.2.4."; + reference + "12.14.4.1.3b of IEEE Std 802.1Q-2018"; + } + } // config-error + } // config-errors + + container maintenance-domains { + description + "A Maintenance Domain object is required in order to create an + MA with a Maintenance Association Identifier (MAID) that + includes that Maintenance Domains Name. From this Maintenance + Domain managed object, all Maintenance Association managed + objects associated with that Maintenance Domain managed object + can be accessed, and thus controlled."; + + list maintenance-domain { + key "md-index"; + description + "Contains the Maintenance Domain configuration and + operational data. A Maintenance Domain is the network or the + part of the network for which faults in connectivity can be + managed. The boundary of a Maintenance Domain is defined by + a set of Domain Service Access Points (DoSAPs), each of + which can become a point of connectivity to a service + instance."; + leaf md-index { + type uint32; + description + "The index to the Maintenance Domain list."; + } + uses md-name-choice; + leaf md-level { + type md-level-type; + default 0; + description + "The Maintenance Domain level."; + reference + "3.122, 12.14.5.1.3b of IEEE Std 802.1Q-2018"; + } + leaf mhf-creation { + type mhf-creation-type; + default mhf-none; + description + "Value indicating whether the management entity can + create MHFs (MIP Half Function) for this Maintenance + Domain. Since there is no encompassing Maintenance + Domain, the value mhf-defer is not allowed."; + reference + "3.122, 12.14.5.1.3c of IEEE Std 802.1Q-2018"; + } + leaf id-permission { + type sender-id-permission-type; + default send-id-none; + description + "Value indicating what, if anything, is to be included in + the Sender ID TLV transmitted by Maintenance Points + configured in this Maintenance Domain. Since there is no + encompassing Maintenance Domain, the value send-id-defer + is not allowed."; + reference + "3.122, 12.14.5.1.3d of IEEE Std 802.1Q-2018"; + } + leaf fault-alarm-address { + type fault-alarm-address-type; + default "not-transmitted"; + description + "A value indicating whether Fault Alarms are to be + transmitted or not. The default is not transmit."; + reference + "3.122, 12.14.5.1.3e of IEEE Std 802.1Q-2018"; + } + + list maintenance-association { + key "ma-index"; + description + "Provides configuration and operational data for the + Maintenance Associations. A Maintenance Association is a + set of MEPs, each configured with the same MAID and MD + level, established to verify the integrity of a single + service instance. A Maintenance Association can be thought + of as a full mesh of Maintenance Entities among a set of + MEPs so configured."; + leaf ma-index { + type uint32; + description + "Key of the Maintenance Association list of entries."; + } + uses ma-name-choice; + leaf md-index { + type uint32; + description + "An index reference to the Maintenance Domain that this + Maintenance Association belongs to."; + reference + "12.14.5.3.2a of IEEE Std 802.1Q-2018"; + } + leaf ccm-interval { + type cfm-interval-type; + default "1sec"; + description + "The interval between CCM transmissions to be used by all + MEPs in the Maintenance Association."; + reference + "12.14.6.1.3e of IEEE Std 802.1Q-2018"; + } + leaf fault-alarm-address { + type fault-alarm-address-type; + default "not-specified"; + description + "A value indicating whether Fault Alarms are to be + transmitted or not. The default is not specified, + which implies that the disposition of the fault-alarm + used by the MD should be used."; + reference + "3.122, 12.14.5.1.3e of IEEE Std 802.1Q-2018"; + } + leaf maintenance-group { + type maintenance-group-type; + description + "The maintenance group provides a handle + for the MD and MA combination."; + } + + list maintenance-association-component { + key ma-component-id; + description + "This is the part of the complete MA table that is + variable across the Bridges in a Maintenance Domain, or + across the components of a single Bridge."; + leaf ma-component-id { + type component-identifier-type; + description + "The Bridge component within the system to which the + information applies. If the system is not a Bridge, or + if only one component is present in the Bridge, then + this variable (index) MUST be equal to 1"; + reference + "12.3l of IEEE Std 802.1Q-2018"; + } + container service-id { + description + "The list of VIDs, I-SID, or the TE-SID monitored by + this MA, or 0, if the MA is not attached to a VID, or + I-SID, or TE-SID. In the case of a list of VIDs, the + first VID in the list is the MAs Primary VID (default + none). The specification of I-SID is allowed only in + the case of I- or B- components. The TE-SID is allowed + only in the case that PBB-TE is supported."; + uses service-id; + reference + "12.14.5.3.2c, 12.14.6.1.3b of IEEE Std 802.1Q-2018"; + } + leaf mhf-creation { + type mhf-creation-type; + default mhf-defer; + description + "Value indicating whether the management entity can + create MHFs (MIP Half Function) for this Maintenance + Domain. Since there is no encompassing Maintenance + Domain, the value mhf-defer is not allowed."; + reference + "3.122, 12.14.5.1.3c of IEEE Std 802.1Q-2018"; + } + leaf id-permission { + type sender-id-permission-type; + default "send-id-defer"; + description + "Enumerated value indicating what, if anything, is to + be included in the Sender ID TLV (21.5.3) transmitted + by MPs configured in this MA."; + reference + "12.14.3.1.3d of IEEE Std 802.1Q-2018"; + } + list mep { + key "mep-id maintenance-group"; + description + "A list of Maintenance association End Points (MEPs). A + MEP is an actively managed CFM entity, associated with + a specific DoSAP of a service instance, which can + generate and receive CFM PDUs and track any responses. + It is an end point of a single Maintenance Association + (MA) and is an end point of a separate Maintenance + Entity for each of the other MEPs in the same MA."; + leaf mep-id { + type mep-id-type; + description + "Integer that is unique among all the MEPs in the + same Maintenance Association."; + reference + "3.114, 12.14.7, 19.2 of IEEE Std 802.1Q-2018"; + } + leaf maintenance-group { + type maintenance-group-type; + description + "The maintenance group provides an identifier + for the MD and MA combination."; + } + leaf ma-index { + type uint32; + description + "An index reference to the particular Maintenance + Association that this MEP belongs to."; + reference + "12.14.6.3.2a of IEEE Std 802.1Q-2018"; + } + leaf port { + type if:interface-ref; + description + "The interface index of the interface (e.g., Bridge + Port) to which the MEP is attached."; + reference + "12.14.7.1.3b of IEEE Std 802.1Q-2018"; + } + leaf direction { + type mp-direction-type; + description + "The direction in which the MEP faces on the Bridge + Port. Example, up or down."; + reference + "12.14.7.1.3c, 19.2 of IEEE Std 802.1Q-2018"; + } + leaf primary-vid { + type uint32 { + range "0..16777215"; + } + default 0; + description + "An integer indicating the Primary VID of the MEP. It + is always one of the VIDs assigned to the MEPs MA. A + value of 0 indicates that either the Primary VID is + that of the MEPs MA, or that the MEPs MA is + associated with no VID."; + reference + "12.14.7.1.3d of IEEE Std 802.1Q-2018"; + } + leaf admin-state { + type boolean; + default "false"; + description + "The administrative state of the MEP. TRUE indicates + that the MEP is to functional normally, and FALSE + indicates that it is to cease functioning."; + reference + "12.14.7.1.3e, 20.9.1 of IEEE Std 802.1Q-2018"; + } + leaf fng-state { + type fng-state-type; + default "fng-reset"; + config false; + description + "The current state of the MEP Fault Notification + Generator state machine."; + reference + "12.14.7.1.3f, 20.35 of IEEE Std 802.1Q-2018"; + } + leaf ccm-ltm-priority { + type dot1q-types:priority-type; + description + "The priority value for CCMs and LTMs transmitted by + the MEP. The default value is the highest priority + allowed to pass through the Bridge Port for any of + the MEPs VID(s)."; + reference + "12.14.7.1.3h of IEEE Std 802.1Q-2018"; + } + leaf mac-address { + type ieee:mac-address; + config false; + description + "The MAC address of the MEP."; + reference + "12.14.7.1.3i, 19.4 of IEEE Std 802.1Q-2018"; + } + leaf fault-alarm-address { + type fault-alarm-address-type; + default "not-specified"; + description + "A value indicating whether Fault Alarms are to be + transmitted or not. The default is not specified, + which implies that the disposition of the fault-alarm + used by the MD should be used."; + reference + "3.122, 12.14.7.1.3j of IEEE Std 802.1Q-2018"; + } + leaf lowest-priority-defect { + type lowest-alarm-priority-type; + default "mac-remote-error-xcon"; + description + "The lowest priority defect that is allowed to + generate fault alarms."; + reference + "12.14.7.1.3k, 20.9.5 of IEEE Std 802.1Q-2018"; + } + leaf fng-alarm-time { + type yang:zero-based-counter32 { + range "250..1000"; + } + units deciseconds; + default 250; + description + "The time that defect must be present before a Fault + Alarm is issued."; + reference + "12.14.7.1.3l, 20.35.3 of IEEE Std 802.1Q-2018"; + } + leaf fng-reset-time { + type yang:zero-based-counter32 { + range "250..1000"; + } + units deciseconds; + default 1000; + description + "The time that defects must be absent before + resetting a Fault Alarm."; + reference + "12.14.7.1.3m, 20.35.4 of IEEE Std 802.1Q-2018"; + } + leaf highest-priority-defect { + type highest-defect-priority-type; + config false; + description + "The highest priority defect that has been present + sicne the MEPs Fault Notification Generator state + machine was last in the FNG_RESET state."; + reference + "12.14.7.1.3n, 20.35.9 of IEEE Std 802.1Q-2018"; + } + leaf defects { + type mep-defects-type; + config false; + description + "Vector of boolean error conditions"; + reference + "12.14.7.1.3o-s, 20.21.3, + 20.23.3, 20.35.5, 20.35.6, 20.35.7 of IEEE Std 802.1Q-2018"; + } + leaf error-ccm-last-failure { + type string { + length "1..2000"; + } + config false; + description + "The last received CCM that triggered a def-error-ccm + fault."; + reference + "12.14.7.1.3t, 20.21.2 of IEEE Std 802.1Q-2018"; + } + leaf xcon-ccm-last-failure { + type string { + length "1..2000"; + } + config false; + description + "The last received CCM that triggered a def-xcon-ccm + fault."; + reference + "12.14.7.1.3u, 20.23.2 of IEEE Std 802.1Q-2018"; + } + + list linktrace-reply { + key "ltr-seq-number ltr-receive-order"; + description + "This table extends the MEP table and contains a list + of Linktrace replies received by a specific MEP in + response to a linktrace message."; + leaf ltr-seq-number { + type uint32 { + range "0..4294967295"; + } + description + "Transaction identifier returned by a previous + transmit linktrace message command, indicating + which LTMs response is going to be returned."; + reference + "12.14.7.5.2b of IEEE Std 802.1Q-2018"; + } + leaf ltr-receive-order { + type uint32 { + range "1..4294967295"; + } + description + "An index to distinguish among multiple LTRs with + the same LTR Transaction Identifier field value. + Assigned sequentially from 1, in the order that the + Linktrace Initiator received the LTRs."; + } + leaf ltr-ttl { + type uint32 { + range "0..255"; + } + config false; + description + "TTL field value for a returned LTR."; + reference + "12.14.7.5, 20.41.2.2 of IEEE Std 802.1Q-2018"; + } + leaf ltr-forwarded { + type boolean; + config false; + description + "Indicates if a LTM was forwarded by the responding + MP, as returned in the FwdYes flag of the flags + field."; + reference + "12.14.7.5.3c, 20.41.2.1 of IEEE Std 802.1Q-2018"; + } + leaf ltr-terminal-mep { + type boolean; + config false; + description + "A Boolean value stating whether the forwarded LTM + reached a MEP enclosing its MA, as returned in the + Terminal MEP flag of the Flags field"; + reference + "12.14.7.5.3d, 20.41.2.1 of IEEE Std 802.1Q-2018"; + } + leaf ltr-last-egress-identifier { + type string { + length "8"; + } + config false; + description + "An octet field holding the Last Egress Identifier + returned in the LTR Egress Identifier TLV of the + LTR. The Last Egress Identifier identifies the MEP + Linktrace Initiator that originated, or the + Linktrace Responder that forwarded, the LTM to + which this LTR is the response. This is the same + value as the Egress Identifier TLV of that LTM."; + reference + "12.14.7.5.3e, 20.41.2.3 of IEEE Std 802.1Q-2018"; + } + leaf ltr-next-egress-identifier { + type string { + length "8"; + } + config false; + description + "An octet field holding the Next Egress Identifier + returned in the LTR Egress Identifier TLV of the + LTR. The Next Egress Identifier Identifies the + Linktrace Responder that transmitted this LTR, and + can forward the LTM to the next hop. This is the + same value as the Egress Identifier TLV of the + forwarded LTM, if any. If the FwdYes bit of the + Flags field is false, the contents of this field + are undefined, i.e., any value can be transmitted, + and the field is ignored by the receiver."; + reference + "12.14.7.5.3f, 20.41.2.4 of IEEE Std 802.1Q-2018"; + } + leaf ltr-relay { + type relay-action-field-value; + config false; + description + "Value returned in the Relay Action field."; + reference + "12.14.7.5.3g, 20.41.2.5 of IEEE Std 802.1Q-2018"; + } + leaf ltr-chassis-id-subtype { + type lldp-chassis-id-subtype; + config false; + description + "Specifies the format of the Chassis ID returned + in the Sender ID TLV of the LTR, if any. This value + is meaningless if the ltr-chassis-id has a length + of 0."; + reference + "12.14.7.5.3h, 21.5.3.2 of IEEE Std 802.1Q-2018"; + } + leaf ltr-chassis-id { + type lldp-chassis-id; + config false; + description + "The Chassis ID returned in the Sender ID TLV of + the LTR, if any. The format of this object is + determined by the value of the + ltr-chassis-id-subtype object."; + reference + "12.14.7.5.3i, 21.5.3.2 of IEEE Std 802.1Q-2018"; + } + leaf ltr-man-address-domain { + type transport-service-domain; + config false; + description + "The transport-service-domain that identifies the + type and format of the related mep-db-man-address + object, used to access the YANG agent of the system + transmitting the LTR. Received in the LTR Sender ID + TLV from that system."; + reference + "12.14.7.5.3j, 21.5.3.5, + 21.9.6 of IEEE Std 802.1Q-2018"; + } + leaf ltr-man-address { + type transport-service-address; + config false; + description + "The transport-service-address that can be used to + access the YANG agent of the system transmitting + the CCM, received in the CCM Sender ID TLV from + that system. + + If the related object ltr-man-address-domain + contains the value zeroDotZero, this object + ltr-man-address MUST have a zero-length OCTET + STRING as a value."; + reference + "12.14.7.5.3j, 21.5.3.7, + 21.9.6 of IEEE Std 802.1Q-2018"; + } + leaf ltr-ingress { + type ingress-action-field-value; + config false; + description + "The value returned in the Ingress Action Field of + the LTM. The value ingress-no-tlv indicates that no + Reply Ingress TLV was returned in the LTM."; + reference + "12.14.7.5.3k, 20.41.2.6 of IEEE Std 802.1Q-2018"; + } + leaf ltr-ingress-mac { + type ieee:mac-address; + config false; + description + "MAC address returned in the ingress MAC address + field. If the ltr-ingress object contains the value + ingress-no-tlv, then the contents of this object + are meaningless."; + reference + "12.14.7.5.3l, 20.41.2.7 of IEEE Std 802.1Q-2018"; + } + leaf ltr-ingress-port-id-subtype { + type lldp-port-id-subtype; + config false; + description + "Ingress Port ID. The format of this object is + determined by the value of the + ltr-ingress-port-id-subtype object. If the + ltr-ingress object contains the value + ingress-no-tlv, then the contents of this object + are meaningless."; + reference + "12.14.7.5.3n, 20.41.2.9 of IEEE Std 802.1Q-2018"; + } + leaf ltr-egress { + type egress-action-field-value; + config false; + description + "The value returned in the Egress Action Field of + the LTM. The value egress-no-tlv indicates that + no Reply Egress TLV was returned in the LTM."; + reference + "12.14.7.5.3o, 20.41.2.10 of IEEE Std 802.1Q-2018"; + } + leaf ltr-egress-mac { + type ieee:mac-address; + config false; + description + "MAC address returned in the egress MAC address + field. If the ltr-egress object contains the value + egress-no-tlv, then the contents of this object are + meaningless."; + reference + "12.14.7.5.3p, 20.41.2.11 of IEEE Std 802.1Q-2018"; + } + leaf ltr-egress-port-id-subtype { + type lldp-port-id-subtype; + config false; + description + "Format of the egress Port ID. If the ltr-egress + object contains the value egress-no-tlv, then the + contents of this object are meaningless."; + reference + "12.14.7.5.3q, 20.41.2.12 of IEEE Std 802.1Q-2018"; + } + leaf ltr-egress-port-id { + type lldp-port-id; + config false; + description + "Egress Port ID. The format of this object is + determined by the value of the + ltr-egress-port-id-subtype object. If the + ltr-egress object contains the value egress-no-tlv, + then the contents of this object are meaningless."; + reference + "12.14.7.5.3r, 20.41.2.13 of IEEE Std 802.1Q-2018"; + } + leaf ltr-organization-specific-tlv { + type string { + length "0 | 4..1500"; + } + config false; + description + "All Organization specific TLVs returned in the + LTR, if any. Includes all octets including and + following the TLV Length field of each TLV, + concatenated together."; + reference + "12.14.7.5.3s, 21.5.2 of IEEE Std 802.1Q-2018"; + } + } // linktrace-reply + + list mep-db { + key rmep-id; + description + "The MEP CCM Database. A database, maintained by every + MEP, that maintains received information about other MEPs + in the Maintenance Domain."; + leaf rmep-id { + type mep-id-type; + description + "Maintenance association Endpoint Identifier of a + remote MEP whose information from the MEP Database + is to be returned."; + reference + "12.14.7.6.2b of IEEE Std 802.1Q-2018"; + } + leaf rmep-state { + type remote-mep-state-type; + config false; + description + "The operational state of the remote MEP state + machine"; + reference + "12.14.7.6.3b, 20.20 of IEEE Std 802.1Q-2018"; + } + leaf rmep-failed-ok-time { + type yang:zero-based-counter32; + units seconds; + config false; + description + "The time (SysUpTime) at which the Remote MEP state + machine last entered either the RMEP_FAILED or + RMEP_OK state"; + reference + "12.14.7.6.3c of IEEE Std 802.1Q-2018"; + } + leaf mac-address { + type ieee:mac-address; + config false; + description + "The MAC address of the remote MEP."; + reference + "12.14.7.6.3d, 20.19.7 of IEEE Std 802.1Q-2018"; + } + leaf rdi { + type boolean; + config false; + description + "State of the RDI bit in the last received CCM + (true for RDI=1), or false if none has been + received."; + reference + "12.14.7.6.3e, 20.19.2 of IEEE Std 802.1Q-2018"; + } + leaf port-status-tlv { + type port-status-tlv-value; + default "no-port-state-tlv"; + config false; + description + "An enumerated value of the Port status TLV + received in the last CCM from the remote MEP or + the default value no-port-state-tlv indicating + either no CCM has been received, or that no port + status TLV was received in the last CCM."; + reference + "12.14.7.6.3f, 20.19.3 of IEEE Std 802.1Q-2018"; + } + leaf interface-status-tlv { + type interface-status-tlv-value; + default "is-no-interface-status-tlv"; + config false; + description + "An enumerated value of the Interface status TLV + received in the last CCM from the remote MEP or the + default value is-no-interface-status-tlv indicating + either no CCM has been received, or that no + interface status TLV was received in the last + CCM."; + reference + "12.14.7.6.3g, 20.19.4 of IEEE Std 802.1Q-2018"; + } + leaf chassis-id-subtype { + type lldp-chassis-id-subtype; + config false; + description + "This object specifies the format of the Chassis ID + received in the last CCM."; + reference + "12.14.7.6.3h, 21.5.3.2 of IEEE Std 802.1Q-2018"; + } + leaf chassis-id { + type lldp-chassis-id; + config false; + description + "The Chassis ID. The format of this object is + determined by the value of the + ltr-chassis-id-subtype object."; + reference + "12.14.7.6.3h, 21.5.3.3 of IEEE Std 802.1Q-2018"; + } + leaf man-address-domain { + type transport-service-domain; + config false; + description + "The transport-service-domain that identifies the + type and format of the related mep-db-man-address + object, used to access the YANG agent of the system + transmitting the CCM. Received in the CCM Sender ID + TLV from that system. + + The value zeroDotZero (from RFC2578) indicates no + management address was present in the LTR, in which + case the related mep-db-man-address object MUST + have a zero-length OCTET STRING as a value."; + reference + "12.14.7.6.3h, 21.5.3.5, + 21.6.7 of IEEE Std 802.1Q-2018"; + } + leaf man-address { + type transport-service-address; + config false; + description + "The transport-service-address that can be used to + access the YANG agent of the system transmitting + the CCM, received in the CCM Sender ID TLV from + that system. If the related + mep-db-man-address-domain object contains the + value zeroDotZero, this object mep-db-man-address + MUST have a zero-length OCTET STRING as a value."; + reference + "12.14.7.6.3h, 21.5.3.7, + 21.6.7 of IEEE Std 802.1Q-2018"; + } + leaf rmep-is-active { + type boolean; + description + "A Boolean value statign if the remote MEP is + active."; + reference + "12.14.7.1.3ae"; + } + } // mep-db + + container continuity-check { + description + "Continuity check protocol"; + leaf ccm-enabled { + type boolean; + default "false"; + description + "Indicates whether the MEP can generate CCMs. If + TRUE, the MEP will generate CCM PDUs."; + reference + "12.14.7.1.3g, 20.10.1 of IEEE Std 802.1Q-2018"; + } + leaf priority { + type dot1q-types:priority-type; + description + "The priority value for CCMs and LTMs transmitted by + the MEP. The default value is the highest priority + allowed to pass through the Bridge Port for any of + the MEPs VID(s)."; + reference + "12.14.7.1.3h of IEEE Std 802.1Q-2018"; + } + leaf ccm-interval { + type cfm-interval-type; + description + "The interval between CCM transmissions to be used by all + MEPs in the Maintenance Association."; + reference + "12.14.6.1.3e of IEEE Std 802.1Q-2018"; + } + } // continuity-check + + container loopback { + description + "Loopback protocol"; + leaf status { + type boolean; + default "false"; + description + "A Boolean flag set to TRUE by the MEP Loopback + Initiator state machine or YANG network configuration + manager to indicate that another LBM is being + transmitted. Reset to FALSE by the MEP Loopback + initiator state machine."; + reference + "20.32, Figure 20-11 of IEEE Std 802.1Q-2018"; + } + leaf interval { + type cfm-interval-type; + default 1sec; + description + "The interval between LBM transmissions to be used by all + MEPs in the Maintenance Association."; + } + leaf dest-mac-address { + type ieee:mac-address; + description + "The target MAC Address field to be transmitted. + A unicast destination MAC address. This address + is used if node mep-transmit-lbm-dest-is-mep-id + is FALSE."; + reference + "12.14.7.3.2b of IEEE Std 802.1Q-2018"; + } + leaf dest-mep-id { + type mep-id-or-zero-type; + description + "The identifier of a remote MEP in the same MA to + which the LBM is to be sent. This address + is used if node mep-transmit-lbm-dest-is-mep-id + is TRUE."; + reference + "12.14.7.3.2b of IEEE Std 802.1Q-2018"; + } + leaf dest-is-mep-id { + type boolean; + default "false"; + description + "TRUE indicates that MEP ID of the target MEP is used + for Loopback transmissions. FALSE indicates that + unicast destination MAC address of the target MEP is + used for Loopback transmissions."; + reference + "12.14.7.3.2b of IEEE Std 802.1Q-2018"; + } + leaf message-count { + type uint32 { + range "1..1024"; + } + default 1; + description + "The number of Loopback messages to be transmitted."; + reference + "12.14.7.3.2c of IEEE Std 802.1Q-2018"; + } + leaf data-tlv { + type string; + description + "An arbitrary amount of data to be included in the + Data TLV, if the Data TLV is selected to be sent. The + intent is to be able to fill the frame carrying the + CFM PDU to its maximum length."; + reference + "12.14.7.3.2d of IEEE Std 802.1Q-2018"; + } + leaf priority { + type dot1q-types:priority-type; + description + "Priority. 3 bit value to be used in the VLAN tag, if + present in the transmitted frame. The default value + should be the CCM priority."; + reference + "12.14.7.3.2e of IEEE Std 802.1Q-2018"; + } + leaf vlan-drop-eligible { + type boolean; + default "false"; + description + "Drop eligible bit value to be used in the VLAN tag, + if present in the transmitted frame"; + reference + "12.14.7.3.2e of IEEE Std 802.1Q-2018"; + } + leaf result-ok { + type boolean; + default "true"; + config false; + description + "Indicates the result of the operation: + TRUE - The LBM will be (or has been) sent. + FALSE - The LBM will not be sent."; + reference + "12.14.7.3.3a of IEEE Std 802.1Q-2018"; + } + leaf seq-number { + type uint32; + description + "The Loopback transaction identifier + (mep-next-lbm-trans-id) of the first LBM (to be) + sent. The value returned is undefined if + mep-transmit-lbm-result-ok is FALSE."; + reference + "12.14.7.3.3b of IEEE Std 802.1Q-2018"; + } + leaf next-lbm-trans-id { + type uint32; + config false; + description + "Next sequence number identifier to be sent in a + Loopback message. This sequence number can be zero + since it can wrap around."; + reference + "12.14.7.1.3x, 20.28.2 of IEEE Std 802.1Q-2018"; + } + } // loopback + + container linktrace { + description + "Linktrace protocol"; + leaf status { + type boolean; + default "false"; + description + "A Boolean flag set to TRUE by the Bridge Port to + indicate that another LTM may be transmitted. Reset + to FALSE by the MEP Linktrace initiator state + machine."; + reference + "20.49, Figure 20-17 of IEEE Std 802.1Q-2018"; + } + leaf interval { + type cfm-interval-type; + default 1sec; + description + "The interval between LTM transmissions to be used by all + MEPs in the Maintenance Association."; + } + leaf priority { + type dot1q-types:priority-type; + description + "The priority value for CCMs and LTMs transmitted by + the MEP. The default value is the highest priority + allowed to pass through the Bridge Port for any of + the MEPs VID(s)."; + reference + "12.14.7.1.3h of IEEE Std 802.1Q-2018"; + } + leaf flags { + type mep-tx-ltm-flags-type; + default use-fdb-only; + description + "The flags field for the LTMs transmitted by the + MEP."; + reference + "12.14.7.4.2b, 20.42.1 of IEEE Std 802.1Q-2018"; + + } + leaf target-mac-address { + type ieee:mac-address; + description + "The target MAC address field to be transmitted. A + unicast MAC address. This address will be used if the + value of mep-transmit-ltm-target-is-mep-id is FALSE."; + reference + "12.14.7.4.2c of IEEE Std 802.1Q-2018"; + } + leaf target-mep-id { + type mep-id-or-zero-type; + description + "The target MAC address field to be transmitted. The + MEP identifier of another MEP in the same MA. This + address will be used if the value of + mep-transmit-ltm-target-is-mep-id is TRUE."; + reference + "12.14.7.4.2c of IEEE Std 802.1Q-2018"; + } + leaf target-is-mep-id { + type boolean; + default "false"; + description + "TRUE indicates that MEP id of the target MEP is used + for Linktrace transmission. FALSE indicates that + unicast destination MAC address of the target MEP is + used for LinkTrace transmission."; + reference + "12.14.7.4.2c of IEEE Std 802.1Q-2018"; + } + leaf ttl { + type uint32 { + range "0..255"; + } + default 64; + description + "The LTM TTL field. Indicates the number of hops + remaining to the LTM. Decremented by 1 by each + Linktrace Responder that handles the LTM. The value + returned in the LTR is one less than that received in + the LTM. If the LTM TTL is 0 or 1, the LTM is not + forwarded to the next hop, and if 0, no LTR is + generated."; + reference + "12.14.7.4.2d, 21.8.4 of IEEE Std 802.1Q-2018"; + } + leaf result { + type boolean; + default "true"; + config false; + description + "Indicates the result of the operation: + TRUE - The Linktrace message will be (or has been) + sent. + FALSE - The Linktrace message will not be sent."; + reference + "12.14.7.4.3a of IEEE Std 802.1Q-2018"; + } + leaf seq-number { + type uint32; + config false; + description + "The LTM transaction identifier + (mep-ltm-next-seq-number) of the LTM sent. The value + returned is undefined if mep-transmit-ltm-result is + FALSE."; + reference + "12.14.7.4.3b of IEEE Std 802.1Q-2018"; + } + leaf egress-identifier { + type string { + length "8"; + } + config false; + description + "Identifies the MEP Linktrace Initiator that is + originating, or the Linktrace Responder that is + forwarding, this LTM. + + The low-order six octets contain a 48-bit IEEE MAC + address unique to the system in which the MEP + Linktrace Initiator or Linktrace Responder resides. + The high-order two octets contain a value sufficient + to uniquely identify the MEP Linktrace Initiator or + Linktrace Responder within that system. + + For most Bridges, the address of any MAC attached to + the Bridge will suffice for the low-order six octets, + and 0 for the high-order octets. In some situations, + e.g., if multiple virtual Bridges utilizing emulated + LANs are implemented in a single physical system, the + high-order two octets can be used to differentiate + among the transmitting entities. + + The value returned is undefined if + mep-transmit-ltm-result is FALSE."; + reference + "12.14.7.4.3c of IEEE Std 802.1Q-2018"; + } + leaf next-seq-number { + type uint32; + config false; + description + "Next transaction identifier to be sent in a + LinkTrace message.This sequence number can be zero + since it can wrap around."; + reference + "12.14.7.1.3ab, 20.41.1 of IEEE Std 802.1Q-2018"; + } + } // linktrace + + container stats { + config false; + description + "Contains the counters associated with the MEP."; + leaf mep-ccm-sequence-errors { + type yang:counter64; + description + "The total number of out-of-sequence CCMs received + from all remote MEPs."; + reference + "12.14.7.1.3v, 20.16.12 of IEEE Std 802.1Q-2018"; + } + leaf mep-ccms-sent { + type yang:counter64; + description + "Total number of CCMs transmitted"; + reference + "12.14.7.1.3w, 20.10.2 of IEEE Std 802.1Q-2018"; + } + leaf mep-lbr-in { + type yang:counter64; + description + "Total number of valid, in-order Loopback Replies + received."; + reference + "12.14.7.1.3y, 20.31.1 of IEEE Std 802.1Q-2018"; + } + leaf mep-lbr-in-out-of-order { + type yang:counter64; + description + "The total number of valid, out-of-order + Loopback Replies received"; + reference + "12.14.7.1.3z, 20.31.1 of IEEE Std 802.1Q-2018"; + } + leaf mep-lbr-bad-msdu { + type yang:counter64; + description + "The total number of LBRs received whose + mac_service_data_unit did not match (except for the + OpCode) that of the corresponding LBM."; + reference + "12.14.7.1.3aa, 20.2.3 of IEEE Std 802.1Q-2018"; + } + leaf mep-unexpected-ltr-in { + type yang:counter64; + description + "The total number of unexpected LTRs received."; + reference + "12.14.7.1.3ac, 20.44.1 of IEEE Std 802.1Q-2018"; + } + leaf mep-lbr-out { + type yang:counter64; + description + "Total number of Loopback Replies transmitted."; + reference + "12.14.7.1.3ad, 20.28.2 of IEEE Std 802.1Q-2018"; + } + } // stats + } // mep + } // maintenance-association-component + } // maintenance-association + } // maintenance-domain + } // maintenance-domains + } // cfm + + + /* ------------------------ + * Remote Procedure Calls + * ------------------------ + */ + rpc transmit-loopback { + description + "To signal to the MEP to transmit some number of LBMs."; + input { + leaf maintenance-group { + type maintenance-group-type; + description + "The maintenance group to which the Maintenance Points + is associated with."; + } + leaf mep-id { + type mep-id-type; + description + "Integer that is unique among all the MEPs in the same + Maintenance Association."; + reference + "12.14.7.3.2a of IEEE Std 802.1Q-2018"; + } + leaf interval { + type cfm-interval-type; + default 1sec; + description + "The interval between LBM transmissions to be used by all + MEPs in the Maintenance Association."; + } + leaf lbm-dest-is-mep-id { + type boolean; + default "false"; + description + "TRUE indicates that MEP ID of the target MEP is used + for Loopback transmissions. FALSE indicates that + unicast destination MAC address of the target MEP is + used for Loopback transmissions."; + reference + "12.14.7.3.2b of IEEE Std 802.1Q-2018"; + } + leaf lbm-dest-mac-address { + type ieee:mac-address; + description + "The target MAC Address field to be transmitted. + A unicast destination MAC address. This address + is used if node lbm-dest-is-mep-id is FALSE."; + reference + "12.14.7.3.2b of IEEE Std 802.1Q-2018"; + } + leaf lbm-dest-mep-id { + type mep-id-or-zero-type; + default 0; + description + "The identifier of a remote MEP in the same MA to + which the LBM is to be sent. This address + is used if node mep-transmit-lbm-dest-is-mep-id + is TRUE."; + reference + "12.14.7.3.2b of IEEE Std 802.1Q-2018"; + } + leaf lbm-messages { + type uint32 { + range "1..1024"; + } + default 1; + description + "The number of Loopback messages to be transmitted."; + reference + "12.14.7.3.2c of IEEE Std 802.1Q-2018"; + } + leaf lbm-priority { + type dot1q-types:priority-type; + description + "Priority. 3 bit value to be used in the VLAN tag, if + present in the transmitted frame. The default value + should be the CCM priority."; + reference + "12.14.7.3.2e of IEEE Std 802.1Q-2018"; + } + leaf lbm-drop-eligible { + type boolean; + default "false"; + description + "Drop eligible bit value to be used in the VLAN tag, if + present in the transmitted frame"; + reference + "12.14.7.3.2e of IEEE Std 802.1Q-2018"; + } + leaf lbm-data-tlv { + type string; + description + "An arbitrary amount of data to be included in the + Data TLV, if the Data TLV is selected to be sent. The + intent is to be able to fill the frame carrying the + CFM PDU to its maximum length."; + reference + "12.14.7.3.2d of IEEE Std 802.1Q-2018"; + } + } // input + output { + leaf lbm-result-ok { + type boolean; + default "true"; + description + "Indicates the result of the operation: + TRUE - The LBM will be (or has been) sent. + FALSE - The LBM will not be sent."; + reference + "12.14.7.3.3a of IEEE Std 802.1Q-2018"; + } + leaf lbm-seq-number { + type uint32; + description + "The Loopback transaction identifier + (mep-next-lbm-trans-id) of the first LBM (to be) sent. + The value returned is undefined if + mep-transmit-lbm-result-ok is FALSE."; + reference + "12.14.7.3.3b of IEEE Std 802.1Q-2018"; + } + } // output + } // transmit-loopback + + rpc transmit-linktrace { + description + "To signal to the MEP to transmit an LTM and to create an LTM + entry in the MEPs Linktrace Database."; + input { + leaf maintenance-group { + type maintenance-group-type; + description + "The maintenance group to which the Maintenance Points + is associated with."; + } + leaf mep-id { + type mep-id-type; + description + "Integer that is unique among all the MEPs in the same + Maintenance Association."; + reference + "12.14.7.4.2a of IEEE Std 802.1Q-2018"; + } + leaf interval { + type cfm-interval-type; + default 1sec; + description + "The interval between LTM transmissions to be used by all + MEPs in the Maintenance Association."; + } + leaf ltm-target-is-mep-id { + type boolean; + default "false"; + description + "TRUE indicates that MEP id of the target MEP is used + for Linktrace transmission. FALSE indicates that + unicast destination MAC address of the target MEP is + used for LinkTrace transmission."; + reference + "12.14.7.4.2c of IEEE Std 802.1Q-2018"; + } + leaf ltm-target-mac-address { + type ieee:mac-address; + description + "The target MAC address field to be transmitted. A + unicast MAC address. This address will be used if the + value of mep-transmit-ltm-target-is-mep-id is FALSE."; + reference + "12.14.7.4.2c of IEEE Std 802.1Q-2018"; + } + leaf ltm-target-mep-id { + type mep-id-or-zero-type; + default 0; + description + "The target MAC address field to be transmitted. The + MEP identifier of another MEP in the same MA. This + address will be used if the value of + mep-transmit-ltm-target-is-mep-id is TRUE."; + reference + "12.14.7.4.2c of IEEE Std 802.1Q-2018"; + } + leaf ltm-priority { + type dot1q-types:priority-type; + description + "Priority. 3 bit value to be used in the VLAN tag, if + present in the transmitted frame. The default value + should be the CCM priority."; + } + leaf ltm-drop-eligible { + type boolean; + default "false"; + description + "Drop eligible bit value to be used in the VLAN tag, if + present in the transmitted frame"; + } + leaf ltm-ttl { + type uint32 { + range "0..255"; + } + default 64; + description + "The LTM TTL field. Indicates the number of hops + remaining to the LTM. Decremented by 1 by each + Linktrace Responder that handles the LTM. The value + returned in the LTR is one less than that received in + the LTM. If the LTM TTL is 0 or 1, the LTM is not + forwarded to the next hop, and if 0, no LTR is + generated."; + reference + "12.14.7.4.2d, 21.8.4 of IEEE Std 802.1Q-2018"; + } + leaf ltm-flags { + type mep-tx-ltm-flags-type; + default use-fdb-only; + description + "The flags field for the LTMs transmitted by the MEP."; + reference + "12.14.7.4.2b, 20.42.1 of IEEE Std 802.1Q-2018"; + + } + } // input + output { + leaf ltm-result { + type boolean; + default "true"; + description + "Indicates the result of the operation: + TRUE - The Linktrace message will be (or has been) + sent. + FALS - The Linktrace message will not be sent."; + reference + "12.14.7.4.3a of IEEE Std 802.1Q-2018"; + } + leaf ltm-seq-number { + type uint32; + description + "The LTM transaction identifier + (mep-ltm-next-seq-number) of the LTM sent. The value + returned is undefined if mep-transmit-ltm-result is + FALSE."; + reference + "12.14.7.4.3b of IEEE Std 802.1Q-2018"; + } + leaf ltm-egress-identifier { + type string { + length "8"; + } + description + "Identifies the MEP Linktrace Initiator that is + originating, or the Linktrace Responder that is + forwarding, this LTM. + + The low-order six octets contain a 48-bit IEEE MAC + address unique to the system in which the MEP Linktrace + Initiator or Linktrace Responder resides. The + high-order two octets contain a value sufficient to + uniquely identify the MEP Linktrace Initiator or + Linktrace Responder within that system. + + For most Bridges, the address of any MAC attached to + the Bridge will suffice for the low-order six octets, + and 0 for the high-order octets. In some situations, + e.g., if multiple virtual Bridges utilizing emulated + LANs are implemented in a single physical system, the + high-order two octets can be used to differentiate + among the transmitting entities. + + The value returned is undefined if + mep-transmit-ltm-result is FALSE."; + reference + "12.14.7.4.3c of IEEE Std 802.1Q-2018"; + } + } // output + } // transmit- linktrace + + /* --------------- + * Notifications + * --------------- + */ + + notification mep-fault-alarm { + description + "To alert the Manager to the existence of a fault in a monitored + MA by issuing a Fault Alarm."; + leaf maintenance-group { + type maintenance-group-type; + description + "The maintenance group to which the Maintenance Points + is associated with."; + } + leaf mep-id { + type leafref { + path "/cfm/maintenance-domains/maintenance-domain"+ + "/maintenance-association/maintenance-association-component"+ + "/mep/mep-id"; + } + description + "Integer that is unique among all the MEPs in the same + Maintenance Association."; + reference + "3.114, 12.14.7, 19.2 of IEEE Std 802.1Q-2018"; + } + leaf mep-priority-defect { + type leafref { + path "/cfm/maintenance-domains/maintenance-domain"+ + "/maintenance-association/maintenance-association-component"+ + "/mep/highest-priority-defect"; + } + description + "The highest priority defect that has been present + since the MEPs Fault Notification Generator state + machine was last in the FNG_RESET state."; + } + } // mep-fault-alarm + +} // ieee802-dot1q-cfm \ No newline at end of file diff --git a/model/yang/imports/ietf-inet-types.yang b/model/yang/imports/ietf-inet-types.yang new file mode 100644 index 0000000..5624a95 --- /dev/null +++ b/model/yang/imports/ietf-inet-types.yang @@ -0,0 +1,461 @@ +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: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + 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 . + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + + + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + length "1..253"; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + +} \ No newline at end of file diff --git a/model/yang/imports/ietf-interfaces.yang b/model/yang/imports/ietf-interfaces.yang new file mode 100644 index 0000000..96d4167 --- /dev/null +++ b/model/yang/imports/ietf-interfaces.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: + WG List: + + Editor: Martin Bjorklund + "; + + 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"; + } + } + } + } +} \ No newline at end of file diff --git a/model/yang/imports/ietf-ptp-dataset.yang b/model/yang/imports/ietf-ptp-dataset.yang new file mode 100644 index 0000000..d899e56 --- /dev/null +++ b/model/yang/imports/ietf-ptp-dataset.yang @@ -0,0 +1,605 @@ + module ietf-ptp-dataset{ + namespace "urn:ietf:params:xml:ns:yang:ietf-ptp-dataset"; + prefix "ptp-dataset"; + organization "IETF TICTOC Working Group"; + contact + "WG Web: http://tools.ietf.org/wg/tictoc/ + WG List: + WG Chair: Karen O'Donoghue + + WG Chair: Yaakov Stein + + Editor: Yuanlong Jiang + + Editor: Rodney Cummings + "; + description + "This YANG module defines a data model for the configuration + of IEEE 1588-2008 clocks, and also for retrieval of the state + data of IEEE 1588-2008 clocks."; + + revision "2017-02-08" { + description "Version 4.0"; + reference "draft-ietf-tictoc-1588v2-yang"; + } + + typedef delay-mechanism-enumeration { + type enumeration { + enum E2E { + value 1; + description + "The port uses the delay request-response + mechanism."; + } + enum P2P { + value 2; + description + "The port uses the peer delay mechanism."; + } + enum DISABLED { + value 254; + description + "The port does not implement any delay + mechanism."; + } + } + description + "The propagation delay measuring option used by the + port. Values for this enumeration are specified + by the IEEE 1588 standard exclusively."; + reference + "IEEE Std 1588-2008: 8.2.5.4.4"; + } + + typedef port-state-enumeration { + type enumeration { + enum INITIALIZING { + value 1; + description + "The port is initializing its data sets, hardware, and + communication facilities."; + } + enum FAULTY { + value 2; + description + "The port is in the fault state."; + } + enum DISABLED { + value 3; + description + "The port is disabled, and is not communicating PTP + messages (other than possibly PTP management + messages)."; + } + enum LISTENING { + value 4; + description + "The port is listening for an Announce message."; + } + enum PRE_MASTER { + value 5; + description + "The port is in the pre-master state."; + } + enum MASTER { + value 6; + description + "The port is behaving as a master port."; + } + enum PASSIVE { + value 7; + description + "The port is in the passive state."; + } + enum UNCALIBRATED { + value 8; + description + "A master port has been selected, but the port is still + in the uncalibrated state."; + } + enum SLAVE { + value 9; + description + "The port is synchronizing to the selected + master port."; + } + } + description + "The current state of the protocol engine associated + with the port. Values for this enumeration are specified + by the IEEE 1588 standard exclusively."; + reference + "IEEE Std 1588-2008: 8.2.5.3.1, 9.2.5"; + } + + typedef time-interval-type { + type int64; + description + "Derived data type for time interval, + represented in units of nanoseconds and + multipled by 2^16"; + reference + "IEEE Std 1588-2008: 5.3.2"; + } + + typedef clock-identity-type { + type binary { + length "8"; + } + description + "Derived data type to identify a clock"; + reference + "IEEE Std 1588-2008: 5.3.4"; + } + + grouping port-identity-grouping { + description + "Derived data type to identify a port, which contains + two members: clockIdentity and portNumber."; + reference + "IEEE Std 1588-2008: 5.3.5"; + + leaf clock-identity { + type clock-identity-type; + description + "Identity of the clock"; + } + + leaf port-number { + type uint16; + description + "Port number"; + } + } + + grouping clock-quality-grouping { + description + "Derived data type for quality of a clock, which contains + clockClass, clockAccuracy and offsetScaledLogVariance."; + reference + "IEEE Std 1588-2008: 5.3.7"; + + leaf clock-class { + type uint8; + default 248; + description + "The clockClass denotes the traceability of the time + or frequency distributed by the clock."; + } + + leaf clock-accuracy { + type uint8; + description + "The clockAccuracy indicates the expected accuracy + of the clock."; + } + + leaf offset-scaled-log-variance { + type uint16; + description + "The offsetScaledLogVariance provides an + estimate of the variations of the clock + from a linear timescale when it is not synchronized + to another clock using the protocol."; + } + } + + grouping default-ds-entry { + description + "Collection of members of the default data set."; + + leaf two-step-flag { + type boolean; + description + "When set, the clock is a two-step clock; otherwise, + the clock is a one-step clock."; + } + + leaf clock-identity { + type clock-identity-type; + description + "The clockIdentity of the local clock"; + } + + leaf number-ports { + type uint16; + description + "The number of PTP ports on the device."; + } + + container clock-quality { + description + "The clockQuality of the local clock."; + + uses clock-quality-grouping; + } + + leaf priority1 { + type uint8; + description + "The priority1 attribute of the local clock."; + } + + leaf priority2{ + type uint8; + description + "The priority2 attribute of the local clock. "; + } + + leaf domain-number { + type uint8; + description + "The domain number of the current syntonization + domain."; + } + + leaf slave-only { + type boolean; + description + "When set, the clock is a slave-only clock."; + } + } + + grouping current-ds-entry { + description + "Collection of members of current data set."; + + leaf steps-removed { + type uint16; + default 0; + description + "The number of communication paths traversed + between the local clock and the grandmaster clock."; + } + leaf offset-from-master { + type time-interval-type; + description + "The current value of the time difference between + a master and a slave clock as computed by the slave."; + } + + leaf mean-path-delay { + type time-interval-type; + description + "The current value of the mean propagation time between + a master and a slave clock as computed by the slave."; + + } + } + + grouping parent-ds-entry { + description + "Collection of members of the parent data set."; + + container parent-port-identity { + description + "The portIdentity of the port on the master"; + uses port-identity-grouping; + } + leaf parent-stats { + type boolean; + default false; + description + "When set, the values of + observedParentOffsetScaledLogVariance and + observedParentClockPhaseChangeRate of parentDS + have been measured and are valid."; + } + leaf observed-parent-offset-scaled-log-variance { + type uint16; + default 0xFFFF; + description + "An estimate of the parent clock's PTP variance + as observed by the slave clock."; + } + leaf observed-parent-clock-phase-change-rate { + type int32; + description + "An estimate of the parent clock's phase change rate + as observed by the slave clock."; + } + leaf grandmaster-identity { + type binary{ + length "8"; + } + + description + "The clockIdentity attribute of the grandmaster clock."; + + } + container grandmaster-clock-quality { + description + "The clockQuality of the grandmaster clock."; + uses clock-quality-grouping; + } + leaf grandmaster-priority1 { + type uint8; + description + "The priority1 attribute of the grandmaster clock."; + } + leaf grandmaster-priority2 { + type uint8; + description + "The priority2 attribute of the grandmaster clock."; + } + } + + grouping time-properties-ds-entry { + description + "Collection of members of the timeProperties data set."; + leaf current-utc-offset-valid { + type boolean; + description + "When set, the current UTC offset is valid."; + } + leaf current-utc-offset { + type int16; + description + "The offset between TAI and UTC when the epoch of the + PTP system is the PTP epoch, i.e., when ptp-timescale + is TRUE; otherwise, the value has no meaning."; + } + leaf leap59 { + type boolean; + description + "When set, the last minute of the current UTC day + contains 59 seconds."; + } + leaf leap61 { + type boolean; + description + "When set, the last minute of the current UTC day + contains 61 seconds."; + } + leaf time-traceable { + type boolean; + description + "When set, the timescale and the currentUtcOffset are + traceable to a primary reference."; + } + leaf frequency-traceable { + type boolean; + description + "When set, the frequency determining the timescale + is traceable to a primary reference."; + } + leaf ptp-timescale { + type boolean; + description + "When set, the clock timescale of the grandmaster + clock is PTP; otherwise, the timescale is ARB + (arbitrary)."; + } + leaf time-source { + type uint8; + description + "The source of time used by the grandmaster clock."; + + } + } + + grouping port-ds-entry { + description + "Collection of members of the port data set."; + + container port-identity { + description + "The portIdentity attribute of the local port."; + uses port-identity-grouping; + } + + leaf port-state { + type port-state-enumeration; + default "INITIALIZING"; + description + "Current state associated with the port."; + } + + leaf log-min-delay-req-interval { + type int8; + description + "The base-two logarithm of the minDelayReqInterval + (the minimum permitted mean time interval between + successive Delay_Req messages)."; + } + + leaf peer-mean-path-delay { + type time-interval-type; + default 0; + description + "An estimate of the current one-way propagation delay + on the link when the delayMechanism is P2P; otherwise, + it is zero."; + } + + leaf log-announce-interval { + type int8; + description + "The base-two logarithm of the mean + announceInterval (mean time interval between + successive Announce messages)."; + } + + leaf announce-receipt-timeout { + type uint8; + description + "The number of announceInterval that have to pass + without receipt of an Announce message before the + occurrence of the event ANNOUNCE_RECEIPT_TIMEOUT_ + EXPIRES."; + } + + leaf log-sync-interval { + type int8; + description + "The base-two logarithm of the mean SyncInterval + for multicast messages. The rates for unicast + transmissions are negotiated separately on a per port + basis and are not constrained by this attribute."; + } + + leaf delay-mechanism { + type delay-mechanism-enumeration; + description + "The propagation delay measuring option used by the + port in computing meanPathDelay."; + } + + leaf log-min-pdelay-req-interval { + type int8; + description + "The base-two logarithm of the + minPdelayReqInterval (minimum permitted mean time + interval between successive Pdelay_Req messages)."; + + } + + leaf version-number { + type uint8; + description + "The PTP version in use on the port."; + } + } + + grouping transparent-clock-default-ds-entry { + description + "Collection of members of the transparentClockDefault data + set (default data set for a transparent clock)."; + + leaf clock-identity { + type clock-identity-type; + description + "The clockIdentity of the transparent clock."; + } + leaf number-ports { + type uint16; + description + "The number of PTP ports on the device."; + } + leaf delay-mechanism { + type delay-mechanism-enumeration; + description + "The propagation delay measuring option + used by the transparent clock."; + } + leaf primary-domain { + type uint8; + default 0; + description + "The domainNumber of the primary syntonization domain."; + + } + } + + grouping transparent-clock-port-ds-entry { + description + "Collection of members of the transparentClockPort data + set (port data set for a transparent clock)."; + + container port-identity { + description + "The portIdentity of the local port."; + + uses port-identity-grouping; + } + leaf log-min-pdelay-req-interval { + type int8; + description + "The logarithm to the base 2 of the + minPdelayReqInterval (minimum permitted mean time + interval between successive Pdelay_Req messages)."; + } + leaf faulty-flag { + type boolean; + default false; + description + "When set, the port is faulty."; + } + leaf peer-mean-path-delay { + type time-interval-type; + default 0; + description + "An estimate of the current one-way propagation delay + on the link when the delayMechanism is P2P; otherwise, + it is zero."; + } + } + + list instance-list { + + key "instance-number"; + + description + "List of one or more PTP datasets in the device, one for + each domain (see IEEE 1588-2008 subclause 6.3). + Each PTP dataset represents a distinct instance of + PTP implementation in the device (i.e. distinct + Ordinary Clock or Boundary Clock)."; + + leaf instance-number { + type uint16; + description + "The instance number of the current PTP instance"; + } + container default-ds { + description + "The default data set of the clock."; + uses default-ds-entry; + } + + container current-ds { + description + "The current data set of the clock."; + uses current-ds-entry; + } + + container parent-ds { + description + "The parent data set of the clock."; + uses parent-ds-entry; + } + + container time-properties-ds { + description + "The timeProperties data set of the clock."; + uses time-properties-ds-entry; + } + + list port-ds-list { + key "port-number"; + description + "List of port data sets of the clock."; + leaf port-number{ + type leafref{ + path "../port-identity/port-number"; + } + description + "Refers to the portNumber memer of + portDS.portIdentity."; + } + uses port-ds-entry; + } + } + + container transparent-clock-default-ds { + description + "The members of the transparentClockDefault Data Set"; + uses transparent-clock-default-ds-entry; + } + + list transparent-clock-port-ds-list { + key "port-number"; + description + "List of transparentClockPort data sets + of the transparent clock."; + leaf port-number { + type leafref { + path "../port-identity/port-number"; + } + description + "Refers to the portNumber memer + of transparentClockPortDS.portIdentity."; + } + uses transparent-clock-port-ds-entry; + } + } diff --git a/model/yang/imports/ietf-yang-types.yang b/model/yang/imports/ietf-yang-types.yang new file mode 100644 index 0000000..66a513e --- /dev/null +++ b/model/yang/imports/ietf-yang-types.yang @@ -0,0 +1,480 @@ +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: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + + + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + + + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +} \ No newline at end of file