[openstack-dev] [cinder] [driver] DB operations

Mike Perez thingee at gmail.com
Fri Dec 19 19:07:52 UTC 2014


On 01:20 Fri 19 Dec     , Duncan Thomas wrote:
> So our general advice has historical been 'drivers should not be accessing
> the db directly'. I haven't had chance to look at your driver code yet,
> I've been on vacation, but my suggestion is that if you absolutely must
> store something in the admin metadata rather than somewhere that is covered
> by the model update (generally provider location and provider auth) then
> writing some helper methods that wrap the context bump and db call would be
> better than accessing it directly from the driver.
> 
> Duncan Thomas
> On Dec 18, 2014 11:41 PM, "Amit Das" <amit.das at cloudbyte.com> wrote:
> 
<snip>
> > So what is the proper way to run these DB operations from within a driver ?

Drivers not doing db changes is also documented in the "How to contribute
a driver" wiki page.

https://wiki.openstack.org/wiki/Cinder/how-to-contribute-a-driver

-- 
Mike Perez



More information about the OpenStack-dev mailing list