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