You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by chris snow <ch...@gmail.com> on 2014/04/29 19:44:04 UTC

CLI command line mode usage

I'm trying to deploy a partition using the following command:

vagrant@puppet:~$ java -jar
$CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
admin -password admin deploy-partition -p
/vagrant/openstack-qemu/example_partition.json

The response is:

Username: admin
usage: deploy-partition [-p <resource path>]

For some reason, the CLI is not recognising the '-p' option.

Any ideas?

Many thanks,

Chris

Re: CLI command line mode usage

Posted by Isuru Perera <is...@wso2.com>.
On Tue, Apr 29, 2014 at 11:23 AM, Nirmal Fernando <ni...@gmail.com>wrote:

> Yes, I was suggesting the work-around, since you claimed it's not working
> :-)
>
Good! Sorry, I misunderstood. :D

I will investigate more when I get some time.

>
>
> On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com> wrote:
>
>>
>>
>>
>> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando <nirmal070125@gmail.com
>> > wrote:
>>
>>> Hi Chris,
>>>
>>> I think you need to run the deploy-partition command inside the stratos
>>> CLI console.
>>>
>> Yes. That's the workaround. However what Chris needs is to run it as an
>> external commands. The way Chris tried is supposed to work and that's how
>> the CLI was designed.
>>
>>>
>>>
>>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com>wrote:
>>>
>>>> I'm trying to deploy a partition using the following command:
>>>>
>>>> vagrant@puppet:~$ java -jar
>>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
>>>> admin -password admin deploy-partition -p
>>>> /vagrant/openstack-qemu/example_partition.json
>>>>
>>>> The response is:
>>>>
>>>> Username: admin
>>>> usage: deploy-partition [-p <resource path>]
>>>>
>>>> For some reason, the CLI is not recognising the '-p' option.
>>>>
>>>> Any ideas?
>>>>
>>>> Many thanks,
>>>>
>>>> Chris
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: CLI command line mode usage

Posted by Pradeep Fernando <pr...@gmail.com>.
Hii Chris,

This mock webapp is something i happened to develop over the course of
developing the UI integration. Yes, better to use mock library.
two aspects to consider...

- integration/unit tests
- developer testing (while code-complile-run cycle)

thanks,
--Pradeep


On Wed, Apr 30, 2014 at 11:07 PM, Nirmal Fernando <ni...@gmail.com>wrote:

>
>
>
> On Wed, Apr 30, 2014 at 11:03 PM, chris snow <ch...@gmail.com> wrote:
>
>> Hi Pradeep, thanks for the info - I'll take a look into your web mock.
>>
>> If it looks like a mock library is the way to go for the CLI, is there
>> anything stopping us from using  a mock library like easymock?
>>
>
> I don't see any.
>
>>
>> On Wed, Apr 30, 2014 at 5:34 PM, Pradeep Fernando <pr...@gmail.com>
>> wrote:
>> > Hi Chris,
>> >
>> > We dont use mock libs. However i wrote a mock backend for SM REST api.
>> It
>> > manipulates the input using a in-memory object model (you can deploy
>> > partition/subscribe to cartridges/etc). To build the mock webapp you
>> have to
>> > pass the
>> >
>> > -Denv=test
>> >
>> > property while building the components/org.apache.stratos.rest.endpoint
>> > module.
>> >
>> > copy the resulting war (you get the war file with same name, but the
>> content
>> > is different - cxf-servlet.xml) to repositoty/deployment/server/webapps
>> and
>> > test CLI or UI
>> >
>> > thanks.
>> >
>> >
>> > On Wed, Apr 30, 2014 at 7:13 PM, Nirmal Fernando <
>> nirmal070125@gmail.com>
>> > wrote:
>> >>
>> >> Chris,
>> >>
>> >> AFAIK Stratos Manager uses a mock library.
>> >>
>> >>
>> >> On Wed, Apr 30, 2014 at 12:46 PM, chris snow <ch...@gmail.com>
>> wrote:
>> >>>
>> >>> Yep, that's what I found too.
>> >>>
>> >>> I'm going to take a look at fixing this.  I think the first step is
>> >>> adding some unit tests.
>> >>>
>> >>> Do we have a preference over mock libraries?  I had a quick scan in
>> >>> the source and couldn't see any other mock libraries being used.
>> >>>
>> >>>
>> >>> On Wed, Apr 30, 2014 at 7:53 AM, Manula Chathurika Thantriwatte
>> >>> <ma...@wso2.com> wrote:
>> >>> > Hi,
>> >>> >
>> >>> > This works for commands which haven't options. Ex : ./stratos.sh -u
>> >>> > admin -p
>> >>> > admin list-autoscaling-policies works for me.
>> >>> >
>> >>> >
>> >>> > On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com>
>> >>> > wrote:
>> >>> >>
>> >>> >> Np,  I've wrapped it with an expect script for the time being.
>> >>> >>
>> >>> >> If I get a chance, I'll have a look at the bugs at some point.
>> >>> >>
>> >>> >> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando
>> >>> >> <ni...@gmail.com>
>> >>> >> wrote:
>> >>> >> > Yes, I was suggesting the work-around, since you claimed it's not
>> >>> >> > working
>> >>> >> > :-)
>> >>> >> >
>> >>> >> >
>> >>> >> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com>
>> >>> >> > wrote:
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando
>> >>> >> >> <ni...@gmail.com>
>> >>> >> >> wrote:
>> >>> >> >>>
>> >>> >> >>> Hi Chris,
>> >>> >> >>>
>> >>> >> >>> I think you need to run the deploy-partition command inside the
>> >>> >> >>> stratos
>> >>> >> >>> CLI console.
>> >>> >> >>
>> >>> >> >> Yes. That's the workaround. However what Chris needs is to run
>> it
>> >>> >> >> as an
>> >>> >> >> external commands. The way Chris tried is supposed to work and
>> >>> >> >> that's
>> >>> >> >> how
>> >>> >> >> the CLI was designed.
>> >>> >> >>>
>> >>> >> >>>
>> >>> >> >>>
>> >>> >> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <
>> chsnow123@gmail.com>
>> >>> >> >>> wrote:
>> >>> >> >>>>
>> >>> >> >>>> I'm trying to deploy a partition using the following command:
>> >>> >> >>>>
>> >>> >> >>>> vagrant@puppet:~$ java -jar
>> >>> >> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar
>> >>> >> >>>> -username
>> >>> >> >>>> admin -password admin deploy-partition -p
>> >>> >> >>>> /vagrant/openstack-qemu/example_partition.json
>> >>> >> >>>>
>> >>> >> >>>> The response is:
>> >>> >> >>>>
>> >>> >> >>>> Username: admin
>> >>> >> >>>> usage: deploy-partition [-p <resource path>]
>> >>> >> >>>>
>> >>> >> >>>> For some reason, the CLI is not recognising the '-p' option.
>> >>> >> >>>>
>> >>> >> >>>> Any ideas?
>> >>> >> >>>>
>> >>> >> >>>> Many thanks,
>> >>> >> >>>>
>> >>> >> >>>> Chris
>> >>> >> >>>
>> >>> >> >>>
>> >>> >> >>>
>> >>> >> >>>
>> >>> >> >>> --
>> >>> >> >>> Best Regards,
>> >>> >> >>> Nirmal
>> >>> >> >>>
>> >>> >> >>> Nirmal Fernando.
>> >>> >> >>> PPMC Member & Committer of Apache Stratos,
>> >>> >> >>> Senior Software Engineer, WSO2 Inc.
>> >>> >> >>>
>> >>> >> >>> Blog: http://nirmalfdo.blogspot.com/
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>
>> >>> >> >> --
>> >>> >> >> Isuru Perera
>> >>> >> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> >>> >> >> Lean . Enterprise . Middleware
>> >>> >> >>
>> >>> >> >> about.me/chrishantha
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > --
>> >>> >> > Best Regards,
>> >>> >> > Nirmal
>> >>> >> >
>> >>> >> > Nirmal Fernando.
>> >>> >> > PPMC Member & Committer of Apache Stratos,
>> >>> >> > Senior Software Engineer, WSO2 Inc.
>> >>> >> >
>> >>> >> > Blog: http://nirmalfdo.blogspot.com/
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> --
>> >>> >> Check out my professional profile and connect with me on LinkedIn.
>> >>> >> http://lnkd.in/cw5k69
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > Regards,
>> >>> > Manula Chathurika Thantriwatte
>> >>> > Software Engineer
>> >>> > WSO2 Inc. : http://wso2.com
>> >>> > lean . enterprise . middleware
>> >>> >
>> >>> > email : manulac@wso2.com / manula@apache.org
>> >>> > phone : +94 772492511
>> >>> > blog : http://manulachathurika.blogspot.com/
>> >>> >
>> >>> >
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Check out my professional profile and connect with me on LinkedIn.
>> >>> http://lnkd.in/cw5k69
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Best Regards,
>> >> Nirmal
>> >>
>> >> Nirmal Fernando.
>> >> PPMC Member & Committer of Apache Stratos,
>> >> Senior Software Engineer, WSO2 Inc.
>> >>
>> >> Blog: http://nirmalfdo.blogspot.com/
>> >
>> >
>> >
>> >
>> > --
>> > Pradeep Fernando.
>> > http://pradeepfernando.blogspot.com/
>>
>>
>>
>> --
>> Check out my professional profile and connect with me on LinkedIn.
>> http://lnkd.in/cw5k69
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Pradeep Fernando.
http://pradeepfernando.blogspot.com/

Re: CLI command line mode usage

Posted by Nirmal Fernando <ni...@gmail.com>.
On Wed, Apr 30, 2014 at 11:03 PM, chris snow <ch...@gmail.com> wrote:

> Hi Pradeep, thanks for the info - I'll take a look into your web mock.
>
> If it looks like a mock library is the way to go for the CLI, is there
> anything stopping us from using  a mock library like easymock?
>

I don't see any.

>
> On Wed, Apr 30, 2014 at 5:34 PM, Pradeep Fernando <pr...@gmail.com>
> wrote:
> > Hi Chris,
> >
> > We dont use mock libs. However i wrote a mock backend for SM REST api. It
> > manipulates the input using a in-memory object model (you can deploy
> > partition/subscribe to cartridges/etc). To build the mock webapp you
> have to
> > pass the
> >
> > -Denv=test
> >
> > property while building the components/org.apache.stratos.rest.endpoint
> > module.
> >
> > copy the resulting war (you get the war file with same name, but the
> content
> > is different - cxf-servlet.xml) to repositoty/deployment/server/webapps
> and
> > test CLI or UI
> >
> > thanks.
> >
> >
> > On Wed, Apr 30, 2014 at 7:13 PM, Nirmal Fernando <nirmal070125@gmail.com
> >
> > wrote:
> >>
> >> Chris,
> >>
> >> AFAIK Stratos Manager uses a mock library.
> >>
> >>
> >> On Wed, Apr 30, 2014 at 12:46 PM, chris snow <ch...@gmail.com>
> wrote:
> >>>
> >>> Yep, that's what I found too.
> >>>
> >>> I'm going to take a look at fixing this.  I think the first step is
> >>> adding some unit tests.
> >>>
> >>> Do we have a preference over mock libraries?  I had a quick scan in
> >>> the source and couldn't see any other mock libraries being used.
> >>>
> >>>
> >>> On Wed, Apr 30, 2014 at 7:53 AM, Manula Chathurika Thantriwatte
> >>> <ma...@wso2.com> wrote:
> >>> > Hi,
> >>> >
> >>> > This works for commands which haven't options. Ex : ./stratos.sh -u
> >>> > admin -p
> >>> > admin list-autoscaling-policies works for me.
> >>> >
> >>> >
> >>> > On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> Np,  I've wrapped it with an expect script for the time being.
> >>> >>
> >>> >> If I get a chance, I'll have a look at the bugs at some point.
> >>> >>
> >>> >> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando
> >>> >> <ni...@gmail.com>
> >>> >> wrote:
> >>> >> > Yes, I was suggesting the work-around, since you claimed it's not
> >>> >> > working
> >>> >> > :-)
> >>> >> >
> >>> >> >
> >>> >> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando
> >>> >> >> <ni...@gmail.com>
> >>> >> >> wrote:
> >>> >> >>>
> >>> >> >>> Hi Chris,
> >>> >> >>>
> >>> >> >>> I think you need to run the deploy-partition command inside the
> >>> >> >>> stratos
> >>> >> >>> CLI console.
> >>> >> >>
> >>> >> >> Yes. That's the workaround. However what Chris needs is to run it
> >>> >> >> as an
> >>> >> >> external commands. The way Chris tried is supposed to work and
> >>> >> >> that's
> >>> >> >> how
> >>> >> >> the CLI was designed.
> >>> >> >>>
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <
> chsnow123@gmail.com>
> >>> >> >>> wrote:
> >>> >> >>>>
> >>> >> >>>> I'm trying to deploy a partition using the following command:
> >>> >> >>>>
> >>> >> >>>> vagrant@puppet:~$ java -jar
> >>> >> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar
> >>> >> >>>> -username
> >>> >> >>>> admin -password admin deploy-partition -p
> >>> >> >>>> /vagrant/openstack-qemu/example_partition.json
> >>> >> >>>>
> >>> >> >>>> The response is:
> >>> >> >>>>
> >>> >> >>>> Username: admin
> >>> >> >>>> usage: deploy-partition [-p <resource path>]
> >>> >> >>>>
> >>> >> >>>> For some reason, the CLI is not recognising the '-p' option.
> >>> >> >>>>
> >>> >> >>>> Any ideas?
> >>> >> >>>>
> >>> >> >>>> Many thanks,
> >>> >> >>>>
> >>> >> >>>> Chris
> >>> >> >>>
> >>> >> >>>
> >>> >> >>>
> >>> >> >>>
> >>> >> >>> --
> >>> >> >>> Best Regards,
> >>> >> >>> Nirmal
> >>> >> >>>
> >>> >> >>> Nirmal Fernando.
> >>> >> >>> PPMC Member & Committer of Apache Stratos,
> >>> >> >>> Senior Software Engineer, WSO2 Inc.
> >>> >> >>>
> >>> >> >>> Blog: http://nirmalfdo.blogspot.com/
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> --
> >>> >> >> Isuru Perera
> >>> >> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> >>> >> >> Lean . Enterprise . Middleware
> >>> >> >>
> >>> >> >> about.me/chrishantha
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > --
> >>> >> > Best Regards,
> >>> >> > Nirmal
> >>> >> >
> >>> >> > Nirmal Fernando.
> >>> >> > PPMC Member & Committer of Apache Stratos,
> >>> >> > Senior Software Engineer, WSO2 Inc.
> >>> >> >
> >>> >> > Blog: http://nirmalfdo.blogspot.com/
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Check out my professional profile and connect with me on LinkedIn.
> >>> >> http://lnkd.in/cw5k69
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Regards,
> >>> > Manula Chathurika Thantriwatte
> >>> > Software Engineer
> >>> > WSO2 Inc. : http://wso2.com
> >>> > lean . enterprise . middleware
> >>> >
> >>> > email : manulac@wso2.com / manula@apache.org
> >>> > phone : +94 772492511
> >>> > blog : http://manulachathurika.blogspot.com/
> >>> >
> >>> >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Check out my professional profile and connect with me on LinkedIn.
> >>> http://lnkd.in/cw5k69
> >>
> >>
> >>
> >>
> >> --
> >> Best Regards,
> >> Nirmal
> >>
> >> Nirmal Fernando.
> >> PPMC Member & Committer of Apache Stratos,
> >> Senior Software Engineer, WSO2 Inc.
> >>
> >> Blog: http://nirmalfdo.blogspot.com/
> >
> >
> >
> >
> > --
> > Pradeep Fernando.
> > http://pradeepfernando.blogspot.com/
>
>
>
> --
> Check out my professional profile and connect with me on LinkedIn.
> http://lnkd.in/cw5k69
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: CLI command line mode usage

Posted by chris snow <ch...@gmail.com>.
Hi Pradeep, thanks for the info - I'll take a look into your web mock.

If it looks like a mock library is the way to go for the CLI, is there
anything stopping us from using  a mock library like easymock?

On Wed, Apr 30, 2014 at 5:34 PM, Pradeep Fernando <pr...@gmail.com> wrote:
> Hi Chris,
>
> We dont use mock libs. However i wrote a mock backend for SM REST api. It
> manipulates the input using a in-memory object model (you can deploy
> partition/subscribe to cartridges/etc). To build the mock webapp you have to
> pass the
>
> -Denv=test
>
> property while building the components/org.apache.stratos.rest.endpoint
> module.
>
> copy the resulting war (you get the war file with same name, but the content
> is different - cxf-servlet.xml) to repositoty/deployment/server/webapps and
> test CLI or UI
>
> thanks.
>
>
> On Wed, Apr 30, 2014 at 7:13 PM, Nirmal Fernando <ni...@gmail.com>
> wrote:
>>
>> Chris,
>>
>> AFAIK Stratos Manager uses a mock library.
>>
>>
>> On Wed, Apr 30, 2014 at 12:46 PM, chris snow <ch...@gmail.com> wrote:
>>>
>>> Yep, that's what I found too.
>>>
>>> I'm going to take a look at fixing this.  I think the first step is
>>> adding some unit tests.
>>>
>>> Do we have a preference over mock libraries?  I had a quick scan in
>>> the source and couldn't see any other mock libraries being used.
>>>
>>>
>>> On Wed, Apr 30, 2014 at 7:53 AM, Manula Chathurika Thantriwatte
>>> <ma...@wso2.com> wrote:
>>> > Hi,
>>> >
>>> > This works for commands which haven't options. Ex : ./stratos.sh -u
>>> > admin -p
>>> > admin list-autoscaling-policies works for me.
>>> >
>>> >
>>> > On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Np,  I've wrapped it with an expect script for the time being.
>>> >>
>>> >> If I get a chance, I'll have a look at the bugs at some point.
>>> >>
>>> >> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando
>>> >> <ni...@gmail.com>
>>> >> wrote:
>>> >> > Yes, I was suggesting the work-around, since you claimed it's not
>>> >> > working
>>> >> > :-)
>>> >> >
>>> >> >
>>> >> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com>
>>> >> > wrote:
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando
>>> >> >> <ni...@gmail.com>
>>> >> >> wrote:
>>> >> >>>
>>> >> >>> Hi Chris,
>>> >> >>>
>>> >> >>> I think you need to run the deploy-partition command inside the
>>> >> >>> stratos
>>> >> >>> CLI console.
>>> >> >>
>>> >> >> Yes. That's the workaround. However what Chris needs is to run it
>>> >> >> as an
>>> >> >> external commands. The way Chris tried is supposed to work and
>>> >> >> that's
>>> >> >> how
>>> >> >> the CLI was designed.
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com>
>>> >> >>> wrote:
>>> >> >>>>
>>> >> >>>> I'm trying to deploy a partition using the following command:
>>> >> >>>>
>>> >> >>>> vagrant@puppet:~$ java -jar
>>> >> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar
>>> >> >>>> -username
>>> >> >>>> admin -password admin deploy-partition -p
>>> >> >>>> /vagrant/openstack-qemu/example_partition.json
>>> >> >>>>
>>> >> >>>> The response is:
>>> >> >>>>
>>> >> >>>> Username: admin
>>> >> >>>> usage: deploy-partition [-p <resource path>]
>>> >> >>>>
>>> >> >>>> For some reason, the CLI is not recognising the '-p' option.
>>> >> >>>>
>>> >> >>>> Any ideas?
>>> >> >>>>
>>> >> >>>> Many thanks,
>>> >> >>>>
>>> >> >>>> Chris
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> --
>>> >> >>> Best Regards,
>>> >> >>> Nirmal
>>> >> >>>
>>> >> >>> Nirmal Fernando.
>>> >> >>> PPMC Member & Committer of Apache Stratos,
>>> >> >>> Senior Software Engineer, WSO2 Inc.
>>> >> >>>
>>> >> >>> Blog: http://nirmalfdo.blogspot.com/
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> Isuru Perera
>>> >> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>> >> >> Lean . Enterprise . Middleware
>>> >> >>
>>> >> >> about.me/chrishantha
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Best Regards,
>>> >> > Nirmal
>>> >> >
>>> >> > Nirmal Fernando.
>>> >> > PPMC Member & Committer of Apache Stratos,
>>> >> > Senior Software Engineer, WSO2 Inc.
>>> >> >
>>> >> > Blog: http://nirmalfdo.blogspot.com/
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Check out my professional profile and connect with me on LinkedIn.
>>> >> http://lnkd.in/cw5k69
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Regards,
>>> > Manula Chathurika Thantriwatte
>>> > Software Engineer
>>> > WSO2 Inc. : http://wso2.com
>>> > lean . enterprise . middleware
>>> >
>>> > email : manulac@wso2.com / manula@apache.org
>>> > phone : +94 772492511
>>> > blog : http://manulachathurika.blogspot.com/
>>> >
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Check out my professional profile and connect with me on LinkedIn.
>>> http://lnkd.in/cw5k69
>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>
>
>
>
> --
> Pradeep Fernando.
> http://pradeepfernando.blogspot.com/



-- 
Check out my professional profile and connect with me on LinkedIn.
http://lnkd.in/cw5k69

Re: CLI command line mode usage

Posted by Nirmal Fernando <ni...@gmail.com>.
[Adding Mari]


On Wed, Apr 30, 2014 at 10:07 PM, Nirmal Fernando <ni...@gmail.com>wrote:

> Hi Pradeep,
>
> Would you be able to find some time to document this?
>
>
> On Wed, Apr 30, 2014 at 10:04 PM, Pradeep Fernando <pr...@gmail.com>wrote:
>
>> Hi Chris,
>>
>> We dont use mock libs. However i wrote a mock backend for SM REST api. It
>> manipulates the input using a in-memory object model (you can deploy
>> partition/subscribe to cartridges/etc). To build the mock webapp you have
>> to pass the
>>
>> -Denv=test
>>
>> property while building the components/org.apache.stratos.rest.endpoint
>> module.
>>
>> copy the resulting war (you get the war file with same name, but the
>> content is different - cxf-servlet.xml) to
>> repositoty/deployment/server/webapps and test CLI or UI
>>
>> thanks.
>>
>>
>> On Wed, Apr 30, 2014 at 7:13 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>>
>>> Chris,
>>>
>>> AFAIK Stratos Manager uses a mock library.
>>>
>>>
>>> On Wed, Apr 30, 2014 at 12:46 PM, chris snow <ch...@gmail.com>wrote:
>>>
>>>> Yep, that's what I found too.
>>>>
>>>> I'm going to take a look at fixing this.  I think the first step is
>>>> adding some unit tests.
>>>>
>>>> Do we have a preference over mock libraries?  I had a quick scan in
>>>> the source and couldn't see any other mock libraries being used.
>>>>
>>>>
>>>> On Wed, Apr 30, 2014 at 7:53 AM, Manula Chathurika Thantriwatte
>>>> <ma...@wso2.com> wrote:
>>>> > Hi,
>>>> >
>>>> > This works for commands which haven't options. Ex : ./stratos.sh -u
>>>> admin -p
>>>> > admin list-autoscaling-policies works for me.
>>>> >
>>>> >
>>>> > On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com>
>>>> wrote:
>>>> >>
>>>> >> Np,  I've wrapped it with an expect script for the time being.
>>>> >>
>>>> >> If I get a chance, I'll have a look at the bugs at some point.
>>>> >>
>>>> >> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando <
>>>> nirmal070125@gmail.com>
>>>> >> wrote:
>>>> >> > Yes, I was suggesting the work-around, since you claimed it's not
>>>> >> > working
>>>> >> > :-)
>>>> >> >
>>>> >> >
>>>> >> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com>
>>>> wrote:
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando
>>>> >> >> <ni...@gmail.com>
>>>> >> >> wrote:
>>>> >> >>>
>>>> >> >>> Hi Chris,
>>>> >> >>>
>>>> >> >>> I think you need to run the deploy-partition command inside the
>>>> >> >>> stratos
>>>> >> >>> CLI console.
>>>> >> >>
>>>> >> >> Yes. That's the workaround. However what Chris needs is to run it
>>>> as an
>>>> >> >> external commands. The way Chris tried is supposed to work and
>>>> that's
>>>> >> >> how
>>>> >> >> the CLI was designed.
>>>> >> >>>
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <
>>>> chsnow123@gmail.com>
>>>> >> >>> wrote:
>>>> >> >>>>
>>>> >> >>>> I'm trying to deploy a partition using the following command:
>>>> >> >>>>
>>>> >> >>>> vagrant@puppet:~$ java -jar
>>>> >> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar
>>>> -username
>>>> >> >>>> admin -password admin deploy-partition -p
>>>> >> >>>> /vagrant/openstack-qemu/example_partition.json
>>>> >> >>>>
>>>> >> >>>> The response is:
>>>> >> >>>>
>>>> >> >>>> Username: admin
>>>> >> >>>> usage: deploy-partition [-p <resource path>]
>>>> >> >>>>
>>>> >> >>>> For some reason, the CLI is not recognising the '-p' option.
>>>> >> >>>>
>>>> >> >>>> Any ideas?
>>>> >> >>>>
>>>> >> >>>> Many thanks,
>>>> >> >>>>
>>>> >> >>>> Chris
>>>> >> >>>
>>>> >> >>>
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> --
>>>> >> >>> Best Regards,
>>>> >> >>> Nirmal
>>>> >> >>>
>>>> >> >>> Nirmal Fernando.
>>>> >> >>> PPMC Member & Committer of Apache Stratos,
>>>> >> >>> Senior Software Engineer, WSO2 Inc.
>>>> >> >>>
>>>> >> >>> Blog: http://nirmalfdo.blogspot.com/
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >> --
>>>> >> >> Isuru Perera
>>>> >> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>>> >> >> Lean . Enterprise . Middleware
>>>> >> >>
>>>> >> >> about.me/chrishantha
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > --
>>>> >> > Best Regards,
>>>> >> > Nirmal
>>>> >> >
>>>> >> > Nirmal Fernando.
>>>> >> > PPMC Member & Committer of Apache Stratos,
>>>> >> > Senior Software Engineer, WSO2 Inc.
>>>> >> >
>>>> >> > Blog: http://nirmalfdo.blogspot.com/
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Check out my professional profile and connect with me on LinkedIn.
>>>> >> http://lnkd.in/cw5k69
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Regards,
>>>> > Manula Chathurika Thantriwatte
>>>> > Software Engineer
>>>> > WSO2 Inc. : http://wso2.com
>>>> > lean . enterprise . middleware
>>>> >
>>>> > email : manulac@wso2.com / manula@apache.org
>>>> > phone : +94 772492511
>>>> > blog : http://manulachathurika.blogspot.com/
>>>> >
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Check out my professional profile and connect with me on LinkedIn.
>>>> http://lnkd.in/cw5k69
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Pradeep Fernando.
>> http://pradeepfernando.blogspot.com/
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: CLI command line mode usage

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Pradeep,

Would you be able to find some time to document this?


On Wed, Apr 30, 2014 at 10:04 PM, Pradeep Fernando <pr...@gmail.com>wrote:

> Hi Chris,
>
> We dont use mock libs. However i wrote a mock backend for SM REST api. It
> manipulates the input using a in-memory object model (you can deploy
> partition/subscribe to cartridges/etc). To build the mock webapp you have
> to pass the
>
> -Denv=test
>
> property while building the components/org.apache.stratos.rest.endpoint
> module.
>
> copy the resulting war (you get the war file with same name, but the
> content is different - cxf-servlet.xml) to
> repositoty/deployment/server/webapps and test CLI or UI
>
> thanks.
>
>
> On Wed, Apr 30, 2014 at 7:13 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>> Chris,
>>
>> AFAIK Stratos Manager uses a mock library.
>>
>>
>> On Wed, Apr 30, 2014 at 12:46 PM, chris snow <ch...@gmail.com> wrote:
>>
>>> Yep, that's what I found too.
>>>
>>> I'm going to take a look at fixing this.  I think the first step is
>>> adding some unit tests.
>>>
>>> Do we have a preference over mock libraries?  I had a quick scan in
>>> the source and couldn't see any other mock libraries being used.
>>>
>>>
>>> On Wed, Apr 30, 2014 at 7:53 AM, Manula Chathurika Thantriwatte
>>> <ma...@wso2.com> wrote:
>>> > Hi,
>>> >
>>> > This works for commands which haven't options. Ex : ./stratos.sh -u
>>> admin -p
>>> > admin list-autoscaling-policies works for me.
>>> >
>>> >
>>> > On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com>
>>> wrote:
>>> >>
>>> >> Np,  I've wrapped it with an expect script for the time being.
>>> >>
>>> >> If I get a chance, I'll have a look at the bugs at some point.
>>> >>
>>> >> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando <
>>> nirmal070125@gmail.com>
>>> >> wrote:
>>> >> > Yes, I was suggesting the work-around, since you claimed it's not
>>> >> > working
>>> >> > :-)
>>> >> >
>>> >> >
>>> >> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com>
>>> wrote:
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando
>>> >> >> <ni...@gmail.com>
>>> >> >> wrote:
>>> >> >>>
>>> >> >>> Hi Chris,
>>> >> >>>
>>> >> >>> I think you need to run the deploy-partition command inside the
>>> >> >>> stratos
>>> >> >>> CLI console.
>>> >> >>
>>> >> >> Yes. That's the workaround. However what Chris needs is to run it
>>> as an
>>> >> >> external commands. The way Chris tried is supposed to work and
>>> that's
>>> >> >> how
>>> >> >> the CLI was designed.
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <chsnow123@gmail.com
>>> >
>>> >> >>> wrote:
>>> >> >>>>
>>> >> >>>> I'm trying to deploy a partition using the following command:
>>> >> >>>>
>>> >> >>>> vagrant@puppet:~$ java -jar
>>> >> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar
>>> -username
>>> >> >>>> admin -password admin deploy-partition -p
>>> >> >>>> /vagrant/openstack-qemu/example_partition.json
>>> >> >>>>
>>> >> >>>> The response is:
>>> >> >>>>
>>> >> >>>> Username: admin
>>> >> >>>> usage: deploy-partition [-p <resource path>]
>>> >> >>>>
>>> >> >>>> For some reason, the CLI is not recognising the '-p' option.
>>> >> >>>>
>>> >> >>>> Any ideas?
>>> >> >>>>
>>> >> >>>> Many thanks,
>>> >> >>>>
>>> >> >>>> Chris
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> --
>>> >> >>> Best Regards,
>>> >> >>> Nirmal
>>> >> >>>
>>> >> >>> Nirmal Fernando.
>>> >> >>> PPMC Member & Committer of Apache Stratos,
>>> >> >>> Senior Software Engineer, WSO2 Inc.
>>> >> >>>
>>> >> >>> Blog: http://nirmalfdo.blogspot.com/
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> Isuru Perera
>>> >> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>> >> >> Lean . Enterprise . Middleware
>>> >> >>
>>> >> >> about.me/chrishantha
>>> >> >
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Best Regards,
>>> >> > Nirmal
>>> >> >
>>> >> > Nirmal Fernando.
>>> >> > PPMC Member & Committer of Apache Stratos,
>>> >> > Senior Software Engineer, WSO2 Inc.
>>> >> >
>>> >> > Blog: http://nirmalfdo.blogspot.com/
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Check out my professional profile and connect with me on LinkedIn.
>>> >> http://lnkd.in/cw5k69
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Regards,
>>> > Manula Chathurika Thantriwatte
>>> > Software Engineer
>>> > WSO2 Inc. : http://wso2.com
>>> > lean . enterprise . middleware
>>> >
>>> > email : manulac@wso2.com / manula@apache.org
>>> > phone : +94 772492511
>>> > blog : http://manulachathurika.blogspot.com/
>>> >
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Check out my professional profile and connect with me on LinkedIn.
>>> http://lnkd.in/cw5k69
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Pradeep Fernando.
> http://pradeepfernando.blogspot.com/
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: CLI command line mode usage

Posted by Pradeep Fernando <pr...@gmail.com>.
Hi Chris,

We dont use mock libs. However i wrote a mock backend for SM REST api. It
manipulates the input using a in-memory object model (you can deploy
partition/subscribe to cartridges/etc). To build the mock webapp you have
to pass the

-Denv=test

property while building the components/org.apache.stratos.rest.endpoint
module.

copy the resulting war (you get the war file with same name, but the
content is different - cxf-servlet.xml) to
repositoty/deployment/server/webapps and test CLI or UI

thanks.


On Wed, Apr 30, 2014 at 7:13 PM, Nirmal Fernando <ni...@gmail.com>wrote:

> Chris,
>
> AFAIK Stratos Manager uses a mock library.
>
>
> On Wed, Apr 30, 2014 at 12:46 PM, chris snow <ch...@gmail.com> wrote:
>
>> Yep, that's what I found too.
>>
>> I'm going to take a look at fixing this.  I think the first step is
>> adding some unit tests.
>>
>> Do we have a preference over mock libraries?  I had a quick scan in
>> the source and couldn't see any other mock libraries being used.
>>
>>
>> On Wed, Apr 30, 2014 at 7:53 AM, Manula Chathurika Thantriwatte
>> <ma...@wso2.com> wrote:
>> > Hi,
>> >
>> > This works for commands which haven't options. Ex : ./stratos.sh -u
>> admin -p
>> > admin list-autoscaling-policies works for me.
>> >
>> >
>> > On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com>
>> wrote:
>> >>
>> >> Np,  I've wrapped it with an expect script for the time being.
>> >>
>> >> If I get a chance, I'll have a look at the bugs at some point.
>> >>
>> >> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando <
>> nirmal070125@gmail.com>
>> >> wrote:
>> >> > Yes, I was suggesting the work-around, since you claimed it's not
>> >> > working
>> >> > :-)
>> >> >
>> >> >
>> >> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com>
>> wrote:
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando
>> >> >> <ni...@gmail.com>
>> >> >> wrote:
>> >> >>>
>> >> >>> Hi Chris,
>> >> >>>
>> >> >>> I think you need to run the deploy-partition command inside the
>> >> >>> stratos
>> >> >>> CLI console.
>> >> >>
>> >> >> Yes. That's the workaround. However what Chris needs is to run it
>> as an
>> >> >> external commands. The way Chris tried is supposed to work and
>> that's
>> >> >> how
>> >> >> the CLI was designed.
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com>
>> >> >>> wrote:
>> >> >>>>
>> >> >>>> I'm trying to deploy a partition using the following command:
>> >> >>>>
>> >> >>>> vagrant@puppet:~$ java -jar
>> >> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar
>> -username
>> >> >>>> admin -password admin deploy-partition -p
>> >> >>>> /vagrant/openstack-qemu/example_partition.json
>> >> >>>>
>> >> >>>> The response is:
>> >> >>>>
>> >> >>>> Username: admin
>> >> >>>> usage: deploy-partition [-p <resource path>]
>> >> >>>>
>> >> >>>> For some reason, the CLI is not recognising the '-p' option.
>> >> >>>>
>> >> >>>> Any ideas?
>> >> >>>>
>> >> >>>> Many thanks,
>> >> >>>>
>> >> >>>> Chris
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> --
>> >> >>> Best Regards,
>> >> >>> Nirmal
>> >> >>>
>> >> >>> Nirmal Fernando.
>> >> >>> PPMC Member & Committer of Apache Stratos,
>> >> >>> Senior Software Engineer, WSO2 Inc.
>> >> >>>
>> >> >>> Blog: http://nirmalfdo.blogspot.com/
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Isuru Perera
>> >> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> >> >> Lean . Enterprise . Middleware
>> >> >>
>> >> >> about.me/chrishantha
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Best Regards,
>> >> > Nirmal
>> >> >
>> >> > Nirmal Fernando.
>> >> > PPMC Member & Committer of Apache Stratos,
>> >> > Senior Software Engineer, WSO2 Inc.
>> >> >
>> >> > Blog: http://nirmalfdo.blogspot.com/
>> >>
>> >>
>> >>
>> >> --
>> >> Check out my professional profile and connect with me on LinkedIn.
>> >> http://lnkd.in/cw5k69
>> >
>> >
>> >
>> >
>> > --
>> > Regards,
>> > Manula Chathurika Thantriwatte
>> > Software Engineer
>> > WSO2 Inc. : http://wso2.com
>> > lean . enterprise . middleware
>> >
>> > email : manulac@wso2.com / manula@apache.org
>> > phone : +94 772492511
>> > blog : http://manulachathurika.blogspot.com/
>> >
>> >
>> >
>>
>>
>>
>> --
>> Check out my professional profile and connect with me on LinkedIn.
>> http://lnkd.in/cw5k69
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Pradeep Fernando.
http://pradeepfernando.blogspot.com/

Re: CLI command line mode usage

Posted by Nirmal Fernando <ni...@gmail.com>.
Chris,

AFAIK Stratos Manager uses a mock library.


On Wed, Apr 30, 2014 at 12:46 PM, chris snow <ch...@gmail.com> wrote:

> Yep, that's what I found too.
>
> I'm going to take a look at fixing this.  I think the first step is
> adding some unit tests.
>
> Do we have a preference over mock libraries?  I had a quick scan in
> the source and couldn't see any other mock libraries being used.
>
>
> On Wed, Apr 30, 2014 at 7:53 AM, Manula Chathurika Thantriwatte
> <ma...@wso2.com> wrote:
> > Hi,
> >
> > This works for commands which haven't options. Ex : ./stratos.sh -u
> admin -p
> > admin list-autoscaling-policies works for me.
> >
> >
> > On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com>
> wrote:
> >>
> >> Np,  I've wrapped it with an expect script for the time being.
> >>
> >> If I get a chance, I'll have a look at the bugs at some point.
> >>
> >> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando <
> nirmal070125@gmail.com>
> >> wrote:
> >> > Yes, I was suggesting the work-around, since you claimed it's not
> >> > working
> >> > :-)
> >> >
> >> >
> >> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com>
> wrote:
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando
> >> >> <ni...@gmail.com>
> >> >> wrote:
> >> >>>
> >> >>> Hi Chris,
> >> >>>
> >> >>> I think you need to run the deploy-partition command inside the
> >> >>> stratos
> >> >>> CLI console.
> >> >>
> >> >> Yes. That's the workaround. However what Chris needs is to run it as
> an
> >> >> external commands. The way Chris tried is supposed to work and that's
> >> >> how
> >> >> the CLI was designed.
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com>
> >> >>> wrote:
> >> >>>>
> >> >>>> I'm trying to deploy a partition using the following command:
> >> >>>>
> >> >>>> vagrant@puppet:~$ java -jar
> >> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar
> -username
> >> >>>> admin -password admin deploy-partition -p
> >> >>>> /vagrant/openstack-qemu/example_partition.json
> >> >>>>
> >> >>>> The response is:
> >> >>>>
> >> >>>> Username: admin
> >> >>>> usage: deploy-partition [-p <resource path>]
> >> >>>>
> >> >>>> For some reason, the CLI is not recognising the '-p' option.
> >> >>>>
> >> >>>> Any ideas?
> >> >>>>
> >> >>>> Many thanks,
> >> >>>>
> >> >>>> Chris
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Best Regards,
> >> >>> Nirmal
> >> >>>
> >> >>> Nirmal Fernando.
> >> >>> PPMC Member & Committer of Apache Stratos,
> >> >>> Senior Software Engineer, WSO2 Inc.
> >> >>>
> >> >>> Blog: http://nirmalfdo.blogspot.com/
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Isuru Perera
> >> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> >> >> Lean . Enterprise . Middleware
> >> >>
> >> >> about.me/chrishantha
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Best Regards,
> >> > Nirmal
> >> >
> >> > Nirmal Fernando.
> >> > PPMC Member & Committer of Apache Stratos,
> >> > Senior Software Engineer, WSO2 Inc.
> >> >
> >> > Blog: http://nirmalfdo.blogspot.com/
> >>
> >>
> >>
> >> --
> >> Check out my professional profile and connect with me on LinkedIn.
> >> http://lnkd.in/cw5k69
> >
> >
> >
> >
> > --
> > Regards,
> > Manula Chathurika Thantriwatte
> > Software Engineer
> > WSO2 Inc. : http://wso2.com
> > lean . enterprise . middleware
> >
> > email : manulac@wso2.com / manula@apache.org
> > phone : +94 772492511
> > blog : http://manulachathurika.blogspot.com/
> >
> >
> >
>
>
>
> --
> Check out my professional profile and connect with me on LinkedIn.
> http://lnkd.in/cw5k69
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: CLI command line mode usage

Posted by chris snow <ch...@gmail.com>.
Yep, that's what I found too.

I'm going to take a look at fixing this.  I think the first step is
adding some unit tests.

Do we have a preference over mock libraries?  I had a quick scan in
the source and couldn't see any other mock libraries being used.


On Wed, Apr 30, 2014 at 7:53 AM, Manula Chathurika Thantriwatte
<ma...@wso2.com> wrote:
> Hi,
>
> This works for commands which haven't options. Ex : ./stratos.sh -u admin -p
> admin list-autoscaling-policies works for me.
>
>
> On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com> wrote:
>>
>> Np,  I've wrapped it with an expect script for the time being.
>>
>> If I get a chance, I'll have a look at the bugs at some point.
>>
>> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando <ni...@gmail.com>
>> wrote:
>> > Yes, I was suggesting the work-around, since you claimed it's not
>> > working
>> > :-)
>> >
>> >
>> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com> wrote:
>> >>
>> >>
>> >>
>> >>
>> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando
>> >> <ni...@gmail.com>
>> >> wrote:
>> >>>
>> >>> Hi Chris,
>> >>>
>> >>> I think you need to run the deploy-partition command inside the
>> >>> stratos
>> >>> CLI console.
>> >>
>> >> Yes. That's the workaround. However what Chris needs is to run it as an
>> >> external commands. The way Chris tried is supposed to work and that's
>> >> how
>> >> the CLI was designed.
>> >>>
>> >>>
>> >>>
>> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com>
>> >>> wrote:
>> >>>>
>> >>>> I'm trying to deploy a partition using the following command:
>> >>>>
>> >>>> vagrant@puppet:~$ java -jar
>> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
>> >>>> admin -password admin deploy-partition -p
>> >>>> /vagrant/openstack-qemu/example_partition.json
>> >>>>
>> >>>> The response is:
>> >>>>
>> >>>> Username: admin
>> >>>> usage: deploy-partition [-p <resource path>]
>> >>>>
>> >>>> For some reason, the CLI is not recognising the '-p' option.
>> >>>>
>> >>>> Any ideas?
>> >>>>
>> >>>> Many thanks,
>> >>>>
>> >>>> Chris
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Best Regards,
>> >>> Nirmal
>> >>>
>> >>> Nirmal Fernando.
>> >>> PPMC Member & Committer of Apache Stratos,
>> >>> Senior Software Engineer, WSO2 Inc.
>> >>>
>> >>> Blog: http://nirmalfdo.blogspot.com/
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Isuru Perera
>> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> >> Lean . Enterprise . Middleware
>> >>
>> >> about.me/chrishantha
>> >
>> >
>> >
>> >
>> > --
>> > Best Regards,
>> > Nirmal
>> >
>> > Nirmal Fernando.
>> > PPMC Member & Committer of Apache Stratos,
>> > Senior Software Engineer, WSO2 Inc.
>> >
>> > Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>> --
>> Check out my professional profile and connect with me on LinkedIn.
>> http://lnkd.in/cw5k69
>
>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>



-- 
Check out my professional profile and connect with me on LinkedIn.
http://lnkd.in/cw5k69

Re: CLI command line mode usage

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi,

This works for commands which haven't options. Ex : ./stratos.sh -u admin
-p admin list-autoscaling-policies works for me.


On Tue, Apr 29, 2014 at 11:59 PM, chris snow <ch...@gmail.com> wrote:

> Np,  I've wrapped it with an expect script for the time being.
>
> If I get a chance, I'll have a look at the bugs at some point.
>
> On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando <ni...@gmail.com>
> wrote:
> > Yes, I was suggesting the work-around, since you claimed it's not working
> > :-)
> >
> >
> > On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com> wrote:
> >>
> >>
> >>
> >>
> >> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando <
> nirmal070125@gmail.com>
> >> wrote:
> >>>
> >>> Hi Chris,
> >>>
> >>> I think you need to run the deploy-partition command inside the stratos
> >>> CLI console.
> >>
> >> Yes. That's the workaround. However what Chris needs is to run it as an
> >> external commands. The way Chris tried is supposed to work and that's
> how
> >> the CLI was designed.
> >>>
> >>>
> >>>
> >>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com>
> wrote:
> >>>>
> >>>> I'm trying to deploy a partition using the following command:
> >>>>
> >>>> vagrant@puppet:~$ java -jar
> >>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
> >>>> admin -password admin deploy-partition -p
> >>>> /vagrant/openstack-qemu/example_partition.json
> >>>>
> >>>> The response is:
> >>>>
> >>>> Username: admin
> >>>> usage: deploy-partition [-p <resource path>]
> >>>>
> >>>> For some reason, the CLI is not recognising the '-p' option.
> >>>>
> >>>> Any ideas?
> >>>>
> >>>> Many thanks,
> >>>>
> >>>> Chris
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Best Regards,
> >>> Nirmal
> >>>
> >>> Nirmal Fernando.
> >>> PPMC Member & Committer of Apache Stratos,
> >>> Senior Software Engineer, WSO2 Inc.
> >>>
> >>> Blog: http://nirmalfdo.blogspot.com/
> >>
> >>
> >>
> >>
> >> --
> >> Isuru Perera
> >> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> >> Lean . Enterprise . Middleware
> >>
> >> about.me/chrishantha
> >
> >
> >
> >
> > --
> > Best Regards,
> > Nirmal
> >
> > Nirmal Fernando.
> > PPMC Member & Committer of Apache Stratos,
> > Senior Software Engineer, WSO2 Inc.
> >
> > Blog: http://nirmalfdo.blogspot.com/
>
>
>
> --
> Check out my professional profile and connect with me on LinkedIn.
> http://lnkd.in/cw5k69
>



-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: CLI command line mode usage

Posted by chris snow <ch...@gmail.com>.
Np,  I've wrapped it with an expect script for the time being.

If I get a chance, I'll have a look at the bugs at some point.

On Tue, Apr 29, 2014 at 7:23 PM, Nirmal Fernando <ni...@gmail.com> wrote:
> Yes, I was suggesting the work-around, since you claimed it's not working
> :-)
>
>
> On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com> wrote:
>>
>>
>>
>>
>> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando <ni...@gmail.com>
>> wrote:
>>>
>>> Hi Chris,
>>>
>>> I think you need to run the deploy-partition command inside the stratos
>>> CLI console.
>>
>> Yes. That's the workaround. However what Chris needs is to run it as an
>> external commands. The way Chris tried is supposed to work and that's how
>> the CLI was designed.
>>>
>>>
>>>
>>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com> wrote:
>>>>
>>>> I'm trying to deploy a partition using the following command:
>>>>
>>>> vagrant@puppet:~$ java -jar
>>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
>>>> admin -password admin deploy-partition -p
>>>> /vagrant/openstack-qemu/example_partition.json
>>>>
>>>> The response is:
>>>>
>>>> Username: admin
>>>> usage: deploy-partition [-p <resource path>]
>>>>
>>>> For some reason, the CLI is not recognising the '-p' option.
>>>>
>>>> Any ideas?
>>>>
>>>> Many thanks,
>>>>
>>>> Chris
>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/



-- 
Check out my professional profile and connect with me on LinkedIn.
http://lnkd.in/cw5k69

Re: CLI command line mode usage

Posted by Nirmal Fernando <ni...@gmail.com>.
Yes, I was suggesting the work-around, since you claimed it's not working
:-)


On Tue, Apr 29, 2014 at 11:46 PM, Isuru Perera <is...@wso2.com> wrote:

>
>
>
> On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>> Hi Chris,
>>
>> I think you need to run the deploy-partition command inside the stratos
>> CLI console.
>>
> Yes. That's the workaround. However what Chris needs is to run it as an
> external commands. The way Chris tried is supposed to work and that's how
> the CLI was designed.
>
>>
>>
>> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com> wrote:
>>
>>> I'm trying to deploy a partition using the following command:
>>>
>>> vagrant@puppet:~$ java -jar
>>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
>>> admin -password admin deploy-partition -p
>>> /vagrant/openstack-qemu/example_partition.json
>>>
>>> The response is:
>>>
>>> Username: admin
>>> usage: deploy-partition [-p <resource path>]
>>>
>>> For some reason, the CLI is not recognising the '-p' option.
>>>
>>> Any ideas?
>>>
>>> Many thanks,
>>>
>>> Chris
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: CLI command line mode usage

Posted by Isuru Perera <is...@wso2.com>.
On Tue, Apr 29, 2014 at 11:14 AM, Nirmal Fernando <ni...@gmail.com>wrote:

> Hi Chris,
>
> I think you need to run the deploy-partition command inside the stratos
> CLI console.
>
Yes. That's the workaround. However what Chris needs is to run it as an
external commands. The way Chris tried is supposed to work and that's how
the CLI was designed.

>
>
> On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com> wrote:
>
>> I'm trying to deploy a partition using the following command:
>>
>> vagrant@puppet:~$ java -jar
>> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
>> admin -password admin deploy-partition -p
>> /vagrant/openstack-qemu/example_partition.json
>>
>> The response is:
>>
>> Username: admin
>> usage: deploy-partition [-p <resource path>]
>>
>> For some reason, the CLI is not recognising the '-p' option.
>>
>> Any ideas?
>>
>> Many thanks,
>>
>> Chris
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: CLI command line mode usage

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Chris,

I think you need to run the deploy-partition command inside the stratos CLI
console.


On Tue, Apr 29, 2014 at 11:14 PM, chris snow <ch...@gmail.com> wrote:

> I'm trying to deploy a partition using the following command:
>
> vagrant@puppet:~$ java -jar
> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
> admin -password admin deploy-partition -p
> /vagrant/openstack-qemu/example_partition.json
>
> The response is:
>
> Username: admin
> usage: deploy-partition [-p <resource path>]
>
> For some reason, the CLI is not recognising the '-p' option.
>
> Any ideas?
>
> Many thanks,
>
> Chris
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: CLI command line mode usage

Posted by Isuru Perera <is...@wso2.com>.
Hi Chris,

I remember, this didn't work for me also.

AFAIU, this is broken from https://issues.apache.org/jira/browse/STRATOS-414

A fix for this jira has modified the initial design and has added some
argument checking. I re-opened this sometime back to fix it properly.

I didn't get time to look at the issue yet. :(

We should fix this in master branch soon.

Thanks!

Best Regards,


On Tue, Apr 29, 2014 at 10:44 AM, chris snow <ch...@gmail.com> wrote:

> I'm trying to deploy a partition using the following command:
>
> vagrant@puppet:~$ java -jar
> $CLI_HOME/org.apache.stratos.cli-4.0.0-incubating-Tool.jar -username
> admin -password admin deploy-partition -p
> /vagrant/openstack-qemu/example_partition.json
>
> The response is:
>
> Username: admin
> usage: deploy-partition [-p <resource path>]
>
> For some reason, the CLI is not recognising the '-p' option.
>
> Any ideas?
>
> Many thanks,
>
> Chris
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha