← Back to team overview

openstack team mailing list archive

Re: [Metering] Bootstrapping, first counter implementation

 

On Wed, May 09 2012, Doug Hellmann wrote:

> I'm not sure what you mean. I was able to use nova.service to create a
> "metering" server and a simple manager that subscribes to the notification
> events. See https://github.com/dhellmann/metering-prototype (metering-test
> is the main program and testmanager.py is the manager class). I borrowed
> your Connection code.

Actually, the Service class is supposed to handle the AMQP (or whatever
backend) connection itself and bind it to a set of topics. But it uses
the nova.rpc.impl_kombu.Connection class that uses ProxyCallback and
that one obviously fails to decode notification. This is why I say I
failed to the Service class.

You cheated since you opened another AMQP connection in your Manager
class, rendering the connection from the Service class useless. I wish
we could access the connection from the Service from the Manager so we
can reuse it at least, but that does not seem possible neither.

On the other hand, even if it's not the cleanest way to do things, I
kind of like using the Service class so I'll probably grab your code
anyway. :-)

Thanks Doug,
-- 
Julien Danjou
// eNovance                      http://enovance.com
// ✉ julien.danjou@xxxxxxxxxxxx  ☎ +33 1 49 70 99 81


Follow ups

References