Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-21 Thread Thomas Maddox
On 8/20/13 6:47 PM, "Jay Pipes" wrote: >On 08/19/2013 08:27 AM, Sandy Walsh wrote: >> >> >> On 08/19/2013 05:08 AM, Julien Danjou wrote: >>> On Sun, Aug 18 2013, Jay Pipes wrote: >>> I'm proposing that in these cases, a *new* resource would be added to the resource table (and its ID

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-21 Thread Thomas Maddox
On 8/20/13 1:48 PM, "Sandy Walsh" wrote: > > >On 08/20/2013 10:42 AM, Thomas Maddox wrote: >> On 8/19/13 8:21 AM, "Sandy Walsh" wrote: >> >>> >>> >>> On 08/18/2013 04:04 PM, Jay Pipes wrote: On 08/17/2013 03:10 AM, Julien Danjou wrote: > On Fri, Aug 16 2013, Jay Pipes wrote: >

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-21 Thread Julien Danjou
On Tue, Aug 20 2013, Thomas Maddox wrote: […] > I hope I'm not seeing a problem that doesn't exist, but either way I'll > learn something so, thoughts? =] That sounds like a good idea. -- Julien Danjou // Free Software hacker / independent consultant // http://julien.danjou.info signature.a

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-20 Thread Jay Pipes
On 08/19/2013 08:27 AM, Sandy Walsh wrote: On 08/19/2013 05:08 AM, Julien Danjou wrote: On Sun, Aug 18 2013, Jay Pipes wrote: I'm proposing that in these cases, a *new* resource would be added to the resource table (and its ID inserted in meter) table with the new flavor/instance's metadata.

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-20 Thread Sandy Walsh
On 08/20/2013 10:42 AM, Thomas Maddox wrote: > On 8/19/13 8:21 AM, "Sandy Walsh" wrote: > >> >> >> On 08/18/2013 04:04 PM, Jay Pipes wrote: >>> On 08/17/2013 03:10 AM, Julien Danjou wrote: On Fri, Aug 16 2013, Jay Pipes wrote: > Actually, that's the opposite of what I'm suggesting

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-20 Thread Thomas Maddox
On 8/19/13 8:21 AM, "Sandy Walsh" wrote: > > >On 08/18/2013 04:04 PM, Jay Pipes wrote: >> On 08/17/2013 03:10 AM, Julien Danjou wrote: >>> On Fri, Aug 16 2013, Jay Pipes wrote: >>> Actually, that's the opposite of what I'm suggesting :) I'm suggesting getting rid of the resource_metadat

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-19 Thread Sandy Walsh
On 08/18/2013 04:04 PM, Jay Pipes wrote: > On 08/17/2013 03:10 AM, Julien Danjou wrote: >> On Fri, Aug 16 2013, Jay Pipes wrote: >> >>> Actually, that's the opposite of what I'm suggesting :) I'm suggesting >>> getting rid of the resource_metadata column in the meter table and >>> using the >>> r

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-19 Thread Sandy Walsh
On 08/19/2013 09:40 AM, Julien Danjou wrote: > On Mon, Aug 19 2013, Sandy Walsh wrote: > >> On 08/19/2013 05:08 AM, Julien Danjou wrote: >>> On Sun, Aug 18 2013, Jay Pipes wrote: >>> I'm proposing that in these cases, a *new* resource would be added to the resource table (and its ID in

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-19 Thread Julien Danjou
On Mon, Aug 19 2013, Sandy Walsh wrote: > On 08/19/2013 05:08 AM, Julien Danjou wrote: >> On Sun, Aug 18 2013, Jay Pipes wrote: >> >>> I'm proposing that in these cases, a *new* resource would be added to the >>> resource table (and its ID inserted in meter) table with the new >>> flavor/instance

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-19 Thread Sandy Walsh
On 08/19/2013 05:08 AM, Julien Danjou wrote: > On Sun, Aug 18 2013, Jay Pipes wrote: > >> I'm proposing that in these cases, a *new* resource would be added to the >> resource table (and its ID inserted in meter) table with the new >> flavor/instance's metadata. > > Ah I see. Considering we're

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-19 Thread Julien Danjou
On Sun, Aug 18 2013, Jay Pipes wrote: > I'm proposing that in these cases, a *new* resource would be added to the > resource table (and its ID inserted in meter) table with the new > flavor/instance's metadata. Ah I see. Considering we're storing metadata as a serialized string (whereas it's a di

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-18 Thread Jay Pipes
On 08/17/2013 03:10 AM, Julien Danjou wrote: On Fri, Aug 16 2013, Jay Pipes wrote: Actually, that's the opposite of what I'm suggesting :) I'm suggesting getting rid of the resource_metadata column in the meter table and using the resource table in joins... I think there's a lot of scenario w

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-17 Thread Julien Danjou
On Fri, Aug 16 2013, Jay Pipes wrote: > Actually, that's the opposite of what I'm suggesting :) I'm suggesting > getting rid of the resource_metadata column in the meter table and using the > resource table in joins... I think there's a lot of scenario where this would fail, like for example inst

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-16 Thread Doug Hellmann
On Fri, Aug 16, 2013 at 4:43 PM, Jay Pipes wrote: > On 08/16/2013 04:37 PM, Doug Hellmann wrote: > >> On Fri, Aug 16, 2013 at 4:15 PM, Jay Pipes > > wrote: >> >> On 08/16/2013 03:52 PM, Doug Hellmann wrote: >> >> However, that's just one example use case. So

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-16 Thread Jay Pipes
On 08/16/2013 04:37 PM, Doug Hellmann wrote: On Fri, Aug 16, 2013 at 4:15 PM, Jay Pipes mailto:jaypi...@gmail.com>> wrote: On 08/16/2013 03:52 PM, Doug Hellmann wrote: However, that's just one example use case. Sometimes people do want to know something about the res

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-16 Thread Doug Hellmann
On Fri, Aug 16, 2013 at 4:15 PM, Jay Pipes wrote: > On 08/16/2013 03:52 PM, Doug Hellmann wrote: > >> However, that's just one example use case. Sometimes people do want to >> know something about the resources that have existed besides the >> aggregated samples for billing. The challenge with qu

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-16 Thread Jay Pipes
On 08/16/2013 03:52 PM, Doug Hellmann wrote: However, that's just one example use case. Sometimes people do want to know something about the resources that have existed besides the aggregated samples for billing. The challenge with querying for resources is that the metadata for a given resource

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-16 Thread Doug Hellmann
On Tue, Aug 13, 2013 at 2:36 PM, Thomas Maddox wrote: > Hello! > > I was having some chats yesterday with both Julien and Doug regarding > some thoughts that occurred to me while digging through CM and Doug > suggested that I bring them up on the dev list for everyones benefit and > discussion.

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-14 Thread Thomas Maddox
On 8/14/13 10:29 AM, "Julien Danjou" wrote: >On Wed, Aug 14 2013, Thomas Maddox wrote: > >> Am I misunderstanding the code? This looks like it's returning the first >> sample's details: >> >>https://github.com/openstack/ceilometer/blob/master/ceilometer/storage/im >>pl >> _mongodb.py#L578-L584.

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-14 Thread Julien Danjou
On Wed, Aug 14 2013, Thomas Maddox wrote: > Am I misunderstanding the code? This looks like it's returning the first > sample's details: > https://github.com/openstack/ceilometer/blob/master/ceilometer/storage/impl > _mongodb.py#L578-L584. When I change the metadata attribute's aggregation > func

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-14 Thread Thomas Maddox
On 8/14/13 7:48 AM, "Sandy Walsh" wrote: > >On 08/14/2013 06:17 AM, Julien Danjou wrote: >> On Tue, Aug 13 2013, Thomas Maddox wrote: >> >> Hi Thomas, >> >>> * Driving get_resources() with the Meter table instead of the >>> Resource table. This is mainly because of the additional filter

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-14 Thread Sandy Walsh
On 08/14/2013 06:17 AM, Julien Danjou wrote: > On Tue, Aug 13 2013, Thomas Maddox wrote: > > Hi Thomas, > >> * Driving get_resources() with the Meter table instead of the >> Resource table. This is mainly because of the additional filtering >> available in the Meter table, which allows

Re: [openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-14 Thread Julien Danjou
On Tue, Aug 13 2013, Thomas Maddox wrote: Hi Thomas, > * Driving get_resources() with the Meter table instead of the > Resource table. This is mainly because of the additional filtering > available in the Meter table, which allows us to satisfy a use case > like getting a list of resour

[openstack-dev] [Ceilometer] Concerning get_resources/get_meters and the Ceilometer API

2013-08-13 Thread Thomas Maddox
Hello! I was having some chats yesterday with both Julien and Doug regarding some thoughts that occurred to me while digging through CM and Doug suggested that I bring them up on the dev list for everyones benefit and discussion. My bringing this up is intended to help myself and others get a b