Read now works, and terraform directory contains example code
This commit is contained in:
1 parent
ef498e4a72
commit
a6f1019175
43 files changed
+4341
-38
No files matched your search
@@ -0,0 +1,13 @@
|
||||
"""Switch connection config, read from environment variables.
|
||||
|
||||
These three settings (host, https, password) are exactly what a future
|
||||
Terraform provider config block would need per-switch -- see AGENT.md.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
SWITCH_HOST = os.environ.get("SWITCH_HOST", "192.168.2.10")
|
||||
SWITCH_HTTPS = os.environ.get("SWITCH_HTTPS", "false").strip().lower() in ("1", "true", "yes")
|
||||
SWITCH_PASSWORD = os.environ.get("SWITCH_PASSWORD", "")
|
||||
|
||||
SWITCH_BASE_URL = f"{'https' if SWITCH_HTTPS else 'http'}://{SWITCH_HOST}"
|
||||
Reference in new issue
Block a user