cortexapps-cli 1.0.1__tar.gz → 1.0.2__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.1 → cortexapps_cli-1.0.2}/PKG-INFO +1 -1
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/github.py +68 -1
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/pyproject.toml +1 -1
- cortexapps_cli-1.0.1/cortexapps_cli/cortex.py +0 -4071
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/LICENSE +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/README.rst +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/cli.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/command_options.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/api_keys.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/audit_logs.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/backup.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/backup_commands/cortex_export.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/catalog.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/custom_data.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/custom_events.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/custom_metrics.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/dependencies.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/deploys.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/discovery_audit.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/docs.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/entity_types.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/gitops_logs.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/groups.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/initiatives.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/aws.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/azure_devops.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/azure_resources.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/circleci.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/coralogix.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/datadog.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/gitlab.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/incidentio.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/launchdarkly.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/newrelic.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/pagerduty.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/prometheus.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/integrations_commands/sonarqube.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/ip_allowlist.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/on_call.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/packages.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/packages_commands/go.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/packages_commands/java.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/packages_commands/node.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/packages_commands/nuget.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/packages_commands/python.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/plugins.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/queries.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/rest.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/scim.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/scorecards.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/scorecards_commands/exemptions.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/teams.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/commands/workflows.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/cortex_client.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/models/team.py +0 -0
- {cortexapps_cli-1.0.1 → cortexapps_cli-1.0.2}/cortexapps_cli/utils.py +0 -0
|
@@ -22,7 +22,7 @@ def add(
|
|
|
22
22
|
|
|
23
23
|
if file_input:
|
|
24
24
|
if alias or api_key or is_default or host:
|
|
25
|
-
raise typer.BadParameter("When providing a
|
|
25
|
+
raise typer.BadParameter("When providing a configuration file, do not specify any other attributes")
|
|
26
26
|
data = json.loads("".join([line for line in file_input]))
|
|
27
27
|
else:
|
|
28
28
|
data = {
|
|
@@ -168,3 +168,70 @@ def validate_all(
|
|
|
168
168
|
|
|
169
169
|
r = client.post("api/v1/github/configurations")
|
|
170
170
|
print_json(data=r)
|
|
171
|
+
|
|
172
|
+
@app.command()
|
|
173
|
+
def add_personal(
|
|
174
|
+
ctx: typer.Context,
|
|
175
|
+
alias: str = typer.Option(..., "--alias", "-a", help="Alias for this configuration"),
|
|
176
|
+
access_token: str = typer.Option(..., "--access-token", "-at", help="Access Token"),
|
|
177
|
+
host: str = typer.Option(None, "--host", "-h", help="Optional host name"),
|
|
178
|
+
is_default: bool = typer.Option(False, "--is-default", "-i", help="If this is the default configuration"),
|
|
179
|
+
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,
|
|
180
|
+
):
|
|
181
|
+
"""
|
|
182
|
+
Add a single personal configuration
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
client = ctx.obj["client"]
|
|
186
|
+
|
|
187
|
+
if file_input:
|
|
188
|
+
if alias or access_token or is_default or host:
|
|
189
|
+
raise typer.BadParameter("When providing a configuration file, do not specify any other attributes")
|
|
190
|
+
data = json.loads("".join([line for line in file_input]))
|
|
191
|
+
else:
|
|
192
|
+
data = {
|
|
193
|
+
"alias": alias,
|
|
194
|
+
"accessToken": access_token,
|
|
195
|
+
"apiHost": host,
|
|
196
|
+
"isDefault": is_default,
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
# remove any data elements that are None - can only be is_default
|
|
200
|
+
data = {k: v for k, v in data.items() if v is not None}
|
|
201
|
+
|
|
202
|
+
r = client.post("api/v1/github/configurations/personal", data=data)
|
|
203
|
+
print_json(data=r)
|
|
204
|
+
|
|
205
|
+
@app.command()
|
|
206
|
+
def delete_personal(
|
|
207
|
+
ctx: typer.Context,
|
|
208
|
+
alias: str = typer.Option(..., "--alias", "-a", help="The alias of the configuration"),
|
|
209
|
+
):
|
|
210
|
+
"""
|
|
211
|
+
Delete a personal configuration
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
client = ctx.obj["client"]
|
|
215
|
+
|
|
216
|
+
r = client.delete("api/v1/github/configurations/personal/" + alias)
|
|
217
|
+
print_json(data=r)
|
|
218
|
+
|
|
219
|
+
@app.command()
|
|
220
|
+
def update_personal(
|
|
221
|
+
ctx: typer.Context,
|
|
222
|
+
alias: str = typer.Option(..., "--alias", "-a", help="The alias of the configuration"),
|
|
223
|
+
is_default: bool = typer.Option(False, "--is-default", "-i", help="If this is the default configuration"),
|
|
224
|
+
):
|
|
225
|
+
"""
|
|
226
|
+
Update a personal configuration
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
client = ctx.obj["client"]
|
|
230
|
+
|
|
231
|
+
data = {
|
|
232
|
+
"alias": alias,
|
|
233
|
+
"isDefault": is_default
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
r = client.put("api/v1/github/configurations/personal/" + alias, data=data)
|
|
237
|
+
print_json(data=r)
|