Skip to content

feat: honour ONTAP_TIMEOUT env var in OntapClient.from_env()#40

Open
algojogacor wants to merge 1 commit into
NetApp:mainfrom
algojogacor:feat/honour-ontap-timeout-env-var
Open

feat: honour ONTAP_TIMEOUT env var in OntapClient.from_env()#40
algojogacor wants to merge 1 commit into
NetApp:mainfrom
algojogacor:feat/honour-ontap-timeout-env-var

Conversation

@algojogacor
Copy link
Copy Markdown

Summary

Honour ONTAP_TIMEOUT environment variable in OntapClient.from_env(), allowing users to configure the request timeout without modifying code.

Changes

  • python/ontap_client.py: from_env() now reads optional ONTAP_TIMEOUT env var (defaults to 30s) and passes it as timeout= to the constructor. Docstring updated accordingly.
  • python/README.md: Added ONTAP_TIMEOUT documentation with usage examples for CI and slow clusters.

Testing

# With ONTAP_TIMEOUT set to 2s, connection to unreachable host fails fast
ONTAP_HOST=10.0.0.1 ONTAP_PASS=x ONTAP_TIMEOUT=2 python cluster_info.py
# ~2s timeout (was 30s)

# Without ONTAP_TIMEOUT, behavior is unchanged (30s default)
ONTAP_HOST=10.0.0.1 ONTAP_PASS=x python cluster_info.py
# ~30s timeout (unchanged)

Closes #35

Reads optional ONTAP_TIMEOUT environment variable (defaults to 30s)
and passes it as the timeout argument to the OntapClient constructor.

- Updated from_env() classmethod to read ONTAP_TIMEOUT
- Updated docstring to document the new env var
- Updated python/README.md with ONTAP_TIMEOUT usage examples

Closes NetApp#35
@algojogacor algojogacor requested a review from hvinn as a code owner May 15, 2026 15:06
@github-actions github-actions Bot added python Pull requests that update python code docs needs-test-report labels May 15, 2026
@github-actions
Copy link
Copy Markdown

Test Report missing or unfilled.

This PR touches python/, ansible/, or terraform/, so a populated Test Report section is required in the PR body. See TESTING.md for what to capture (environment, platform version, first-run output, idempotency check, teardown).

This is a soft gate - your CI checks are unaffected - but reviewers will not approve until the report is filled in.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your first PR to Pace — welcome aboard.

Quick orientation:

  1. CI runs in ~2 minutes. If anything fails, check the Actions tab — most failures have a one-line fix in docs/troubleshooting.md.
  2. If your PR touches python/, ansible/, or terraform/, you'll be asked for a Test Report. It's worth the effort — reviewers rely on it.
  3. Make sure the NetApp CCLA is on file before review.
  4. Stuck? Comment on this PR and a maintainer will jump in. We aim to respond as soon as possible.

For background, see CONTRIBUTING.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs needs-test-report python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[good-first-issue] Honour ONTAP_TIMEOUT env var in OntapClient.from_env()

1 participant