blob: aefb2989fa6bcd84c917c22b6cc0965439087c91 [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
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 */
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
30const Dot1AgMaintenanceDomainClassID ClassID = ClassID(299)
31
32var dot1agmaintenancedomainBME *ManagedEntityDefinition
33
34// Dot1AgMaintenanceDomain (class ID #299)
35// 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
mpagenko71eb3202021-08-19 07:41:22 +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
mpagenko71eb3202021-08-19 07:41:22 +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
mpagenko71eb3202021-08-19 07:41:22 +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//
mpagenko71eb3202021-08-19 07:41:22 +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
mpagenko71eb3202021-08-19 07:41:22 +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
mpagenko71eb3202021-08-19 07:41:22 +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
121func init() {
122 dot1agmaintenancedomainBME = &ManagedEntityDefinition{
123 Name: "Dot1AgMaintenanceDomain",
124 ClassID: 299,
125 MessageTypes: mapset.NewSetWith(
126 Create,
127 Delete,
128 Get,
129 Set,
130 ),
mpagenko71eb3202021-08-19 07:41:22 +0000131 AllowedAttributeMask: 0xfc00,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000132 AttributeDefinitions: AttributeDefinitionMap{
133 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
134 1: ByteField("MdLevel", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
135 2: ByteField("MdNameFormat", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
mpagenko71eb3202021-08-19 07:41:22 +0000136 3: MultiByteField("MdName1", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
137 4: MultiByteField("MdName2", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
138 5: ByteField("MaintenanceDomainIntermediatePointHalfFunctionMhfCreation", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
139 6: ByteField("SenderIdPermission", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000140 },
141 Access: CreatedByOlt,
142 Support: UnknownSupport,
143 }
144}
145
146// NewDot1AgMaintenanceDomain (class ID 299) creates the basic
147// Managed Entity definition that is used to validate an ME of this type that
148// is received from or transmitted to the OMCC.
149func NewDot1AgMaintenanceDomain(params ...ParamData) (*ManagedEntity, OmciErrors) {
150 return NewManagedEntity(*dot1agmaintenancedomainBME, params...)
151}