cortexapps-cli 1.0.3__tar.gz → 1.0.5__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.0.3 → cortexapps_cli-1.0.5}/LICENSE +5 -7
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/PKG-INFO +15 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/README.rst +14 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/azure_devops.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/azure_resources.py +2 -2
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/circleci.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/coralogix.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/datadog.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/gitlab.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/incidentio.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/launchdarkly.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/newrelic.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/pagerduty.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/prometheus.py +15 -9
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/sonarqube.py +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/pyproject.toml +1 -1
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/cli.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/command_options.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/api_keys.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/audit_logs.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/backup.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/backup_commands/cortex_export.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/catalog.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/custom_data.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/custom_events.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/custom_metrics.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/dependencies.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/deploys.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/discovery_audit.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/docs.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/entity_types.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/gitops_logs.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/groups.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/initiatives.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/aws.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/github.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/ip_allowlist.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/on_call.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/go.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/java.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/node.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/nuget.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/python.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/plugins.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/queries.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/rest.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/scim.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/scorecards.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/scorecards_commands/exemptions.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/teams.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/workflows.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/cortex_client.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/models/team.py +0 -0
- {cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/utils.py +0 -0
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
The
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018 tsuyoshiwada
|
|
1
|
+
Copyright (c) 2018 The Python Packaging Authority
|
|
4
2
|
|
|
5
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
4
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +7,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
7
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
8
|
furnished to do so, subject to the following conditions:
|
|
11
9
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
14
12
|
|
|
15
13
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
14
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
15
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
16
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
17
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: cortexapps-cli
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: Command Line Interface for cortexapps
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Cortex Apps
|
|
@@ -464,6 +464,20 @@ This recipe does the following:
|
|
|
464
464
|
cortex catalog descriptor -y -t ${entity} | yq "with(.info.x-cortex-owners[]; select(.type | downcase == \"group\") | select(.provider == null) | .provider = \"${provider}\" )" | cortex catalog create -f-
|
|
465
465
|
done
|
|
466
466
|
|
|
467
|
+
-----------------------------------------------------------------------------
|
|
468
|
+
Export all workflows
|
|
469
|
+
-----------------------------------------------------------------------------
|
|
470
|
+
|
|
471
|
+
This recipe creates YAML files for each Workflow. This may be helpful if you are considering enabling GitOps for Workflows and you want to export current Workflows as a starting point.
|
|
472
|
+
|
|
473
|
+
.. code:: bash
|
|
474
|
+
|
|
475
|
+
for workflow in `cortex workflows list --csv --no-headers --columns tag`
|
|
476
|
+
do
|
|
477
|
+
echo "workflow = $workflow"
|
|
478
|
+
cortex workflows get --tag $workflow --yaml > $workflow.yaml
|
|
479
|
+
done
|
|
480
|
+
|
|
467
481
|
-----------------------------------------------------------------------------
|
|
468
482
|
Obfuscating a Cortex export
|
|
469
483
|
-----------------------------------------------------------------------------
|
|
@@ -439,6 +439,20 @@ This recipe does the following:
|
|
|
439
439
|
cortex catalog descriptor -y -t ${entity} | yq "with(.info.x-cortex-owners[]; select(.type | downcase == \"group\") | select(.provider == null) | .provider = \"${provider}\" )" | cortex catalog create -f-
|
|
440
440
|
done
|
|
441
441
|
|
|
442
|
+
-----------------------------------------------------------------------------
|
|
443
|
+
Export all workflows
|
|
444
|
+
-----------------------------------------------------------------------------
|
|
445
|
+
|
|
446
|
+
This recipe creates YAML files for each Workflow. This may be helpful if you are considering enabling GitOps for Workflows and you want to export current Workflows as a starting point.
|
|
447
|
+
|
|
448
|
+
.. code:: bash
|
|
449
|
+
|
|
450
|
+
for workflow in `cortex workflows list --csv --no-headers --columns tag`
|
|
451
|
+
do
|
|
452
|
+
echo "workflow = $workflow"
|
|
453
|
+
cortex workflows get --tag $workflow --yaml > $workflow.yaml
|
|
454
|
+
done
|
|
455
|
+
|
|
442
456
|
-----------------------------------------------------------------------------
|
|
443
457
|
Obfuscating a Cortex export
|
|
444
458
|
-----------------------------------------------------------------------------
|
|
@@ -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-
|
|
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/
|
|
84
|
+
r = client.put("api/v1/azure-resources/configurations", data=data)
|
|
85
85
|
print_json(data=r)
|
|
86
86
|
|
|
87
87
|
@app.command()
|
|
@@ -8,9 +8,11 @@ app = typer.Typer(help="Prometheus commands", no_args_is_help=True)
|
|
|
8
8
|
@app.command()
|
|
9
9
|
def add(
|
|
10
10
|
ctx: typer.Context,
|
|
11
|
-
alias: str = typer.Option(
|
|
12
|
-
api_key: str = typer.Option(..., "--api-key", "-api", help="API key"),
|
|
11
|
+
alias: str = typer.Option(None, "--alias", "-a", help="Alias for this configuration"),
|
|
13
12
|
host: str = typer.Option(None, "--host", "-h", help="Optional host name"),
|
|
13
|
+
username: str = typer.Option(None, "--username", "-u", help="username"),
|
|
14
|
+
password: str = typer.Option(None, "--password", "-p", help="password"),
|
|
15
|
+
tenant_id: str = typer.Option(None, "--tenant", "-t", help="Optional tenant id"),
|
|
14
16
|
is_default: bool = typer.Option(False, "--is-default", "-i", help="If this is the default configuration"),
|
|
15
17
|
file_input: Annotated[typer.FileText, typer.Option("--file", "-f", help="JSON file containing configurations, if command line options not used; can be passed as stdin with -, example: -f-")] = None,
|
|
16
18
|
):
|
|
@@ -21,19 +23,23 @@ def add(
|
|
|
21
23
|
client = ctx.obj["client"]
|
|
22
24
|
|
|
23
25
|
if file_input:
|
|
24
|
-
if alias or
|
|
25
|
-
raise typer.BadParameter("When providing a
|
|
26
|
+
if alias or host or username or password or tenant_id or is_default:
|
|
27
|
+
raise typer.BadParameter("When providing a prometheus definition file, do not specify any other attributes")
|
|
26
28
|
data = json.loads("".join([line for line in file_input]))
|
|
27
29
|
else:
|
|
30
|
+
|
|
28
31
|
data = {
|
|
29
32
|
"alias": alias,
|
|
30
|
-
"apiKey": api_key,
|
|
31
33
|
"host": host,
|
|
32
|
-
"
|
|
34
|
+
"username": username,
|
|
35
|
+
"password": password,
|
|
36
|
+
"tenant_id": tenant_id,
|
|
37
|
+
"is_default": is_default
|
|
33
38
|
}
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
for k, v in data.items():
|
|
41
|
+
if v is None:
|
|
42
|
+
raise typer.BadParameter("Missing required parameter: " + k)
|
|
37
43
|
|
|
38
44
|
r = client.post("api/v1/prometheus/configuration", data=data)
|
|
39
45
|
print_json(data=r)
|
|
@@ -51,7 +57,7 @@ def add_multiple(
|
|
|
51
57
|
|
|
52
58
|
data = json.loads("".join([line for line in file_input]))
|
|
53
59
|
|
|
54
|
-
r = client.put("api/v1/
|
|
60
|
+
r = client.put("api/v1/prometheus/configurations", data=data)
|
|
55
61
|
print_json(data=r)
|
|
56
62
|
|
|
57
63
|
@app.command()
|
|
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
|
{cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/integrations_commands/aws.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/go.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/java.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/node.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/cortexapps_cli/commands/packages_commands/nuget.py
RENAMED
|
File without changes
|
{cortexapps_cli-1.0.3 → cortexapps_cli-1.0.5}/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
|