Hi YDK community,
I came back with another set of CRUD sample apps, which configure access control lists (ACL) using OpenConfig and gNMI.
What does ACLs do?
You can configure the states of access rules, filters and other access controlling functions in the network with ACL!
gn-create-oc-acl-10-ydk.py - create boilerplate
gn-create-oc-acl-30-ydk.py - allow one host
gn-create-oc-acl-32-ydk.py - allow multiple hosts
gn-create-oc-acl-34-ydk.py - multiple hosts w/ codepoint
gn-delete-oc-acl-10-ydk.py - delete boilerplate
gn-delete-oc-acl-20-ydk.py - delete all access lists
gn-read-oc-acl-10-ydk.py - read boilerplate
gn-update-oc-acl-10-ydk.py - update boilerplate
You can find the sample apps including XML and CLI configuration files in the following Github directory:
https://github.com/CiscoDevNet/ydk-py-samples/tree/master/samples/basic/crud/gnmi/models/openconfig/openconfig-acl
How about comparing the ACL sample apps of gNMI and NETCONF?
As gNMI does not have "get schema" RPC, the sample apps of gNMI import os additionally and pre-populate a model repository using the following two lines in the application.
YDK_REPO_DIR = os.path.expanduser("~/.ydk/")
repository = Repository(YDK_REPO_DIR+device.hostname)
Make sure to check out these two lines in the sample apps of gNMI!