blob: 58b64dd9e4100c8829f6cd1540d15a78d6d55acb [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const AuthenticationSecurityMethodClassId ClassID = ClassID(148)
25
26var authenticationsecuritymethodBME *ManagedEntityDefinition
27
28// AuthenticationSecurityMethod (class ID #148)
29// The authentication security method defines the user ID and password configuration to establish a
30// session between a client and a server. This object may be used in the role of the client or
31// server. An instance of this ME is created by the OLT if authenticated communication is
32// necessary.
33//
34// Relationships
35// One instance of this management entity may be associated with a network address ME. This ME may
36// also be cited by other MEs that require authentication parameter management.
37//
38// Attributes
39// Managed Entity Id
40// Managed entity ID: This attribute uniquely identifies each instance of this ME. The value 0xFFFF
41// is reserved. (R, setbycreate) (mandatory) (2 bytes)
42//
43// Validation Scheme
44// (R, W) (mandatory) (1 byte)
45//
46// Username 1
47// Username 1: This string attribute is the user name. If the string is shorter than 25 bytes, it
48// must be null terminated (Note). (R, W) (mandatory) (25 bytes)
49//
50// Password
51// Password: This string attribute is the password. If the string is shorter than 25 bytes, it must
52// be null terminated. (R, W) (mandatory) (25 bytes)
53//
54// Realm
55// Realm: This string attribute specifies the realm used in digest authentication. If the string is
56// shorter than 25 bytes, it must be null terminated. (R, W) (mandatory) (25 bytes)
57//
58// Username 2
59// NOTE – The total username is the concatenation of the username 1 and username 2 attributes if
60// and only if: a) username 1 comprises 25 non-null characters; b) username 2 is supported by the
61// ONU; and c) username 2 contains a leading non-null character string. Otherwise, the total
62// username is simply the value of the username 1 attribute.
63//
64type AuthenticationSecurityMethod struct {
65 ManagedEntityDefinition
66 Attributes AttributeValueMap
67}
68
69func init() {
70 authenticationsecuritymethodBME = &ManagedEntityDefinition{
71 Name: "AuthenticationSecurityMethod",
72 ClassID: 148,
73 MessageTypes: mapset.NewSetWith(
74 Create,
75 Delete,
76 Get,
77 Set,
78 ),
79 AllowedAttributeMask: 0XF800,
80 AttributeDefinitions: AttributeDefinitionMap{
81 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, false, 0),
82 1: ByteField("ValidationScheme", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 1),
83 2: MultiByteField("Username1", 25, nil, mapset.NewSetWith(Read, Write), false, false, false, false, 2),
84 3: MultiByteField("Password", 25, nil, mapset.NewSetWith(Read, Write), false, false, false, false, 3),
85 4: MultiByteField("Realm", 25, nil, mapset.NewSetWith(Read, Write), false, false, false, false, 4),
86 5: MultiByteField("Username2", 25, nil, mapset.NewSetWith(Read, Write), false, false, true, false, 5),
87 },
88 }
89}
90
91// NewAuthenticationSecurityMethod (class ID 148 creates the basic
92// Managed Entity definition that is used to validate an ME of this type that
93// is received from the wire, about to be sent on the wire.
94func NewAuthenticationSecurityMethod(params ...ParamData) (*ManagedEntity, OmciErrors) {
95 return NewManagedEntity(authenticationsecuritymethodBME, params...)
96}