cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
559
Views
0
Helpful
1
Replies

Copying/Assigning one actions output to others [PYTHON]

viskakka@cisco.com
Cisco Employee
Cisco Employee

I have stacked Actions.. One action invoking other actions

Output yang of parent action is referring to child action yang.

But i am unable to get how i can assign output of child action to a leaf in parent output.

 

If i assign parent output = child output  , no error comes

But It shows blank test_bandwidth_optimization_results, hence data is not copied

2018-12-30 21:34:31 - test-portal-app - DEBUG - <class 'ncs.maagic.ActionParams'>
2018-12-30 21:34:31 - test-portal-app - DEBUG - ['__class__', '__delattr__', '__doc__', '__format__', '__get__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__self__', '__self_class__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__thisclass__', 'test_bandwidth_optimization_results']

 

If i assign parent output.test_bandwidth_optimization_results = child_output.test_bandwidth_optimization_results , following error is seen

2018-12-30 21:34:31 - root - ERROR - Node type does not support assignment

 

Yang structures:

Child

output {
container test-bandwidth-optimization-results {
uses config-opm-output;

uses config-opm-congestion-output;
}

Parent:

output {

container test-bandwidth-optimization-results {
uses test-bandwidth-optimization:config-opm-output{}
uses test-bandwidth-optimization:config-opm-congestion-output{}
}

 

Thanks

 

 

 

1 Reply 1

frjansso
Cisco Employee
Cisco Employee

Unfortunately you can't do that, the code has to copy the individual values/leafs.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: