DLI EPCDC32 Object Model Reference
|
object | snmp/ |
Object representing SNMP server configuration |
Retrieving the value is denied if not administrative user
This object contains the following items:
enabled | Allow SNMP |
engine_id | Engine ID |
oid_subtrees | OID subtrees |
users | Users |
community_mappings | Community mappings |
known_auth_methods | Known authentication methods |
known_priv_methods | Known privacy methods |
Sample curl
write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "..." "http://192.168.0.100/restapi/snmp/"
Sample JS request
write command:
request.put({url:"snmp/",body:<...>});
sum (boolean) | snmp/enabled/ |
Enable SNMP server operation |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
constant true | Enabled | The feature is enabled | |
constant false | Disabled | The feature is disabled |
Sample JS request
write command:
request.put({url:"snmp/enabled/",body:false});
Sample uom
library write command:
uom.snmp.enabled=false
string | snmp/engine_id/ |
The engine ID, in hexadecimal, to which all user authentication and privacy keys are localized |
The value is subject to the following constraints: the value matches ^([0-9A-Fa-f]{2})*$
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample CLI write command:
uom set "snmp/engine_id" "\"213F55A0\""
Sample curl
write command:
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "\"4683998628C02975DC3B\"" "http://192.168.0.100/restapi/snmp/engine_id/"
map | snmp/oid_subtrees/ |
OID subtrees exposed by SNMP server |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This map represents a value in persistent storage.
This map contains OID subtree elements.
Sample requests
read command:
print(requests.get('http://192.168.0.100/restapi/snmp/oid_subtrees/',auth=auth,headers=headers).json())
⇒
{'energyObject': {'read_security_level': 'noauth', 'root': '1.3.6.1.2.1.229', 'title': 'energyObject MIB (RFC 7460, allows manipulating relays and power-related meters)', 'write_security_level': 'noauth'}}
Sample JS request
write command:
request.put({url:"snmp/oid_subtrees/",body:{"energyObject":{"read_security_level":"noauth","root":"1.3.6.1.2.1.229","title":"energyObject MIB (RFC 7460, allows manipulating relays and power-related meters)","write_security_level":"noauth"}}});
See also OID subtrees: OID subtree
object | snmp/oid_subtrees/S/ |
Properties of an OID subtree |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This object represents a value in persistent storage.
This object contains the following items:
title | Title |
root | Root mask |
read_security_level | Read security level |
write_security_level | Write security level |
Sample requests
deletion command (note that _oid_subtree
is a variable):
requests.delete('http://192.168.0.100/restapi/snmp/oid_subtrees/'+_oid_subtree+'/',auth=auth,headers=headers)
Sample JS request
read command (note that _oid_subtree
is a variable):
request.get({url:"snmp/oid_subtrees/"+_oid_subtree+"/"},function(error,response,body) {console.log(body)});
⇒
{"read_security_level":"noauth","root":"1.3.6.1.2.1.229","title":"energyObject MIB (RFC 7460, allows manipulating relays and power-related meters)","write_security_level":"noauth"}
string | snmp/oid_subtrees/S/title/ |
The title of this subtree |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample JS request
read command (note that _oid_subtree
is a variable):
request.get({url:"snmp/oid_subtrees/"+_oid_subtree+"/title/"},function(error,response,body) {console.log(body)});
⇒
"energyObject MIB (RFC 7460, allows manipulating relays and power-related meters)"
Sample JS request
write command (note that _oid_subtree
is a variable):
request.put({url:"snmp/oid_subtrees/"+_oid_subtree+"/title/",body:"energyObject MIB (RFC 7460, allows manipulating relays and power-related meters)"});
string | snmp/oid_subtrees/S/root/ |
The root OID mask of this subtree (for all but the first two arcs, '*' can be used for "don't care" parts, and inclusive ranges can be specified like '1,2,4-7') |
The value is subject to the following constraints: the value matches ^(0|1|(01|2)(.(*|(0|[1-9][0-9]*)(-(0|[1-9][0-9]*))?(,(0|[1-9][0-9]*)(-(0|[1-9][0-9]*))?)*))*)$
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample requests
write command (note that _oid_subtree
is a variable):
requests.put('http://192.168.0.100/restapi/snmp/oid_subtrees/'+_oid_subtree+'/root/',auth=auth,headers=headers,json='1.3.6.1.2.1.229')
Sample uom
library write command (note that _oid_subtree
is a variable):
uom.snmp.oid_subtrees[_oid_subtree].root="1.3.6.1.2.1.229"
sum (enumerated string) | snmp/oid_subtrees/S/read_security_level/ |
Required security level for reading from this subtree |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
constant "deny" | Forbidden | Nobody can read from this OID subtree | |
constant "priv" | Authenticated and encrypted | SNMPv3 authentication and encryption must be used to read from this OID subtree | |
constant "auth" | Authenticated | SNMPv3 authentication must be used to read from this OID subtree (encryption is optional) | |
constant "noauth" | Minimal | Any protocol, including SNMPv1 and SNMPv2c, can be used to read from this OID subtree (authentication and encryption are optional) |
Sample uom
library read command (note that _oid_subtree
is a variable):
print(uom.dump(uom.snmp.oid_subtrees[_oid_subtree].read_security_level))
⇒
"noauth"
Sample curl
write command (note that :oid_subtree
is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "\"noauth\"" "http://192.168.0.100/restapi/snmp/oid_subtrees/:oid_subtree/read_security_level/"
sum (enumerated string) | snmp/oid_subtrees/S/write_security_level/ |
Required security level for writing to this subtree |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
constant "deny" | Forbidden | Nobody can write to this OID subtree | |
constant "priv" | Authenticated and encrypted | SNMPv3 authentication and encryption must be used to write to this OID subtree | |
constant "auth" | Authenticated | SNMPv3 authentication must be used to write to this OID subtree (encryption is optional) | |
constant "noauth" | Minimal | Any protocol, including SNMPv1 and SNMPv2c, can be used to write to this OID subtree (authentication and encryption are optional) |
Sample JS request
read command (note that _oid_subtree
is a variable):
request.get({url:"snmp/oid_subtrees/"+_oid_subtree+"/write_security_level/"},function(error,response,body) {console.log(body)});
⇒
"noauth"
Sample requests
read command (note that _oid_subtree
is a variable):
print(requests.get('http://192.168.0.100/restapi/snmp/oid_subtrees/'+_oid_subtree+'/write_security_level/',auth=auth,headers=headers).json())
⇒
'noauth'
map | snmp/users/ |
SNMP user accounts |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This map represents a value in persistent storage.
This map contains User elements.
Sample requests
write command:
requests.put('http://192.168.0.100/restapi/snmp/users/',auth=auth,headers=headers,json={'powerReader': {'priv_password': 'readerPrivPassword', 'subtree_access': {'energyObject': 'readonly'}, 'auth_password': 'readerAuthPassword', 'is_allowed': True, 'priv_method': 'des', 'auth_method': 'sha1'}, 'powerAdmin': {'priv_password': 'adminPrivPassword', 'subtree_access': {'energyObject': True}, 'auth_password': 'adminAuthPassword', 'is_allowed': False, 'priv_method': 'des', 'auth_method': 'sha1'}})
Sample CLI read command:
uom get "snmp/users"
⇒
object | snmp/users/S/ |
Properties of an SNMP user |
The value is subject to the following constraints: index of the value matches ^[a-zA-Z0-9]*$
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This object represents a value in persistent storage.
This object contains the following items:
Sample curl
write command (note that :user
is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "{\"priv_password\":\"readerPrivPassword\",\"subtree_access\":{\"energyObject\":\"readonly\"},\"auth_password\":\"readerAuthPassword\",\"is_allowed\":false,\"priv_method\":\"des\",\"auth_method\":\"md5\",\"has_priv_password\":true}" "http://192.168.0.100/restapi/snmp/users/:user/"
Sample JS request
write command (note that _user
is a variable):
request.put({url:"snmp/users/"+_user+"/",body:{"priv_password":"readerPrivPassword","subtree_access":{"energyObject":"readonly"},"auth_password":"readerAuthPassword","is_allowed":false,"priv_method":"des","auth_method":"sha1","has_priv_password":true}});
See also User: User allowed
See also User: Authentication method
See also User: Authentication password configured
See also User: Authentication password
See also User: Privacy method
See also User: Privacy password configured
See also User: Privacy password
See also User: Subtree access levels
sum (boolean) | snmp/users/S/is_allowed/ |
Flag indicating whether user is allowed or denied |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum represents a value in persistent storage.
This sum can assume the following values:
constant true | Allowed | The user is allowed to log in | |
constant false | Denied | The user is denied login |
Sample uom
library write command (note that _user
is a variable):
uom.snmp.users[_user].is_allowed=false
Sample curl
write command (note that :user
is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "true" "http://192.168.0.100/restapi/snmp/users/:user/is_allowed/"
string | snmp/users/S/auth_method/ |
User authentication method |
The value is subject to the following constraints: known authentication methods[the value]
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample requests
write command (note that _user
is a variable):
requests.put('http://192.168.0.100/restapi/snmp/users/'+_user+'/auth_method/',auth=auth,headers=headers,json='sha1')
Sample uom
library write command (note that _user
is a variable):
uom.snmp.users[_user].auth_method="sha1"
sum (boolean) | snmp/users/S/has_auth_password/ |
Flag indicating if the authentication password has been configured for the user (cleared if engine ID or authentication method changes) |
The value is unconditionally set to authentication password is not equal to "" on creation and doesn't have to be supplied (if it is, it must match)
Retrieving the value is denied if not administrative user
This sum does not support direct modification.
This sum can change as if by itself or indirectly because of other actions.
Changes to this sum cannot be tracked.
This sum can assume the following values:
constant true | Configured | The authentication password has been configured | |
constant false | Not configured | The authentication password hasn't been configured, the user won't be able to log in |
Sample JS request
read command (note that _user
is a variable):
request.get({url:"snmp/users/"+_user+"/has_auth_password/"},function(error,response,body) {console.log(body)});
⇒
true
Sample CLI read command (note that user
is a variable):
uom get "snmp/users/${user}/has_auth_password"
⇒
false
string | snmp/users/S/auth_password/ |
User authentication password (cannot be read as it is stored localized to the engine ID), empty if not set |
The value is subject to the following constraints: any of the following is true:
Retrieving the value is denied
Changing the value is denied if any of the following is true:
Using the string as a field for indexing into the grandparent collection is denied
This string represents a value in persistent storage.
This string can change as if by itself or indirectly because of other actions.
This string should be displayed in a secure manner.
Representation of the resource cannot be obtained. Attempts to do so via a JSON API will succeed but return '{"$ref":""}' which means "the value of this resource".
Sample requests
write command (note that _user
is a variable):
requests.put('http://192.168.0.100/restapi/snmp/users/'+_user+'/auth_password/',auth=auth,headers=headers,json='adminAuthPassword')
Sample JS request
write command (note that _user
is a variable):
request.put({url:"snmp/users/"+_user+"/auth_password/",body:"adminAuthPassword"});
string | snmp/users/S/priv_method/ |
User privacy method |
The value is subject to the following constraints: known privacy methods[the value]
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample requests
write command (note that _user
is a variable):
requests.put('http://192.168.0.100/restapi/snmp/users/'+_user+'/priv_method/',auth=auth,headers=headers,json='aes')
Sample CLI read command (note that user
is a variable):
uom get "snmp/users/${user}/priv_method"
⇒
"aes"
sum (boolean) | snmp/users/S/has_priv_password/ |
Flag indicating if the privacy password has been configured for the user (cleared if engine ID or authentication or privacy method changes) |
The value is unconditionally set to privacy password is not equal to "" on creation and doesn't have to be supplied (if it is, it must match)
Retrieving the value is denied if not administrative user
This sum does not support direct modification.
This sum can change as if by itself or indirectly because of other actions.
Changes to this sum cannot be tracked.
This sum can assume the following values:
constant true | Configured | The privacy password has been configured | |
constant false | Not configured | The privacy password hasn't been configured, the user won't be able to log in |
Sample curl
read command (note that :user
is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/snmp/users/:user/has_priv_password/"
⇒
true
Sample requests
read command (note that _user
is a variable):
print(requests.get('http://192.168.0.100/restapi/snmp/users/'+_user+'/has_priv_password/',auth=auth,headers=headers).json())
⇒
False
string | snmp/users/S/priv_password/ |
User privacy password (cannot be read as it is stored localized to the engine ID), empty if not set |
The value is subject to the following constraints: any of the following is true:
Retrieving the value is denied
Changing the value is denied if any of the following is true:
Using the string as a field for indexing into the grandparent collection is denied
This string represents a value in persistent storage.
This string can change as if by itself or indirectly because of other actions.
This string should be displayed in a secure manner.
Representation of the resource cannot be obtained. Attempts to do so via a JSON API will succeed but return '{"$ref":""}' which means "the value of this resource".
Sample uom
library write command (note that _user
is a variable):
uom.snmp.users[_user].priv_password="adminPrivPassword"
Sample requests
write command (note that _user
is a variable):
requests.put('http://192.168.0.100/restapi/snmp/users/'+_user+'/priv_password/',auth=auth,headers=headers,json='readerPrivPassword')
map | snmp/users/S/subtree_access/ |
OID subtree access levels |
This map is composite, i.e. is modified as a whole.
This map represents a value in persistent storage.
This map contains Subtree access elements.
Sample uom
library subtree access creation command (note that _user
is a variable):
local composite=uom.copy(uom.snmp.users[_user].subtree_access) uom.insert(composite,"energyObject","readonly") uom.snmp.users[_user].subtree_access=composite
Sample requests
subtree access creation command (note that _user
is a variable):
requests.put('http://192.168.0.100/restapi/snmp/users/'+_user+'/subtree_access/energyObject/',auth=auth,headers=headers,json='readonly')
sum (optional variant) | snmp/users/S/subtree_access/S/ |
OID subtree access level |
The value is subject to the following constraints: OID subtrees[index of the value]
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This sum is a part of a composite value which is modified as a whole.
This sum represents a value in persistent storage.
This sum can assume the following values:
constant true | Full | OIDs can be read and written by the user | |
constant "readonly" | Read-only | OIDs can only be read, not written, by the user | |
constant false | None | OIDs can neither be read nor written by the user | |
constant null | Default | No access rule present (permissions are determined by parent OID access levels, or denied) |
Sample CLI deletion command (note that user
and subtree_access
are variables):
uom remove "snmp/users/${user}/subtree_access/${subtree_access}"
Sample CLI read command (note that user
and subtree_access
are variables):
uom get "snmp/users/${user}/subtree_access/${subtree_access}"
⇒
false
array | snmp/community_mappings/ |
Mappings of SNMP v1/v2c communities to user names |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This array represents a value in persistent storage.
This array contains Community mapping elements.
Sample JS request
write command:
request.put({url:"snmp/community_mappings/",body:[{"ip_address":"10.150.8.56","user":"user0m3ae","netmask":"255.0.0.0","community":"eBXRsR5owc"},{"ip_address":"10.167.61.68","user":"userwq5Y","netmask":"255.0.0.0","community":"fjSV96hgYZ"},{"ip_address":"10.26.85.105","user":"userRcpiZg","netmask":"255.0.0.0","community":"hLEm2fSm7xvE"},{"ip_address":"192.168.31.231","user":"userjJUx4v","netmask":"255.255.255.0","community":"9aRrwgeyL6"},{"ip_address":"192.168.231.179","user":"userr9qDFc","netmask":"255.255.255.0","community":"public"},{"ip_address":"192.168.81.113","user":"user2fDmJ8","netmask":"255.255.255.0","community":"private"},{"ip_address":"192.168.211.54","user":"useryt51","netmask":"255.255.255.0","community":"r3ETjYm7bPzc"},{"ip_address":"192.168.77.213","user":"userWi7J","netmask":"255.255.255.0","community":"miSchKfwoP"},{"ip_address":"192.168.214.157","user":"userE2Zl8a","netmask":"255.255.255.0","community":"cxIvlBNXup9"},{"ip_address":"10.220.183.172","user":"user3yp1","netmask":"255.0.0.0","community":"8jHkgagSm3"}]});
Sample uom
library read command:
print(uom.dump(uom.snmp.community_mappings))
⇒
See also Community mappings: Community mapping
object | snmp/community_mappings/N/ |
Properties of a community mapping |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This object represents a value in persistent storage.
This object contains the following items:
community | Community |
user | User |
ip_address | IP address |
netmask | Network mask |
Sample uom
library write command (note that _community_mapping_index
is a variable):
uom.snmp.community_mappings[_community_mapping_index]={community="BwCUsbOzGIMk",ip_address="192.168.245.131",netmask="255.255.255.0",user="user26oX"}
Sample curl
write command (note that :community_mapping_index
is a URL template argument):
curl --digest -u admin:1234 -H "X-CSRF: x" -X PUT -H "Content-type: application/json" -H "Accept: application/json" --data-binary "{\"ip_address\":\"10.86.171.99\",\"user\":\"userYkb7n\",\"netmask\":\"255.0.0.0\",\"community\":\"sj66MVSgZNVu\"}" "http://192.168.0.100/restapi/snmp/community_mappings/:community_mapping_index/"
string | snmp/community_mappings/N/community/ |
The community identifier |
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample CLI write command (note that community_mapping_index
is a variable):
uom set "snmp/community_mappings/${community_mapping_index}/community" "\"public\""
Sample curl
read command (note that :community_mapping_index
is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/snmp/community_mappings/:community_mapping_index/community/"
⇒
"private"
string | snmp/community_mappings/N/user/ |
The user identifier |
The value is subject to the following constraints: users[the value]
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample CLI write command (note that community_mapping_index
is a variable):
uom set "snmp/community_mappings/${community_mapping_index}/user" "\"user59w1\""
Sample curl
read command (note that :community_mapping_index
is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/snmp/community_mappings/:community_mapping_index/user/"
⇒
"userKJtK"
string | snmp/community_mappings/N/ip_address/ |
IP address allowed to connect |
The value is subject to the following constraints: the value matches ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample CLI read command (note that community_mapping_index
is a variable):
uom get "snmp/community_mappings/${community_mapping_index}/ip_address"
⇒
"10.177.88.154"
Sample uom
library read command (note that _community_mapping_index
is a variable):
print(uom.dump(uom.snmp.community_mappings[_community_mapping_index].ip_address))
⇒
"10.146.194.216"
string | snmp/community_mappings/N/netmask/ |
Network mask allowed to connect |
The value is subject to the following constraints: the value matches ^((2(5[42]|4[80]|24)|192|128|0).0.0.0|255.(2(5[42]|4[80]|24)|192|128|0).0.0|255.255.(2(5[42]|4[80]|24)|192|128|0).0|255.255.255.(2(5[542]|4[80]|24)|192|128|0))$
Retrieving the value is denied if not administrative user
Changing the value is denied if any of the following is true:
This string represents a value in persistent storage.
Sample requests
write command (note that _community_mapping_index
is a variable):
requests.put('http://192.168.0.100/restapi/snmp/community_mappings/'+str(_community_mapping_index)+'/netmask/',auth=auth,headers=headers,json='255.255.255.0')
Sample CLI read command (note that community_mapping_index
is a variable):
uom get "snmp/community_mappings/${community_mapping_index}/netmask"
⇒
"255.255.255.0"
map | snmp/known_auth_methods/ |
Map of known authentication methods |
Retrieving the value is denied if not administrative user
This map does not support direct modification.
This map represents a value in persistent storage.
This map contains Authentication method elements.
Creating elements in this collection is not supported.
Sample curl
read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/snmp/known_auth_methods/"
⇒
{"sha1":"SHA1","md5":"MD5"}
Sample JS request
read command:
request.get({url:"snmp/known_auth_methods/"},function(error,response,body) {console.log(body)});
⇒
{"sha1":"SHA1","md5":"MD5"}
string | snmp/known_auth_methods/S/ |
Authentication method name |
Retrieving the value is denied if not administrative user
This string does not support direct modification.
This string represents a value in persistent storage.
Sample requests
read command (note that _authentication_method
is a variable):
print(requests.get('http://192.168.0.100/restapi/snmp/known_auth_methods/'+_authentication_method+'/',auth=auth,headers=headers).json())
⇒
'SHA1'
Sample CLI read command (note that authentication_method
is a variable):
uom get "snmp/known_auth_methods/${authentication_method}"
⇒
"SHA1"
map | snmp/known_priv_methods/ |
Map of known privacy methods |
Retrieving the value is denied if not administrative user
This map does not support direct modification.
This map represents a value in persistent storage.
This map contains Privacy method elements.
Creating elements in this collection is not supported.
Sample JS request
read command:
request.get({url:"snmp/known_priv_methods/"},function(error,response,body) {console.log(body)});
⇒
{"aes":"AES","des":"DES"}
Sample uom
library read command:
print(uom.dump(uom.snmp.known_priv_methods))
⇒
{aes="AES",des="DES"}
string | snmp/known_priv_methods/S/ |
Privacy method name |
Retrieving the value is denied if not administrative user
This string does not support direct modification.
This string represents a value in persistent storage.
Sample curl
read command (note that :privacy_method
is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/snmp/known_priv_methods/:privacy_method/"
⇒
"AES"
Sample uom
library read command (note that _privacy_method
is a variable):
print(uom.dump(uom.snmp.known_priv_methods[_privacy_method]))
⇒
"DES"