PAN-OS OpenConfig Wildcard Support
Table of Contents
Expand all | Collapse all
PAN-OS OpenConfig Wildcard Support
PAN-OS OpenConfig supports * and ... wildcards for retrieving elements in a given subtree as described in the schema.
PAN-OS Supports both * and ... wildcard
operators.
* Wildcard
The * Wild represents a single
level wildcard and retrieves all elements for a given subtree described
in the schema.
OpenConfig also supports multiple wildcards.
For
example, this command gets all of the virtual routers:
gnmic get --path network-instances/network-instance[name=*]/tables/table[address-family=*][protocol=BGP]
The
client provides the following response:
[ { "timestamp": 1626468723561748605, "time": "2021-07-16T13:52:03.561748605-07:00", "updates": [ { "Path": "network-instances/network-instance[name=demo_vr]/tables/table[address-family=IPV4][protocol=BGP]", "values": { "network-instances/network-instance/tables/table": { "address-family": "openconfig-types:IPV4", "config": { "address-family": "openconfig-types:IPV4", "protocol": "openconfig-policy-types:BGP" }, "protocol": "openconfig-policy-types:BGP", "state": { "address-family": "openconfig-types:IPV4", "protocol": "openconfig-policy-types:BGP" } } } }, { "Path": "network-instances/network-instance[name=openconfig-test]/tables/table[address-family=IPV4][protocol=BGP]", "values": { "network-instances/network-instance/tables/table": { "address-family": "openconfig-types:IPV4", "config": { "address-family": "openconfig-types:IPV4", "protocol": "openconfig-policy-types:BGP" }, "protocol": "openconfig-policy-types:BGP", "state": { "address-family": "openconfig-types:IPV4", "protocol": "openconfig-policy-types:BGP" } } } }, { "Path": "network-instances/network-instance[name=openconfig-test2]/tables/table[address-family=IPV4][protocol=BGP]", "values": { "network-instances/network-instance/tables/table": { "address-family": "openconfig-types:IPV4", "config": { "address-family": "openconfig-types:IPV4", "protocol": "openconfig-policy-types:BGP" }, "protocol": "openconfig-policy-types:BGP", "state": { "address-family": "openconfig-types:IPV4", "protocol": "openconfig-policy-types:BGP" } } } } ] } ]
... Wildcard
The ... Wildcard represents
a multiple level wildcard and can retrieve multiple levels of elements
for different subtrees described in the schema.
For example,
you can use this to get the descriptions for all of the nodes under
the interfaces container.
gnmic get --path /interfaces/.../config/description
The
client provides the following response:
[ { "timestamp": 1626468131823530325, "time": "2021-07-16T13:42:11.823530325-07:00", "updates": [ { "Path": "interfaces/interface[name=ae1]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/1]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/10]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/11]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/14]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/15]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/16]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/18]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/2]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/24]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/3]/config/description", "values": { "interfaces/interface/config/description": "test" } }, { "Path": "interfaces/interface[name=ethernet1/4]/config/description", "values": { "interfaces/interface/config/description": "test" } } } } ] } ]