Updated list-cartridges command Signed-off-by: Imesh Gunaratne <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/95e134e3 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/95e134e3 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/95e134e3 Branch: refs/heads/stratos-4.1.x Commit: 95e134e3f5ade24f8ba6ac020edc365c054b3314 Parents: 5d7df71 Author: Milindu Sanoj Kumarage <[email protected]> Authored: Sun Aug 2 13:10:18 2015 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Tue Oct 13 16:32:47 2015 +0530 ---------------------------------------------------------------------- .../src/main/python/cli/Stratos.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/95e134e3/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py b/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py index 5990b4c..e7becf9 100755 --- a/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py +++ b/components/org.apache.stratos.python.cli/src/main/python/cli/Stratos.py @@ -74,9 +74,7 @@ class Stratos: """ @staticmethod def list_cartridges(): - r = requests.get(Configs.stratos_api_url + 'cartridges', - auth=(Configs.stratos_username, Configs.stratos_password), verify=False) - return r.json() + return Stratos.get('cartridges', errorMessage='No cartridges found') @staticmethod def list_cartridge_groups(): @@ -104,6 +102,7 @@ class Stratos: def get(resource, errorMessage): r = requests.get(Configs.stratos_api_url + resource, auth=(Configs.stratos_username, Configs.stratos_password), verify=False) + print(r.text) if r.status_code == 200: return r.json() elif r.status_code == 400:
