Skip to content

Commit

Permalink
Merge pull request #126 from splunk/remove_verbose_print
Browse files Browse the repository at this point in the history
Remove verbose print
  • Loading branch information
pyth0n1c authored Apr 1, 2024
2 parents 3c88c7c + 2843ee3 commit 03f9e9b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions contentctl/output/conf_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,13 @@ def deploy_via_acs(self, splunk_cloud_jwt_token:str, splunk_cloud_stack:str, app
'token': (None, appinspect_token),
'package': app_data
}
print(f"curl -X POST '{address}' --header 'Authorization: Bearer {splunk_cloud_jwt_token}' --header 'ACS-Legal-Ack: Y' --form 'token={appinspect_token}' --form 'package=@{self.getPackagePath(include_version=False)}'")
res = post(address, headers=headers, files = form_data)
else:
# Victoria uses the X-Splunk-Authorization Header
# It also uses --data-binary for the app content
# https://docs.splunk.com/Documentation/SplunkCloud/9.1.2308/Config/ManageApps#Manage_private_apps_using_the_ACS_API_on_Victoria_Experience
headers.update({'X-Splunk-Authorization': appinspect_token})
address = f"https://admin.splunk.com/{splunk_cloud_stack}/adminconfig/v2/apps/victoria"
print(f"curl -X POST '{address}' --header 'X-Splunk-Authorization: {appinspect_token}' --header 'Authorization: Bearer {splunk_cloud_jwt_token}' --header 'ACS-Legal-Ack: Y' --data-binary '@{self.getPackagePath(include_version=False)}'")
res = post(address, headers=headers, data=app_data.read())
except Exception as e:
raise Exception(f"Error installing to stack '{splunk_cloud_stack}' (stack_type='{stack_type}') via ACS:\n{str(e)}")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "contentctl"
version = "3.4.2"
version = "3.4.3"
description = "Splunk Content Control Tool"
authors = ["STRT <[email protected]>"]
license = "Apache 2.0"
Expand Down

0 comments on commit 03f9e9b

Please sign in to comment.