blob: 2219b3ef17198ec067298b70d42b30e8a0ca2ad6 [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080017 /*
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070018 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// SnmpConfigurationDataClassID is the 16-bit ID for the OMCI
29// Managed entity SNMP configuration data
30const SnmpConfigurationDataClassID ClassID = ClassID(335)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080046// 0xFFFF are reserved. (R, setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070047//
48// Snmp Version
Matteo Scandolof9d43412021-01-12 11:11:34 -080049// SNMP version: This integer attribute is the SNMP protocol version to be supported. (R,-W,
50// setbycreate) (mandatory) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070051//
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
Matteo Scandolof9d43412021-01-12 11:11:34 -080079// system name. SysName is defined in [b-IETF RFC-3418]. (R, W, setbycreate) (mandatory) (2 bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070080//
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 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -080096 AllowedAttributeMask: 0xff00,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070097 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -080098 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),
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700107 },
Matteo Scandolof9d43412021-01-12 11:11:34 -0800108 Access: CreatedByOlt,
109 Support: UnknownSupport,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700110 }
111}
112
Matteo Scandolof9d43412021-01-12 11:11:34 -0800113// NewSnmpConfigurationData (class ID 335) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700114// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800115// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700116func NewSnmpConfigurationData(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800117 return NewManagedEntity(*snmpconfigurationdataBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700118}