This YANG module provides a Netgate-defined data-model for MACIP Access Control Lists.
Copyright 2019-2020 Rubicon Communications, LLC.
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)) }
{- "netgate-macip:macip-config": {
- "netgate-macip:macip-table": {
- "netgate-macip:macip-list": [
- {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
]
}
}
}
MACIP ACL configuration in VPP.
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. |
{- "netgate-macip:macip-table": {
- "netgate-macip:macip-list": [
- {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
]
}
}
MACIP ACL configuration in VPP.
netgate.macip.MacipConfig to be added or updated
object (netgate.macip.MacipConfig) MACIP ACL configuration in VPP. |
{- "netgate-macip:macip-config": {
- "netgate-macip:macip-table": {
- "netgate-macip:macip-list": [
- {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
]
}
}
}
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)) }
Table of MACIP lists, indexed by name. Each entry contains a set of MACIP Rules ordered by sequence number.
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)) }
{- "netgate-macip:macip-table": {
- "netgate-macip:macip-list": [
- {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
]
}
}
Table of MACIP lists, indexed by name. Each entry contains a set of MACIP Rules ordered by sequence number.
netgate.macip.macipconfig.MacipTable to be added to list
Array of objects (netgate.macip.macipconfig.maciptable.MacipList) MACIP list name. |
{- "netgate-macip:macip-list": [
- {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
]
}
Table of MACIP lists, indexed by name. Each entry contains a set of MACIP Rules ordered by sequence number.
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. |
{- "netgate-macip:macip-table": {
- "netgate-macip:macip-list": [
- {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
]
}
}
Table of MACIP lists, indexed by name. Each entry contains a set of MACIP Rules ordered by sequence number.
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)) }
MACIP list name.
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. |
{- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
MACIP list name.
macip-name required | string Id of macip-list |
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)) }
{- "netgate-macip:macip-list": {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
}
MACIP list name.
macip-name required | string Id of macip-list |
netgate.macip.macipconfig.maciptable.MacipList to be added or updated
object (netgate.macip.macipconfig.maciptable.MacipList) MACIP list name. |
{- "netgate-macip:macip-list": {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-description": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
}
MACIP list name.
macip-name required | string Id of macip-list |
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)) }
MACIP Rule Table ordered by sequence number.
macip-name required | string Id of macip-list |
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)) }
{- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
MACIP Rule Table ordered by sequence number.
macip-name required | string Id of macip-list |
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. |
{- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
MACIP Rule Table ordered by sequence number.
macip-name required | string Id of macip-list |
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. |
{- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "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"
}
]
}
}
MACIP Rule Table ordered by sequence number.
macip-name required | string Id of macip-list |
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)) }
A List of MACIP Rules.
macip-name required | string Id of macip-list |
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" |
{- "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"
}
A List of MACIP Rules.
macip-name required | string Id of macip-list |
sequence required | integer <int64> Id of macip-rule |
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)) }
{- "netgate-macip:macip-rule": {
- "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"
}
}
A List of MACIP Rules.
macip-name required | string Id of macip-list |
sequence required | integer <int64> Id of macip-rule |
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. |
{- "netgate-macip:macip-rule": {
- "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"
}
}
A List of MACIP Rules.
macip-name required | string Id of macip-list |
sequence required | integer <int64> Id of macip-rule |
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)) }
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)) }
{- "netgate-macip:macip-state": {
- "netgate-macip:macip-table": {
- "netgate-macip:macip-list": [
- {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "netgate-macip:mac-address": "string",
- "netgate-macip:sequence": 0,
- "netgate-macip:action": "deny",
- "netgate-macip:ip-prefix": "string",
- "netgate-macip:mac-mask": "string",
- "netgate-macip:ip-version": "unknown"
}
]
}
}
]
}
}
}
Table of MACIP lists, indexed by name. Each entry contains a set of MACIP Rules ordered by sequence number.
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)) }
{- "netgate-macip:macip-table": {
- "netgate-macip:macip-list": [
- {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "netgate-macip:mac-address": "string",
- "netgate-macip:sequence": 0,
- "netgate-macip:action": "deny",
- "netgate-macip:ip-prefix": "string",
- "netgate-macip:mac-mask": "string",
- "netgate-macip:ip-version": "unknown"
}
]
}
}
]
}
}
MACIP list name.
macip-name required | string Id of macip-list |
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)) }
{- "netgate-macip:macip-list": {
- "netgate-macip:macip-name": "string",
- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "netgate-macip:mac-address": "string",
- "netgate-macip:sequence": 0,
- "netgate-macip:action": "deny",
- "netgate-macip:ip-prefix": "string",
- "netgate-macip:mac-mask": "string",
- "netgate-macip:ip-version": "unknown"
}
]
}
}
}
MACIP Rule Table ordered by sequence number.
macip-name required | string Id of macip-list |
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)) }
{- "netgate-macip:macip-rules": {
- "netgate-macip:macip-rule": [
- {
- "netgate-macip:mac-address": "string",
- "netgate-macip:sequence": 0,
- "netgate-macip:action": "deny",
- "netgate-macip:ip-prefix": "string",
- "netgate-macip:mac-mask": "string",
- "netgate-macip:ip-version": "unknown"
}
]
}
}
A List of MACIP Rules.
macip-name required | string Id of macip-list |
sequence required | integer <int64> Id of macip-rule |
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)) }
{- "netgate-macip:macip-rule": {
- "netgate-macip:mac-address": "string",
- "netgate-macip:sequence": 0,
- "netgate-macip:action": "deny",
- "netgate-macip:ip-prefix": "string",
- "netgate-macip:mac-mask": "string",
- "netgate-macip:ip-version": "unknown"
}
}