netgate-acl API (24.06)

This YANG module provides a Netgate-defined data-model for Access Control Lists.

Copyright 2017-2020 Rubicon Communications, LLC.

acl-config

returns netgate.acl.AclConfig

Access Control Lists (ACL) data needed to support VPP.

Responses

Request samples

package main

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

func main() {

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

creates netgate.acl.AclConfig

Access Control Lists (ACL) data needed to support VPP.

Request Body schema: application/yang-data+json

netgate.acl.AclConfig to be added to list

object (netgate.acl.aclconfig.AclTable)

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-table": {
    }
}

creates or updates netgate.acl.AclConfig

Access Control Lists (ACL) data needed to support VPP.

Request Body schema: application/yang-data+json

netgate.acl.AclConfig to be added or updated

object (netgate.acl.AclConfig)

Access Control Lists (ACL) data needed to support VPP.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-config": {
    }
}

removes netgate.acl.AclConfig

Access Control Lists (ACL) data needed to support VPP.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-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.acl.aclconfig.AclTable

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Responses

Request samples

package main

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

func main() {

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

	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
{
  • "netgate-acl:acl-table": {
    }
}

creates netgate.acl.aclconfig.AclTable

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.AclTable to be added to list

Array of objects (netgate.acl.aclconfig.acltable.AclList)

ACL list name.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-list": [
    ]
}

creates or updates netgate.acl.aclconfig.AclTable

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.AclTable to be added or updated

object (netgate.acl.aclconfig.AclTable)

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-table": {
    }
}

removes netgate.acl.aclconfig.AclTable

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Responses

Request samples

package main

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

func main() {

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

	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.acl.aclconfig.acltable.AclList

ACL list name.

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.AclList to be added to list

netgate-acl:acl-name
string

The ACL name as supplied by the developer. It is a unique name used to identify this set of ACL Rules.

object (netgate.acl.aclconfig.acltable.acllist.AclRules)

ACL Rule Table ordered by sequence number.

netgate-acl:acl-description
string

A text description for the ACL.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-name": "string",
  • "netgate-acl:acl-rules": {
    },
  • "netgate-acl:acl-description": "string"
}

returns netgate.acl.aclconfig.acltable.AclList

ACL list name.

path Parameters
acl-name
required
string

Id of acl-list

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-config/acl-table/acl-list=%7Bacl-name%7D"

	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
{
  • "netgate-acl:acl-list": {
    }
}

creates or updates netgate.acl.aclconfig.acltable.AclList

ACL list name.

path Parameters
acl-name
required
string

Id of acl-list

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.AclList to be added or updated

object (netgate.acl.aclconfig.acltable.AclList)

ACL list name.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-list": {
    }
}

removes netgate.acl.aclconfig.acltable.AclList

ACL list name.

path Parameters
acl-name
required
string

Id of acl-list

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-config/acl-table/acl-list=%7Bacl-name%7D"

	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.acl.aclconfig.acltable.acllist.AclRules

ACL Rule Table ordered by sequence number.

path Parameters
acl-name
required
string

Id of acl-list

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-config/acl-table/acl-list=%7Bacl-name%7D/acl-rules"

	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
{
  • "netgate-acl:acl-rules": {
    }
}

creates netgate.acl.aclconfig.acltable.acllist.AclRules

ACL Rule Table ordered by sequence number.

path Parameters
acl-name
required
string

Id of acl-list

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.acllist.AclRules to be added to list

Array of objects (netgate.acl.aclconfig.acltable.acllist.aclrules.AclRule)

A List of ACL Rules.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-rule": [
    ]
}

creates or updates netgate.acl.aclconfig.acltable.acllist.AclRules

ACL Rule Table ordered by sequence number.

path Parameters
acl-name
required
string

Id of acl-list

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.acllist.AclRules to be added or updated

object (netgate.acl.aclconfig.acltable.acllist.AclRules)

ACL Rule Table ordered by sequence number.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-rules": {
    }
}

removes netgate.acl.aclconfig.acltable.acllist.AclRules

ACL Rule Table ordered by sequence number.

path Parameters
acl-name
required
string

Id of acl-list

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-config/acl-table/acl-list=%7Bacl-name%7D/acl-rules"

	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.acl.aclconfig.acltable.acllist.aclrules.AclRule

A List of ACL Rules.

path Parameters
acl-name
required
string

Id of acl-list

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.acllist.aclrules.AclRule to be added to list

netgate-acl:src-last-port
integer <int32>

The last source port in a range.

netgate-acl:icmp-first-code
integer <int32>

The first ICMP code in a range.

netgate-acl:icmp-last-code
integer <int32>

The last ICMP code in a range.

netgate-acl:acl-rule-description
string

A text description for the ACL rule.

netgate-acl:icmp-first-type
integer <int32>

The first ICMP type in a range.

netgate-acl:tcp-flags-mask
integer <int32>

The TCP flags mask.

netgate-acl:ip-version
string (ietf.inet.types.IpVersion)
Enum: "unknown" "ipv4" "ipv6"
netgate-acl:src-first-port
integer <int32>

The first source port in a range.

netgate-acl:sequence
integer <int64>

Rules are executed in increasing sequence number.

netgate-acl:protocol
string

IP protocol

netgate-acl:dst-last-port
integer <int32>

The last destination port in a range.

netgate-acl:dst-ip-prefix
string

IP destination prefix.

netgate-acl:action
string (netgate.acl.AclRuleAction)
Enum: "deny" "permit" "reflect"
netgate-acl:tcp-flags-value
integer <int32>

The TCP flags value.

netgate-acl:src-ip-prefix
string

IP source prefix.

netgate-acl:icmp-last-type
integer <int32>

The last ICMP type in a range.

netgate-acl:dst-first-port
integer <int32>

The first destination port in a range.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:src-last-port": 0,
  • "netgate-acl:icmp-first-code": 0,
  • "netgate-acl:icmp-last-code": 0,
  • "netgate-acl:acl-rule-description": "string",
  • "netgate-acl:icmp-first-type": 0,
  • "netgate-acl:tcp-flags-mask": 0,
  • "netgate-acl:ip-version": "unknown",
  • "netgate-acl:src-first-port": 0,
  • "netgate-acl:sequence": 0,
  • "netgate-acl:protocol": "string",
  • "netgate-acl:dst-last-port": 0,
  • "netgate-acl:dst-ip-prefix": "string",
  • "netgate-acl:action": "deny",
  • "netgate-acl:tcp-flags-value": 0,
  • "netgate-acl:src-ip-prefix": "string",
  • "netgate-acl:icmp-last-type": 0,
  • "netgate-acl:dst-first-port": 0
}

returns netgate.acl.aclconfig.acltable.acllist.aclrules.AclRule

A List of ACL Rules.

path Parameters
acl-name
required
string

Id of acl-list

sequence
required
integer <int64>

Id of acl-rule

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-config/acl-table/acl-list=%7Bacl-name%7D/acl-rules/acl-rule=%7Bsequence%7D"

	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
{
  • "netgate-acl:acl-rule": {
    }
}

creates or updates netgate.acl.aclconfig.acltable.acllist.aclrules.AclRule

A List of ACL Rules.

path Parameters
acl-name
required
string

Id of acl-list

sequence
required
integer <int64>

Id of acl-rule

Request Body schema: application/yang-data+json

netgate.acl.aclconfig.acltable.acllist.aclrules.AclRule to be added or updated

object (netgate.acl.aclconfig.acltable.acllist.aclrules.AclRule)

A List of ACL Rules.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-acl:acl-rule": {
    }
}

removes netgate.acl.aclconfig.acltable.acllist.aclrules.AclRule

A List of ACL Rules.

path Parameters
acl-name
required
string

Id of acl-list

sequence
required
integer <int64>

Id of acl-rule

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-config/acl-table/acl-list=%7Bacl-name%7D/acl-rules/acl-rule=%7Bsequence%7D"

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

}

acl-state

returns netgate.acl.AclState

Access Control Lists (ACL) state data.

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-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
{
  • "netgate-acl:acl-state": {
    }
}

returns netgate.acl.aclstate.AclTable

Table of ACL lists, indexed by name. Each entry contains a set of ACL Rules ordered by sequence number.

Responses

Request samples

package main

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

func main() {

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

	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
{
  • "netgate-acl:acl-table": {
    }
}

returns netgate.acl.aclstate.acltable.AclList

ACL list name.

path Parameters
acl-name
required
string

Id of acl-list

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-state/acl-table/acl-list=%7Bacl-name%7D"

	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
{
  • "netgate-acl:acl-list": {
    }
}

returns netgate.acl.aclstate.acltable.acllist.AclRules

ACL Rule Table ordered by sequence number.

path Parameters
acl-name
required
string

Id of acl-list

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-state/acl-table/acl-list=%7Bacl-name%7D/acl-rules"

	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
{
  • "netgate-acl:acl-rules": {
    }
}

returns netgate.acl.aclstate.acltable.acllist.aclrules.AclRule

A List of ACL Rules.

path Parameters
acl-name
required
string

Id of acl-list

sequence
required
integer <int64>

Id of acl-rule

Responses

Request samples

package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-acl:acl-state/acl-table/acl-list=%7Bacl-name%7D/acl-rules/acl-rule=%7Bsequence%7D"

	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
{
  • "netgate-acl:acl-rule": {
    }
}