Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR expands the repository’s Workload Factory API sample scripts and slightly extends the FSx for ONTAP AWS CLI filesystem creation helper to support additional request options.
Changes:
- Add new Workload Factory “builders” API samples for EDA project configuration, CI/CD projects, and CI/CD clones.
- Update multiple existing Workload Factory scripts’ required-parameter messaging for
CREDENTIALS_ID. - Extend
create_fsxn_filesystemto accept an alternate AWS endpoint URL and attempt to support updating route tables during FSx for ONTAP filesystem creation.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 35 comments.
Show a summary per file
| File | Description |
|---|---|
| Management-Utilities/fsx-ontap-aws-cli-scripts/create_fsxn_filesystem | Adds -route-tables and -endpoint_url support to FSxN filesystem creation/wait flow. |
| Management-Utilities/Workload-Factory-API-Samples/volume_delete | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/volume_clone | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/snapshot_create | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/list_volumes | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/list_svms | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/list_snapmirrors | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/list_filesystems | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/link_disassociate | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/link_associate | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/fsxn_credentials_set | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/bluexp_fsxn_discovery | Updates CREDENTIALS_ID required-option error messaging. |
| Management-Utilities/Workload-Factory-API-Samples/list_eda_project_config | New script to list EDA project config (“configure”) builder data. |
| Management-Utilities/Workload-Factory-API-Samples/list_cicd_projects | New script to list EDA CI/CD projects (builders API). |
| Management-Utilities/Workload-Factory-API-Samples/list_cicd_clones | New script to list clones for a given CI/CD project (builders API). |
| Management-Utilities/Workload-Factory-API-Samples/eda_project_config_delete | New script to delete EDA project config (builders API). |
| Management-Utilities/Workload-Factory-API-Samples/eda_project_config_create | New script to create EDA project config (builders API). |
| Management-Utilities/Workload-Factory-API-Samples/cicd_project_delete | New script to delete a CI/CD project (builders API). |
| Management-Utilities/Workload-Factory-API-Samples/cicd_project_create | New script to create a CI/CD project (builders API). |
| Management-Utilities/Workload-Factory-API-Samples/cicd_clones_delete | New script to delete a CI/CD clone (builders API). |
| Management-Utilities/Workload-Factory-API-Samples/cicd_clones_create | New script to create a CI/CD clone (builders API). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| You can get the list of accounts you have access to by running the "list_bluexp_accts" script | ||
| found in this GitHub repository: https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/Management-Utilities/Workload-Factory-API-Samples\n\n' | ||
| required_options["CREDENTIALS_ID"]='Error: The ID of the credentials to delete is required. | ||
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to manage resources is required to run this script. |
There was a problem hiding this comment.
Typo in the error message: “Workload Facotry” should be “Workload Factory”.
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to manage resources is required to run this script. | |
| required_options["CREDENTIALS_ID"]='Error: The Workload Factory credentials ID used to manage resources is required to run this script. |
| You can get the list of accounts you have access to by running the "list_bluexp_accts" script | ||
| found in this GitHub repository: https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/Management-Utilities/Workload-Factory-API-Samples\n\n' | ||
| required_options["CREDENTIALS_ID"]='Error: The ID of the credentials to delete is required. | ||
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to list resources is required to run this script. |
There was a problem hiding this comment.
Typo in the error message: “Workload Facotry” should be “Workload Factory”.
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to list resources is required to run this script. | |
| required_options["CREDENTIALS_ID"]='Error: The Workload Factory credentials ID used to list resources is required to run this script. |
| You can get the list of accounts you have access to by running the "list_bluexp_accts" script | ||
| found in this GitHub repository: https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/Management-Utilities/Workload-Factory-API-Samples\n\n' | ||
| required_options["CREDENTIALS_ID"]='Error: The ID of the credentials to delete is required. | ||
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to manage resources is required to run this script. |
There was a problem hiding this comment.
Typo in the error message: “Workload Facotry” should be “Workload Factory”.
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to manage resources is required to run this script. | |
| required_options["CREDENTIALS_ID"]='Error: The Workload Factory credentials ID used to manage resources is required to run this script. |
| # This script is used to list all the EDA CI/CD projects user has access to. | ||
| # |
There was a problem hiding this comment.
The header comment says this script lists “EDA CI/CD projects”, but the implementation calls /projects/${PROJECT_ID}/operations/clones and formats clone fields. Update the description to reflect that this script lists clones for a specific project.
| echo "exit code=$?" | ||
| echo "output" | ||
| cat $tmpout | ||
| echo "error" | ||
| cat $tmperr |
There was a problem hiding this comment.
The post-request logging here is misleading/noisy: run_curl exits on non-2xx responses, so echo "exit code=$?" will always be 0 on success, and tmperr will typically be empty. Consider replacing this with a simple success message and (optionally) a -j flag to print the raw JSON response when desired.
| You can get a list of credentials by running the "list_credentials" script | ||
| found in this GitHub repository: https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/Management-Utilities/Workload-Factory-API-Samples\n\n' | ||
| required_options["projectId"]='Error: The ID of the project to delete is required. | ||
| You can get a list of projects by running the "list_cicd_project" script |
There was a problem hiding this comment.
The required-parameter help text references a non-existent script name: it says to run "list_cicd_project", but the repository contains "list_cicd_projects". Update the message to point users to the correct script.
| You can get a list of projects by running the "list_cicd_project" script | |
| You can get a list of projects by running the "list_cicd_projects" script |
| -security-group-id|--security-group-id) securityGroupOption="--security-group-ids $2" | ||
| shift | ||
| ;; | ||
| -route-tables|--route-tables) routeTables='"RouteTableIds":"'$2'",' |
There was a problem hiding this comment.
The -route-tables option builds RouteTableIds as a single comma-separated string (e.g., "rtb-1,rtb-2") and injects it into the ONTAP configuration JSON. The FSx API expects RouteTableIds to be a JSON array of strings, so this will produce a request payload that the API is unlikely to accept. Convert the comma-separated input into a JSON array (or build the entire --ontap-configuration with jq to avoid manual JSON string assembly).
| -route-tables|--route-tables) routeTables='"RouteTableIds":"'$2'",' | |
| -route-tables|--route-tables) | |
| IFS=',' read -r -a routeTableIds <<< "$2" | |
| routeTables='"RouteTableIds":[' | |
| firstRouteTable=true | |
| for routeTableId in "${routeTableIds[@]}"; do | |
| routeTableId="${routeTableId#"${routeTableId%%[![:space:]]*}"}" | |
| routeTableId="${routeTableId%"${routeTableId##*[![:space:]]}"}" | |
| [ -z "$routeTableId" ] && continue | |
| if [ "$firstRouteTable" = true ]; then | |
| firstRouteTable=false | |
| else | |
| routeTables="$routeTables," | |
| fi | |
| routeTables="$routeTables\"$routeTableId\"" | |
| done | |
| routeTables="$routeTables]," |
| required_options["BLUEXP_ACCOUNT_ID"]='Error: A BlueXP account ID is required to run this script. | ||
| You can get the list of accounts you have access to by running the "list_bluexp_accts" script | ||
| found in this GitHub repository: https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/Management-Utilities/Workload-Factory-API-Samples\n\n' | ||
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to manage resources is required to run this script. |
There was a problem hiding this comment.
Typo in the error message: “Workload Facotry” should be “Workload Factory”.
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to manage resources is required to run this script. | |
| required_options["CREDENTIALS_ID"]='Error: The Workload Factory credentials ID used to manage resources is required to run this script. |
| required_options["CREDENTIALS_ID"]='Error: The Workload Facotry credentials ID used to manage resources is required to run this script. | ||
| You can get a list of credentials by running the "list_credentials" script | ||
| found in this GitHub repository: https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/Management-Utilities/Workload-Factory-API-Samples\n\n' |
There was a problem hiding this comment.
CREDENTIALS_ID is required/accepted but never used in the DELETE request (URL is /builders/v1/configure with no credentials component and no headers/body use it). Either remove -c/CREDENTIALS_ID from this script’s interface, or use it explicitly in the request if the API requires it.
| credentials you have access to. | ||
| -g tag1[,tag2,...] - is a comma separated list of tags to use in the filter. | ||
| -y single|multiselect,single|multiselect,... - is a comma separated list of filter types | ||
| corresponding to the tags specified with the -a option. |
There was a problem hiding this comment.
In the usage text for -y, it says the filter types correspond to tags specified with the -a option, but tags are provided via -g. This is likely to confuse users; update the usage description to reference -g instead of -a.
| corresponding to the tags specified with the -a option. | |
| corresponding to the tags specified with the -g option. |
…ct so the user didn't have to prvoide it; Created a new list_snapshots script so a user can easily get the snapshots; Updated list_cicd_project to list the volume_ID associated with the volume so it can be used with 'list_snapshots'.
…ct so the user didn't have to prvoide it; Created a new list_snapshots script so a user can easily get the snapshots; Updated list_cicd_project to list the volume_ID associated with the volume so it can be used with 'list_snapshots'.
No description provided.