cortexapps-cli 1.7.0__tar.gz → 1.9.0__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.
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/PKG-INFO +2 -2
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/backup.py +4 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/cortex_client.py +23 -2
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/pyproject.toml +2 -2
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/LICENSE +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/README.rst +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/cli.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/command_options.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/api_keys.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/audit_logs.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/backup_commands/cortex_export.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/catalog.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/custom_data.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/custom_events.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/custom_metrics.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/dependencies.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/deploys.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/discovery_audit.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/docs.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/entity_relationship_types.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/entity_relationships.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/entity_types.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/gitops_logs.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/groups.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/initiatives.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/aws.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/azure_devops.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/azure_resources.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/circleci.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/coralogix.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/datadog.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/github.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/gitlab.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/incidentio.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/launchdarkly.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/newrelic.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/pagerduty.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/prometheus.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/sonarqube.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/ip_allowlist.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/on_call.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/go.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/java.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/node.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/nuget.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/python.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/plugins.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/queries.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/rest.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/scim.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/scorecards.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/scorecards_commands/exemptions.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/secrets.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/teams.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/workflows.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/models/team.py +0 -0
- {cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cortexapps-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0
|
|
4
4
|
Summary: Command Line Interface for cortexapps
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -18,7 +18,7 @@ Requires-Dist: click (<8.2)
|
|
|
18
18
|
Requires-Dist: pyyaml (>=6.0.1,<7)
|
|
19
19
|
Requires-Dist: requests (>=2.32.4,<3.0.0)
|
|
20
20
|
Requires-Dist: typer (>=0.12.5,<0.13.0)
|
|
21
|
-
Requires-Dist: urllib3 (>=2.
|
|
21
|
+
Requires-Dist: urllib3 (>=2.6.0)
|
|
22
22
|
Project-URL: Bug Tracker, https://github.com/cortexapps/cli/issues
|
|
23
23
|
Project-URL: Changes, https://github.com/cortexapps/cli/blob/main/HISTORY.md
|
|
24
24
|
Project-URL: Documentation, https://github.com/cortexapps/cli/blob/main/README.rst
|
|
@@ -698,3 +698,7 @@ def import_tenant(
|
|
|
698
698
|
print(f"cortex scorecards create -f \"{file_path}\"")
|
|
699
699
|
elif import_type == "workflows":
|
|
700
700
|
print(f"cortex workflows create -f \"{file_path}\"")
|
|
701
|
+
|
|
702
|
+
# Exit with non-zero code if any imports failed
|
|
703
|
+
if total_failed > 0:
|
|
704
|
+
raise typer.Exit(1)
|
|
@@ -149,6 +149,23 @@ class CortexClient:
|
|
|
149
149
|
# try to parse the error message
|
|
150
150
|
error = response.json()
|
|
151
151
|
status = response.status_code
|
|
152
|
+
|
|
153
|
+
# Check for validation error format with violations array
|
|
154
|
+
if 'violations' in error and isinstance(error['violations'], list):
|
|
155
|
+
print(f'[red][bold]HTTP Error {status}[/bold][/red]: Validation failed')
|
|
156
|
+
for violation in error['violations']:
|
|
157
|
+
title = violation.get('title', 'Validation Error')
|
|
158
|
+
description = violation.get('description', 'No description')
|
|
159
|
+
violation_type = violation.get('violationType', '')
|
|
160
|
+
pointer = violation.get('pointer', '')
|
|
161
|
+
print(f' [yellow]{title}[/yellow]: {description}')
|
|
162
|
+
if pointer:
|
|
163
|
+
print(f' [dim]Location: {pointer}[/dim]')
|
|
164
|
+
if violation_type:
|
|
165
|
+
print(f' [dim]Type: {violation_type}[/dim]')
|
|
166
|
+
raise typer.Exit(code=1)
|
|
167
|
+
|
|
168
|
+
# Standard error format with message/details
|
|
152
169
|
message = error.get('message', 'Unknown error')
|
|
153
170
|
details = error.get('details', 'No details')
|
|
154
171
|
request_id = error.get('requestId', 'No request ID')
|
|
@@ -156,8 +173,12 @@ class CortexClient:
|
|
|
156
173
|
print(error_str)
|
|
157
174
|
raise typer.Exit(code=1)
|
|
158
175
|
except json.JSONDecodeError:
|
|
159
|
-
# if we can't parse the error message,
|
|
160
|
-
response.
|
|
176
|
+
# if we can't parse the error message, print a clean error and exit
|
|
177
|
+
status = response.status_code
|
|
178
|
+
reason = response.reason or 'Unknown error'
|
|
179
|
+
error_str = f'[red][bold]HTTP Error {status}[/bold][/red]: {reason}'
|
|
180
|
+
print(error_str)
|
|
181
|
+
raise typer.Exit(code=1)
|
|
161
182
|
|
|
162
183
|
if raw_response:
|
|
163
184
|
return response
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cortexapps-cli"
|
|
3
3
|
# version will be incremented via command line as part of github actions build
|
|
4
|
-
version = "1.
|
|
4
|
+
version = "1.9.0"
|
|
5
5
|
description = "Command Line Interface for cortexapps"
|
|
6
6
|
license = "MIT"
|
|
7
7
|
authors = [
|
|
@@ -19,7 +19,7 @@ classifiers = [
|
|
|
19
19
|
python = "^3.11"
|
|
20
20
|
requests = "^2.32.4"
|
|
21
21
|
pyyaml = ">= 6.0.1, < 7"
|
|
22
|
-
urllib3 = ">= 2.
|
|
22
|
+
urllib3 = ">= 2.6.0"
|
|
23
23
|
typer = "^0.12.5"
|
|
24
24
|
click = "<8.2"
|
|
25
25
|
|
|
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
|
{cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/entity_relationship_types.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/entity_relationships.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/integrations_commands/aws.py
RENAMED
|
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
|
{cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/go.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/java.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/node.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/nuget.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.7.0 → cortexapps_cli-1.9.0}/cortexapps_cli/commands/packages_commands/python.py
RENAMED
|
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
|