10-02-2020 04:31 AM
Solved! Go to Solution.
10-02-2020 09:51 AM
These lines are erroneous, because all the container and list nodes are pre-initialized in class hierarchy and must be used:
## qos under interface
QOS = interface_configuration.Qos()
qos1 =QOS.Input()
qos2 =QOS.Input.ServicePolicyQos()
qos2.service_policy_name = "TEST_POLICY"
qos1.service_policy_qos.append(qos2)
## qos under interface
qos_policy = xr_intf.InterfaceConfigurations.InterfaceConfiguration.Qos.Input.ServicePolicyQos()
qos_policy.service_policy_name = "TEST_POLICY"
interface_configuration.qos.input.service_policy_qos.append(qos_policy)
10-02-2020 09:51 AM
These lines are erroneous, because all the container and list nodes are pre-initialized in class hierarchy and must be used:
## qos under interface
QOS = interface_configuration.Qos()
qos1 =QOS.Input()
qos2 =QOS.Input.ServicePolicyQos()
qos2.service_policy_name = "TEST_POLICY"
qos1.service_policy_qos.append(qos2)
## qos under interface
qos_policy = xr_intf.InterfaceConfigurations.InterfaceConfiguration.Qos.Input.ServicePolicyQos()
qos_policy.service_policy_name = "TEST_POLICY"
interface_configuration.qos.input.service_policy_qos.append(qos_policy)
10-02-2020 07:03 PM
Thank you!! it worked, but the class had to be ServicePolicy, not ServicePolicyQos .
10-04-2020 11:49 AM
Actually both classes to use is OK, because following documentation (and YANG model) the class Input contains 2 classes ServicePolicy and ServicePolicyQos. It is up to to your application, which one (or both of them) should be used.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide