Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/integrations_commands/apiiro.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/apiiro/configurations", data=data)
r = client.post("api/v1/apiiro/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/integrations_commands/argocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/argocd/configurations", data=data)
r = client.post("api/v1/argocd/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/azure-devops/configurations", data=data)
r = client.post("api/v1/azure-devops/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/azure-resources/configurations", data=data)
r = client.post("api/v1/azure-resources/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/bitbucket/configurations", data=data)
r = client.post("api/v1/bitbucket/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/circleci/configurations", data=data)
r = client.post("api/v1/circleci/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/coralogix/configurations", data=data)
r = client.post("api/v1/coralogix/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/integrations_commands/datadog.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/datadog/configurations", data=data)
r = client.post("api/v1/datadog/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/integrations_commands/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/gitlab/configurations", data=data)
r = client.post("api/v1/gitlab/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/incidentio/configurations", data=data)
r = client.post("api/v1/incidentio/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/integrations_commands/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/jenkins/configurations", data=data)
r = client.post("api/v1/jenkins/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/integrations_commands/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/jira/configurations", data=data)
r = client.post("api/v1/jira/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/launchdarkly/configurations", data=data)
r = client.post("api/v1/launchdarkly/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/pagerduty/configurations", data=data)
r = client.post("api/v1/pagerduty/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/prometheus/configurations", data=data)
r = client.post("api/v1/prometheus/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/integrations_commands/rootly.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/rootly/configurations", data=data)
r = client.post("api/v1/rootly/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/integrations_commands/semgrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/semgrep/configurations", data=data)
r = client.post("api/v1/semgrep/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_multiple(

data = json.loads("".join([line for line in file_input]))

r = client.put("api/v1/sonarqube/configurations", data=data)
r = client.post("api/v1/sonarqube/configurations", data=data)
print_json(data=r)

@app.command()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integrations_apiiro.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_apiiro_add_file_with_flags_error(tmp_path):
def test_integrations_apiiro_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/apiiro/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/apiiro/configurations", json={}, status=200)
cli(["integrations", "apiiro", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_argocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_argocd_add_file_with_flags_error(tmp_path):
def test_integrations_argocd_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/argocd/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/argocd/configurations", json={}, status=200)
cli(["integrations", "argocd", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_azure_devops.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_azure_devops_add_file_with_flags_error(tmp_path):
def test_integrations_azure_devops_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/azure-devops/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/azure-devops/configurations", json={}, status=200)
cli(["integrations", "azure-devops", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ def test_integrations_bitbucket_add_valid(tmp_path):
def test_integrations_bitbucket_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/bitbucket/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/bitbucket/configurations", json={}, status=200)
cli(["integrations", "bitbucket", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_circleci.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_circleci_add_file_with_flags_error(tmp_path):
def test_integrations_circleci_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/circleci/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/circleci/configurations", json={}, status=200)
cli(["integrations", "circleci", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_coralogix.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_coralogix_add_file_with_flags_error(tmp_path):
def test_integrations_coralogix_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/coralogix/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/coralogix/configurations", json={}, status=200)
cli(["integrations", "coralogix", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_datadog.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_datadog_add_file_with_flags_error(tmp_path):
def test_integrations_datadog_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/datadog/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/datadog/configurations", json={}, status=200)
cli(["integrations", "datadog", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_gitlab_add_file_with_flags_error(tmp_path):
def test_integrations_gitlab_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/gitlab/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/gitlab/configurations", json={}, status=200)
cli(["integrations", "gitlab", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_incidentio.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_incidentio_add_file_with_flags_error(tmp_path):
def test_integrations_incidentio_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/incidentio/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/incidentio/configurations", json={}, status=200)
cli(["integrations", "incidentio", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_jenkins_add_file_with_flags_error(tmp_path):
def test_integrations_jenkins_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/jenkins/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/jenkins/configurations", json={}, status=200)
cli(["integrations", "jenkins", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ def test_integrations_jira_add_valid(tmp_path):
def test_integrations_jira_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/jira/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/jira/configurations", json={}, status=200)
cli(["integrations", "jira", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_launchdarkly.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_launchdarkly_add_file_with_flags_error(tmp_path):
def test_integrations_launchdarkly_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/launchdarkly/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/launchdarkly/configurations", json={}, status=200)
cli(["integrations", "launchdarkly", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_pagerduty.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_pagerduty_add_file_with_flags_error(tmp_path):
def test_integrations_pagerduty_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/pagerduty/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/pagerduty/configurations", json={}, status=200)
cli(["integrations", "pagerduty", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_prometheus_add_file_with_flags_error(tmp_path):
def test_integrations_prometheus_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/prometheus/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/prometheus/configurations", json={}, status=200)
cli(["integrations", "prometheus", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_rootly.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_rootly_add_file_with_flags_error(tmp_path):
def test_integrations_rootly_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/rootly/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/rootly/configurations", json={}, status=200)
cli(["integrations", "rootly", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_semgrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ def test_integrations_semgrep_add_file_with_flags_error(tmp_path):
def test_integrations_semgrep_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/semgrep/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/semgrep/configurations", json={}, status=200)
cli(["integrations", "semgrep", "add-multiple", "-f", str(f)])
2 changes: 1 addition & 1 deletion tests/test_integrations_sonarqube.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ def test_integrations_sonarqube_add_file_with_flags_error(tmp_path):
def test_integrations_sonarqube_add_multiple_valid(tmp_path):
f = tmp_path / "valid.json"
f.write_text('{"configurations": []}')
responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/sonarqube/configurations", json={}, status=200)
responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/sonarqube/configurations", json={}, status=200)
cli(["integrations", "sonarqube", "add-multiple", "-f", str(f)])