hpux updates
This commit is contained in:
25
list_mv.sh
25
list_mv.sh
@@ -1,13 +1,23 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# List MVs using API call to CDM, for diagnostic purposes
|
||||
# List MVs using API call to RSC, for diagnostic purposes
|
||||
# Written for HCL / Nokia
|
||||
# v1.1 - James Pattinson - October 2025
|
||||
#
|
||||
# usage: list_mv.sh
|
||||
|
||||
|
||||
MYDIR="$(dirname "$(readlink -f "$0")")"
|
||||
get_script_dir() {
|
||||
# Portable way to get script directory for Linux and HP/UX
|
||||
local src="$0"
|
||||
while [ -h "$src" ]; do
|
||||
dir="$(cd -P "$(dirname "$src")" >/dev/null 2>&1 && pwd)"
|
||||
src="$(readlink "$src")"
|
||||
[[ $src != /* ]] && src="$dir/$src"
|
||||
done
|
||||
cd -P "$(dirname "$src")" >/dev/null 2>&1 && pwd
|
||||
}
|
||||
MYDIR="$(get_script_dir)"
|
||||
source $MYDIR/rbk_api.conf
|
||||
source $MYDIR/oracle_funcs.sh
|
||||
|
||||
@@ -15,18 +25,11 @@ source $MYDIR/oracle_funcs.sh
|
||||
|
||||
echo Service account in use is $ID
|
||||
|
||||
echo ALL MVs
|
||||
echo "Managed Volumes"
|
||||
|
||||
ENDPOINT="https://$RUBRIK_IP/api/internal/managed_volume"
|
||||
rest_api_get
|
||||
|
||||
grep -Eo '"name"[^,]*' /tmp/rbkresponse.$$
|
||||
|
||||
echo NonRelic MVs
|
||||
|
||||
ENDPOINT="https://$RUBRIK_IP/api/internal/managed_volume?is_relic=false"
|
||||
rest_api_get
|
||||
|
||||
grep -Eo '"name"[^,]*' /tmp/rbkresponse.$$
|
||||
grep -o '"name":"[^"]*"' /tmp/rbkresponse.$$ | cut -d'"' -f4
|
||||
|
||||
cleanup
|
||||
|
||||
Reference in New Issue
Block a user