blob: 1c878ad73703ba41f8d67ec44449b9286f9109af [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 */
David K. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
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// SnmpConfigurationDataClassID is the 16-bit ID for the OMCI
29// Managed entity SNMP configuration data
30const SnmpConfigurationDataClassID ClassID = ClassID(335)
31
32var snmpconfigurationdataBME *ManagedEntityDefinition
33
34// SnmpConfigurationData (class ID #335)
35// 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
45// Managed entity ID: This attribute uniquely identifies each instance of this ME. The ME IDs 0 and
46// 0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
47//
48// Snmp Version
49// SNMP version: This integer attribute is the SNMP protocol version to be supported. (R,-W,
50// setbycreate) (mandatory) (2-bytes)
51//
52// Snmp Agent Address
53// SNMP agent address: This attribute is a pointer to a TCP/UDP config data ME, which provides the
54// SNMP agent. (R, W, setbycreate) (mandatory) (2 bytes)
55//
56// Snmp Server Address
57// SNMP server address: This attribute is the IP address of the SNMP server. (R, W, setbycreate)
58// (mandatory) (4 bytes)
59//
60// Snmp Server Port
61// SNMP server port: This attribute is the UDP port number of the SNMP server. (R, W, setbycreate)
62// (mandatory) (2 bytes)
63//
64// Security Name Pointer
65// Security name pointer: This attribute points to a large string whose content represents the SNMP
66// security name in a human-readable format that is independent of the security model. SecurityName
67// is defined in [b-IETF RFC 2571]. (R, W, setbycreate) (mandatory) (2 bytes)
68//
69// Community For Read
70// Community for read: This attribute is a pointer to a large string that contains the name of the
71// read community. (R, W, setbycreate) (mandatory) (2 bytes)
72//
73// Community For Write
74// Community for write: This attribute is a pointer to a large string that contains the name of the
75// write community. (R, W, setbycreate) (mandatory) (2 bytes)
76//
77// Sys Name Pointer
78// Sys name pointer: This attribute points to a large string whose content identifies the SNMP
79// system name. SysName is defined in [b-IETF RFC-3418]. (R, W, setbycreate) (mandatory) (2 bytes)
80//
81type SnmpConfigurationData struct {
82 ManagedEntityDefinition
83 Attributes AttributeValueMap
84}
85
86func init() {
87 snmpconfigurationdataBME = &ManagedEntityDefinition{
88 Name: "SnmpConfigurationData",
89 ClassID: 335,
90 MessageTypes: mapset.NewSetWith(
91 Create,
92 Delete,
93 Get,
94 Set,
95 ),
96 AllowedAttributeMask: 0xff00,
97 AttributeDefinitions: AttributeDefinitionMap{
98 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
99 1: Uint16Field("SnmpVersion", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
100 2: Uint16Field("SnmpAgentAddress", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
101 3: Uint32Field("SnmpServerAddress", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
102 4: Uint16Field("SnmpServerPort", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 4),
103 5: Uint16Field("SecurityNamePointer", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 5),
104 6: Uint16Field("CommunityForRead", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 6),
105 7: Uint16Field("CommunityForWrite", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 7),
106 8: Uint16Field("SysNamePointer", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 8),
107 },
108 Access: CreatedByOlt,
109 Support: UnknownSupport,
110 }
111}
112
113// NewSnmpConfigurationData (class ID 335) creates the basic
114// Managed Entity definition that is used to validate an ME of this type that
115// is received from or transmitted to the OMCC.
116func NewSnmpConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
117 return NewManagedEntity(*snmpconfigurationdataBME, params...)
118}