diff --git a/scripts/test-add-device.sh b/scripts/test-add-device.sh index 5268009a17c5c48b410fa39fe6d7f733f9b77148..82ba2d42e0ee387297134ff9857295f518d0e2d3 100755 --- a/scripts/test-add-device.sh +++ b/scripts/test-add-device.sh @@ -1,3 +1,7 @@ -./artifacts/gosdnc init --controller 127.0.0.1:55055 -./artifacts/gosdnc device create -a 172.100.0.11:6030 -u admin -p admin --name='test-ceos-1' --type csbi +if [ $# -eq 0 ] + then + echo 'you need to provide the password for the admin user' + exit 1 +fi +./artifacts/gosdnc device create -a 172.100.0.11:6030 -u admin -p admin --name="test-ceos-1" ./artifacts/gosdnc device list diff --git a/scripts/test-add-multiple-devices.sh b/scripts/test-add-multiple-devices.sh index 159180dc03fad1788d2f939cd5b1f9a19940dd6b..58c6a49445e16fdb7c2903ad0e3e428a013db1b1 100755 --- a/scripts/test-add-multiple-devices.sh +++ b/scripts/test-add-multiple-devices.sh @@ -7,7 +7,7 @@ fi ./artifacts/gosdnc login --controller 127.0.0.1:55055 --u admin --p $1 ./artifacts/gosdnc pnd use 5f20f34b-cbd0-4511-9ddc-c50cf6a3b49d -for i in {0..$2} +for i in $(seq 1 $2) do ./artifacts/gosdnc device create -a 172.100.0.11:6030 -u admin -p admin --name="test-ceos-$i" done diff --git a/scripts/test-add-pnd.sh b/scripts/test-add-pnd.sh index fc8a36129e55d2c76a35bfcfc90e78abdbfb3847..bd2cf7e77380da0d83bf57f38a5663845629dc51 100755 --- a/scripts/test-add-pnd.sh +++ b/scripts/test-add-pnd.sh @@ -5,5 +5,5 @@ if [ $# -eq 0 ] fi ./artifacts/gosdnc login --controller 127.0.0.1:55055 --u admin --p $1 -./artifacts/gosdnc pnd create --name test-pnd-1 test +./artifacts/gosdnc pnd create --name test-pnd-1 ./artifacts/gosdnc list diff --git a/scripts/test-list-devices.sh b/scripts/test-list-devices.sh new file mode 100755 index 0000000000000000000000000000000000000000..ec6fa1320aab68d2456239ffece99a39cdf7e609 --- /dev/null +++ b/scripts/test-list-devices.sh @@ -0,0 +1,8 @@ +if [ $# -eq 0 ] + then + echo 'you need to provide the password for the admin user' + exit 1 +fi + +./artifacts/gosdnc login --controller 127.0.0.1:55055 --u admin --p $1 +./artifacts/gosdnc device list