netgate-macip API (24.06)

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

MACIP ACL configuration in VPP.

Responses

Request samples

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

creates netgate.macip.MacipConfig

MACIP ACL configuration in VPP.

Request Body schema: application/yang-data+json

netgate.macip.MacipConfig to be added to list

object (netgate.macip.macipconfig.MacipTable)

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

Responses

Request samples

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

creates or updates netgate.macip.MacipConfig

MACIP ACL configuration in VPP.

Request Body schema: application/yang-data+json

netgate.macip.MacipConfig to be added or updated

object (netgate.macip.MacipConfig)

MACIP ACL configuration in VPP.

Responses

Request samples

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

removes netgate.macip.MacipConfig

MACIP ACL configuration in VPP.

Responses

Request samples

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

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

Responses

Request samples

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

creates netgate.macip.macipconfig.MacipTable

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

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

MACIP list name.

Responses

Request samples

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

creates or updates netgate.macip.macipconfig.MacipTable

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

object (netgate.macip.macipconfig.MacipTable)

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

Responses

Request samples

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

removes netgate.macip.macipconfig.MacipTable

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

Responses

Request samples

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

MACIP list name.

Request Body schema: application/yang-data+json

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

netgate-macip:macip-name
string

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

netgate-macip:macip-description
string

A text description for the MACIP.

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

MACIP Rule Table ordered by sequence number.

Responses

Request samples

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

returns netgate.macip.macipconfig.maciptable.MacipList

MACIP list name.

path Parameters
macip-name
required
string

Id of macip-list

Responses

Request samples

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

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

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

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

MACIP list name.

Responses

Request samples

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

removes netgate.macip.macipconfig.maciptable.MacipList

MACIP list name.

path Parameters
macip-name
required
string

Id of macip-list

Responses

Request samples

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

MACIP Rule Table ordered by sequence number.

path Parameters
macip-name
required
string

Id of macip-list

Responses

Request samples

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

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

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

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

A List of MACIP Rules.

Responses

Request samples

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

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

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

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

MACIP Rule Table ordered by sequence number.

Responses

Request samples

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

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

MACIP Rule Table ordered by sequence number.

path Parameters
macip-name
required
string

Id of macip-list

Responses

Request samples

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

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

netgate-macip:mac-address
string

The L2 MAC address to be matched.

netgate-macip:sequence
integer <int64>

Rules are executed in increasing sequence number.

netgate-macip:mac-mask
string

The L2 MAC mask ANDed with packet MAC addresses.

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

A text description for the MACIP.

netgate-macip:ip-prefix
string

IP prefix.

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

Responses

Request samples

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

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

A List of MACIP Rules.

path Parameters
macip-name
required
string

Id of macip-list

sequence
required
integer <int64>

Id of macip-rule

Responses

Request samples

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

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

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

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

A List of MACIP Rules.

Responses

Request samples

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

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

A List of MACIP Rules.

path Parameters
macip-name
required
string

Id of macip-list

sequence
required
integer <int64>

Id of macip-rule

Responses

Request samples

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

MACIP ACL state data.

Responses

Request samples

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
{
  • "netgate-macip:macip-state": {
    }
}

returns netgate.macip.macipstate.MacipTable

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

Responses

Request samples

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

returns netgate.macip.macipstate.maciptable.MacipList

MACIP list name.

path Parameters
macip-name
required
string

Id of macip-list

Responses

Request samples

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

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

MACIP Rule Table ordered by sequence number.

path Parameters
macip-name
required
string

Id of macip-list

Responses

Request samples

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

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

A List of MACIP Rules.

path Parameters
macip-name
required
string

Id of macip-list

sequence
required
integer <int64>

Id of macip-rule

Responses

Request samples

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