File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
netjsonconfig/backends/airos Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,20 @@ JSON method
5656General settings
5757----------------
5858
59+ From the ``general `` key we can configure the contact and the location for a device using the ``contact `` and ``location `` properties.
60+
61+ The following snippet specify both contact and location:
62+
63+ .. code-block :: json
64+
65+ {
66+ "type" : " DeviceConfiguration" ,
67+ "general" : {
68+ "contact" : " user@example.com" ,
69+ "location" : " Up in the roof"
70+ }
71+ }
72+
5973 Network interface
6074-----------------
6175
Original file line number Diff line number Diff line change @@ -489,12 +489,13 @@ class Snmp(AirOsConverter):
489489 netjson_key = 'general'
490490
491491 def to_intermediate (self ):
492+ original = get_copy (self .netson , self .netjson_key )
492493 result = [
493- {
494- 'community' : 'public' ,
495- 'contact' : '' ,
496- 'location' : '' ,
497- 'status' : 'enabled' ,
494+ {
495+ 'community' : 'public' ,
496+ 'contact' : original . get ( 'mantainer' , '' ) ,
497+ 'location' : original . get ( 'location' , '' ) ,
498+ 'status' : 'enabled' ,
498499 },
499500 ]
500501 return (('snmp' , result ),)
You can’t perform that action at this time.
0 commit comments