deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH core 3/5] CIMI: Added MachineImage model
Date Wed, 16 Nov 2011 17:47:30 GMT
On Wed, 2011-11-16 at 13:21 +0200, marios@redhat.com wrote:
> minor comments inline (otherwise ACK):
> 
> On 14/11/11 17:09, mfojtik@redhat.com wrote:
> > From: Michal Fojtik <mfojtik@redhat.com>
> > +# Unless required by applicable law or agreed to in writing, software
> > +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
> > +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
> > +# License for the specific language governing permissions and limitations
> > +# under the License.
> > +
> > +class CIMI::Model::MachineImage < CIMI::Model::Base
> > +
> > +  scalar :image_location
> 
> could also have :image_data instead of :image_location (either-or, but
> not both)... :image_data is a byte array, but represented as string in
> json and xml, so scalar?

We can't express 'either or' in the DSL (yet) Adding Rails-style
validation is one of the things I'd like to do. In terms of lifecycle, I
think validations should run right after from_{xml,json} and just before
to_{xml,json}

But we can hold off on that for a little bit, I'd rather get to start
machines first ;)

David



Mime
View raw message