blob: 4c0616c4ef9df54a08831cab6b50b0e229aac881 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +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 */
David K. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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// SnmpConfigurationDataClassID is the 16-bit ID for the OMCI
29// Managed entity SNMP configuration data
mpagenko836a1fd2021-11-01 16:12:42 +000030const SnmpConfigurationDataClassID = ClassID(335) // 0x014f
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var snmpconfigurationdataBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// SnmpConfigurationData (Class ID: #335 / 0x014f)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// The SNMP configuration data ME provides a way for the OLT to provision an IP path for an SNMP
36// management agent.
37//
38// The SNMP configuration data ME is created and deleted by the OLT.
39//
40// Relationships
41// One instance of this ME is created by the OLT for each SNMP management path termination.
42//
43// Attributes
44// Managed Entity Id
mpagenko836a1fd2021-11-01 16:12:42 +000045// This attribute uniquely identifies each instance of this ME. The ME IDs 0 and 0xFFFF are
46// reserved. (R, setbycreate) (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000047//
48// Snmp Version
mpagenko836a1fd2021-11-01 16:12:42 +000049// This integer attribute is the SNMP protocol version to be supported. (R,-W, setbycreate)
50// (mandatory) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000051//
52// Snmp Agent Address
mpagenko836a1fd2021-11-01 16:12:42 +000053// This attribute is a pointer to a TCP/UDP config data ME, which provides the SNMP agent. (R, W,
54// setbycreate) (mandatory) (2 bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000055//
56// Snmp Server Address
mpagenko836a1fd2021-11-01 16:12:42 +000057// This attribute is the IP address of the SNMP server. (R, W, setbycreate) (mandatory) (4 bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000058//
59// Snmp Server Port
mpagenko836a1fd2021-11-01 16:12:42 +000060// This attribute is the UDP port number of the SNMP server. (R, W, setbycreate) (mandatory) (2
61// bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000062//
63// Security Name Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000064// This attribute points to a large string whose content represents the SNMP security name in a
65// human-readable format that is independent of the security model. SecurityName is defined in
66// [b-IETF RFC 2571]. (R, W, setbycreate) (mandatory) (2 bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000067//
68// Community For Read
mpagenko836a1fd2021-11-01 16:12:42 +000069// This attribute is a pointer to a large string that contains the name of the read community. (R,
70// W, setbycreate) (mandatory) (2 bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000071//
72// Community For Write
mpagenko836a1fd2021-11-01 16:12:42 +000073// This attribute is a pointer to a large string that contains the name of the write community. (R,
74// W, setbycreate) (mandatory) (2 bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000075//
76// Sys Name Pointer
mpagenko836a1fd2021-11-01 16:12:42 +000077// This attribute points to a large string whose content identifies the SNMP system name. SysName
78// is defined in [b-IETF RFC-3418]. (R, W, setbycreate) (mandatory) (2 bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000079//
80type SnmpConfigurationData struct {
81 ManagedEntityDefinition
82 Attributes AttributeValueMap
83}
84
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000085// Attribute name constants
86
87const SnmpConfigurationData_SnmpVersion = "SnmpVersion"
88const SnmpConfigurationData_SnmpAgentAddress = "SnmpAgentAddress"
89const SnmpConfigurationData_SnmpServerAddress = "SnmpServerAddress"
90const SnmpConfigurationData_SnmpServerPort = "SnmpServerPort"
91const SnmpConfigurationData_SecurityNamePointer = "SecurityNamePointer"
92const SnmpConfigurationData_CommunityForRead = "CommunityForRead"
93const SnmpConfigurationData_CommunityForWrite = "CommunityForWrite"
94const SnmpConfigurationData_SysNamePointer = "SysNamePointer"
95
Holger Hildebrandtfa074992020-03-27 15:42:06 +000096func init() {
97 snmpconfigurationdataBME = &ManagedEntityDefinition{
98 Name: "SnmpConfigurationData",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000099 ClassID: SnmpConfigurationDataClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000100 MessageTypes: mapset.NewSetWith(
101 Create,
102 Delete,
103 Get,
104 Set,
105 ),
106 AllowedAttributeMask: 0xff00,
107 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000108 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
109 1: Uint16Field(SnmpConfigurationData_SnmpVersion, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
110 2: Uint16Field(SnmpConfigurationData_SnmpAgentAddress, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
111 3: Uint32Field(SnmpConfigurationData_SnmpServerAddress, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
112 4: Uint16Field(SnmpConfigurationData_SnmpServerPort, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
113 5: Uint16Field(SnmpConfigurationData_SecurityNamePointer, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
114 6: Uint16Field(SnmpConfigurationData_CommunityForRead, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
115 7: Uint16Field(SnmpConfigurationData_CommunityForWrite, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
116 8: Uint16Field(SnmpConfigurationData_SysNamePointer, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000117 },
118 Access: CreatedByOlt,
119 Support: UnknownSupport,
120 }
121}
122
123// NewSnmpConfigurationData (class ID 335) creates the basic
124// Managed Entity definition that is used to validate an ME of this type that
125// is received from or transmitted to the OMCC.
126func NewSnmpConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
127 return NewManagedEntity(*snmpconfigurationdataBME, params...)
128}