> i think we have to use default version only if type contains > 1 True, but a default should be settable even if there's only one type.
> And default version should be active, otherwise - > error. Agreed. ________________________________________ From: Andrey Shestakov [ashesta...@mirantis.com] Sent: Monday, October 21, 2013 4:40 PM To: OpenStack Development Mailing List Subject: Re: [openstack-dev] [Trove] How users should specify a datastore type when creating an instance On Mon, Oct 21, 2013 at 11:40 PM, Tim Simpson <tim.simp...@rackspace.com> wrote: > > >> 4. Additionally, in the current pull request to implement this it is > >> possible to avoid passing a version, but only if no more than one version > >> of the datastore_type exists in the database. > >> > >> I think instead the datastore_type row in the database should also have a > >> "default_version_id" property, that an operator could update to the most > >> recent version or whatever other criteria they wish to use, meaning the > >> call could become this simple: > > > Since we have determined from this email thread that we have an active > > status, and that > 1 version can be active, we have to think about the > > precedence of active vs default. My question would be, if we have a > > default_version_id and a active version, what do we choose on behalf of the > > user? If there is > 1 active version and a user does not specify the > > version, the api will error out, unless a default is defined. We also need > > a default_type in the config so the existing APIs can maintain > > compatibility. We can re-discuss this for v2 of the API. > > Imagine that an operator sets up Trove and only has one active version. They > then somehow fumble setting up the default_version, but think they succeeded > as the API works for users the way they expect anyway. Then they go to add > another active version and suddenly their users get error messages. > > If we only use the "default_version" field of the datastore_type to define a > default would honor the principle of least surprise. if default version is inactive? there will more cases for error also, i think we have to use default version only if type contains > 1 active version. And default version should be active, otherwise - error. _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev _______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev