blob: 4db7afe537597f00a18b852abb30bf9e5f46f28c [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +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 *
mpagenko836a1fd2021-11-01 16:12:42 +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 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +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 */
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
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// MplsPseudowireTerminationPointClassID is the 16-bit ID for the OMCI
29// Managed entity MPLS pseudowire termination point
30const MplsPseudowireTerminationPointClassID = ClassID(333) // 0x014d
31
32var mplspseudowireterminationpointBME *ManagedEntityDefinition
33
34// MplsPseudowireTerminationPoint (Class ID: #333 / 0x014d)
35// This ME contains the configuration data of a pseudowire whose underlying transport method is
36// MPLS. Instances of this ME are created and deleted by the OLT.
37//
38// Relationships
39// Zero or one instance of this ME is associated with each instance of the pseudowire TP ME.
40//
41// Attributes
42// Managed Entity Id
43// This attribute uniquely identifies each instance of this ME. (R, setbycreate)-(mandatory) (2
44// bytes)
45//
46// Tp Type
47// This attribute specifies the type of ANI-side TP associated with this-ME.
48//
49// 1 Ethernet flow termination point
50//
51// 2 GEM IW TP
52//
53// 3 TCP/UDP config data
54//
55// 4 MPLS pseudowire termination point
56//
57// NOTE - If this instance of the MPLS PW TP is pointed to by another instance of the MPLS PW TP
58// (i.e., whose TP type-= 4), this instance represents a tunnelled MPLS flow, and the following
59// attributes are not meaningful: MPLS PW direction; MPLS PW uplink label; MPLS PW downlink label;
60// and MPLS PW TC. These attributes should be set to the proper number of 0x00 bytes by the OLT and
61// ignored by the ONU.
62//
63// (R, W, setbycreate) (mandatory) (1 byte)
64//
65// Tp Pointer
66// This attribute points to the instance of the TP associated with this MPLS PW TP. The type of the
67// associated TP is determined by the TP type attribute. (R, W, setbycreate) (mandatory) (2 bytes)
68//
69// Mpls Label Indicator
70// This attribute specifies the MPLS label stacking situation.
71//
72// 0 Single MPLS labelled
73//
74// 1 Double MPLS labelled
75//
76// (R, W, setbycreate) (mandatory) (1 byte)
77//
78// Mpls Pw Direction
79// This attribute specifies the inner MPLS direction.
80//
81// 0 Upstream only
82//
83// 1 Downstream only
84//
85// 2 Bidirectional
86//
87// (R, W, setbycreate) (mandatory) (1 byte)
88//
89// Mpls Pw Uplink Label
90// This attribute specifies the label of the inner MPLS pseudowire upstream. The attribute is not
91// meaningful for unidirectional downstream PWs. (R, W, setbycreate) (mandatory) (4 bytes)
92//
93// Mpls Pw Downlink Label
94// This attribute specifies the label of the inner MPLS pseudowire downstream. The attribute is not
95// meaningful for unidirectional upstream PWs. (R, W, setbycreate) (mandatory) (4 bytes)
96//
97// Mpls Pw Tc
98// NOTE 1 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
99//
100// This attribute specifies the inner MPLS TC value in the upstream direction. The attribute is not
101// meaningful for unidirectional downstream PWs. (R, W, setbycreate) (mandatory) (1 byte)
102//
103// Mpls Tunnel Direction
104// This attribute specifies the direction of the (outer) MPLS tunnel.
105//
106// 0 Upstream only
107//
108// 1 Downstream only
109//
110// 2 Bidirectional
111//
112// (R, W, setbycreate) (mandatory for double-labelled case) (1 byte)
113//
114// Mpls Tunnel Uplink Label
115// This attribute specifies the (outer) label for the upstream MPLS tunnel. If the MPLS tunnel is
116// downstream only, this attribute should be set to 0. (R, W, setbycreate) (mandatory for double-
117// labelled case) (4 bytes)
118//
119// Mpls Tunnel Downlink Label
120// This attribute specifies the (outer) label for the downstream MPLS tunnel. If the MPLS tunnel is
121// upstream only, this attribute should be set to 0. (R, W, setbycreate) (mandatory for double-
122// labelled case) (4 bytes)
123//
124// Mpls Tunnel Tc
125// This attribute specifies the TC value of the upstream MPLS tunnel. If the MPLS tunnel is
126// downstream only, this attribute should be set to 0. (R, W, setbycreate) (mandatory for double
127// MPLS labelled case) (1 byte)
128//
129// NOTE 2 - The TC field was previously known as EXP. Refer to [bIETF-RFC-5462].
130//
131// Pseudowire Type
132// This attribute specifies the emulated service to be carried over this PW. The values are from
133// [IETF RFC 4446].
134//
135// 2 ATM AAL5 SDU VCC transport
136//
137// 3 ATM transparent cell transport
138//
139// 5 Ethernet
140//
141// 9 ATM n-to-one VCC cell transport
142//
143// 10 ATM n-to-one VPC cell transport
144//
145// 12 ATM one-to-one VCC cell mode
146//
147// 13 ATM one-to-one VPC cell mode
148//
149// 14 ATM AAL5 PDU VCC transport
150//
151// All other values are reserved.
152//
153// (R, W, setbycreate) (mandatory) (2 bytes)
154//
155// Pseudowire Control Word Preference
156// When set to true, this Boolean attribute specifies that a control word is to be sent with each
157// packet. Some PW types mandate the use of a control word in any event. In such cases, the value
158// configured for this attribute has no effect on the presence of the control word. (R, W,
159// setbycreate) (optional) (1 byte)
160//
161// Administrative State
162// This attribute locks (1) and unlocks (0) the functions performed by the MPLS pseudowire TP.
163// Administrative state is further described in clause-A.1.6. (R,-W) (optional) (1-byte)
164//
165// Operational State
166// This attribute reports whether the ME is currently capable of performing its function. Valid
167// values are enabled (0) and disabled (1). (R) (optional) (1-byte)
168//
169type MplsPseudowireTerminationPoint struct {
170 ManagedEntityDefinition
171 Attributes AttributeValueMap
172}
173
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000174// Attribute name constants
175
176const MplsPseudowireTerminationPoint_TpType = "TpType"
177const MplsPseudowireTerminationPoint_TpPointer = "TpPointer"
178const MplsPseudowireTerminationPoint_MplsLabelIndicator = "MplsLabelIndicator"
179const MplsPseudowireTerminationPoint_MplsPwDirection = "MplsPwDirection"
180const MplsPseudowireTerminationPoint_MplsPwUplinkLabel = "MplsPwUplinkLabel"
181const MplsPseudowireTerminationPoint_MplsPwDownlinkLabel = "MplsPwDownlinkLabel"
182const MplsPseudowireTerminationPoint_MplsPwTc = "MplsPwTc"
183const MplsPseudowireTerminationPoint_MplsTunnelDirection = "MplsTunnelDirection"
184const MplsPseudowireTerminationPoint_MplsTunnelUplinkLabel = "MplsTunnelUplinkLabel"
185const MplsPseudowireTerminationPoint_MplsTunnelDownlinkLabel = "MplsTunnelDownlinkLabel"
186const MplsPseudowireTerminationPoint_MplsTunnelTc = "MplsTunnelTc"
187const MplsPseudowireTerminationPoint_PseudowireType = "PseudowireType"
188const MplsPseudowireTerminationPoint_PseudowireControlWordPreference = "PseudowireControlWordPreference"
189const MplsPseudowireTerminationPoint_AdministrativeState = "AdministrativeState"
190const MplsPseudowireTerminationPoint_OperationalState = "OperationalState"
191
mpagenko836a1fd2021-11-01 16:12:42 +0000192func init() {
193 mplspseudowireterminationpointBME = &ManagedEntityDefinition{
194 Name: "MplsPseudowireTerminationPoint",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000195 ClassID: MplsPseudowireTerminationPointClassID,
mpagenko836a1fd2021-11-01 16:12:42 +0000196 MessageTypes: mapset.NewSetWith(
197 Create,
198 Delete,
199 Get,
200 Set,
201 ),
202 AllowedAttributeMask: 0xfffe,
203 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000204 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
205 1: ByteField(MplsPseudowireTerminationPoint_TpType, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
206 2: Uint16Field(MplsPseudowireTerminationPoint_TpPointer, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
207 3: ByteField(MplsPseudowireTerminationPoint_MplsLabelIndicator, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
208 4: ByteField(MplsPseudowireTerminationPoint_MplsPwDirection, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
209 5: Uint32Field(MplsPseudowireTerminationPoint_MplsPwUplinkLabel, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
210 6: Uint32Field(MplsPseudowireTerminationPoint_MplsPwDownlinkLabel, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
211 7: ByteField(MplsPseudowireTerminationPoint_MplsPwTc, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
212 8: ByteField(MplsPseudowireTerminationPoint_MplsTunnelDirection, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
213 9: Uint32Field(MplsPseudowireTerminationPoint_MplsTunnelUplinkLabel, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 9),
214 10: Uint32Field(MplsPseudowireTerminationPoint_MplsTunnelDownlinkLabel, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 10),
215 11: ByteField(MplsPseudowireTerminationPoint_MplsTunnelTc, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 11),
216 12: Uint16Field(MplsPseudowireTerminationPoint_PseudowireType, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 12),
217 13: ByteField(MplsPseudowireTerminationPoint_PseudowireControlWordPreference, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
218 14: ByteField(MplsPseudowireTerminationPoint_AdministrativeState, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
219 15: ByteField(MplsPseudowireTerminationPoint_OperationalState, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read), true, true, false, 15),
mpagenko836a1fd2021-11-01 16:12:42 +0000220 },
221 Access: CreatedByOlt,
222 Support: UnknownSupport,
223 }
224}
225
226// NewMplsPseudowireTerminationPoint (class ID 333) creates the basic
227// Managed Entity definition that is used to validate an ME of this type that
228// is received from or transmitted to the OMCC.
229func NewMplsPseudowireTerminationPoint(params ...ParamData) (*ManagedEntity, OmciErrors) {
230 return NewManagedEntity(*mplspseudowireterminationpointBME, params...)
231}