Brad Hall wrote: > On Mon, Sep 29, 2008 at 01:41:00PM -0500, Shawn Walker wrote: > >> Brad Hall wrote: >> >>> On Fri, Sep 26, 2008 at 02:48:58PM -0500, Shawn Walker wrote: >>> >>>> Also, I'd like to see this logic put into set_attrs instead of >>>> client.py and a force parameter added to set_attrs instead... >>>> >>> Why? A number of other safety checks are being done in >>> client.py::image_create, but set_attrs for the most part is just setting >>> attributes of the image. (Though I do see the comment above set_attrs >>> that it >>> should be merged with mkdirs into a create function) It seems like if >>> this is >>> going to be moved into image.py it should be moved to some sort of "check >>> validity" method. Anyhow, I'm not opposed to moving it, just wanted to >>> understand why you want to see it moved. >>> >> So that if the GUI or any other client uses this part of the API the >> same safety checks get performed. You might talk to Brock about this >> given his API work. >> > > Ok, I'll talk with him to find a good spot to put that. > I don't have any objections to this code from an API perspective. When we move image_create into the API, most of these checks will get moved inside the... "static function"/constructor/method which does image_create. I don't believe packagemanager currently does any image creation outside of image-update, so moving everything within image is a low priority for me.
Only other thing I'd say is, if it wasn't hard to do, it'd be nice if an installation of some package was done in each of the test cases just to make certain that the images haven't been corrupted strangely. Other than that, LGTM Brock > Thanks, > Brad > _______________________________________________ > pkg-discuss mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/pkg-discuss > _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
