cortexapps-cli 1.0.4__tar.gz → 1.0.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.
Files changed (56) hide show
  1. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/PKG-INFO +4 -2
  2. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/cli.py +9 -8
  3. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/azure_devops.py +1 -1
  4. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/azure_resources.py +2 -2
  5. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/circleci.py +1 -1
  6. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/coralogix.py +1 -1
  7. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/datadog.py +1 -1
  8. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/gitlab.py +1 -1
  9. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/incidentio.py +1 -1
  10. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/launchdarkly.py +1 -1
  11. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/newrelic.py +1 -1
  12. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/pagerduty.py +1 -1
  13. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/sonarqube.py +1 -1
  14. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/pyproject.toml +1 -1
  15. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/LICENSE +0 -0
  16. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/README.rst +0 -0
  17. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/command_options.py +0 -0
  18. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/api_keys.py +0 -0
  19. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/audit_logs.py +0 -0
  20. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/backup.py +0 -0
  21. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/backup_commands/cortex_export.py +0 -0
  22. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/catalog.py +0 -0
  23. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/custom_data.py +0 -0
  24. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/custom_events.py +0 -0
  25. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/custom_metrics.py +0 -0
  26. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/dependencies.py +0 -0
  27. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/deploys.py +0 -0
  28. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/discovery_audit.py +0 -0
  29. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/docs.py +0 -0
  30. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/entity_types.py +0 -0
  31. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/gitops_logs.py +0 -0
  32. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/groups.py +0 -0
  33. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/initiatives.py +0 -0
  34. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations.py +0 -0
  35. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/aws.py +0 -0
  36. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/github.py +0 -0
  37. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/integrations_commands/prometheus.py +0 -0
  38. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/ip_allowlist.py +0 -0
  39. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/on_call.py +0 -0
  40. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/packages.py +0 -0
  41. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/packages_commands/go.py +0 -0
  42. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/packages_commands/java.py +0 -0
  43. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/packages_commands/node.py +0 -0
  44. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/packages_commands/nuget.py +0 -0
  45. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/packages_commands/python.py +0 -0
  46. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/plugins.py +0 -0
  47. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/queries.py +0 -0
  48. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/rest.py +0 -0
  49. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/scim.py +0 -0
  50. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/scorecards.py +0 -0
  51. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/scorecards_commands/exemptions.py +0 -0
  52. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/teams.py +0 -0
  53. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/commands/workflows.py +0 -0
  54. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/cortex_client.py +0 -0
  55. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/models/team.py +0 -0
  56. {cortexapps_cli-1.0.4 → cortexapps_cli-1.0.6}/cortexapps_cli/utils.py +0 -0
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: cortexapps-cli
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Command Line Interface for cortexapps
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Author: Cortex Apps
7
8
  Author-email: cortexapps@cortex.io
8
9
  Requires-Python: >=3.11,<4.0
@@ -12,6 +13,7 @@ Classifier: Programming Language :: Python :: 3
12
13
  Classifier: Programming Language :: Python :: 3.11
13
14
  Classifier: Programming Language :: Python :: 3.12
14
15
  Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
15
17
  Requires-Dist: click (<8.2)
16
18
  Requires-Dist: pyyaml (>=6.0.1,<7)
17
19
  Requires-Dist: requests (>=2.32.4,<3.0.0)
@@ -78,7 +78,7 @@ app.add_typer(workflows.app, name="workflows")
78
78
  def global_callback(
79
79
  ctx: typer.Context,
80
80
  api_key: str = typer.Option(None, "--api-key", "-k", help="API key", envvar="CORTEX_API_KEY"),
81
- url: str = typer.Option("https://api.getcortexapp.com", "--url", "-u", help="Base URL for the API", envvar="CORTEX_BASE_URL"),
81
+ url: str = typer.Option(None, "--url", "-u", help="Base URL for the API", envvar="CORTEX_BASE_URL"),
82
82
  config_file: str = typer.Option(os.path.join(os.path.expanduser('~'), '.cortex', 'config'), "--config", "-c", help="Config file path", envvar="CORTEX_CONFIG"),
83
83
  tenant: str = typer.Option("default", "--tenant", "-t", help="Tenant alias", envvar="CORTEX_TENANT_ALIAS"),
84
84
  log_level: Annotated[str, typer.Option("--log-level", "-l", help="Set the logging level")] = "INFO"
@@ -109,16 +109,17 @@ def global_callback(
109
109
  else:
110
110
  # config file found
111
111
  # if api_key is provided, use that in preference to the config file
112
+ config = configparser.ConfigParser()
113
+ config.read(config_file)
114
+ if tenant not in config:
115
+ raise typer.BadParameter(f"Tenant {tenant} not found in config file")
112
116
  if not api_key:
113
- config = configparser.ConfigParser()
114
- config.read(config_file)
115
- if tenant not in config:
116
- raise typer.BadParameter(f"Tenant {tenant} not found in config file")
117
117
  api_key = config[tenant]["api_key"]
118
- if url not in config[tenant]:
119
- url = url
118
+ if not url:
119
+ if 'base_url' in config[tenant].keys():
120
+ url = config[tenant]['base_url']
120
121
  else:
121
- url = config[tenant]["base_url"]
122
+ url = "https://api.getcortexapp.com"
122
123
 
123
124
  # strip any quotes or spaces from the api_key and url
124
125
  api_key = api_key.strip('"\' ')
@@ -55,7 +55,7 @@ def add_multiple(
55
55
 
56
56
  data = json.loads("".join([line for line in file_input]))
57
57
 
58
- r = client.put("api/v1/aws/configurations", data=data)
58
+ r = client.put("api/v1/azure-devops/configurations", data=data)
59
59
  print_json(data=r)
60
60
 
61
61
  @app.command()
@@ -65,7 +65,7 @@ def add(
65
65
  # remove any data elements that are None - can only be is_default
66
66
  data = {k: v for k, v in data.items() if v is not None}
67
67
 
68
- r = client.post("api/v1/azure-devops/configuration", data=data)
68
+ r = client.post("api/v1/azure-resources/configuration", data=data)
69
69
  print_json(data=r)
70
70
 
71
71
  @app.command()
@@ -81,7 +81,7 @@ def add_multiple(
81
81
 
82
82
  data = json.loads("".join([line for line in file_input]))
83
83
 
84
- r = client.put("api/v1/aws/configurations", data=data)
84
+ r = client.put("api/v1/azure-resources/configurations", data=data)
85
85
  print_json(data=r)
86
86
 
87
87
  @app.command()
@@ -51,7 +51,7 @@ def add_multiple(
51
51
 
52
52
  data = json.loads("".join([line for line in file_input]))
53
53
 
54
- r = client.put("api/v1/aws/configurations", data=data)
54
+ r = client.put("api/v1/circleci/configurations", data=data)
55
55
  print_json(data=r)
56
56
 
57
57
  @app.command()
@@ -60,7 +60,7 @@ def add_multiple(
60
60
 
61
61
  data = json.loads("".join([line for line in file_input]))
62
62
 
63
- r = client.put("api/v1/aws/configurations", data=data)
63
+ r = client.put("api/v1/coralogix/configurations", data=data)
64
64
  print_json(data=r)
65
65
 
66
66
  @app.command()
@@ -59,7 +59,7 @@ def add_multiple(
59
59
 
60
60
  data = json.loads("".join([line for line in file_input]))
61
61
 
62
- r = client.put("api/v1/aws/configurations", data=data)
62
+ r = client.put("api/v1/datadog/configurations", data=data)
63
63
  print_json(data=r)
64
64
 
65
65
  @app.command()
@@ -51,7 +51,7 @@ def add_multiple(
51
51
 
52
52
  data = json.loads("".join([line for line in file_input]))
53
53
 
54
- r = client.put("api/v1/aws/configurations", data=data)
54
+ r = client.put("api/v1/gitlab/configurations", data=data)
55
55
  print_json(data=r)
56
56
 
57
57
  @app.command()
@@ -51,7 +51,7 @@ def add_multiple(
51
51
 
52
52
  data = json.loads("".join([line for line in file_input]))
53
53
 
54
- r = client.put("api/v1/aws/configurations", data=data)
54
+ r = client.put("api/v1/incidentio/configurations", data=data)
55
55
  print_json(data=r)
56
56
 
57
57
  @app.command()
@@ -51,7 +51,7 @@ def add_multiple(
51
51
 
52
52
  data = json.loads("".join([line for line in file_input]))
53
53
 
54
- r = client.put("api/v1/aws/configurations", data=data)
54
+ r = client.put("api/v1/launchdarkly/configurations", data=data)
55
55
  print_json(data=r)
56
56
 
57
57
  @app.command()
@@ -51,7 +51,7 @@ def add_multiple(
51
51
 
52
52
  data = json.loads("".join([line for line in file_input]))
53
53
 
54
- r = client.put("api/v1/aws/configurations", data=data)
54
+ r = client.put("api/v1/newrelic/configurations", data=data)
55
55
  print_json(data=r)
56
56
 
57
57
  @app.command()
@@ -51,7 +51,7 @@ def add_multiple(
51
51
 
52
52
  data = json.loads("".join([line for line in file_input]))
53
53
 
54
- r = client.put("api/v1/aws/configurations", data=data)
54
+ r = client.put("api/v1/pagerduty/configurations", data=data)
55
55
  print_json(data=r)
56
56
 
57
57
  @app.command()
@@ -51,7 +51,7 @@ def add_multiple(
51
51
 
52
52
  data = json.loads("".join([line for line in file_input]))
53
53
 
54
- r = client.put("api/v1/aws/configurations", data=data)
54
+ r = client.put("api/v1/sonarqube/configurations", data=data)
55
55
  print_json(data=r)
56
56
 
57
57
  @app.command()
@@ -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.0.4"
4
+ version = "1.0.6"
5
5
  description = "Command Line Interface for cortexapps"
6
6
  license = "MIT"
7
7
  authors = [
File without changes