stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milindu Sanoj Kumarage <agentmili...@gmail.com>
Subject Re: [GSoC 2015] Python CLI for Stratos : Weekly Update
Date Sat, 20 Jun 2015 15:34:32 GMT
Hi,

I could implement the "List Network Partitions" action where we have to
print a tree and it went well. ( I was not sure what to put as properties
when creating the partitions, sorry for the funny properties I have added
O:) )

[image: Inline image 1]


I think implementing the rest of the CLI actions would be straight forward.
I'm on the process of generalizing the HTTP response handling and exception
raising.


I'm getting an SSL error when the Python HTTP library is making requests to
the REST API. This is because the self-signed certificate is not trusted by
the Python HTTP library. Currently I'm setting validate=False which is not
a good practice at all, but this is just for testing.

'Requests <http://docs.python-requests.org/en/latest/#>' ( the Python
library we use for sending HTTP requests ) has a method to attach a CA
bundle file, then the HTTPS requests will be validated with it. I'm working
on it, but having some troubles there. I still get a SSL error even if I
linked a CA bundle. I'm not very sure if I'm giving it the correct Certs.
Hope I can get this issue solved this week.

We had several Google Hangouts to discuss on progress and issues I face
when developing.

On Fri, Jun 12, 2015 at 7:52 PM, Chamila De Alwis <chamilad@wso2.com> wrote:

> Hi Milindu,
>
> It's great to see a complete workflow being executed! The format the data
> is displayed in looks good. Let's continue to add the commands one by one.
>
> Py.Test is a great framework to do Python unit testing. Let us know the
> results of the research on test frameworks. There might be better
> frameworks suited to test command line apps as a whole.
>
>
> Regards,
> Chamila de Alwis
> Committer and PMC Member - Apache Stratos
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Thu, Jun 11, 2015 at 3:50 PM, Milindu Sanoj Kumarage <
> agentmilindu@gmail.com> wrote:
>
>> Hi everyone,
>>
>> We had a Google Hangout yesterday to discuss the progress. Since we have
>> finished the foundation of the CLI, we thought of moving to calling Stratos
>> REST API parts. I'm currently working with Mock IaaS. As a test run, I
>> tried to list the available users and show on the terminal as a table. It
>> went well and here is a snapshot :)
>>
>> I will continue this, with action names as of Java CLI ( eg;- list-users,
>> etc ).
>>
>>
>> [image: Inline image 1]
>>
>> We discussed to use PyTest( http://pytest.org ) for testing, I will try
>> to write some test for the codes we have this far :) Meanwhile, I will
>> research other options also.
>>
>>
>>
>> On Tue, Jun 9, 2015 at 6:46 PM, Manula Thantriwatte <
>> manulachathurika@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> +1 for the non-interactive mode behaviour.
>>>
>>> On Tue, Jun 9, 2015 at 12:08 AM, Milindu Sanoj Kumarage <
>>> agentmilindu@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> When the CLI is used in the non-interactive mode, it is most likely
>>>>> included in a (ex: Bash) script. In that case it should notify of the
error
>>>>> and continue, rather than hang up and wait for user input (thus the name
>>>>> "non-interactive" :) ). WDYT?
>>>>
>>>>
>>>>   I too agree. Like to know others' ideas too :)
>>>>
>>>> Just a minor point on the source code.
>>>>> [image: Inline image 1]
>>>>> In Configs.py I noticed that "~" symbol is used. Is this portable to
>>>>> Windows? If not let's keep that in mind and test only in Linux for now.
We
>>>>> will have to make it portable to Windows as well.
>>>>>
>>>>
>>>>   In Logging.py I'm using following code to get the path of the
>>>> Stratos's dir( ".stratos" ) inside the user's home dir( "~/" ) , in
>>>>  platform independent manner.
>>>>
>>>> stratos_dir_path = os.path.expanduser(Configs.stratos_dir)
>>>>
>>>> But it seems it is better to add this part too to Configs.py :) Let's
>>>> change that :)
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> Manula Chathurika Thantriwatte
>>> phone : (+65) 91306970
>>> email : manulachathurika@gmail.com
>>> Linkedin : *http://lk.linkedin.com/in/manulachathurika
>>> <http://lk.linkedin.com/in/manulachathurika>*
>>> blog : http://manulachathurika.blogspot.com/
>>>
>>
>>
>

Mime
View raw message