diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py index 9ba7e8df31f..4630136b84b 100644 --- a/tools/cli/cloudmonkey/cloudmonkey.py +++ b/tools/cli/cloudmonkey/cloudmonkey.py @@ -81,8 +81,9 @@ class CloudStackShell(cmd.Cmd): for key in self.config_fields.keys(): setattr(self, key, self.config_fields[key]) config = self.write_config() - print("Set your apikey, secretkey, host, port, prompt, color," - " log_file, history_file using the set command!") + print("Set your apikey, secretkey, host, port, prompt," + " protocol, path, color, log_file and history_file" + " using the set command!") for key in self.config_fields.keys(): try: @@ -195,10 +196,13 @@ class CloudStackShell(cmd.Cmd): def make_request(self, command, requests={}, isAsync=False): conn = cloudConnection(self.host, port=int(self.port), apiKey=self.apikey, securityKey=self.secretkey, - asyncTimeout=self.timeout, logging=logger) + asyncTimeout=self.timeout, logging=logger, + protocol=self.protocol, path=self.path) response = None try: + self.print_shell("Starting call") response = conn.make_request_with_auth(command, requests) + self.print_shell("Ending call") except cloudstackAPIException, e: self.print_shell("API Error:", e) except HTTPError, e: diff --git a/tools/cli/cloudmonkey/common.py b/tools/cli/cloudmonkey/common.py index d525086f7e4..a6f3a770b2b 100644 --- a/tools/cli/cloudmonkey/common.py +++ b/tools/cli/cloudmonkey/common.py @@ -30,6 +30,7 @@ except ImportError, e: # Add config key:value config_file = os.path.expanduser('~/.cloudmonkey_config') config_fields = {'host': 'localhost', 'port': '8080', + 'protocol': 'http', 'path': '/client/api', 'apikey': '', 'secretkey': '', 'timeout': '3600', 'asyncblock': 'true', 'prompt': '🐵 cloudmonkey>', 'color': 'true',