xenfra-sdk 0.1.5__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/PKG-INFO +1 -1
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/pyproject.toml +1 -1
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/resources/deployments.py +9 -1
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/README.md +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/__init__.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/cli/__init__.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/cli/main.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/client.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/client_with_hooks.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/config.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/db/__init__.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/db/models.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/db/session.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/dependencies.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/dockerizer.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/engine.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/exceptions.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/mcp_client.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/models.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/patterns.json +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/privacy.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/recipes.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/resources/__init__.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/resources/base.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/resources/intelligence.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/resources/projects.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/security.py +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/templates/Dockerfile.j2 +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/templates/cloud-init.sh.j2 +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/templates/docker-compose.yml.j2 +0 -0
- {xenfra_sdk-0.1.5 → xenfra_sdk-0.1.6}/src/xenfra_sdk/utils.py +0 -0
|
@@ -149,8 +149,16 @@ class DeploymentsManager(BaseManager):
|
|
|
149
149
|
headers=headers,
|
|
150
150
|
timeout=600.0, # 10 minute timeout for deployments
|
|
151
151
|
) as response:
|
|
152
|
+
# Check status before consuming stream
|
|
152
153
|
if response.status_code not in [200, 201, 202]:
|
|
153
|
-
|
|
154
|
+
# For streaming responses, we can't access .text directly
|
|
155
|
+
# Read the error from the stream
|
|
156
|
+
error_lines = []
|
|
157
|
+
for line in response.iter_lines():
|
|
158
|
+
error_lines.append(line)
|
|
159
|
+
if len(error_lines) > 10: # Limit error message size
|
|
160
|
+
break
|
|
161
|
+
error_text = "\n".join(error_lines) if error_lines else "Unknown error"
|
|
154
162
|
raise XenfraAPIError(
|
|
155
163
|
status_code=response.status_code,
|
|
156
164
|
detail=f"Deployment failed: {error_text}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|