netgate-sysctl API (22.10)

This YANG module provides a Netgate-defined data-model for Linux Kernel sysctl parameters.

Copyright 2018-2020 Rubicon Communications, LLC.

sysctl-config

returns netgate.sysctl.SysctlConfig

get /data/netgate-sysctl:sysctl-config

Example URL

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

Linux kernel sysctl parameters.

Responses

200

netgate.sysctl.SysctlConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-sysctl:sysctl-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-sysctl:sysctl-config-wrapper":
    {
    }
}

creates netgate.sysctl.SysctlConfig

post /data/netgate-sysctl:sysctl-config

Example URL

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

Linux kernel sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.SysctlConfig to be added to list

netgate-sysctl:sysctl-config
object (netgate.sysctl.SysctlConfig)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.sysctl.SysctlConfig

put /data/netgate-sysctl:sysctl-config

Example URL

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

Linux kernel sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.SysctlConfig to be added or updated

netgate-sysctl:sysctl-config-wrapper
object (netgate.sysctl.SysctlConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.sysctl.SysctlConfig

delete /data/netgate-sysctl:sysctl-config

Example URL

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

Linux kernel sysctl parameters.

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-sysctl:sysctl-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.sysctl.sysctlconfig.Kernel

get /data/netgate-sysctl:sysctl-config/kernel

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-config/kernel

Kernel sysctl parameters.

Responses

200

netgate.sysctl.sysctlconfig.Kernel

400

Internal error

Request samples

Copy
package main

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

func main() {

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

	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-sysctl:kernel-wrapper":
    {
    }
}

creates netgate.sysctl.sysctlconfig.Kernel

post /data/netgate-sysctl:sysctl-config/kernel

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-config/kernel

Kernel sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.sysctlconfig.Kernel to be added to list

kernel
object (netgate.sysctl.sysctlconfig.Kernel)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.sysctl.sysctlconfig.Kernel

put /data/netgate-sysctl:sysctl-config/kernel

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-config/kernel

Kernel sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.sysctlconfig.Kernel to be added or updated

netgate-sysctl:kernel-wrapper
object (netgate.sysctl.sysctlconfig.KernelWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-sysctl:kernel-wrapper":
    {
    }
}

removes netgate.sysctl.sysctlconfig.Kernel

delete /data/netgate-sysctl:sysctl-config/kernel

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-config/kernel

Kernel sysctl parameters.

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-sysctl:sysctl-config/kernel"

	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.sysctl.sysctlconfig.Vm

get /data/netgate-sysctl:sysctl-config/vm

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-config/vm

VM sysctl parameters.

Responses

200

netgate.sysctl.sysctlconfig.Vm

400

Internal error

Request samples

Copy
package main

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

func main() {

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

	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-sysctl:vm-wrapper":
    {
    }
}

creates netgate.sysctl.sysctlconfig.Vm

post /data/netgate-sysctl:sysctl-config/vm

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-config/vm

VM sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.sysctlconfig.Vm to be added to list

vm
object (netgate.sysctl.sysctlconfig.Vm)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.sysctl.sysctlconfig.Vm

put /data/netgate-sysctl:sysctl-config/vm

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-config/vm

VM sysctl parameters.

Request Body schema: application/yang-data+json

netgate.sysctl.sysctlconfig.Vm to be added or updated

netgate-sysctl:vm-wrapper
object (netgate.sysctl.sysctlconfig.VmWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-sysctl:vm-wrapper":
    {
    }
}

removes netgate.sysctl.sysctlconfig.Vm

delete /data/netgate-sysctl:sysctl-config/vm

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-config/vm

VM sysctl parameters.

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-sysctl:sysctl-config/vm"

	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))

}

sysctl-state

returns netgate.sysctl.SysctlState

get /data/netgate-sysctl:sysctl-state

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-state

Linux kernel sysctl parameters.

Responses

200

netgate.sysctl.SysctlState

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-sysctl:sysctl-state"

	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-sysctl:sysctl-state-wrapper":
    {
    }
}

returns netgate.sysctl.sysctlstate.Kernel

get /data/netgate-sysctl:sysctl-state/kernel

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-state/kernel

Kernel sysctl parameters.

Responses

200

netgate.sysctl.sysctlstate.Kernel

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-sysctl:sysctl-state/kernel"

	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-sysctl:kernel-wrapper":
    {
    }
}

returns netgate.sysctl.sysctlstate.Vm

get /data/netgate-sysctl:sysctl-state/vm

Example URL

https://hostname/restconf/data/netgate-sysctl:sysctl-state/vm

VM sysctl parameters.

Responses

200

netgate.sysctl.sysctlstate.Vm

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-sysctl:sysctl-state/vm"

	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-sysctl:vm-wrapper":
    {
    }
}