Andrea Campanella | 10426e2 | 2021-10-15 17:58:04 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
| 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | /* |
| 18 | * NOTE: This file was generated, manual edits will be overwritten! |
| 19 | * |
| 20 | * Generated by 'goCodeGenerator.py': |
| 21 | * https://github.com/cboling/OMCI-parser/README.md |
| 22 | */ |
| 23 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // Dot1AgCfmStackClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Dot1ag CFM stack |
| 30 | const Dot1AgCfmStackClassID = ClassID(305) // 0x0131 |
| 31 | |
| 32 | var dot1agcfmstackBME *ManagedEntityDefinition |
| 33 | |
| 34 | // Dot1AgCfmStack (Class ID: #305 / 0x0131) |
| 35 | // This ME reports the maintenance status of a bridge port at any given time. An ONU that supports |
| 36 | // [IEEE 802.1ag] functionality automatically creates an instance of the dot1ag CFM stack ME for |
| 37 | // each MAC bridge or IEEE 802.1p mapper, depending on its provisioning model. |
| 38 | // |
| 39 | // The dot1ag CFM stack also lists any VLANs and bridge ports against which configuration errors |
| 40 | // are currently identified. The ONU should reject operations that create configuration errors. |
| 41 | // However, these errors can arise because of operations on other MEs that are not necessarily |
| 42 | // possible to detect during CFM configuration. |
| 43 | // |
| 44 | // Relationships |
| 45 | // An ONU that supports [IEEE 802.1ag] creates one instance of this ME for each MAC bridge or IEEE |
| 46 | // 802.1p mapper, depending on its provisioning model. It should not create an instance for an |
| 47 | // IEEE-802.1p mapper that is associated with a MAC bridge. |
| 48 | // |
| 49 | // Attributes |
| 50 | // Managed Entity Id |
| 51 | // This attribute uniquely identifies an instance of this ME. Through an identical ID, this ME is |
| 52 | // implicitly linked to an instance of the MAC bridge service profile ME or an IEEE 802.1p mapper |
| 53 | // ME. It is expected that an ONU will implement CFM on bridges or on IEEE-802.1p mappers, but not |
| 54 | // both. For precision, the reference is disambiguated by the value of the layer 2 type pointer |
| 55 | // attribute. (R) (mandatory) (2-bytes) |
| 56 | // |
| 57 | // Layer 2 Type |
| 58 | // This attribute specifies whether the dot1ag CFM stack is associated with a MAC bridge service |
| 59 | // profile (value 0) or an IEEE 802.1p mapper (value 1). (R) (mandatory) (1-byte) |
| 60 | // |
| 61 | // Mp Status Table |
| 62 | // This attribute is a list of entries, each entry reporting one aspect of the maintenance status |
| 63 | // of one port. If a port is associated with more than one CFM maintenance entity, each is |
| 64 | // represented as a separate item in this table attribute; a port that has no current maintenance |
| 65 | // functions is not represented in the table (so the table may be empty). Each entry is defined as |
| 66 | // follows. |
| 67 | // |
| 68 | // Port ID: The ME ID of the MAC bridge port config data whose information is reported in this |
| 69 | // entry. If the layer 2 parent is an IEEE 802.1p mapper, a null pointer. (2-bytes) |
| 70 | // |
| 71 | // Level: The level at which the reported maintenance function exists, 0..7. (1-byte) |
| 72 | // |
| 73 | // Direction: The value 1 (down) or 2 (up). (1-byte) |
| 74 | // |
| 75 | // VLAN ID: If this table entry reports a maintenance function associated with a VLAN, this field |
| 76 | // contains the value of the primary VLAN ID. If no VLAN is associated with this entry, this field |
| 77 | // contains the value 0. (2-bytes) |
| 78 | // |
| 79 | // MD: A pointer to the associated dot1ag maintenance domain ME. If no MD is associated with this |
| 80 | // entry, a null pointer. (2-bytes) |
| 81 | // |
| 82 | // MA: A pointer to the associated dot1ag maintenance association ME. If no MA is associated with |
| 83 | // this entry, a null pointer. (2-bytes) |
| 84 | // |
| 85 | // MEP ID: If this table entry reports an MEP, this field contains the value of its MEP ID (range |
| 86 | // 1..8191). If this table entry reports an MHF, this field contains the value 0. (2-bytes) |
| 87 | // |
| 88 | // MAC address: The MAC address of the MP. (6-bytes) |
| 89 | // |
| 90 | // (R) (mandatory) (18N bytes) |
| 91 | // |
| 92 | // Configuration Error List Table |
| 93 | // This attribute is based on the [IEEE 802.1ag] configuration error list. It is a list of entries, |
| 94 | // each entry reporting a VLAN and a bridge port against which a configuration error has been |
| 95 | // detected. The table may be empty at any given time. Entries are defined as follows: |
| 96 | // |
| 97 | // VLAN ID: If this table entry reports a maintenance function associated with a VLAN, this field |
| 98 | // contains the value of the VLAN ID in error. If no VLAN is associated with this entry, this field |
| 99 | // contains the value 0. (2-bytes) |
| 100 | // |
| 101 | // Port ID: A pointer to the MAC bridge port config data whose information is reported in this |
| 102 | // entry. If the layer 2 parent is an IEEE 802.1p mapper, a null pointer. (2-bytes) |
| 103 | // |
| 104 | // Detected configuration error: A bit mask with the following meanings. A list entry exists if and |
| 105 | // only if at least one of these bits is set. Definitions appear in clause 22.2.4 of [IEEE |
| 106 | // 802.1ag]: (1-byte) |
| 107 | // |
| 108 | // 0x01 CFM leak. MA x is associated with a specific VID list, one or more of the VIDs in MA x can |
| 109 | // pass through the bridge port, no up MEP is configured for MA x on the bridge port, no down MEP |
| 110 | // is configured on any bridge port for MA x, and another MA y, at a higher MD level than MA x, and |
| 111 | // associated with at least one of the VID(s) also in MA x, does have an MEP configured on the |
| 112 | // bridge port. |
| 113 | // |
| 114 | // 0x02 Conflicting VIDs. MA x is associated with a specific VID list, an up MEP is configured on |
| 115 | // MA x on the bridge port, and another MA y, associated with at least one of the VID(s) also in MA |
| 116 | // x, and at the same MD level as MA x, also has an up MEP configured on some bridge port. |
| 117 | // |
| 118 | // 0x04 Excessive levels. The number of different MD levels at which maintenance domain |
| 119 | // intermediate points (MIPs) are to be created on this port exceeds the bridge's capabilities. |
| 120 | // |
| 121 | // 0x08 Overlapped levels. An MEP is created for one VID at one MD level, but an MEP is also |
| 122 | // configured on another VID at that MD level or higher, exceeding the bridge's capabilities. |
| 123 | // |
| 124 | // (R) (mandatory) (5N bytes) |
| 125 | // |
| 126 | type Dot1AgCfmStack struct { |
| 127 | ManagedEntityDefinition |
| 128 | Attributes AttributeValueMap |
| 129 | } |
| 130 | |
| 131 | func init() { |
| 132 | dot1agcfmstackBME = &ManagedEntityDefinition{ |
| 133 | Name: "Dot1AgCfmStack", |
| 134 | ClassID: 305, |
| 135 | MessageTypes: mapset.NewSetWith( |
| 136 | Get, |
| 137 | GetNext, |
| 138 | ), |
| 139 | AllowedAttributeMask: 0xe000, |
| 140 | AttributeDefinitions: AttributeDefinitionMap{ |
| 141 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 142 | 1: ByteField("Layer2Type", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1), |
| 143 | 2: TableField("MpStatusTable", TableAttributeType, 0x4000, TableInfo{nil, 18}, mapset.NewSetWith(Read), false, false, false, 2), |
| 144 | 3: TableField("ConfigurationErrorListTable", TableAttributeType, 0x2000, TableInfo{nil, 5}, mapset.NewSetWith(Read), true, false, false, 3), |
| 145 | }, |
| 146 | Access: CreatedByOnu, |
| 147 | Support: UnknownSupport, |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | // NewDot1AgCfmStack (class ID 305) creates the basic |
| 152 | // Managed Entity definition that is used to validate an ME of this type that |
| 153 | // is received from or transmitted to the OMCC. |
| 154 | func NewDot1AgCfmStack(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 155 | return NewManagedEntity(*dot1agcfmstackBME, params...) |
| 156 | } |