netgate-macip API (19.08)

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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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

Content type
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<