Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 | // Dot1AgMaintenanceDomainClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Dot1ag maintenance domain |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 30 | const Dot1AgMaintenanceDomainClassID = ClassID(299) // 0x012b |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var dot1agmaintenancedomainBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame^] | 34 | // Dot1AgMaintenanceDomain (Class ID: #299 / 0x012b) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 48 | // This attribute uniquely identifies an instance of this ME. The values 0 and 0xFFFF are reserved. |
| 49 | // (R, setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 50 | // |
| 51 | // Md Level |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 52 | // 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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 54 | // |
| 55 | // Md Name Format |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 56 | // This attribute specifies one of several possible formats for the MD name attribute. (R,-W, |
| 57 | // setbycreate) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 58 | // |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 59 | // 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) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 80 | // |
| 81 | // Maintenance Domain Intermediate Point Half Function Mhf Creation |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 82 | // 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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 95 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 96 | // |
| 97 | // Sender Id Permission |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 98 | // 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 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 114 | // (R,-W, setbycreate) (mandatory) (1-byte) |
| 115 | // |
| 116 | type Dot1AgMaintenanceDomain struct { |
| 117 | ManagedEntityDefinition |
| 118 | Attributes AttributeValueMap |
| 119 | } |
| 120 | |
| 121 | func init() { |
| 122 | dot1agmaintenancedomainBME = &ManagedEntityDefinition{ |
| 123 | Name: "Dot1AgMaintenanceDomain", |
| 124 | ClassID: 299, |
| 125 | MessageTypes: mapset.NewSetWith( |
| 126 | Create, |
| 127 | Delete, |
| 128 | Get, |
| 129 | Set, |
| 130 | ), |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 131 | AllowedAttributeMask: 0xfc00, |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 132 | 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), |
Chip Boling | 8fddd11 | 2021-08-11 09:58:20 -0500 | [diff] [blame] | 136 | 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), |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 140 | }, |
| 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. |
| 149 | func NewDot1AgMaintenanceDomain(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 150 | return NewManagedEntity(*dot1agmaintenancedomainBME, params...) |
| 151 | } |