Skip to content

Commit 67b1276

Browse files
extra spaces removed
1 parent dbc9663 commit 67b1276

26 files changed

+998
-1048
lines changed

examples/agent.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ def main():
3636
address = os.environ.get("TFE_ADDRESS", "https://app.terraform.io")
3737

3838
if not token:
39-
print(" TFE_TOKEN environment variable is required")
39+
print("TFE_TOKEN environment variable is required")
4040
return 1
4141

4242
if not org:
43-
print(" TFE_ORG environment variable is required")
43+
print("TFE_ORG environment variable is required")
4444
return 1
4545

4646
# Create TFE client
@@ -58,7 +58,7 @@ def main():
5858
# Convert to list to check if empty and get count
5959
pool_list = list(agent_pools)
6060
if not pool_list:
61-
print(" No agent pools found. Create an agent pool first.")
61+
print("No agent pools found. Create an agent pool first.")
6262
return 1
6363

6464
print(f"Found {len(pool_list)} agent pools:")
@@ -81,27 +81,27 @@ def main():
8181
if agent_list:
8282
total_agents += len(agent_list)
8383
for agent in agent_list:
84-
print(f" - Agent {agent.id}")
85-
print(f" Name: {agent.name or 'Unnamed'}")
86-
print(f" Status: {agent.status}")
87-
print(f" Version: {agent.version or 'Unknown'}")
88-
print(f" IP: {agent.ip_address or 'Unknown'}")
89-
print(f" Last Ping: {agent.last_ping_at or 'Never'}")
84+
print(f"Agent {agent.id}")
85+
print(f"Name: {agent.name or 'Unnamed'}")
86+
print(f"Status: {agent.status}")
87+
print(f"Version: {agent.version or 'Unknown'}")
88+
print(f"IP: {agent.ip_address or 'Unknown'}")
89+
print(f"Last Ping: {agent.last_ping_at or 'Never'}")
9090

9191
# Example 3: Read detailed agent information
9292
try:
9393
agent_details = client.agents.read(agent.id)
94-
print(" Agent details retrieved successfully")
95-
print(f" Full name: {agent_details.name or 'Unnamed'}")
96-
print(f" Current status: {agent_details.status}")
94+
print("Agent details retrieved successfully")
95+
print(f"Full name: {agent_details.name or 'Unnamed'}")
96+
print(f"Current status: {agent_details.status}")
9797
except NotFound:
98-
print(" Agent details not accessible")
98+
print("Agent details not accessible")
9999
except Exception as e:
100-
print(f" Error reading agent details: {e}")
100+
print(f"Error reading agent details: {e}")
101101

102102
print("")
103103
else:
104-
print(" No agents found in this pool")
104+
print("No agents found in this pool")
105105

106106
if total_agents == 0:
107107
print("\n No agents found in any pools.")

examples/agent_pool.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ def main():
3939
address = os.environ.get("TFE_ADDRESS", "https://app.terraform.io")
4040

4141
if not token:
42-
print(" TFE_TOKEN environment variable is required")
42+
print("TFE_TOKEN environment variable is required")
4343
return 1
4444

4545
if not org:
46-
print(" TFE_ORG environment variable is required")
46+
print("TFE_ORG environment variable is required")
4747
return 1
4848

4949
# Create TFE client
@@ -81,10 +81,10 @@ def main():
8181
# Example 3: Read the agent pool
8282
print("\n Reading agent pool details...")
8383
pool_details = client.agent_pools.read(new_pool.id)
84-
print(f" Name: {pool_details.name}")
85-
print(f" Organization Scoped: {pool_details.organization_scoped}")
86-
print(f" Policy: {pool_details.allowed_workspace_policy}")
87-
print(f" Agent Count: {pool_details.agent_count}")
84+
print(f"Name: {pool_details.name}")
85+
print(f"Organization Scoped: {pool_details.organization_scoped}")
86+
print(f"Policy: {pool_details.allowed_workspace_policy}")
87+
print(f"Agent Count: {pool_details.agent_count}")
8888

8989
# Example 4: Update the agent pool
9090
print("\n Updating agent pool...")
@@ -118,7 +118,7 @@ def main():
118118
print(f" - {token.description or 'No description'} (ID: {token.id})")
119119

120120
# Example 7: Clean up - delete the token and pool
121-
print("\n🧹 Cleaning up...")
121+
print("\n Cleaning up...")
122122
client.agent_tokens.delete(agent_token.id)
123123
print("Deleted agent token")
124124

examples/apply.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def main():
3939

4040
# Display timestamp details if available
4141
if apply.status_timestamps:
42-
print(f" Queued At: {apply.status_timestamps.queued_at}")
43-
print(f" Started At: {apply.status_timestamps.started_at}")
44-
print(f" Finished At: {apply.status_timestamps.finished_at}")
42+
print(f"Queued At: {apply.status_timestamps.queued_at}")
43+
print(f"Started At: {apply.status_timestamps.started_at}")
44+
print(f"Finished At: {apply.status_timestamps.finished_at}")
4545
except Exception as e:
4646
print(f"Error reading apply: {e}")
4747
return 1

0 commit comments

Comments
 (0)