Skip to content

Commit 52947e5

Browse files
committed
remove redundant parts
1 parent 6d067fd commit 52947e5

File tree

1 file changed

+3
-40
lines changed

1 file changed

+3
-40
lines changed

.dagger/src/localstack/main.py

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,7 @@ def start(
2626
docker_sock: Annotated[Optional[dagger.Socket], Doc("Docker socket for container interactions")] = None,
2727
image_name: Annotated[Optional[str], Doc("Custom LocalStack image name to use")] = None
2828
) -> dagger.Service:
29-
"""Start a LocalStack service with appropriate configuration.
30-
31-
If image_name is provided, starts that specific image.
32-
If auth_token is provided but no image_name, starts LocalStack Pro edition.
33-
Otherwise starts LocalStack Community edition.
34-
35-
Args:
36-
auth_token: Optional secret containing LocalStack Pro Auth Token
37-
configuration: Optional string of configuration variables in format "KEY1=value1,KEY2=value2"
38-
Example: "DEBUG=1,LS_LOG=trace"
39-
docker_sock: Optional Docker socket for container interactions
40-
image_name: Optional custom LocalStack image name to use
41-
42-
Returns:
43-
A running LocalStack service container
44-
"""
29+
"""Start a LocalStack service with appropriate configuration."""
4530
# Determine image based on parameters
4631
if image_name:
4732
image = image_name
@@ -88,17 +73,7 @@ async def state(
8873
endpoint: Annotated[Optional[str], Doc("LocalStack endpoint (defaults to host.docker.internal:4566)")] = None,
8974
reset: Annotated[bool, Doc("Reset the LocalStack state")] = False
9075
) -> str:
91-
"""Load, save, or reset LocalStack state.
92-
93-
Args:
94-
auth_token: Secret containing LocalStack Auth Token (required for save/load)
95-
load: Name of the Cloud Pod to load
96-
save: Name of the Cloud Pod to save
97-
reset: Reset the LocalStack state
98-
endpoint: LocalStack endpoint to use (optional, defaults to host.docker.internal:4566)
99-
Returns:
100-
Output from the pod operation or error message if LocalStack is not running
101-
"""
76+
"""Load, save, or reset LocalStack state."""
10277
# Base URL for LocalStack API
10378
localstack_url = endpoint or "http://host.docker.internal:4566"
10479

@@ -173,19 +148,7 @@ async def ephemeral(
173148
auto_load_pod: Annotated[Optional[str], Doc("Auto load pod configuration")] = None,
174149
extension_auto_install: Annotated[Optional[str], Doc("Extension auto install configuration")] = None
175150
) -> str:
176-
"""Manage ephemeral LocalStack instances in the cloud.
177-
178-
Args:
179-
auth_token: LocalStack Auth Token (required)
180-
operation: Operation to perform (create, list, delete, logs)
181-
name: Name of the ephemeral instance (required for create, delete, logs)
182-
lifetime: Lifetime of the instance in minutes (optional, default: 60)
183-
auto_load_pod: Auto load pod configuration (optional)
184-
extension_auto_install: Extension auto install configuration (optional)
185-
186-
Returns:
187-
Response from the API operation
188-
"""
151+
"""Manage ephemeral LocalStack instances in the cloud."""
189152
if not auth_token:
190153
return "Error: auth_token is required for ephemeral instance operations"
191154

0 commit comments

Comments
 (0)