[openstack-dev] Newbie python novaclient question

Alex la6470 at gmail.com
Fri Oct 11 12:34:28 UTC 2013


Is that actually doing something or parsing the sub commands?

I think after args is initialized it is probably the args.func calls that actually does something. For example the following line in the main:

args.func(self.cs, args) 

What do you think is the .func method?

Regards
Al

On Oct 11, 2013, at 3:07 AM, Noorul Islam K M <noorul at noorul.com> wrote:

> Alex <la6470 at gmail.com> writes:
> 
>> Yes , this method seems to look for the corresponding action but still doesn't seem to be the one actually calling them.
>> 
> 
> Are you looking for this which is inside **main** method?
> 
> args = subcommand_parser.parse_args(argv)
> 
> Thanks and Regards
> Noorul
> 
>> Regards
>> Al
>> 
>> 
>> 
>> On Oct 10, 2013, at 11:07 PM, Noorul Islam K M <noorul at noorul.com> wrote:
>> 
>>> Alex <la6470 at gmail.com> writes:
>>> 
>>>> Thank you Noorul. I looked at the review. My question is that in openstackcomputeshell.main which line call the v1_1/ shell.py.<function>?
>>>> 
>>> 
>>> I would look at get_subcommand_parser() method.
>>> 
>>> Thanks and Regards
>>> Noorul
>>> 
>>>> 
>>>> 
>>>> On Oct 10, 2013, at 9:03 PM, Noorul Islam K M <noorul at noorul.com> wrote:
>>>> 
>>>>> A L <la6470 at gmail.com> writes:
>>>>> 
>>>>>> Dear Openstack Dev Gurus,
>>>>>> 
>>>>>> I am trying to understand the python novaclient code. Can someone please
>>>>>> point me to where in openstackcomputeshell class in shell.py does the
>>>>>> actual function or class related to an argument gets called?
>>>>>> 
>>>>> 
>>>>> This review [1] is something I submitted and it adds a sub command. May
>>>>> be this will give you some clue.
>>>>> 
>>>>> [1] https://review.openstack.org/#/c/40181/
>>>>> 
>>>>> Thanks and Regards
>>>>> Noorul



More information about the OpenStack-dev mailing list