netgate-macip API (19.05)

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

Copyright 2019 Rubicon Communications, LLC.

macip-config

returns netgate.macip.MacipConfig

get /data/netgate-macip:macip-config

Example URL

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

MACIP ACL configuration in VPP.

Responses

200

netgate.macip.MacipConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-macip:macip-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

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

creates netgate.macip.MacipConfig

post /data/netgate-macip:macip-config

Example URL

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

MACIP ACL configuration in VPP.

Request Body schema: application/yang-data+json

netgate.macip.MacipConfig to be added to list

macip-table
object (netgate.macip.macipconfig.MacipTable)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "macip-table":
    {
    }
}

creates or updates netgate.macip.MacipConfig

put /data/netgate-macip:macip-config

Example URL

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

MACIP ACL configuration in VPP.

Request Body schema: application/yang-data+json

netgate.macip.MacipConfig to be added or updated

netgate-macip:macip-config
object (netgate.macip.MacipConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.macip.MacipConfig

delete /data/netgate-macip:macip-config

Example URL

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

MACIP ACL configuration in VPP.

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-macip:macip-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.macip.macipconfig.MacipTable

get /data/netgate-macip:macip-config/netgate-macip:macip-table

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table

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

Responses

200

netgate.macip.macipconfig.MacipTable

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-macip:macip-table":
    {
    }
}

creates netgate.macip.macipconfig.MacipTable

post /data/netgate-macip:macip-config/netgate-macip:macip-table

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table

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

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.MacipTable to be added to list

macip-list
Array of objects (netgate.macip.macipconfig.maciptable.MacipList)

MACIP list name.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "macip-list":
    [
    ]
}

creates or updates netgate.macip.macipconfig.MacipTable

put /data/netgate-macip:macip-config/netgate-macip:macip-table

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table

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

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.MacipTable to be added or updated

netgate-macip:macip-table
object (netgate.macip.macipconfig.MacipTable)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-macip:macip-table":
    {
    }
}

removes netgate.macip.macipconfig.MacipTable

delete /data/netgate-macip:macip-config/netgate-macip:macip-table

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table

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

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-macip:macip-config/netgate-macip:macip-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.macip.macipconfig.maciptable.MacipList

post /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list

MACIP list name.

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.maciptable.MacipList to be added to list

macip-name
string

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

macip-description
string

A text description for the MACIP.

macip-rules
object (netgate.macip.macipconfig.maciptable.maciplist.MacipRules)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "macip-name": "string",
  • "macip-description": "string",
  • "macip-rules":
    {
    }
}

returns netgate.macip.macipconfig.maciptable.MacipList

get /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}

MACIP list name.

path Parameters
macip-name
required
string

Id of macip-list

Responses

200

netgate.macip.macipconfig.maciptable.MacipList

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list=%7Bmacip-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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-macip:macip-list":
    {
    }
}

creates netgate.macip.macipconfig.maciptable.MacipList

post /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}

MACIP list name.

path Parameters
macip-name
required
string

Id of macip-list

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.maciptable.MacipList to be added to list

macip-name
string

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

macip-description
string

A text description for the MACIP.

macip-rules
object (netgate.macip.macipconfig.maciptable.maciplist.MacipRules)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "macip-name": "string",
  • "macip-description": "string",
  • "macip-rules":
    {
    }
}

creates or updates netgate.macip.macipconfig.maciptable.MacipList

put /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}

MACIP list name.

path Parameters
macip-name
required
string

Id of macip-list

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.maciptable.MacipList to be added or updated

netgate-macip:macip-list
object (netgate.macip.macipconfig.maciptable.MacipList)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-macip:macip-list":
    {
    }
}

removes netgate.macip.macipconfig.maciptable.MacipList

delete /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}

MACIP list name.

path Parameters
macip-name
required
string

Id of macip-list

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-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list=%7Bmacip-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.macip.macipconfig.maciptable.maciplist.MacipRules

get /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules

MACIP Rule Table ordered by sequence number.

path Parameters
macip-name
required
string

Id of macip-list

Responses

200

netgate.macip.macipconfig.maciptable.maciplist.MacipRules

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list=%7Bmacip-name%7D/netgate-macip:macip-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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-macip:macip-rules":
    {
    }
}

creates netgate.macip.macipconfig.maciptable.maciplist.MacipRules

post /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules

MACIP Rule Table ordered by sequence number.

path Parameters
macip-name
required
string

Id of macip-list

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.maciptable.maciplist.MacipRules to be added to list

macip-rule
Array of objects (netgate.macip.macipconfig.maciptable.maciplist.maciprules.MacipRule)

A List of MACIP Rules.

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "macip-rule":
    [
    ]
}

creates or updates netgate.macip.macipconfig.maciptable.maciplist.MacipRules

put /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules

MACIP Rule Table ordered by sequence number.

path Parameters
macip-name
required
string

Id of macip-list

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.maciptable.maciplist.MacipRules to be added or updated

netgate-macip:macip-rules
object (netgate.macip.macipconfig.maciptable.maciplist.MacipRules)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-macip:macip-rules":
    {
    }
}

removes netgate.macip.macipconfig.maciptable.maciplist.MacipRules

delete /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules

MACIP Rule Table ordered by sequence number.

path Parameters
macip-name
required
string

Id of macip-list

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-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list=%7Bmacip-name%7D/netgate-macip:macip-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.macip.macipconfig.maciptable.maciplist.maciprules.MacipRule

post /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules/netgate-macip:macip-rule

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules/netgate-macip:macip-rule

A List of MACIP Rules.

path Parameters
macip-name
required
string

Id of macip-list

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.maciptable.maciplist.maciprules.MacipRule to be added to list

mac-address
string

The L2 MAC address to be matched.

sequence
integer <int64>

Rules are executed in increasing sequence number.

mac-mask
string

The L2 MAC mask ANDed with packet MAC addresses.

action
string (netgate.macip.MacipRuleAction)
Enum:"deny" "permit"
macip-rule-description
string

A text description for the MACIP.

ip-prefix
string

IP prefix.

ip-version
string (ietf.inet.types.IpVersion)
Enum:"unknown" "ipv4" "ipv6"

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

application/yang-data+json
Copy
Expand all Collapse all
{
  • "mac-address": "string",
  • "sequence": 0,
  • "mac-mask": "string",
  • "action": "deny",
  • "macip-rule-description": "string",
  • "ip-prefix": "string",
  • "ip-version": "unknown"
}

returns netgate.macip.macipconfig.maciptable.maciplist.maciprules.MacipRule

get /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules/netgate-macip:macip-rule={sequence}

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules/netgate-macip:macip-rule={sequence}

A List of MACIP Rules.

path Parameters
macip-name
required
string

Id of macip-list

sequence
required
integer <int64>

Id of macip-rule

Responses

200

netgate.macip.macipconfig.maciptable.maciplist.maciprules.MacipRule

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list=%7Bmacip-name%7D/netgate-macip:macip-rules/netgate-macip:macip-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

application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-macip:macip-rule":
    {
    }
}

creates netgate.macip.macipconfig.maciptable.maciplist.maciprules.MacipRule

post /data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules/netgate-macip:macip-rule={sequence}

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/netgate-macip:macip-table/netgate-macip:macip-list={macip-name}/netgate-macip:macip-rules/netgate-macip:macip-rule={sequence}

A List of MACIP Rules.

path Parameters
macip-name
required
string

Id of macip-list

sequence
required
integer <int64>

Id of macip-rule

Request Body schema: application/yang-data+json

netgate.macip.macipconfig.maciptable.maciplist.maciprules.MacipRule to be added to list

mac-address
string

The L2 MAC address to be matched.

sequence
integer <int64>

Rules are executed in increasing sequence number.

mac-mask
string

The L2 MAC mask ANDed with packet MAC addresses.

action
string (netgate.macip.MacipRuleAction)
Enum:"deny" "permit"
macip-rule-description
string

A text description for the MACIP.

ip-prefix
string

IP prefix.

ip-version
string (ietf.inet.types.IpVersion)
Enum:"unknown" "ipv4" "ipv6"

Responses

201

Object created

400

Internal error

409