Skip to content

Commit 725a67c

Browse files
authored
Merge pull request #263 from NetApp/fix_null_issue
Fix null issue
2 parents 8a44741 + ee9e328 commit 725a67c

File tree

13 files changed

+21
-16
lines changed

13 files changed

+21
-16
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
/Ansible/fsx_inventory_report/ @kcantrel
99
/Ansible/snapmirror_report/ @kcantrel
1010
/EKS/FSxN-as-PVC-for-EKS/ @mickeysh
11+
/EKS/Backup-EKS-Applications-with-Trident-Protect/ @kcantrel
12+
/EKS/PV-Migrate-with-Trident-Protect/ @kcantrel
13+
/Management-Utilities/FSxN-Report/ @kcantrel
1114
/Management-Utilities/auto_create_sm_relationships/ @kcantrel
1215
/Management-Utilities/auto_set_fsxn_auto_grow/ @kcantrel
16+
/Management-Utilities/ec2-user-data-iscsi-create-and-mount/ @benams1
1317
/Management-Utilities/fsx-ontap-aws-cli-scripts/ @kcantrel
1418
/Management-Utilities/fsxn-rotate-secret/ @kcantrel
1519
/Management-Utilities/warm_performance_tier/ @kcantrel
20+
/Management-Utilities/Workload-Factory-API-Samples/ @kcantrel
1621
/Monitoring/CloudWatch-FSx/ @LirazRom10
1722
/Monitoring/LUN-monitoring/ @LirazRom10
1823
/Monitoring/auto-add-cw-alarms/ @kcantrel

Management-Utilities/Workload-Factory-API-Samples/link_associate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ if [ -z "$token" ]; then
108108
exit 1
109109
fi
110110

111-
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'"}'
111+
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

Management-Utilities/Workload-Factory-API-Samples/list_links

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ if [ -z "$token" ]; then
9494
exit 1
9595
fi
9696

97-
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'
97+
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'
9898

9999
run_curl GET "$token" "https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/links/v1/links?include=associatedTargets,state,features" $tmpout $tmperr
100100
if jq -r "$jq_query" $tmpout > $tmpout2 2> $tmperr; then

Management-Utilities/Workload-Factory-API-Samples/wf_utils

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ run_curl () {
9797

9898
if [ -z "$accept" ]; then
9999
accept="application/json, text/plain, */*"
100-
shift 6
100+
if [ $# -lt 6 ]; then
101+
shift $#
102+
else
103+
shift 6
104+
fi
101105
else
102106
shift 7
103107
fi

Management-Utilities/fsx-ontap-aws-cli-scripts/create_fsxn_filesystem

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ done
8686
# Set some defaults.
8787
size=1024
8888
throughput=128
89-
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
89+
region=$(aws configure get region)
9090
securityGroupOption=""
9191
endpointips=""
9292
availType=multi

Management-Utilities/fsx-ontap-aws-cli-scripts/create_fsxn_svm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ else
4646
fi
4747
#
4848
# Set some defaults.
49-
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
49+
region=$(aws configure get region)
5050
waitForCompletion=false
5151
maxIterations=24
5252
sleepTime=5

Management-Utilities/fsx-ontap-aws-cli-scripts/create_fsxn_volume

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ intergerRegex='^[0-9]+$'
5252
#
5353
# Set some defaults.
5454
size=20
55-
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
55+
region=$(aws configure get region)
5656
waitForCompletion=false
5757
volumeStyle="flexvol"
5858
aggregateOption=""

Management-Utilities/fsx-ontap-aws-cli-scripts/delete_fsxn_filesystem

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ for cmd in jq aws delete_fsxn_svm delete_fsxn_volume; do
8383
done
8484
#
8585
# Get the default region.
86-
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
86+
region=$(aws configure get region)
8787
enableBackup=false
8888
waitForCompletion=false
8989
#

Management-Utilities/fsx-ontap-aws-cli-scripts/delete_fsxn_svm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ for cmd in aws jq delete_fsxn_volume; do
5151
done
5252
#
5353
# Set any defaults.
54-
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
54+
region=$(aws configure get region)
5555
waitForDelete=false
5656
noQuery=false
5757
enableBackup=false

Management-Utilities/fsx-ontap-aws-cli-scripts/delete_fsxn_volume

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ tmpout=/tmp/delete-volume.$$
7777
trap 'rm -f $tmpout' exit
7878
#
7979
# Set some defaults.
80-
region=$(aws configure list | egrep '^.*egion ' | awk '{print $2}')
80+
region=$(aws configure get region)
8181
skipBackup=true
8282
waitForCompletion=false
8383
quiet=false

0 commit comments

Comments
 (0)