Skip to content

Commit 43eb92d

Browse files
committed
changes on documentation in markdown files
1 parent 089ca6c commit 43eb92d

20 files changed

Lines changed: 219 additions & 219 deletions

.github/copilot-instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ convention:
3636
- Python >= 3.11; use modern syntax (PEP 604 unions, f-strings, `match` where appropriate).
3737
- Linter: `ruff` (line length 99, target py311). Run `ruff check python/`.
3838
- All new Python code should have type hints.
39-
- Never hardcode credentials use env vars, Ansible Vault, or Terraform `sensitive`.
39+
- Never hardcode credentials - use env vars, Ansible Vault, or Terraform `sensitive`.
4040
- Ansible playbooks use `netapp.ontap` FQCNs with `use_rest: always`.
4141
- Terraform modules use the `NetApp/netapp-ontap` provider `~> 2.5`.
4242
- Every generated source file (`.py`, `.yml`, `.tf`, `.sh`, `.html`) MUST start
@@ -59,17 +59,17 @@ Exempt files: Markdown, `requirements.*`, `ansible/inventory/*`,
5959

6060
## ONTAP API rules
6161

62-
- Use ONLY ONTAP REST APIs no ZAPI, no CLI passthrough, no SSH.
62+
- Use ONLY ONTAP REST APIs - no ZAPI, no CLI passthrough, no SSH.
6363
- Target ONTAP 9.8+ REST endpoints.
6464
- See `docs/ontap-api-patterns.md` for endpoints, auth, async job handling.
6565

6666
## Python conventions
6767

68-
- Import and use `python/ontap_client.py` never build a new HTTP client.
68+
- Import and use `python/ontap_client.py` - never build a new HTTP client.
6969
- Authenticate via `OntapClient.from_env()` (reads `ONTAP_HOST`, `ONTAP_PASS`).
7070
- Operational params via `argparse` with env-var fallbacks.
7171
- Async jobs: `client.poll_job(resp["job"]["uuid"])`.
72-
- Logging via `logging` module never `print()`.
72+
- Logging via `logging` module - never `print()`.
7373

7474
## Ansible conventions
7575

.github/prompts/generate-ansible.prompt.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ collection, which calls exclusively REST APIs.
1616

1717
Use these repository files as the authoritative source for conventions:
1818

19-
- [ansible/nfs_provision.yml](../../ansible/nfs_provision.yml) NFS reference implementation
20-
- [ansible/cifs_provision.yml](../../ansible/cifs_provision.yml) CIFS reference implementation
21-
- [ansible/group_vars/ontap.yml.example](../../ansible/group_vars/ontap.yml.example) variable defaults
22-
- [ansible/inventory/hosts.yml](../../ansible/inventory/hosts.yml) inventory structure
23-
- [ansible/requirements.yml](../../ansible/requirements.yml) collection version pin
24-
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) API endpoints, auth, async jobs
25-
- [docs/example-template/ansible/example.yml](../../docs/example-template/ansible/example.yml) skeleton
26-
- [CONTRIBUTING.md](../../CONTRIBUTING.md) naming, CI, quality bar
19+
- [ansible/nfs_provision.yml](../../ansible/nfs_provision.yml) - NFS reference implementation
20+
- [ansible/cifs_provision.yml](../../ansible/cifs_provision.yml) - CIFS reference implementation
21+
- [ansible/group_vars/ontap.yml.example](../../ansible/group_vars/ontap.yml.example) - variable defaults
22+
- [ansible/inventory/hosts.yml](../../ansible/inventory/hosts.yml) - inventory structure
23+
- [ansible/requirements.yml](../../ansible/requirements.yml) - collection version pin
24+
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) - API endpoints, auth, async jobs
25+
- [docs/example-template/ansible/example.yml](../../docs/example-template/ansible/example.yml) - skeleton
26+
- [CONTRIBUTING.md](../../CONTRIBUTING.md) - naming, CI, quality bar
2727

28-
## Step 1 Clarify Inputs
28+
## Step 1 - Clarify Inputs
2929

3030
Before writing YAML, identify what information is missing and ask me.
3131
Common inputs: SVM name, volume name/size, aggregate, protocol details,
3232
cluster hostname, special options (snapshot policy, QoS, junction path).
3333

34-
## Step 2 API Sequence
34+
## Step 2 - API Sequence
3535

3636
Even though Ansible modules abstract the API, list the underlying REST calls
3737
and map each to its `netapp.ontap` module:
@@ -40,22 +40,22 @@ and map each to its `netapp.ontap` module:
4040
|---|---------------|--------|----------------|-----|
4141

4242
Rules:
43-
- REST only `use_rest: always` on every ONTAP module.
43+
- REST only - `use_rest: always` on every ONTAP module.
4444
- Target ONTAP 9.8+.
4545
- Fully-qualified collection names: `netapp.ontap.na_ontap_*`.
4646
- Collection version: `netapp.ontap >= 22.12.0`.
4747

4848
Wait for my confirmation before generating the playbook.
4949

50-
## Step 3 Generate Playbook
50+
## Step 3 - Generate Playbook
5151

5252
File: `ansible/<use_case>.yml` (snake_case filename)
5353

5454
### Mandatory conventions
5555

5656
```yaml
5757
---
58-
# <use_case>.yml Brief description.
58+
# <use_case>.yml - Brief description.
5959
#
6060
# Usage:
6161
# ansible-playbook -i inventory/hosts.yml <use_case>.yml
@@ -106,11 +106,11 @@ svm_name, volume_name, volume_size, volume_size_unit, aggregate_name,
106106
client_match (NFS), share_name (CIFS), etc.
107107
```
108108

109-
## Step 4 Validate
109+
## Step 4 - Validate
110110

111111
After the playbook, provide:
112112
1. Exact `ansible-playbook` command to run it.
113-
2. Idempotency behavior what happens on re-run for each task.
113+
2. Idempotency behavior - what happens on re-run for each task.
114114
3. Teardown playbook or reversal instructions.
115115

116116
## Copyright header (required)
@@ -128,4 +128,4 @@ See the NOTICE file in the repo root for trademark and attribution details.
128128

129129
Place after any shebang (`#!/usr/bin/env python3`), YAML directive (`---`),
130130
or `<!DOCTYPE html>` line. Do **not** duplicate the full trademark text in
131-
source files it lives in [NOTICE](../../NOTICE) and the LICENSE appendix.
131+
source files - it lives in [NOTICE](../../NOTICE) and the LICENSE appendix.

.github/prompts/generate-python.prompt.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,34 @@ The script automates a NetApp ONTAP storage task using exclusively REST APIs.
1515

1616
Use these repository files as the authoritative source for conventions:
1717

18-
- [python/ontap_client.py](../../python/ontap_client.py) shared REST client (MUST import and use this)
19-
- [python/nfs_provision.py](../../python/nfs_provision.py) reference implementation pattern
20-
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) API endpoints, auth, async jobs
21-
- [docs/example-template/python/example.py](../../docs/example-template/python/example.py) skeleton to start from
22-
- [CONTRIBUTING.md](../../CONTRIBUTING.md) naming, CI, quality bar
18+
- [python/ontap_client.py](../../python/ontap_client.py) - shared REST client (MUST import and use this)
19+
- [python/nfs_provision.py](../../python/nfs_provision.py) - reference implementation pattern
20+
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) - API endpoints, auth, async jobs
21+
- [docs/example-template/python/example.py](../../docs/example-template/python/example.py) - skeleton to start from
22+
- [CONTRIBUTING.md](../../CONTRIBUTING.md) - naming, CI, quality bar
2323

24-
## Step 1 Clarify Inputs
24+
## Step 1 - Clarify Inputs
2525

2626
Before writing code, identify what information is missing and ask me.
2727
Common inputs: SVM name, volume name/size, aggregate, protocol details,
2828
cluster hostname, special options (snapshot policy, QoS, junction path).
2929

30-
## Step 2 API Sequence
30+
## Step 2 - API Sequence
3131

3232
List the ONTAP REST API calls in execution order:
3333

3434
| # | Method | Endpoint | Key Body/Query Params | Sync/Async | Why |
3535
|---|--------|----------|-----------------------|------------|-----|
3636

3737
Rules:
38-
- ONTAP REST only no ZAPI, no CLI passthrough, no SSH.
38+
- ONTAP REST only - no ZAPI, no CLI passthrough, no SSH.
3939
- Target ONTAP 9.8+ endpoints.
4040
- Full endpoint paths (e.g. `/api/storage/volumes`).
4141
- For async calls, include the poll step: `GET /api/cluster/jobs/{uuid}`.
4242

4343
Wait for my confirmation before generating code.
4444

45-
## Step 3 Generate Python Script
45+
## Step 3 - Generate Python Script
4646

4747
File: `python/<use_case>.py` (snake_case filename)
4848

@@ -72,7 +72,7 @@ File: `python/<use_case>.py` (snake_case filename)
7272
```
7373
- Async job polling: `client.poll_job(resp["job"]["uuid"])`
7474
- Logging: `logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)-8s %(message)s")`
75-
- `logger = logging.getLogger(__name__)` never use `print()`.
75+
- `logger = logging.getLogger(__name__)` - never use `print()`.
7676
- Entry point:
7777
```python
7878
if __name__ == "__main__":
@@ -86,7 +86,7 @@ File: `python/<use_case>.py` (snake_case filename)
8686
```
8787
- Type hints on all functions. No hardcoded credentials.
8888

89-
## Step 4 Validate
89+
## Step 4 - Validate
9090

9191
After the code, provide:
9292
1. Exact shell commands to run the script.
@@ -108,4 +108,4 @@ See the NOTICE file in the repo root for trademark and attribution details.
108108

109109
Place after any shebang (`#!/usr/bin/env python3`), YAML directive (`---`),
110110
or `<!DOCTYPE html>` line. Do **not** duplicate the full trademark text in
111-
source files it lives in [NOTICE](../../NOTICE) and the LICENSE appendix.
111+
source files - it lives in [NOTICE](../../NOTICE) and the LICENSE appendix.

.github/prompts/generate-terraform.prompt.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ provider, which calls exclusively REST APIs.
1616

1717
Use these repository files as the authoritative source for conventions:
1818

19-
- [terraform/nfs-provision/main.tf](../../terraform/nfs-provision/main.tf) reference implementation
20-
- [terraform/nfs-provision/variables.tf](../../terraform/nfs-provision/variables.tf) variable patterns
21-
- [terraform/nfs-provision/outputs.tf](../../terraform/nfs-provision/outputs.tf) output patterns
22-
- [terraform/nfs-provision/terraform.tfvars.example](../../terraform/nfs-provision/terraform.tfvars.example) tfvars template
23-
- [docs/example-template/terraform/](../../docs/example-template/terraform/) skeleton files
24-
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) API endpoints and conventions
25-
- [CONTRIBUTING.md](../../CONTRIBUTING.md) naming, CI, quality bar
19+
- [terraform/nfs-provision/main.tf](../../terraform/nfs-provision/main.tf) - reference implementation
20+
- [terraform/nfs-provision/variables.tf](../../terraform/nfs-provision/variables.tf) - variable patterns
21+
- [terraform/nfs-provision/outputs.tf](../../terraform/nfs-provision/outputs.tf) - output patterns
22+
- [terraform/nfs-provision/terraform.tfvars.example](../../terraform/nfs-provision/terraform.tfvars.example) - tfvars template
23+
- [docs/example-template/terraform/](../../docs/example-template/terraform/) - skeleton files
24+
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) - API endpoints and conventions
25+
- [CONTRIBUTING.md](../../CONTRIBUTING.md) - naming, CI, quality bar
2626

27-
## Step 1 Clarify Inputs
27+
## Step 1 - Clarify Inputs
2828

2929
Before writing HCL, identify what information is missing and ask me.
3030
Common inputs: SVM name, volume name/size, aggregate, protocol details,
3131
cluster hostname, special options (snapshot policy, QoS, junction path).
3232

33-
## Step 2 API Sequence & Resource Mapping
33+
## Step 2 - API Sequence & Resource Mapping
3434

3535
List the REST API calls the provider makes and map each to a Terraform
3636
resource or data source:
@@ -47,7 +47,7 @@ Rules:
4747

4848
Wait for my confirmation before generating HCL.
4949

50-
## Step 3 Generate Module
50+
## Step 3 - Generate Module
5151

5252
Directory: `terraform/<use-case>/` (kebab-case directory name)
5353

@@ -56,7 +56,7 @@ Create four files:
5656
### main.tf
5757

5858
```hcl
59-
# <use-case> Brief description.
59+
# <use-case> - Brief description.
6060
6161
terraform {
6262
required_version = ">= 1.4"
@@ -101,7 +101,7 @@ provider "netapp-ontap" {
101101

102102
- Placeholder values with comments. Never include real credentials.
103103

104-
## Step 4 Validate
104+
## Step 4 - Validate
105105

106106
After the module, provide:
107107
1. Exact commands: `terraform init`, `terraform plan`, `terraform apply`.
@@ -123,4 +123,4 @@ See the NOTICE file in the repo root for trademark and attribution details.
123123

124124
Place after any shebang (`#!/usr/bin/env python3`), YAML directive (`---`),
125125
or `<!DOCTYPE html>` line. Do **not** duplicate the full trademark text in
126-
source files it lives in [NOTICE](../../NOTICE) and the LICENSE appendix.
126+
source files - it lives in [NOTICE](../../NOTICE) and the LICENSE appendix.

.github/prompts/generate-workflow.prompt.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Generate a complete ONTAP workflow Python + Ansible + Terraform for a storage task"
2+
description: "Generate a complete ONTAP workflow - Python + Ansible + Terraform - for a storage task"
33
---
44

55
# Generate Complete ONTAP Workflow (All Three Tools)
@@ -14,16 +14,16 @@ implementations so users can compare side-by-side.
1414

1515
## Reference Files
1616

17-
- [python/ontap_client.py](../../python/ontap_client.py) shared Python REST client
18-
- [python/nfs_provision.py](../../python/nfs_provision.py) Python reference
19-
- [ansible/nfs_provision.yml](../../ansible/nfs_provision.yml) Ansible reference
20-
- [ansible/cifs_provision.yml](../../ansible/cifs_provision.yml) Ansible CIFS reference
21-
- [terraform/nfs-provision/](../../terraform/nfs-provision/) Terraform reference
22-
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) API endpoints, auth, async jobs
23-
- [docs/example-template/](../../docs/example-template/) skeleton files for all tools
24-
- [CONTRIBUTING.md](../../CONTRIBUTING.md) naming, CI, quality bar
17+
- [python/ontap_client.py](../../python/ontap_client.py) - shared Python REST client
18+
- [python/nfs_provision.py](../../python/nfs_provision.py) - Python reference
19+
- [ansible/nfs_provision.yml](../../ansible/nfs_provision.yml) - Ansible reference
20+
- [ansible/cifs_provision.yml](../../ansible/cifs_provision.yml) - Ansible CIFS reference
21+
- [terraform/nfs-provision/](../../terraform/nfs-provision/) - Terraform reference
22+
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) - API endpoints, auth, async jobs
23+
- [docs/example-template/](../../docs/example-template/) - skeleton files for all tools
24+
- [CONTRIBUTING.md](../../CONTRIBUTING.md) - naming, CI, quality bar
2525

26-
## Phase 1 Clarify Inputs
26+
## Phase 1 - Clarify Inputs
2727

2828
Before generating any code, ask me for anything missing:
2929
- SVM name, volume name/size, aggregate
@@ -32,7 +32,7 @@ Before generating any code, ask me for anything missing:
3232
- Authentication approach
3333
- Non-default options (snapshot policy, tiering, QoS, junction path)
3434

35-
## Phase 2 API Sequence
35+
## Phase 2 - API Sequence
3636

3737
Present a numbered list of ONTAP REST API calls in execution order.
3838
For each:
@@ -41,16 +41,16 @@ For each:
4141
|---|--------|----------|----------------|------------|-----|
4242

4343
Rules:
44-
- ONTAP REST only no ZAPI, no CLI passthrough, no SSH.
44+
- ONTAP REST only - no ZAPI, no CLI passthrough, no SSH.
4545
- Target ONTAP 9.8+ endpoints.
4646
- Full paths (e.g. `/api/storage/volumes`).
4747
- Include poll steps for async calls.
4848

4949
**Wait for my approval before Phase 3.**
5050

51-
## Phase 3 Generate All Three Implementations
51+
## Phase 3 - Generate All Three Implementations
5252

53-
### 3A. Python `python/<use_case>.py`
53+
### 3A. Python - `python/<use_case>.py`
5454

5555
- `#!/usr/bin/env python3`, `from __future__ import annotations`
5656
- Module docstring: steps, prerequisites, usage with CLI flags.
@@ -62,7 +62,7 @@ Rules:
6262
- `if __name__ == "__main__":` with try/except guard.
6363
- Type hints throughout. No hardcoded credentials.
6464

65-
### 3B. Ansible `ansible/<use_case>.yml`
65+
### 3B. Ansible - `ansible/<use_case>.yml`
6666

6767
- `---` header with filename, description, usage comment.
6868
- `hosts: ontap`, `gather_facts: false`, `connection: local`.
@@ -72,7 +72,7 @@ Rules:
7272
- `vars:` for operational defaults (overridable with `-e`).
7373
- Final `ansible.builtin.debug` summary. No hardcoded credentials.
7474

75-
### 3C. Terraform `terraform/<use-case>/`
75+
### 3C. Terraform - `terraform/<use-case>/`
7676

7777
- `main.tf`: `required_version >= 1.4`, provider `NetApp/netapp-ontap ~> 2.5`,
7878
`connection_profiles` with `cx_profile_name = "cluster1"`.
@@ -81,7 +81,7 @@ Rules:
8181
- `terraform.tfvars.example`: placeholder values, no real credentials.
8282
- `depends_on` where ordering matters.
8383

84-
## Phase 4 Validate
84+
## Phase 4 - Validate
8585

8686
For each implementation:
8787
1. Exact commands to run it.
@@ -103,4 +103,4 @@ See the NOTICE file in the repo root for trademark and attribution details.
103103

104104
Place after any shebang (`#!/usr/bin/env python3`), YAML directive (`---`),
105105
or `<!DOCTYPE html>` line. Do **not** duplicate the full trademark text in
106-
source files it lives in [NOTICE](../../NOTICE) and the LICENSE appendix.
106+
source files - it lives in [NOTICE](../../NOTICE) and the LICENSE appendix.

.github/prompts/plan-api-sequence.prompt.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ description: "Design the ONTAP REST API call sequence for a storage operation be
55
# Plan ONTAP REST API Sequence
66

77
You are an ONTAP REST API specialist. Design the exact sequence of API calls
8-
for a storage operation **no code yet**, just the API plan.
8+
for a storage operation - **no code yet**, just the API plan.
99

1010
## Task
1111

1212
{task description}
1313

1414
## Reference
1515

16-
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) endpoints, auth, query params, async jobs
16+
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) - endpoints, auth, query params, async jobs
1717
- ONTAP REST API docs: https://docs.netapp.com/us-en/ontap-restapi/swagger-ui/index.html
1818

1919
## Output Format
@@ -22,11 +22,11 @@ For each API call, fill in this table:
2222

2323
| # | Method | Endpoint | Key Body / Query Params | Sync/Async | Idempotent? | Why |
2424
|---|--------|----------|-------------------------|------------|-------------|-----|
25-
| 1 | GET | /api/svm/svms?name=vs0&fields=uuid | | Sync | Yes | Resolve SVM UUID |
25+
| 1 | GET | /api/svm/svms?name=vs0&fields=uuid | - | Sync | Yes | Resolve SVM UUID |
2626

2727
## Rules
2828

29-
1. **REST only** no ZAPI, no CLI passthrough, no SSH.
29+
1. **REST only** - no ZAPI, no CLI passthrough, no SSH.
3030
2. **ONTAP 9.8+** target minimum.
3131
3. Full endpoint paths (e.g. `/api/storage/volumes`, not just "volumes").
3232
4. For POST/PATCH returning a job, include the poll step:

.github/prompts/review-contribution.prompt.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ I provide and prepare it for a pull request.
1414

1515
## Reference Files
1616

17-
- [CONTRIBUTING.md](../../CONTRIBUTING.md) full contribution guide
18-
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) API conventions
19-
- [python/ontap_client.py](../../python/ontap_client.py) shared client
20-
- [python/nfs_provision.py](../../python/nfs_provision.py) Python reference
21-
- [ansible/nfs_provision.yml](../../ansible/nfs_provision.yml) Ansible reference
22-
- [terraform/nfs-provision/](../../terraform/nfs-provision/) Terraform reference
17+
- [CONTRIBUTING.md](../../CONTRIBUTING.md) - full contribution guide
18+
- [docs/ontap-api-patterns.md](../../docs/ontap-api-patterns.md) - API conventions
19+
- [python/ontap_client.py](../../python/ontap_client.py) - shared client
20+
- [python/nfs_provision.py](../../python/nfs_provision.py) - Python reference
21+
- [ansible/nfs_provision.yml](../../ansible/nfs_provision.yml) - Ansible reference
22+
- [terraform/nfs-provision/](../../terraform/nfs-provision/) - Terraform reference
2323

2424
## 1. Naming & File Structure
2525

@@ -74,9 +74,9 @@ I provide and prepare it for a pull request.
7474
## 4. Documentation Updates
7575

7676
Generate README update snippets for each tool's README:
77-
- `python/README.md` new section with description + run instructions
78-
- `ansible/README.md` new section with description + run instructions
79-
- `terraform/README.md` new section with description + run instructions
77+
- `python/README.md` - new section with description + run instructions
78+
- `ansible/README.md` - new section with description + run instructions
79+
- `terraform/README.md` - new section with description + run instructions
8080

8181
## 5. Commit Message
8282

0 commit comments

Comments
 (0)