Re: Python CLI for Stratos : Design decisions

2015-05-07 Thread Chamila De Alwis
Hi Udara/Milindu, IMO there's little to be shared between disparate Python components in Stratos since we are not distributing them as PIP packages (except for the proposed CLI). Importing cannot be done unless a parent Python package (with an __init__.py) is shared between the components (either

Re: Python CLI for Stratos : Design decisions

2015-05-05 Thread Milindu Sanoj Kumarage
Hi, Thanks for the suggestions :D I'll try to take out the REST part and implement it in a generic way. I saw a recent discussion on re-factoring the REST API to further standardize the status codes and Exception types, etc. Hope it would help me to get through. Thanks. On Mon, May 4, 2015 at 8:

Re: Python CLI for Stratos : Design decisions

2015-05-04 Thread Udara Liyanage
HI Milindu, Few suggestions Isn't it better to take out REST client from Stratos.py. Rest client seems a common module which other components may need. May be Cartridge agent and CLI uses the same module. Handle responses in a generic way at one place(This is what we learn from existing CLI

Python CLI for Stratos : Design decisions

2015-05-04 Thread Milindu Sanoj Kumarage
Hi, I thought of separating the Python CLI into 3 main parts, those are, 1. Main.py - that contains the entry point, it does the initializing parts, creates a CLI instance and runs the loop, 2. CLI.py - this is the actual CLI that extends Cmd2. This contains the command to def mappings, argument