[Ovirt-devel] [PATCH server 5/8] Factor StorageVolume functionality out of StorageController

David Lutterkort lutter at redhat.com
Tue Feb 3 18:46:14 UTC 2009


On Tue, 2009-02-03 at 16:15 +0000, Scott Seago wrote:
> On Mon, Feb 02, 2009 at 12:35:34PM -0800, David Lutterkort wrote:
> > Storage volumes can now be accessed through their own controller. This is
> > needed to expose them in the API.
> > ---
> > diff --git a/src/app/controllers/storage_volume_controller.rb b/src/app/controllers/storage_volume_controller.rb
> > new file mode 100644
> > index 0000000..ba486d2
> > --- /dev/null
> > +++ b/src/app/controllers/storage_volume_controller.rb
> > @@ -0,0 +1,228 @@
> > +#
> > +# Copyright (C) 2009 Red Hat, Inc.
> > +# Written by Scott Seago <sseago at redhat.com>
> > +#
> > +# This program is free software; you can redistribute it and/or modify
> > +# it under the terms of the GNU General Public License as published by
> > +# the Free Software Foundation; version 2 of the License.
> > +#
> > +# This program is distributed in the hope that it will be useful,
> > +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > +# GNU General Public License for more details.
> > +#
> > +# You should have received a copy of the GNU General Public License
> > +# along with this program; if not, write to the Free Software
> > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> > +# MA  02110-1301, USA.  A copy of the GNU General Public License is
> > +# also available at http://www.gnu.org/copyleft/gpl.html.
> > +
> > +class StorageVolumeController < ApplicationController
> > +
> > +  before_filter :pre_create, :only => [:create]
> This before_filter isn't necessary since it's already defined in
> application.rb -- all you need to do here is define the before_filter
> method implementation

Removed that from the patch.

> One thing that I did find missing was another reference to the
> new_volume action -- but this was in jguiddita's new code that wasn't
> there when the original patches were created -- and since it was new,
> it didn't come up as a merge conflict:

Fixed that up.

David





More information about the ovirt-devel mailing list