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

Custom python-vm startup script arguments, NSO 5.5.1

Andrey Grechin
Cisco Employee
Cisco Employee

Hi,

I get zero arguments when using a custom python-vm startup script. This leads to the failure of VM initialization because startup.py doesn't get the required arguments (-l -f -i).

Is this some expected behavior or I missed something?

Thanks.

ncs.conf config:

<python-vm>
  <start-command>
    /Users/user/repos/test/ncs-run/ncs-start-python-vm1
  </start-command>
</python-vm>

The standard script execution result:

Starting python3 -u /Users/user/nso/5.5.1/src/ncs/pyapi/ncs_pyvm/startup.py -l info -f ./logs/ncs-python-vm -i test1 

The custom script execution result:

Starting python3 -u /Users/user/nso/5.5.1/src/ncs/pyapi/ncs_pyvm/startup.py

 

$ cat ncs-start-python-vm1
#!/bin/sh
echo "Number of args $#"

==cut==

echo "Starting python3 -u $main $*"
exec python3 -u "$main" "$@"

 

0 Replies 0