You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Milindu Sanoj Kumarage <ag...@gmail.com> on 2015/07/31 05:09:21 UTC

Python CLI, regarding -u and -p flags in single-command mode

Hi,

While developing the Python CLI for Stratos, I came across a small
question.


add-user -u <USERNAME> -p <PASSWORD> -r <ROLE_NAME> -f <FIRST_NAME> -l
<LAST_NAME> -e <EMAIL> -pr <PROFILE_NAME>

In the above CLI command, -u <USERNAME> and -p <PASSWORD> means the
username and password of the user that is to be added to the system with
this command, right? But we usually use -u and -p flags to provide the
username and the password of the user who is invoking the commands. This
may be not a big problem in Interactive mode. My question is, when in
single-command mode, how this conflict is resolved?

Thank you

Re: Python CLI, regarding -u and -p flags in single-command mode

Posted by Milindu Sanoj Kumarage <ag...@gmail.com>.
Hi,

defining two flags with same name is not possible with the framework, let's
use different parameter names as you suggested.

I have some problems with the outputs of the following commands.

list-deployment-policies

Deployment policies found:
+---------------------+---------------+
| ID                  | Accessibility |
+---------------------+---------------+
| deployment-policy-1 | 1             |
+---------------------+---------------+

What does the Accessibility means here?

describe-cartridge-group displays a JSON, is that the expected behavior?

On Sun, Aug 2, 2015 at 5:17 PM, Imesh Gunaratne <im...@apache.org> wrote:

> May be we can use the -u and -p defined after the add-user command for the
> command and the first -u and -p for the user login to the CLI. If that's
> not possible then we can use different parameter names for the command.
>
> Thanks
>
> On Fri, Jul 31, 2015 at 8:39 AM, Milindu Sanoj Kumarage <
> agentmilindu@gmail.com> wrote:
>
>> Hi,
>>
>> While developing the Python CLI for Stratos, I came across a small
>> question.
>>
>>
>> add-user -u <USERNAME> -p <PASSWORD> -r <ROLE_NAME> -f <FIRST_NAME> -l
>> <LAST_NAME> -e <EMAIL> -pr <PROFILE_NAME>
>>
>> In the above CLI command, -u <USERNAME> and -p <PASSWORD> means the
>> username and password of the user that is to be added to the system with
>> this command, right? But we usually use -u and -p flags to provide the
>> username and the password of the user who is invoking the commands. This
>> may be not a big problem in Interactive mode. My question is, when in
>> single-command mode, how this conflict is resolved?
>>
>> Thank you
>>
>
>
>
> --
> Imesh Gunaratne
>
> Senior Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>

Re: Python CLI, regarding -u and -p flags in single-command mode

Posted by Imesh Gunaratne <im...@apache.org>.
May be we can use the -u and -p defined after the add-user command for the
command and the first -u and -p for the user login to the CLI. If that's
not possible then we can use different parameter names for the command.

Thanks

On Fri, Jul 31, 2015 at 8:39 AM, Milindu Sanoj Kumarage <
agentmilindu@gmail.com> wrote:

> Hi,
>
> While developing the Python CLI for Stratos, I came across a small
> question.
>
>
> add-user -u <USERNAME> -p <PASSWORD> -r <ROLE_NAME> -f <FIRST_NAME> -l
> <LAST_NAME> -e <EMAIL> -pr <PROFILE_NAME>
>
> In the above CLI command, -u <USERNAME> and -p <PASSWORD> means the
> username and password of the user that is to be added to the system with
> this command, right? But we usually use -u and -p flags to provide the
> username and the password of the user who is invoking the commands. This
> may be not a big problem in Interactive mode. My question is, when in
> single-command mode, how this conflict is resolved?
>
> Thank you
>



-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos