On Wed, 2011-11-16 at 13:21 +0200, mar...@redhat.com wrote: > minor comments inline (otherwise ACK): > > On 14/11/11 17:09, mfoj...@redhat.com wrote: > > From: Michal Fojtik <mfoj...@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