You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
It will be useful to pass the return value of the openstack command into the shell, not only on text but as a value that can be directly queried by other scripts.
$ fedcloud openstack volume show test-volume2 --site ... --vo ...
Site: ..., command: volume show test-volume2
Error code: 1
Error message: No volume with a name or ID of 'test-volume2' exists.
$ echo $?
0
This can apply to any other command that is called by fedcloudclient
Solution
Return the value / error code obtained from the openstack operation. In the example: 1.
Alternatives
Return an error code specific for fedcloud if the executed command fails.
For example, a code error of 100 + the error code returned by the command. In the example: 101.
This way it can be distinguished between specific fedcloudclient errors and 3rd party errors.
Note: 100 is just an example used for clarity, it could be 20 instead. Consider that there is a limited number of return codes that can be used (so the sum could be longer than this limit) and there are some reserved codes.
The text was updated successfully, but these errors were encountered:
Initial checklist
Problem
It will be useful to pass the return value of the openstack command into the shell, not only on text but as a value that can be directly queried by other scripts.
This can apply to any other command that is called by fedcloudclient
Solution
Return the value / error code obtained from the openstack operation. In the example: 1.
Alternatives
Return an error code specific for fedcloud if the executed command fails.
For example, a code error of 100 + the error code returned by the command. In the example: 101.
This way it can be distinguished between specific fedcloudclient errors and 3rd party errors.
Note: 100 is just an example used for clarity, it could be 20 instead. Consider that there is a limited number of return codes that can be used (so the sum could be longer than this limit) and there are some reserved codes.
The text was updated successfully, but these errors were encountered: