diff --git a/cli/bin/airgap/download_scripts.py b/cli/bin/airgap/download_scripts.py index d8b2168..ba95486 100644 --- a/cli/bin/airgap/download_scripts.py +++ b/cli/bin/airgap/download_scripts.py @@ -95,7 +95,7 @@ def download_individual_script(scriptID, base_dir, CBW_API, with_attachment=Fals def manager(arguments, CBW_API, verify_ssl=False): parser = argparse.ArgumentParser() - parser.add_argument("--add-attachment", action="store_false") + parser.add_argument("--add-attachment", action="store_true") parser.add_argument("--dest-dir", default="cyberwatch-airgap") parser.add_argument("help", nargs="?") options = parser.parse_args(arguments) diff --git a/cli/cyberwatch-cli b/cli/cyberwatch-cli index 529b026..99714a8 100755 --- a/cli/cyberwatch-cli +++ b/cli/cyberwatch-cli @@ -28,15 +28,15 @@ def help(): print("{: >15} \t {}".format("ping", "Ping the Cyberwatch API to validate the connexion")) print("\n") -def ping(CBW_API, verify_ssl=False): +def ping(CBW_API, verify_ssl=False, verbose=False): apiResponse = CBW_API.request( method="GET", endpoint="/api/v3/ping", verify_ssl=verify_ssl ) - print("Trying to ping Cyberwatch API...") + if verbose : print("Trying to ping Cyberwatch API...") response = next(apiResponse).json() - print(response) + if verbose: print(response) if response.get("error") is not None: print("Failed ping to Cyberwatch API, exiting...") sys.exit(1) @@ -69,7 +69,7 @@ try: if not arguments or arguments[0] == "help": help() elif arguments[0] == "ping": - ping(CBW_API, VERIFY_SSL) + ping(CBW_API, VERIFY_SSL, True) elif arguments[0] == "os": ping(CBW_API, VERIFY_SSL) os.manager(arguments[1:], CBW_API, VERIFY_SSL) diff --git a/setup.py b/setup.py index 5d0cb7f..ab7f9aa 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='cyberwatch_api', - version='0.3.6', + version='0.3.7', description='Python Api client for the Cyberwatch software', long_description=open('README.md').read().strip(), long_description_content_type="text/markdown",