blob: 780fed8a7115129fb41b2d8292b9fad0f5c2ac2c [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 */
David K. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// Dot1AgCfmStackClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag CFM stack
Chip Boling610117d2021-09-09 11:24:34 -050030const Dot1AgCfmStackClassID = ClassID(305) // 0x0131
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var dot1agcfmstackBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// Dot1AgCfmStack (Class ID: #305 / 0x0131)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050051// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060056//
57// Layer 2 Type
Chip Boling610117d2021-09-09 11:24:34 -050058// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060060//
61// Mp Status Table
Chip Boling610117d2021-09-09 11:24:34 -050062// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060090// (R) (mandatory) (18N bytes)
91//
92// Configuration Error List Table
Chip Boling610117d2021-09-09 11:24:34 -050093// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600124// (R) (mandatory) (5N bytes)
125//
126type Dot1AgCfmStack struct {
127 ManagedEntityDefinition
128 Attributes AttributeValueMap
129}
130
Chip Boling8cdd6392022-01-27 08:43:37 -0600131// Attribute name constants
132
133const Dot1AgCfmStack_Layer2Type = "Layer2Type"
134const Dot1AgCfmStack_MpStatusTable = "MpStatusTable"
135const Dot1AgCfmStack_ConfigurationErrorListTable = "ConfigurationErrorListTable"
136
Chip Boling6e27b352020-02-14 09:10:01 -0600137func init() {
138 dot1agcfmstackBME = &ManagedEntityDefinition{
139 Name: "Dot1AgCfmStack",
Chip Boling8cdd6392022-01-27 08:43:37 -0600140 ClassID: Dot1AgCfmStackClassID,
Chip Boling6e27b352020-02-14 09:10:01 -0600141 MessageTypes: mapset.NewSetWith(
142 Get,
143 GetNext,
144 ),
145 AllowedAttributeMask: 0xe000,
146 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600147 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
148 1: ByteField(Dot1AgCfmStack_Layer2Type, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read), false, false, false, 1),
149 2: TableField(Dot1AgCfmStack_MpStatusTable, TableAttributeType, 0x4000, TableInfo{nil, 18}, mapset.NewSetWith(Read), false, false, false, 2),
150 3: TableField(Dot1AgCfmStack_ConfigurationErrorListTable, TableAttributeType, 0x2000, TableInfo{nil, 5}, mapset.NewSetWith(Read), true, false, false, 3),
Chip Boling6e27b352020-02-14 09:10:01 -0600151 },
152 Access: CreatedByOnu,
153 Support: UnknownSupport,
154 }
155}
156
157// NewDot1AgCfmStack (class ID 305) creates the basic
158// Managed Entity definition that is used to validate an ME of this type that
159// is received from or transmitted to the OMCC.
160func NewDot1AgCfmStack(params ...ParamData) (*ManagedEntity, OmciErrors) {
161 return NewManagedEntity(*dot1agcfmstackBME, params...)
162}