v_list_sys_interfaces 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # info: listing system interfaces
  3. #----------------------------------------------------------#
  4. # Variable&Function #
  5. #----------------------------------------------------------#
  6. # Argument defenition
  7. format="${1-shell}"
  8. limit="${2-1000}"
  9. offset="${3-1}"
  10. # Importing variables
  11. source $VESTA/conf/vars.conf
  12. source $V_FUNC/shared_func.sh
  13. source $V_FUNC/ip_func.sh
  14. #----------------------------------------------------------#
  15. # Verifications #
  16. #----------------------------------------------------------#
  17. # Checking argument format
  18. format_validation 'limit' 'offset'
  19. #----------------------------------------------------------#
  20. # Action #
  21. #----------------------------------------------------------#
  22. # Listing domains
  23. case $format in
  24. json) ipint_json_list ;;
  25. shell) ipint_shell_list ;;
  26. *) check_args '1' '0' '[format] [limit] [offset]'
  27. esac
  28. #----------------------------------------------------------#
  29. # Vesta #
  30. #----------------------------------------------------------#
  31. # Logging
  32. log_event 'system' "$V_EVENT"
  33. exit $OK