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 | // AuthenticationSecurityMethodClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Authentication security method |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const AuthenticationSecurityMethodClassID = ClassID(148) // 0x0094 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var authenticationsecuritymethodBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // AuthenticationSecurityMethod (Class ID: #148 / 0x0094) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 46 | // This attribute uniquely identifies each instance of this ME. The value 0xFFFF is reserved. (R, |
| 47 | // setbycreate) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 48 | // |
| 49 | // Validation Scheme |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 50 | // This attribute specifies the validation scheme used when the ONU validates a challenge. |
| 51 | // Validation schemes are defined as follows. |
| 52 | // |
| 53 | // 0 Validation disabled |
| 54 | // |
| 55 | // 1 Validate using MD5 digest authentication as defined in [IETF-RFC-2617] (recommended) |
| 56 | // |
| 57 | // 3 Validate using basic authentication as defined in [IETF RFC 2617] |
| 58 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 59 | // (R,-W) (mandatory) (1-byte) |
| 60 | // |
| 61 | // Username 1 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 62 | // This string attribute is the user name. If the string is shorter than 25-bytes, it must be null |
| 63 | // terminated (Note). (R,-W) (mandatory) (25-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 64 | // |
| 65 | // Password |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 66 | // This string attribute is the password. If the string is shorter than 25-bytes, it must be null |
| 67 | // terminated. (R,-W) (mandatory) (25-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 68 | // |
| 69 | // Realm |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 70 | // This string attribute specifies the realm used in digest authentication. If the string is |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 71 | // shorter than 25-bytes, it must be null terminated. (R,-W) (mandatory) (25-bytes) |
| 72 | // |
| 73 | // Username 2 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 74 | // This string attribute allows for continuation of the user name beyond 25-characters (Note). Its |
| 75 | // default value is a null string. (R,-W) (optional) (25-bytes) |
| 76 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 77 | // NOTE - The total username is the concatenation of the username 1 and username 2 attributes if |
| 78 | // and only if: a) username 1 comprises 25 non-null characters; b) username 2 is supported by the |
| 79 | // ONU; and c) username 2 contains a leading non-null character string. Otherwise, the total |
| 80 | // username is simply the value of the username 1 attribute. |
| 81 | // |
| 82 | type AuthenticationSecurityMethod struct { |
| 83 | ManagedEntityDefinition |
| 84 | Attributes AttributeValueMap |
| 85 | } |
| 86 | |
| 87 | func init() { |
| 88 | authenticationsecuritymethodBME = &ManagedEntityDefinition{ |
| 89 | Name: "AuthenticationSecurityMethod", |
| 90 | ClassID: 148, |
| 91 | MessageTypes: mapset.NewSetWith( |
| 92 | Create, |
| 93 | Delete, |
| 94 | Get, |
| 95 | Set, |
| 96 | ), |
| 97 | AllowedAttributeMask: 0xf800, |
| 98 | AttributeDefinitions: AttributeDefinitionMap{ |
| 99 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0), |
| 100 | 1: ByteField("ValidationScheme", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 101 | 2: MultiByteField("Username1", OctetsAttributeType, 0x4000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 102 | 3: MultiByteField("Password", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 103 | 4: MultiByteField("Realm", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 104 | 5: MultiByteField("Username2", OctetsAttributeType, 0x0800, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 5), |
| 105 | }, |
| 106 | Access: CreatedByOlt, |
| 107 | Support: UnknownSupport, |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | // NewAuthenticationSecurityMethod (class ID 148) creates the basic |
| 112 | // Managed Entity definition that is used to validate an ME of this type that |
| 113 | // is received from or transmitted to the OMCC. |
| 114 | func NewAuthenticationSecurityMethod(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 115 | return NewManagedEntity(*authenticationsecuritymethodBME, params...) |
| 116 | } |