this is w.r.t flowspec UM model. please find the hirerarchy of the flow below. af.local_install.interface_all = True
is suppose take a boolean value but it is throwing error.
Tried with all values .
af = self.flowspec_cfg.AddressFamilies.AddressFamily() af.local_install.interface_all = True self.device.create(af) ** ydk.errors.YPYServiceError: Attempt to assign non YDK entity object of type bool to InterfaceAll
(Pdb) af = self.flowspec_cfg.AddressFamilies.AddressFamily() af.local_install.interface_all = Empty() self.device.create(af) ** ydk.errors.YPYServiceError: Attempt to assign non YDK entity object of type Empty to InterfaceAll (Pdb)
Provided information is not sufficient to give you definitive answer. First of all, the YANG model Cisco-IOS-XR-um-flowspec-cfg.yang is currently not available on the public GitHub repository. Could you please share this module to see clearly types of the nodes in the model.
Second, it is not clear to me what is the representation of self, please clarify. If possible, share the entire script, or at least complete part of it in relations to model building.
One error that I spot. Based on the picture of the model tree view, the node interface-all is a container and therefore, you cannot assign to it leaf values Empty() or True. In YDK all the containers in the model are instantiated with parent class container or list, except it is a presence container. If it is a presence container, you have to instantiate the class manually while building the model object. If you do not need to configure any leaf or leaf-list nodes under the container interface-all, simply remove the erroneous line.
Another error is instantiation of af object, you missed one container in the hierarchy. Also, when building model object, you always have to start from the top level container and specify all the list keys on the way down.
With these comments your script might look like this:
from ydk.models.cisco_ios_xr import Cisco_IOS_XR_um_flowspec_cfg as flowspec_cfg flowspec = flowspec_cfg.Flowspec() # start from top level container af = flowspec_cfg.Flowspec.AddressFamilies.AddressFamily() af.af_name = 'ipv4' # must specify list element key flowspec.address_families.address_family.append(af) # append the element to the list self.device.create(af) # not sure how that is implemented in your script
2) Interface-all is not just a container , but also a leaf (you can see in the image shared) so value should be given. Other models like isis have worked fine by giving true/ Empty. Also have tried with is_presence = True even that is not working
3) hierarchy of local-install - > interface-all -> have declared it after address family itself . please find the code - in location - /ws/ranjns-bgl/CAFY16.16/cafykit/lib/feature_lib/bgp/flowspec_xr_ydk.py ( code written for testing)
PLease let me know your feasible and free time , would like to have a sync up in this
Networking Automation and Analytics Knowledge Base
For one-on-one help with these products, you can open a ticket at https://developer.cisco.com/site/support/. For other products, please contact Cisco TAC at https://www.cisco.com/c/en/u...
Networking Tools Knowledge Base
For one-on-one help with these products, you can open a ticket at https://developer.cisco.com/site/support/. For other products, please contact Cisco TAC at https://www.cisco.com/c/en/us/support/index.html
YANG Tools Knowledge Base
For one-on-one help with developer products, you can open a ticket at https://developer.cisco.com/site/support/. For other products, please contact Cisco TAC (https://www.cisco.com/c/en/us/support/index.html).
Difference between USGMII and USXGMII:
USGMII is used for 8x10M/100M/1GE network ports, with each port maximum speed of 1GE. USXGMII-Single Port version can be used to support ONE network port with 10M/100M/1G/2.5G/5G/10G data rates
USGMII is used...
Hi, how to execute linux-commands (which are executeable directly in the guestshell) from IOS-XE sample :[guestshell@guestshell ~]$ cat test.txt | grep SmartSmart Licensing Status: Smart Licensing is DISABLED[guestshell@guestshell ~]$ exit ...