netgate-snmp API (19.08)

This YANG module provides a data model for the VPP LLDP Service.

Copyright 2019 Rubicon Communications, LLC.

snmp-config

returns netgate.snmp.SnmpConfig

get /data/netgate-snmp:snmp-config

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config

returns netgate.snmp.SnmpConfig

Responses

200

netgate.snmp.SnmpConfig

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-snmp:snmp-config"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-snmp:snmp-config":
    {
    }
}

creates netgate.snmp.SnmpConfig

post /data/netgate-snmp:snmp-config

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config

creates netgate.snmp.SnmpConfig

Request Body schema: application/yang-data+json

netgate.snmp.SnmpConfig to be added to list

snmp-enable
boolean
Default: false

enable the snmp daemons.

snmp-access-control
object (netgate.snmp.snmpconfig.SnmpAccessControl)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "snmp-enable": false,
  • "snmp-access-control":
    {
    }
}

creates or updates netgate.snmp.SnmpConfig

put /data/netgate-snmp:snmp-config

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config

creates or updates netgate.snmp.SnmpConfig

Request Body schema: application/yang-data+json

netgate.snmp.SnmpConfig to be added or updated

netgate-snmp:snmp-config
object (netgate.snmp.SnmpConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-snmp:snmp-config":
    {
    }
}

removes netgate.snmp.SnmpConfig

delete /data/netgate-snmp:snmp-config

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config

removes netgate.snmp.SnmpConfig

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-snmp:snmp-config"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.snmp.snmpconfig.SnmpAccessControl

get /data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control

returns netgate.snmp.snmpconfig.SnmpAccessControl

Responses

200

netgate.snmp.snmpconfig.SnmpAccessControl

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-snmp:snmp-access-control":
    {
    }
}

creates netgate.snmp.snmpconfig.SnmpAccessControl

post /data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control

creates netgate.snmp.snmpconfig.SnmpAccessControl

Request Body schema: application/yang-data+json

netgate.snmp.snmpconfig.SnmpAccessControl to be added to list

view
Array of objects (netgate.snmp.snmpconfig.snmpaccesscontrol.View)

defines a subset of the OID tree

access
Array of objects (netgate.snmp.snmpconfig.snmpaccesscontrol.Access)

maps from group to views

community-map
Array of objects (netgate.snmp.snmpconfig.snmpaccesscontrol.CommunityMap)

maps community name from SNMP request to security name

group
Array of objects (netgate.snmp.snmpconfig.snmpaccesscontrol.Group)

maps security name to group

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "view":
    [
    ],
  • "access":
    [
    ],
  • "community-map":
    [
    ],
  • "group":
    [
    ]
}

creates or updates netgate.snmp.snmpconfig.SnmpAccessControl

put /data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control

creates or updates netgate.snmp.snmpconfig.SnmpAccessControl

Request Body schema: application/yang-data+json

netgate.snmp.snmpconfig.SnmpAccessControl to be added or updated

netgate-snmp:snmp-access-control
object (netgate.snmp.snmpconfig.SnmpAccessControl)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-snmp:snmp-access-control":
    {
    }
}

removes netgate.snmp.snmpconfig.SnmpAccessControl

delete /data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control

removes netgate.snmp.snmpconfig.SnmpAccessControl

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

creates netgate.snmp.snmpconfig.snmpaccesscontrol.Access

post /data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control/netgate-snmp:access

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control/netgate-snmp:access

maps from group to views

Request Body schema: application/yang-data+json

netgate.snmp.snmpconfig.snmpaccesscontrol.Access to be added to list

group-name
string
access-entry
Array of objects (netgate.snmp.snmpconfig.snmpaccesscontrol.access.AccessEntry)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "group-name": "string",
  • "access-entry":
    [
    ]
}

returns netgate.snmp.snmpconfig.snmpaccesscontrol.Access

get /data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control/netgate-snmp:access={group-name}

Example URL

https://hostname/restconf/data/netgate-snmp:snmp-config/netgate-snmp:snmp-access-control/netgate-snmp:access={group-name}

maps from group to views