Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a26cb76
Added a PowerShell version of the WarmPerformnaceTier script.
kcantrel Sep 17, 2026
12f9814
Added a PowerShell version of the WarmPerformnaceTier script.
kcantrel Sep 18, 2026
0d7f0b2
Merge branch 'main' into update_terraform_checks
kcantrel Sep 18, 2026
6bef5d1
Ensure valid parameters were provided.
kcantrel Sep 22, 2026
587cfb8
Change it so it would stream the file objects to loop that processes …
kcantrel Sep 22, 2026
b4bfb51
Made it clearer.
kcantrel Sep 22, 2026
10f7641
Added multi-threading for the -a option.
kcantrel Sep 22, 2026
eb44b89
Adding a PowerShell version of the warm_performance_tier script.
kcantrel Sep 22, 2026
1206f98
Added the "set_fsxn_password" script.
kcantrel Sep 29, 2026
17138c4
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 3, 2026
f3dfe6e
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 3, 2026
6e1e8a9
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 3, 2026
10332fd
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 3, 2026
44c481d
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 3, 2026
883b54b
Added support for a space in the CIFS share name or path.
kcantrel Oct 6, 2026
9e881de
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 6, 2026
9189fdd
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 6, 2026
c6bbf5f
Fixed a typo
kcantrel Oct 7, 2026
e585821
Added a set fsxn password script.
kcantrel Oct 7, 2026
823cab4
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 7, 2026
5ea1475
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 7, 2026
97bbb7a
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 7, 2026
09f6e6c
Apply automatic changes
kcantrel Oct 7, 2026
9ba1175
Updated it to check the destinatio file system to see if the relation…
kcantrel Oct 7, 2026
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
Comment thread
kcantrel marked this conversation as resolved.
# Copyright (c) NetApp, Inc.
# SPDX-License-Identifier: Apache-2.0

name: "Update Cloudformation Template"

on:
pull_request:
paths:
- 'Management-Utilities/auto_create_sm_relationships/auto_create_sm_relationships.py'
push:
paths:
- 'Management-Utilities/auto_create_sm_relationships/auto_create_sm_relationships.py'
branches:
- main

jobs:
update-Cloudformation-Template:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit

- name: Checkout pull request
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Update the Cloudformation Template
shell: bash
working-directory: Management-Utilities/auto_create_sm_relationships
run: ./updateCFTemplate

- name: Commit the changes
uses: step-security/git-auto-commit-action@905c3cd6e9ed2b67b4d46ff401fdb6d745d0ff9d # v7.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ required_options["CIFS_SHARE_NAME"]='Error: The name of the cifs share is requir

check_required_options
#
# Check that the CIFS_SHARE_NAME only contains allowed characters (alphanumeric, underscores and dashes).
if [[ ! "$CIFS_SHARE_NAME" =~ ^[a-zA-Z0-9_-]+$ ]]; then
# Check that the CIFS_SHARE_NAME only contains allowed characters (alphanumeric, underscores, spaces and dashes).
if [[ ! "$CIFS_SHARE_NAME" =~ ^[[:alnum:]_[:space:]-]+$ ]]; then
Comment thread
kcantrel marked this conversation as resolved.
echo "Error: The CIFS share name can only contain alphanumeric characters, underscores and dashes." >&2
exit 1
fi
Expand All @@ -135,7 +135,7 @@ fi
# Get the existing shares and the junction path
run_curl GET "$token" "https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/fsx/v2/credentials/${CREDENTIALS_ID}/regions/${AWS_REGION}/file-systems/${FILESYSTEM_ID}/volumes/${VOLUME_ID}?include=cifsShares" $tmpout $tmperr
cifsShares=$(jq -r '.cifsShares' $tmpout)
alreadExist=$(echo "$cifsShares" | jq -r 'map(select(.name == "'$CIFS_SHARE_NAME'")) | length')
alreadExist=$(echo "$cifsShares" | jq -r --arg shareName "$CIFS_SHARE_NAME" 'map(select(.name == $shareName)) | length')
if [ "$alreadExist" -gt 0 ]; then
echo "A share with the name '$CIFS_SHARE_NAME' already exists. No changes will be made." >&2
exit 1
Expand All @@ -159,6 +159,6 @@ newShare='{"name":"'$CIFS_SHARE_NAME'","path":"'$SHARE_PATH'","acls":[{"userOrGr
echo "Creating share named '$CIFS_SHARE_NAME' with path '$SHARE_PATH'."
#
# Add the new share to the existing ones.
cifsShares=$(echo "$cifsShares" | jq -r '. += ['$newShare']')
cifsShares=$(echo "$cifsShares" | jq -r --argjson newShare "$newShare" '. += [$newShare]')
cifsShares="{\"cifsShares\": $cifsShares}"
run_curl PATCH "$token" "https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/fsx/v2/credentials/${CREDENTIALS_ID}/regions/${AWS_REGION}/file-systems/${FILESYSTEM_ID}/volumes/${VOLUME_ID}" $tmpout $tmperr "$cifsShares"
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ run_curl GET "$token" "https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUN
cifsShares=$(jq -r '.cifsShares' $tmpout)
#
# Remove the specified share from the existing ones.
cifsShares=$(echo "$cifsShares" | jq -r 'map(select(.name != "'$CIFS_SHARE_NAME'"))')
cifsShares=$(echo "$cifsShares" | jq -r --arg shareName "$CIFS_SHARE_NAME" 'map(select(.name != $shareName))')
cifsShares="{\"cifsShares\": $cifsShares}"
run_curl PATCH "$token" "https://api.workloads.netapp.com/accounts/${BLUEXP_ACCOUNT_ID}/fsx/v2/credentials/${CREDENTIALS_ID}/regions/${AWS_REGION}/file-systems/${FILESYSTEM_ID}/volumes/${VOLUME_ID}" $tmpout $tmperr "$cifsShares"
260 changes: 196 additions & 64 deletions Management-Utilities/auto_create_sm_relationships/README.md

Large diffs are not rendered by default.

Loading
Loading