Skip to content

Commit 968992e

Browse files
authored
Merge branch 'main' into add_ubuntu_support
2 parents a7a2b6f + 6c2b7cb commit 968992e

45 files changed

Lines changed: 2063 additions & 153 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/createClone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def usage():
127127
sys.exit(2)
128128
#
129129
# Check that all the required parameters are present.
130-
if secretArn == "" or secretKey == "" or linkArn == "" or fsxId == "" or svmName == "" or parentVolumeName == "" or cloneVolumeName == "":
130+
if secretArn == "" or secretKey == "" or linkArn == "" or fsxId == "" or svmName == "" or parentVolumeName == "" or cloneVolumeName == "" or region == "":
131131
print("Missing required parameters.")
132132
usage()
133133
sys.exit(1)

Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_SM_relationship

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ destinationAggregate="aggr1"
3939
template=""
4040
#
4141
# Get the default region from the AWS CLI configuration
42-
region=$(aws configure list | awk '/region/{print $2}')
42+
region=$(aws configure get region)
4343
#
4444
# Parse the command line arguments
4545
while [ ! -z "$1" ]; do

Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_clone

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ parentVolumeName=""
2727
cloneVolumeName=""
2828
template=""
2929

30-
region=$(aws configure list | awk '/region/{print $2}')
30+
region=$(aws configure get region)
3131

3232
while getopts "hr:l:s:k:f:v:p:c:t:" opt; do
3333
case $opt in

Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_export_policy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protocols="any"
3030
matchCidr="0.0.0.0/0"
3131
template=""
3232

33-
region=$(aws configure list | awk '/region/{print $2}')
33+
region=$(aws configure get region)
3434

3535
while getopts "hr:l:s:k:f:v:n:p:c:t:" opt; do
3636
case $opt in

Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_snapshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ volumeName=""
2727
snapshotName=""
2828
template=""
2929

30-
region=$(aws configure list | awk '/region/{print $2}')
30+
region=$(aws configure get region)
3131

3232
while getopts "hr:l:s:k:f:v:n:p:t:" opt; do
3333
case $opt in

Infrastructure_as_Code/CloudFormation/NetApp-FSxN-Custom-Resources-Samples/scripts/create_volume

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ svmName=""
2929
size="$((20*1024*1024))"
3030
aggregates="aggr1"
3131

32-
region=$(aws configure list | awk '/region/{print $2}')
32+
region=$(aws configure get region)
3333

3434
while getopts "hr:l:s:k:f:v:n:z:a:t:" opt; do
3535
case $opt in

Management-Utilities/Workload-Factory-API-Samples/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ If you do create a new script, please consider contributing it back to this repo
4242
| [bluexp_fsxn_discovery](bluexp_fsxn_discovery) | This discovers FSx for ONTAP file systems for the giving bluexp account and workspace. |
4343
| [bluexp_organization_add](bluexp_organization_add) | This adds a new BlueXP organization (a.k.a. account). |
4444
| [bluexp_organization_delete](bluexp_organization_delete) | This deletes a BlueXP organization (a.k.a. account). |
45+
| [bluexp_organization_rename](bluexp_organization_rename) | This renames a BlueXP organization (a.k.a. account). |
4546
| [credentials_delete](credentials_delete) | This deletes a Workload Factory credential. |
4647
| [fsxn_credentials_set](fsxn_credentials_set) | This sets the credentials for a specified FSx for ONTAP file system. |
48+
| [get_latency_details](get_latency_details) | Get the specific details of a latency event. |
4749
| [link_associate](link_associate) | This associates a Workload Factory Link with a specified FSx for ONTAP file system. |
4850
| [link_delete](link_delete) | This deletes a Workload Factory Link. |
4951
| [link_disassociate](link_disassociate) | This disassociates a Workload Factory Link with a specified FSx for ONTAP file system. |
@@ -54,10 +56,12 @@ If you do create a new script, please consider contributing it back to this repo
5456
| [list_bluexp_workspaces](list_bluexp_workspaces) | This list all the BlueXP workspaces that you have access to. |
5557
| [list_credentials](list_credentials) | This lists all the Workload Factory credentials that you have access to. |
5658
| [list_filesystems](list_filesystems) | This lists all the FSx for ONTAP file systems that you have access to in the specified AWS region. |
59+
| [list_latency_events](list_latency_events) | This lists all the latnecy events associated with the BlueXP account. |
5760
| [list_links](list_links) | This lists all the Workload Factory Links that you have access to. |
5861
| [list_snapmirrors](list_snapmirrors) | This lists all the SnapMirror relationships that are associated with the specified file system. |
5962
| [list_svms](list_svms) | This lists all the SVMs that are associated with the specified file system. |
6063
| [list_volumes](list_volumes) | This lists all the volumes that are associated with the specified file system. |
64+
| [list_volume_cifs_shares](list_volume_cifs_shares) | This lists cifs shares associated with a volume in the specified file system. |
6165
| [show_fsxn_credentials](show_fsxn_credentials) | This shows the credentials that Workload Factory has stored for the specified FSx for ONTAP file system. |
6266
| [snapmirror_break](snapmirror_break) | This breaks the SnapMirror relationship for the specified relationship. |
6367
| [snapmirror_create](snapmirror_create) | This creates a SnapMirror relationship between the specified source volume and destination SVM. |
@@ -67,6 +71,8 @@ If you do create a new script, please consider contributing it back to this repo
6771
| [snapmirror_update](snapmirror_update) | This updates the SnapMirror relationship for the specified relationship. |
6872
| [snapshot_create](snapshot_create) | This creates a snapshot of the specified volume. |
6973
| [volume_clone](volume_clone) | This clones the specified volume. |
74+
| [volume_cifs_share_create](volume_cifs_share_create) | This will create a CIFS share in a volume. |
75+
| [volume_cifs_share_delete](volume_cifs_share_delete) | This will delete a CIFS share from a volume. |
7076
| [volume_delete](volume_delete) | This deletes the specified volume. |
7177
| [wf_utils](wf_utils) | This file contains common functions used by all the scripts. It includes the `get_token()` function that retrieves an access token from the Workload Factory API. |
7278

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# The username field is optional and defaults to fsxadmin if not present.
77
#
88
################################################################################
9-
# Display usage information then exists the script.
9+
# Display usage information then exits the script.
1010
################################################################################
1111
usage () {
1212
cat 1>&2 <<EOF
@@ -100,7 +100,7 @@ required_options["REFRESH_TOKEN"]='Error: A BlueXP refresh token is required to
100100
required_options["BLUEXP_ACCOUNT_ID"]='Error: A BlueXP account ID is required to run this script.
101101
You can get the list of accounts you have access to by running the "list_bluexp_accts" script
102102
found in this GitHub repository: https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/Management-Utilities/Workload-Factory-API-Samples\n\n'
103-
required_options["CREDENTIALS_ID"]='Error: The ID of the credentials to delete is required.
103+
required_options["CREDENTIALS_ID"]='Error: The Workload Factory credentials ID used to list resources is required to run this script.
104104
You can get a list of credentials by running the "list_credentials" script
105105
found in this GitHub repository: https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/Management-Utilities/Workload-Factory-API-Samples\n\n'
106106
required_options["AWS_REGION"]='Error: The AWS region where the file system is located is required.\n\n'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This script adds an organization to a BlueXP account.
44
#
55
################################################################################
6-
# Display usage information then exists the script.
6+
# Display usage information then exits the script.
77
################################################################################
88
usage () {
99
cat 1>&2 <<EOF

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This script deletes an organization from a BlueXP account.
44
#
55
################################################################################
6-
# Display usage information then exists the script.
6+
# Display usage information then exits the script.
77
################################################################################
88
usage () {
99
cat 1>&2 <<EOF
@@ -79,7 +79,6 @@ if [ -z "$token" ]; then
7979
exit 1
8080
fi
8181
#
82-
# Add the organization to the BlueXP workspace.
8382
echo -n "Deleting organization ${ORGANIZATION_ID}..."
8483
run_curl "DELETE" "$token" "https://api.bluexp.netapp.com/v1/management/organizations/$ORGANIZATION_ID" $tmpout $tmperr
8584
echo "Done."

0 commit comments

Comments
 (0)