Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@
/Ansible/fsx_inventory_report/ @kcantrel
/Ansible/snapmirror_report/ @kcantrel
/EKS/FSxN-as-PVC-for-EKS/ @mickeysh
/EKS/Backup-EKS-Applications-with-Trident-Protect/ @kcantrel
/EKS/PV-Migrate-with-Trident-Protect/ @kcantrel
/Management-Utilities/FSxN-Report/ @kcantrel
/Management-Utilities/auto_create_sm_relationships/ @kcantrel
/Management-Utilities/auto_set_fsxn_auto_grow/ @kcantrel
/Management-Utilities/ec2-user-data-iscsi-create-and-mount/ @benams1
/Management-Utilities/fsx-ontap-aws-cli-scripts/ @kcantrel
/Management-Utilities/fsxn-rotate-secret/ @kcantrel
/Management-Utilities/warm_performance_tier/ @kcantrel
/Management-Utilities/Workload-Factory-API-Samples/ @kcantrel
/Monitoring/CloudWatch-FSx/ @LirazRom10
/Monitoring/LUN-monitoring/ @LirazRom10
/Monitoring/auto-add-cw-alarms/ @kcantrel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ if [ -z "$token" ]; then
exit 1
fi

run_curl "POST" "$token" "https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/fsx/v2/credentials/${CREDENTIALS_ID}/regions/${AWS_REGION}/file-systems/${FILESYSTEM_ID}/links" $tmpout $tmperr '{"linkId":"'$LINK_ID'"}'
run_curl "POST" "$token" "https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/fsx/v2/credentials/${CREDENTIALS_ID}/regions/${AWS_REGION}/file-systems/${FILESYSTEM_ID}/links" $tmpout $tmperr '{"linkId":"'$LINK_ID'"}' application/json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if [ -z "$token" ]; then
exit 1
fi

jq_query='.items[] | if(.type == "connector") then "\(.name);\(.id);\(.type);\(.state.status);N/A;N/A;N/A;\(.associatedTargets.items)" else "\(.name);\(.id);\(.type);\(.state.status);\(.region);\(.vpcId);\(.cloudResourceId | split(":") | .[6]);\(.associatedTargets.items)" end'
jq_query='.items[] | if(.type == "connector") then "\(.name);\(.id);\(.type);\(.state.status);N/A;N/A;N/A;\(.associatedTargets.items)" else "\(.name);\(.id);\(.type);\(.state.status);\(.region);\(.vpcId);\(if(.cloudResourceId == null) then "N/A" else .cloudResourceId | split(":") | .[6] end);\(.associatedTargets.items)" end'

run_curl GET "$token" "https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/links/v1/links?include=associatedTargets,state,features" $tmpout $tmperr
if jq -r "$jq_query" $tmpout > $tmpout2 2> $tmperr; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ run_curl () {

if [ -z "$accept" ]; then
accept="application/json, text/plain, */*"
shift 6
if [ $# -lt 6 ]; then
shift $#
else
shift 6
fi
else
shift 7
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ done
# Set some defaults.
size=1024
throughput=128
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
securityGroupOption=""
endpointips=""
availType=multi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ else
fi
#
# Set some defaults.
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
waitForCompletion=false
maxIterations=24
sleepTime=5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ intergerRegex='^[0-9]+$'
#
# Set some defaults.
size=20
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
waitForCompletion=false
volumeStyle="flexvol"
aggregateOption=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ for cmd in jq aws delete_fsxn_svm delete_fsxn_volume; do
done
#
# Get the default region.
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
enableBackup=false
waitForCompletion=false
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ for cmd in aws jq delete_fsxn_volume; do
done
#
# Set any defaults.
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
waitForDelete=false
noQuery=false
enableBackup=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ tmpout=/tmp/delete-volume.$$
trap 'rm -f $tmpout' exit
#
# Set some defaults.
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
skipBackup=true
waitForCompletion=false
quiet=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ contents=false
showStatus=false
showARN=false
showBackup=false
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
#
# Process command line arguments.
while getopts "bhcxsanr:i:f:" option; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fi
allRegions=false
includeFsName=false
includeIp=false
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
while getopts "hanr:i:f:p" option; do
case "$option" in
r) region="$OPTARG"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi
#
# Process command line arguments.
allRegions=false
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
region=$(aws configure get region)
includeFsName=false
excludeRoot=false
filter=""
Expand Down Expand Up @@ -103,10 +103,6 @@ fi

if [ ! -z "$fsid" -a -z "$fileSystemName" ]; then
fileSystemName=$(aws fsx describe-file-systems --region $region --output=json 2> /dev/null | jq -r ".FileSystems[] | if(.FileSystemId == \"$fsid\") then (.Tags[] | select(.Key == \"Name\") .Value) else empty end" 2> /dev/null)
if [ -z "$fileSystemName" ]; then
echo "Error, failed to find the file system with the file system ID of '$fsid'." 1>&2
exit 1
fi
filter='--filters [{"Name":"file-system-id","Values":["'$fsid'"]}]'
fi

Expand Down