blob: bd8d2f6852ec090fb99ce0fb97dc4879919cb40b [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
4
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
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
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 */
Andrea Campanella7167ebb2020-02-24 09:56:38 +010017 /*
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// AuthenticationSecurityMethodClassID is the 16-bit ID for the OMCI
29// Managed entity Authentication security method
30const AuthenticationSecurityMethodClassID ClassID = ClassID(148)
31
32var authenticationsecuritymethodBME *ManagedEntityDefinition
33
34// AuthenticationSecurityMethod (class ID #148)
35// The authentication security method defines the user ID and password configuration to establish a
36// session between a client and a server. This object may be used in the role of the client or
37// server. An instance of this ME is created by the OLT if authenticated communication is
38// necessary.
39//
40// Relationships
41// One instance of this management entity may be associated with a network address ME. This ME may
42// also be cited by other MEs that require authentication parameter management.
43//
44// Attributes
45// Managed Entity Id
46// Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0xFFFF
47// is reserved. (R, setbycreate) (mandatory) (2-bytes)
48//
49// Validation Scheme
50// (R,-W) (mandatory) (1-byte)
51//
52// Username 1
53// Username 1: This string attribute is the user name. If the string is shorter than 25-bytes, it
54// must be null terminated (Note). (R,-W) (mandatory) (25-bytes)
55//
56// Password
57// Password: This string attribute is the password. If the string is shorter than 25-bytes, it must
58// be null terminated. (R,-W) (mandatory) (25-bytes)
59//
60// Realm
61// Realm: This string attribute specifies the realm used in digest authentication. If the string is
62// shorter than 25-bytes, it must be null terminated. (R,-W) (mandatory) (25-bytes)
63//
64// Username 2
65// NOTE - The total username is the concatenation of the username 1 and username 2 attributes if
66// and only if: a) username 1 comprises 25 non-null characters; b) username 2 is supported by the
67// ONU; and c) username 2 contains a leading non-null character string. Otherwise, the total
68// username is simply the value of the username 1 attribute.
69//
70type AuthenticationSecurityMethod struct {
71 ManagedEntityDefinition
72 Attributes AttributeValueMap
73}
74
75func init() {
76 authenticationsecuritymethodBME = &ManagedEntityDefinition{
77 Name: "AuthenticationSecurityMethod",
78 ClassID: 148,
79 MessageTypes: mapset.NewSetWith(
80 Create,
81 Delete,
82 Get,
83 Set,
84 ),
85 AllowedAttributeMask: 0xf800,
86 AttributeDefinitions: AttributeDefinitionMap{
87 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
88 1: ByteField("ValidationScheme", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
89 2: MultiByteField("Username1", OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 2),
90 3: MultiByteField("Password", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
91 4: MultiByteField("Realm", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
92 5: MultiByteField("Username2", OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 5),
93 },
94 Access: CreatedByOlt,
95 Support: UnknownSupport,
96 }
97}
98
99// NewAuthenticationSecurityMethod (class ID 148) creates the basic
100// Managed Entity definition that is used to validate an ME of this type that
101// is received from or transmitted to the OMCC.
102func NewAuthenticationSecurityMethod(params ...ParamData) (*ManagedEntity, OmciErrors) {
103 return NewManagedEntity(*authenticationsecuritymethodBME, params...)
104}