[openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-07 Thread Jay Reslock
Hi,
This is my first mail to the group.  I hope I set the subject correctly and
that this hasn't been asked already.  I searched archives and did not see
this question asked or answered previously.

I am working on a client thing that uses the python-keystoneclient and
python-heatclient api bindings to set up an authenticated session and then
use that session to talk to the heat service.  This doesn't work for heat
but does work for other services such as nova and sahara.  Is this because
sessions aren't supported in the heatclient api yet?

sample code:

https://gist.github.com/jreslock/a525abdcce53ca0492a7

I'm using fabric to define tasks so I can call them via another tool.  When
I run the task I get:

TypeError: Client() takes at least 1 argument (0 given)

The documentation does not say anything about being able to pass session to
the heatclient but the others seem to work.  I just want to know if this is
intended/expected behavior or not.

-Jason
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-07 Thread Ian Cordasco


On 5/7/15, 14:43, "Jay Reslock"  wrote:

>Hi,
>This is my first mail to the group.  I hope I set the subject correctly
>and that this hasn't been asked already.  I searched archives and did not
>see this question asked or answered previously.
>
>
>I am working on a client thing that uses the python-keystoneclient and
>python-heatclient api bindings to set up an authenticated session and
>then use that session to talk to the heat service.  This doesn't work for
>heat but does work for other services
> such as nova and sahara.  Is this because sessions aren't supported in
>the heatclient api yet?
>
>
>sample code:
>
>
>https://gist.github.com/jreslock/a525abdcce53ca0492a7
>
>
>
>I'm using fabric to define tasks so I can call them via another tool.
>When I run the task I get:
>
>
>TypeError: Client() takes at least 1 argument (0 given)
>
>
>
>The documentation does not say anything about being able to pass session
>to the heatclient but the others seem to work.  I just want to know if
>this is intended/expected behavior or not.
>
>
>-Jason
>


Hey Jason,

Welcome to the list. There's a critical difference in the different
Client's that you import. In the rest of the examples you import from
foo.v2.client. In this case, you're importing heatclient.client. Since
heat's API is versioned, heatclient.client.Client is expecting a string
like 'v1' to be passed like

Client(version='v1', session=sess)

Alternatively, you can just do

from heatclient.v1 import client as heat_v1
heat = heat_v1.Client(session=sess)

Note, there is no v2 in heatclient.

Cheers,
Ian

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-07 Thread Sergey Kraynev
Hi Jay.

AFAIK, it works, but we can have some minor issues. There several atches on
review to improve it:

https://review.openstack.org/#/q/status:open+project:openstack/python-heatclient+branch:master+topic:improve-sessionclient,n,z

Also as I remember we really had bug mentioned by you, but fix was merged.
Please look:
https://review.openstack.org/#/c/160431/1
https://bugs.launchpad.net/python-heatclient/+bug/1427310

Which version of client do you use? Try to use code from master, it should
works.
Also one note: the best place for such questions is
openst...@lists.openstack.org or http://ask.openstack.org/. And of course
channel #heat in IRC.

Regards,
Sergey.

On 7 May 2015 at 23:43, Jay Reslock  wrote:

> Hi,
> This is my first mail to the group.  I hope I set the subject correctly
> and that this hasn't been asked already.  I searched archives and did not
> see this question asked or answered previously.
>
> I am working on a client thing that uses the python-keystoneclient and
> python-heatclient api bindings to set up an authenticated session and then
> use that session to talk to the heat service.  This doesn't work for heat
> but does work for other services such as nova and sahara.  Is this because
> sessions aren't supported in the heatclient api yet?
>
> sample code:
>
> https://gist.github.com/jreslock/a525abdcce53ca0492a7
>
> I'm using fabric to define tasks so I can call them via another tool.
> When I run the task I get:
>
> TypeError: Client() takes at least 1 argument (0 given)
>
> The documentation does not say anything about being able to pass session
> to the heatclient but the others seem to work.  I just want to know if this
> is intended/expected behavior or not.
>
> -Jason
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-07 Thread Jay Reslock
Thanks very much to both of you for your help!

I was able to get to another error now about EndpointNotFound.  I will
troubleshoot more and review the bugs mentioned by Sergey.

-Jason

On Thu, May 7, 2015 at 5:34 PM Sergey Kraynev  wrote:

> Hi Jay.
>
> AFAIK, it works, but we can have some minor issues. There several atches
> on review to improve it:
>
>
> https://review.openstack.org/#/q/status:open+project:openstack/python-heatclient+branch:master+topic:improve-sessionclient,n,z
>
> Also as I remember we really had bug mentioned by you, but fix was merged.
> Please look:
> https://review.openstack.org/#/c/160431/1
> https://bugs.launchpad.net/python-heatclient/+bug/1427310
>
> Which version of client do you use? Try to use code from master, it should
> works.
> Also one note: the best place for such questions is
> openst...@lists.openstack.org or http://ask.openstack.org/. And of course
> channel #heat in IRC.
>
> Regards,
> Sergey.
>
> On 7 May 2015 at 23:43, Jay Reslock  wrote:
>
>> Hi,
>> This is my first mail to the group.  I hope I set the subject correctly
>> and that this hasn't been asked already.  I searched archives and did not
>> see this question asked or answered previously.
>>
>> I am working on a client thing that uses the python-keystoneclient and
>> python-heatclient api bindings to set up an authenticated session and then
>> use that session to talk to the heat service.  This doesn't work for heat
>> but does work for other services such as nova and sahara.  Is this because
>> sessions aren't supported in the heatclient api yet?
>>
>> sample code:
>>
>> https://gist.github.com/jreslock/a525abdcce53ca0492a7
>>
>> I'm using fabric to define tasks so I can call them via another tool.
>> When I run the task I get:
>>
>> TypeError: Client() takes at least 1 argument (0 given)
>>
>> The documentation does not say anything about being able to pass session
>> to the heatclient but the others seem to work.  I just want to know if this
>> is intended/expected behavior or not.
>>
>> -Jason
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-08 Thread Jamie Lennox


- Original Message -
> From: "Jay Reslock" 
> To: "OpenStack Development Mailing List (not for usage questions)" 
> 
> Sent: Friday, May 8, 2015 7:42:50 AM
> Subject: Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient 
> works with keystone sessions?
> 
> Thanks very much to both of you for your help!
> 
> I was able to get to another error now about EndpointNotFound. I will
> troubleshoot more and review the bugs mentioned by Sergey.
> 
> -Jason

It's nice to see people using sessions for this sort of script. Just as a 
pointer EndpointNotFound generally means that it couldn't find a url for the 
service you wanted in the service catalog. Have a look at the catalog you're 
getting and make sure the heat entry matches what it should, you may have to 
change the service_type or interface to match. 

> On Thu, May 7, 2015 at 5:34 PM Sergey Kraynev < skray...@mirantis.com >
> wrote:
> 
> 
> 
> Hi Jay.
> 
> AFAIK, it works, but we can have some minor issues. There several atches on
> review to improve it:
> 
> https://review.openstack.org/#/q/status:open+project:openstack/python-heatclient+branch:master+topic:improve-sessionclient,n,z
> 
> Also as I remember we really had bug mentioned by you, but fix was merged.
> Please look:
> https://review.openstack.org/#/c/160431/1
> https://bugs.launchpad.net/python-heatclient/+bug/1427310
> 
> Which version of client do you use? Try to use code from master, it should
> works.
> Also one note: the best place for such questions is
> openst...@lists.openstack.org or http://ask.openstack.org/ . And of course
> channel #heat in IRC.
> 
> Regards,
> Sergey.
> 
> On 7 May 2015 at 23:43, Jay Reslock < jresl...@gmail.com > wrote:
> 
> 
> 
> Hi,
> This is my first mail to the group. I hope I set the subject correctly and
> that this hasn't been asked already. I searched archives and did not see
> this question asked or answered previously.
> 
> I am working on a client thing that uses the python-keystoneclient and
> python-heatclient api bindings to set up an authenticated session and then
> use that session to talk to the heat service. This doesn't work for heat but
> does work for other services such as nova and sahara. Is this because
> sessions aren't supported in the heatclient api yet?
> 
> sample code:
> 
> https://gist.github.com/jreslock/a525abdcce53ca0492a7
> 
> I'm using fabric to define tasks so I can call them via another tool. When I
> run the task I get:
> 
> TypeError: Client() takes at least 1 argument (0 given)
> 
> The documentation does not say anything about being able to pass session to
> the heatclient but the others seem to work. I just want to know if this is
> intended/expected behavior or not.
> 
> -Jason
> 
> 
> 
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-08 Thread Jay Reslock
Hi Jamie,

How do I see the service catalog that I am getting back?

On Fri, May 8, 2015 at 3:25 AM Jamie Lennox  wrote:

>
>
> - Original Message -
> > From: "Jay Reslock" 
> > To: "OpenStack Development Mailing List (not for usage questions)" <
> openstack-dev@lists.openstack.org>
> > Sent: Friday, May 8, 2015 7:42:50 AM
> > Subject: Re: [openstack-dev] [heat][python-heatclient] Does
> python-heatclient works with keystone sessions?
> >
> > Thanks very much to both of you for your help!
> >
> > I was able to get to another error now about EndpointNotFound. I will
> > troubleshoot more and review the bugs mentioned by Sergey.
> >
> > -Jason
>
> It's nice to see people using sessions for this sort of script. Just as a
> pointer EndpointNotFound generally means that it couldn't find a url for
> the service you wanted in the service catalog. Have a look at the catalog
> you're getting and make sure the heat entry matches what it should, you may
> have to change the service_type or interface to match.
>
> > On Thu, May 7, 2015 at 5:34 PM Sergey Kraynev < skray...@mirantis.com >
> > wrote:
> >
> >
> >
> > Hi Jay.
> >
> > AFAIK, it works, but we can have some minor issues. There several atches
> on
> > review to improve it:
> >
> >
> https://review.openstack.org/#/q/status:open+project:openstack/python-heatclient+branch:master+topic:improve-sessionclient,n,z
> >
> > Also as I remember we really had bug mentioned by you, but fix was
> merged.
> > Please look:
> > https://review.openstack.org/#/c/160431/1
> > https://bugs.launchpad.net/python-heatclient/+bug/1427310
> >
> > Which version of client do you use? Try to use code from master, it
> should
> > works.
> > Also one note: the best place for such questions is
> > openst...@lists.openstack.org or http://ask.openstack.org/ . And of
> course
> > channel #heat in IRC.
> >
> > Regards,
> > Sergey.
> >
> > On 7 May 2015 at 23:43, Jay Reslock < jresl...@gmail.com > wrote:
> >
> >
> >
> > Hi,
> > This is my first mail to the group. I hope I set the subject correctly
> and
> > that this hasn't been asked already. I searched archives and did not see
> > this question asked or answered previously.
> >
> > I am working on a client thing that uses the python-keystoneclient and
> > python-heatclient api bindings to set up an authenticated session and
> then
> > use that session to talk to the heat service. This doesn't work for heat
> but
> > does work for other services such as nova and sahara. Is this because
> > sessions aren't supported in the heatclient api yet?
> >
> > sample code:
> >
> > https://gist.github.com/jreslock/a525abdcce53ca0492a7
> >
> > I'm using fabric to define tasks so I can call them via another tool.
> When I
> > run the task I get:
> >
> > TypeError: Client() takes at least 1 argument (0 given)
> >
> > The documentation does not say anything about being able to pass session
> to
> > the heatclient but the others seem to work. I just want to know if this
> is
> > intended/expected behavior or not.
> >
> > -Jason
> >
> >
> >
> >
> __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
> >
> __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
> >
> __
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> >
>
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-08 Thread Jay Reslock
Interestingit is definitely a service endpoint mismatch.

UI:

http://10.25.17.63:8004/v1/dac1095f448d476e9990046331415cf6

keystoneclient.services.list():

http://10.25.17.63:35357/v3/services/e0a18f2f4b574c75ba56823964a7d7eb

What can I do to make these match up correctly?

On Fri, May 8, 2015 at 4:22 PM Jay Reslock  wrote:

> Hi Jamie,
>
> How do I see the service catalog that I am getting back?
>
> On Fri, May 8, 2015 at 3:25 AM Jamie Lennox 
> wrote:
>
>>
>>
>> - Original Message -
>> > From: "Jay Reslock" 
>> > To: "OpenStack Development Mailing List (not for usage questions)" <
>> openstack-dev@lists.openstack.org>
>> > Sent: Friday, May 8, 2015 7:42:50 AM
>> > Subject: Re: [openstack-dev] [heat][python-heatclient] Does
>> python-heatclient works with keystone sessions?
>> >
>> > Thanks very much to both of you for your help!
>> >
>> > I was able to get to another error now about EndpointNotFound. I will
>> > troubleshoot more and review the bugs mentioned by Sergey.
>> >
>> > -Jason
>>
>> It's nice to see people using sessions for this sort of script. Just as a
>> pointer EndpointNotFound generally means that it couldn't find a url for
>> the service you wanted in the service catalog. Have a look at the catalog
>> you're getting and make sure the heat entry matches what it should, you may
>> have to change the service_type or interface to match.
>>
>> > On Thu, May 7, 2015 at 5:34 PM Sergey Kraynev < skray...@mirantis.com >
>> > wrote:
>> >
>> >
>> >
>> > Hi Jay.
>> >
>> > AFAIK, it works, but we can have some minor issues. There several
>> atches on
>> > review to improve it:
>> >
>> >
>> https://review.openstack.org/#/q/status:open+project:openstack/python-heatclient+branch:master+topic:improve-sessionclient,n,z
>> >
>> > Also as I remember we really had bug mentioned by you, but fix was
>> merged.
>> > Please look:
>> > https://review.openstack.org/#/c/160431/1
>> > https://bugs.launchpad.net/python-heatclient/+bug/1427310
>> >
>> > Which version of client do you use? Try to use code from master, it
>> should
>> > works.
>> > Also one note: the best place for such questions is
>> > openst...@lists.openstack.org or http://ask.openstack.org/ . And of
>> course
>> > channel #heat in IRC.
>> >
>> > Regards,
>> > Sergey.
>> >
>> > On 7 May 2015 at 23:43, Jay Reslock < jresl...@gmail.com > wrote:
>> >
>> >
>> >
>> > Hi,
>> > This is my first mail to the group. I hope I set the subject correctly
>> and
>> > that this hasn't been asked already. I searched archives and did not see
>> > this question asked or answered previously.
>> >
>> > I am working on a client thing that uses the python-keystoneclient and
>> > python-heatclient api bindings to set up an authenticated session and
>> then
>> > use that session to talk to the heat service. This doesn't work for
>> heat but
>> > does work for other services such as nova and sahara. Is this because
>> > sessions aren't supported in the heatclient api yet?
>> >
>> > sample code:
>> >
>> > https://gist.github.com/jreslock/a525abdcce53ca0492a7
>> >
>> > I'm using fabric to define tasks so I can call them via another tool.
>> When I
>> > run the task I get:
>> >
>> > TypeError: Client() takes at least 1 argument (0 given)
>> >
>> > The documentation does not say anything about being able to pass
>> session to
>> > the heatclient but the others seem to work. I just want to know if this
>> is
>> > intended/expected behavior or not.
>> >
>> > -Jason
>> >
>> >
>> >
>> >
>> __
>> > OpenStack Development Mailing List (not for usage questions)
>> > Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >
>> >
>> __
>> > OpenStack Development Mailing List (not for usage questions)
>> > Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >
>> >
>> __
>> > OpenStack Development Mailing List (not for usage questions)
>> > Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> >
>>
>> __
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-09 Thread Jamie Lennox
- Original Message -

> From: "Jay Reslock" 
> To: "OpenStack Development Mailing List (not for usage questions)"
> 
> Sent: Saturday, May 9, 2015 6:42:48 AM
> Subject: Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient
> works with keystone sessions?

> Interestingit is definitely a service endpoint mismatch.

> UI:

> http://10.25.17.63:8004/v1/dac1095f448d476e9990046331415cf6

> keystoneclient.services.list():

> http://10.25.17.63:35357/v3/services/e0a18f2f4b574c75ba56823964a7d7eb

> What can I do to make these match up correctly?

They're network URLs - i can't see anything there. Try using: `openstack 
catalog list`. 

Otherwise i'd turn on python's debug logging, something like: 

import logging 

logging.basicConfig(level=logging.DEBUG) 

which will give you a bunch of output - though the service catalog will be 
hidden because it's part of the token exchange. 

> On Fri, May 8, 2015 at 4:22 PM Jay Reslock < jresl...@gmail.com > wrote:

> > Hi Jamie,
> 

> > How do I see the service catalog that I am getting back?
> 

> > On Fri, May 8, 2015 at 3:25 AM Jamie Lennox < jamielen...@redhat.com >
> > wrote:
> 

> > > - Original Message -
> > 
> 
> > > > From: "Jay Reslock" < jresl...@gmail.com >
> > 
> 
> > > > To: "OpenStack Development Mailing List (not for usage questions)" <
> > > > openstack-dev@lists.openstack.org >
> > 
> 
> > > > Sent: Friday, May 8, 2015 7:42:50 AM
> > 
> 
> > > > Subject: Re: [openstack-dev] [heat][python-heatclient] Does
> > > > python-heatclient works with keystone sessions?
> > 
> 
> > > >
> > 
> 
> > > > Thanks very much to both of you for your help!
> > 
> 
> > > >
> > 
> 
> > > > I was able to get to another error now about EndpointNotFound. I will
> > 
> 
> > > > troubleshoot more and review the bugs mentioned by Sergey.
> > 
> 
> > > >
> > 
> 
> > > > -Jason
> > 
> 

> > > It's nice to see people using sessions for this sort of script. Just as a
> > > pointer EndpointNotFound generally means that it couldn't find a url for
> > > the
> > > service you wanted in the service catalog. Have a look at the catalog
> > > you're
> > > getting and make sure the heat entry matches what it should, you may have
> > > to
> > > change the service_type or interface to match.
> > 
> 

> > > > On Thu, May 7, 2015 at 5:34 PM Sergey Kraynev < skray...@mirantis.com >
> > 
> 
> > > > wrote:
> > 
> 
> > > >
> > 
> 
> > > >
> > 
> 
> > > >
> > 
> 
> > > > Hi Jay.
> > 
> 
> > > >
> > 
> 
> > > > AFAIK, it works, but we can have some minor issues. There several
> > > > atches
> > > > on
> > 
> 
> > > > review to improve it:
> > 
> 
> > > >
> > 
> 
> > > > https://review.openstack.org/#/q/status:open+project:openstack/python-heatclient+branch:master+topic:improve-sessionclient,n,z
> > 
> 
> > > >
> > 
> 
> > > > Also as I remember we really had bug mentioned by you, but fix was
> > > > merged.
> > 
> 
> > > > Please look:
> > 
> 
> > > > https://review.openstack.org/#/c/160431/1
> > 
> 
> > > > https://bugs.launchpad.net/python-heatclient/+bug/1427310
> > 
> 
> > > >
> > 
> 
> > > > Which version of client do you use? Try to use code from master, it
> > > > should
> > 
> 
> > > > works.
> > 
> 
> > > > Also one note: the best place for such questions is
> > 
> 
> > > > openst...@lists.openstack.org or http://ask.openstack.org/ . And of
> > > > course
> > 
> 
> > > > channel #heat in IRC.
> > 
> 
> > > >
> > 
> 
> > > > Regards,
> > 
> 
> > > > Sergey.
> > 
> 
> > > >
> > 
> 
> > > > On 7 May 2015 at 23:43, Jay Reslock < jresl...@gmail.com > wrote:
> > 
> 
> > > >
> > 
> 
> > > >
> > 
> 
> > > >
> > 
> 
> > > > Hi,
> > 
> 
> > > > This is my first mail to the group. I hope I set the subject correctly
> > > 

Re: [openstack-dev] [heat][python-heatclient] Does python-heatclient works with keystone sessions?

2015-05-11 Thread Jay Reslock
I was able to get this working by adding service_type = 'orchestration' in
the heat client declaration.

heat = heat_v1.Client(session=sess, service_type='orchestration')

Once I did this I was able to get a list of heat services returned.  This
should be documented somewhere.  I'd be happy to help with a PR if someone
can point me in the right direction.

Thanks again all who replied.  I look forward to more positive community
interactions like this in the future!

Also - a link to a working gist in case someone needs it later:

https://gist.github.com/jreslock/55ed3822eb449ffa2a9c
-Jason



On Sat, May 9, 2015 at 6:09 AM Jamie Lennox  wrote:

> *From: *"Jay Reslock" 
> *To: *"OpenStack Development Mailing List (not for usage questions)" <
> openstack-dev@lists.openstack.org>
>
> *Sent: *Saturday, May 9, 2015 6:42:48 AM
>
>
> *Subject: *Re: [openstack-dev] [heat][python-heatclient] Does
> python-heatclient works with keystone sessions?
>
> Interestingit is definitely a service endpoint mismatch.
>
> UI:
>
> http://10.25.17.63:8004/v1/dac1095f448d476e9990046331415cf6
>
> keystoneclient.services.list():
>
> http://10.25.17.63:35357/v3/services/e0a18f2f4b574c75ba56823964a7d7eb
>
> What can I do to make these match up correctly?
>
> They're network URLs - i can't see anything there. Try using: `openstack
> catalog list`.
>
> Otherwise i'd turn on python's debug logging, something like:
>
> import logging
>
> logging.basicConfig(level=logging.DEBUG)
>
> which will give you a bunch of output - though the service catalog will be
> hidden because it's part of the token exchange.
>
> On Fri, May 8, 2015 at 4:22 PM Jay Reslock  wrote:
>
>> Hi Jamie,
>>
>> How do I see the service catalog that I am getting back?
>>
>> On Fri, May 8, 2015 at 3:25 AM Jamie Lennox 
>> wrote:
>>
>>>
>>>
>>> ----- Original Message -----
>>> > From: "Jay Reslock" 
>>> > To: "OpenStack Development Mailing List (not for usage questions)" <
>>> openstack-dev@lists.openstack.org>
>>> > Sent: Friday, May 8, 2015 7:42:50 AM
>>> > Subject: Re: [openstack-dev] [heat][python-heatclient] Does
>>> python-heatclient works with keystone sessions?
>>> >
>>> > Thanks very much to both of you for your help!
>>> >
>>> > I was able to get to another error now about EndpointNotFound. I will
>>> > troubleshoot more and review the bugs mentioned by Sergey.
>>> >
>>> > -Jason
>>>
>>> It's nice to see people using sessions for this sort of script. Just as
>>> a pointer EndpointNotFound generally means that it couldn't find a url for
>>> the service you wanted in the service catalog. Have a look at the catalog
>>> you're getting and make sure the heat entry matches what it should, you may
>>> have to change the service_type or interface to match.
>>>
>>> > On Thu, May 7, 2015 at 5:34 PM Sergey Kraynev < skray...@mirantis.com
>>> >
>>> > wrote:
>>> >
>>> >
>>> >
>>> > Hi Jay.
>>> >
>>> > AFAIK, it works, but we can have some minor issues. There several
>>> atches on
>>> > review to improve it:
>>> >
>>> >
>>> https://review.openstack.org/#/q/status:open+project:openstack/python-heatclient+branch:master+topic:improve-sessionclient,n,z
>>> >
>>> > Also as I remember we really had bug mentioned by you, but fix was
>>> merged.
>>> > Please look:
>>> > https://review.openstack.org/#/c/160431/1
>>> > https://bugs.launchpad.net/python-heatclient/+bug/1427310
>>> >
>>> > Which version of client do you use? Try to use code from master, it
>>> should
>>> > works.
>>> > Also one note: the best place for such questions is
>>> > openst...@lists.openstack.org or http://ask.openstack.org/ . And of
>>> course
>>> > channel #heat in IRC.
>>> >
>>> > Regards,
>>> > Sergey.
>>> >
>>> > On 7 May 2015 at 23:43, Jay Reslock < jresl...@gmail.com > wrote:
>>> >
>>> >
>>> >
>>> > Hi,
>>> > This is my first mail to the group. I hope I set the subject correctly
>>> and
>>> > that this hasn't been asked already. I searched