netgate-macip API (24.02)

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

Copyright 2019-2020 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-wrapper":
    {
    }
}

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

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

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-macip:macip-config":
    {
    }
}

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-wrapper
object (netgate.macip.MacipConfigWrapper)

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

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/macip-table

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/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/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-wrapper":
    {
    }
}

creates netgate.macip.macipconfig.MacipTable

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/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-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.MacipTable

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/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-wrapper
object (netgate.macip.macipconfig.MacipTableWrapper)

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

removes netgate.macip.macipconfig.MacipTable

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/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/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/macip-table/macip-list

Example URL

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

MACIP list name.

Request Body schema: application/yang-data+json

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

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

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

returns netgate.macip.macipconfig.maciptable.MacipList

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/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/macip-table/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-wrapper":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/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-wrapper
object (netgate.macip.macipconfig.maciptable.MacipListWrapper)

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

removes netgate.macip.macipconfig.maciptable.MacipList

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/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/macip-table/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/macip-table/macip-list={macip-name}/macip-rules

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/macip-list={macip-name}/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/macip-table/macip-list=%7Bmacip-name%7D/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

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

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

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/macip-list={macip-name}/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-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-rules":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/macip-list={macip-name}/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-wrapper
object (netgate.macip.macipconfig.maciptable.maciplist.MacipRulesWrapper)

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

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

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/macip-list={macip-name}/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/macip-table/macip-list=%7Bmacip-name%7D/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/macip-table/macip-list={macip-name}/macip-rules/macip-rule

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/macip-list={macip-name}/macip-rules/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

macip-rule
object (netgate.macip.macipconfig.maciptable.maciplist.maciprules.MacipRule)

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

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

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

Example URL

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

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

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

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/macip-list={macip-name}/macip-rules/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 or updated

netgate-macip:macip-rule-wrapper
object (netgate.macip.macipconfig.maciptable.maciplist.maciprules.MacipRuleWrapper)

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

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

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-config/macip-table/macip-list={macip-name}/macip-rules/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

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/macip-table/macip-list=%7Bmacip-name%7D/macip-rules/macip-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))

}

macip-state

returns netgate.macip.MacipState

get /data/netgate-macip:macip-state

Example URL

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

MACIP ACL state data.

Responses

200

netgate.macip.MacipState

400

Internal error

Request samples

Copy
package main

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

func main() {

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

returns netgate.macip.macipstate.MacipTable

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-state/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.macipstate.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-state/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-wrapper":
    {
    }
}

returns netgate.macip.macipstate.maciptable.MacipList

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

Example URL

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

MACIP list name.

path Parameters
macip-name
required
string

Id of macip-list

Responses

200

netgate.macip.macipstate.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-state/macip-table/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-wrapper":
    {
    }
}

returns netgate.macip.macipstate.maciptable.maciplist.MacipRules

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

Example URL

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

MACIP Rule Table ordered by sequence number.

path Parameters
macip-name
required
string

Id of macip-list

Responses

200

netgate.macip.macipstate.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-state/macip-table/macip-list=%7Bmacip-name%7D/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

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

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

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

Example URL

https://hostname/restconf/data/netgate-macip:macip-state/macip-table/macip-list={macip-name}/macip-rules/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.macipstate.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-state/macip-table/macip-list=%7Bmacip-name%7D/macip-rules/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

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