blob: f64688d33e7e2d32e0e4ed5548e14949b3b79993 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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// Dot1AgMaintenanceDomainClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1ag maintenance domain
mpagenko836a1fd2021-11-01 16:12:42 +000030const Dot1AgMaintenanceDomainClassID = ClassID(299) // 0x012b
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var dot1agmaintenancedomainBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// Dot1AgMaintenanceDomain (Class ID: #299 / 0x012b)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// In [IEEE 802.1ag], a maintenance domain (MD) is a context within which configuration fault
36// management (CFM) connectivity verification can occur. Individual services (maintenance
37// associations, MAs) exist within an MD. An MD is created and deleted by the OLT. The MD ME is
38// specified by [IEEE 802.1ag] in such a way that the same provisioning can be used for all
39// associated systems in a network; the OMCI definition accordingly avoids ONU-specific information
40// such as pointers.
41//
42// Relationships
43// Several MDs may be associated with a given bridge, at various MD levels, and a given MD may be
44// associated with any number of bridges.
45//
46// Attributes
47// Managed Entity Id
mpagenkodcd63cf2021-08-19 07:31:08 +000048// This attribute uniquely identifies an instance of this ME. The values 0 and 0xFFFF are reserved.
49// (R, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000050//
51// Md Level
mpagenkodcd63cf2021-08-19 07:31:08 +000052// This attribute ranges from 0..7 and specifies the maintenance level of this MD. Higher numbers
53// have wider geographic scope. (R,-W, setbycreate) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000054//
55// Md Name Format
mpagenkodcd63cf2021-08-19 07:31:08 +000056// This attribute specifies one of several possible formats for the MD name attribute. (R,-W,
57// setbycreate) (mandatory) (1-byte)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000058//
mpagenkodcd63cf2021-08-19 07:31:08 +000059// MD Name 1
60// These two attributes may be regarded as a 50-byte octet string whose value is the left-justified
61// maintenance domain name. The MD name may or may not be a printable character string, so an octet
62// string is the appropriate representation. If the MD name format specifies a DNS-like name or a
63// character string, the string is null-terminated; otherwise, its length is determined by the MD
64// name format. If the MD has no name (MD name format-=-0), this attribute is undefined. Note that
65// binary comparisons of the MD name are made in other CFM state machines, so blanks, alphabetic
66// case, etc., are significant. Also, note that the MD name and the MA name must be packed (with
67// additional bytes) into 48-byte CFM message headers. (R,-W) (mandatory if MD name format is not
68// 1) (25-bytes * 2 attributes)
69//
70// MD Name 2
71// These two attributes may be regarded as a 50-byte octet string whose value is the left-justified
72// maintenance domain name. The MD name may or may not be a printable character string, so an octet
73// string is the appropriate representation. If the MD name format specifies a DNS-like name or a
74// character string, the string is null-terminated; otherwise, its length is determined by the MD
75// name format. If the MD has no name (MD name format-=-0), this attribute is undefined. Note that
76// binary comparisons of the MD name are made in other CFM state machines, so blanks, alphabetic
77// case, etc., are significant. Also, note that the MD name and the MA name must be packed (with
78// additional bytes) into 48-byte CFM message headers. (R,-W) (mandatory if MD name format is not
79// 1) (25-bytes * 2 attributes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000080//
81// Maintenance Domain Intermediate Point Half Function Mhf Creation
mpagenkodcd63cf2021-08-19 07:31:08 +000082// Maintenance domain intermediate point half function (MHF) creation: This attribute determines
83// whether an associated bridge creates an MHF for this MD, under circumstances defined in
84// clause-22.2.3 of [IEEE 802.1ag]. This attribute is an enumeration with the following values.
85//
86// 1 None
87//
88// 2 Default (IEEE 802.1ag term). The bridge can create MHFs on an associated VID on any port
89// through which the VID can pass, where: i) there are no lower active MD levels or ii) there is a
90// maintenance association end point (MEP) at the next lower active MD level on the port.
91//
92// 3 Explicit. The bridge can create MHFs on an associated VID on any port through which the VID
93// can pass, but only if an MEP exists at some lower maintenance level.
94//
Holger Hildebrandtfa074992020-03-27 15:42:06 +000095// (R,-W, setbycreate) (mandatory) (1-byte)
96//
97// Sender Id Permission
mpagenkodcd63cf2021-08-19 07:31:08 +000098// This attribute determines the contents of the sender ID type-length-value (TLV) included in CFM
99// messages transmitted by maintenance points (MPs) controlled by this MD. Chassis ID and
100// management address information is available from the dot1ag chassismanagement info ME. The
101// attribute is an enumeration with the following values.
102//
103// 1 None: the sender ID TLV is not to be sent.
104//
105// 2 Chassis: the chassis ID length, chassis ID subtype, and chassis ID fields of the sender ID TLV
106// are to be sent, but not the management address fields.
107//
108// 3 Manage: the management address fields of the sender ID TLV are to be sent, but the chassis ID
109// length is to be transmitted with the value 0, and the chassis ID subtype, and chassis ID fields
110// are not to be sent.
111//
112// 4 ChassisManage: all chassis ID and management address fields are to be sent.
113//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000114// (R,-W, setbycreate) (mandatory) (1-byte)
115//
116type Dot1AgMaintenanceDomain struct {
117 ManagedEntityDefinition
118 Attributes AttributeValueMap
119}
120
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000121// Attribute name constants
122
123const Dot1AgMaintenanceDomain_MdLevel = "MdLevel"
124const Dot1AgMaintenanceDomain_MdNameFormat = "MdNameFormat"
125const Dot1AgMaintenanceDomain_MdName1 = "MdName1"
126const Dot1AgMaintenanceDomain_MdName2 = "MdName2"
127const Dot1AgMaintenanceDomain_MaintenanceDomainIntermediatePointHalfFunctionMhfCreation = "MaintenanceDomainIntermediatePointHalfFunctionMhfCreation"
128const Dot1AgMaintenanceDomain_SenderIdPermission = "SenderIdPermission"
129
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000130func init() {
131 dot1agmaintenancedomainBME = &ManagedEntityDefinition{
132 Name: "Dot1AgMaintenanceDomain",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000133 ClassID: Dot1AgMaintenanceDomainClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000134 MessageTypes: mapset.NewSetWith(
135 Create,
136 Delete,
137 Get,
138 Set,
139 ),
mpagenkodcd63cf2021-08-19 07:31:08 +0000140 AllowedAttributeMask: 0xfc00,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000141 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000142 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
143 1: ByteField(Dot1AgMaintenanceDomain_MdLevel, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
144 2: ByteField(Dot1AgMaintenanceDomain_MdNameFormat, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
145 3: MultiByteField(Dot1AgMaintenanceDomain_MdName1, OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
146 4: MultiByteField(Dot1AgMaintenanceDomain_MdName2, OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
147 5: ByteField(Dot1AgMaintenanceDomain_MaintenanceDomainIntermediatePointHalfFunctionMhfCreation, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
148 6: ByteField(Dot1AgMaintenanceDomain_SenderIdPermission, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000149 },
150 Access: CreatedByOlt,
151 Support: UnknownSupport,
152 }
153}
154
155// NewDot1AgMaintenanceDomain (class ID 299) creates the basic
156// Managed Entity definition that is used to validate an ME of this type that
157// is received from or transmitted to the OMCC.
158func NewDot1AgMaintenanceDomain(params ...ParamData) (*ManagedEntity, OmciErrors) {
159 return NewManagedEntity(*dot1agmaintenancedomainBME, params...)
160}