<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12/31/2014 10:54 AM, Hongbin Lu
wrote:<br>
</div>
<blockquote
cite="mid:CAFNUc+RYrKQw17Zc==96BxCGrjmECH7pg4LyOcZhCn2smScOfQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>I am writing tests for the Magnum dbapi. I have several
questions about its implementation and appreciate if someone
could comment on them.</div>
<div><br>
</div>
<div>* Exceptions: The exceptions below were ported from Ironic
but don't seem to make sense in Magnum. I think we should
purge them from the code except InstanceAssociated and
NodeAssociated. Do everyone agree?</div>
<div><br>
</div>
</div>
</blockquote>
Hongbin,<br>
<br>
Agree we should remove any exceptions that were from Ironic that
don't make any sense in Magnum.<br>
<br>
The only reason I copied alot of Ironic code base was to pull in the
versioned objects support which should be heading to oslo at some
point.<br>
<br>
<blockquote
cite="mid:CAFNUc+RYrKQw17Zc==96BxCGrjmECH7pg4LyOcZhCn2smScOfQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div><i>class InstanceAssociated(Conflict):</i></div>
<div><i> message = _("Instance %(instance_uuid)s is
already associated with a node,"</i></div>
<div><i> " it cannot be associated with this
other node %(node)s")</i></div>
<div><i><br>
</i></div>
<div><i>class BayAssociated(InvalidState):</i></div>
<div><i> message = _("Bay %(bay)s is associated with
instance %(instance)s.")</i></div>
<div><i><br>
</i></div>
<div><i>class ContainerAssociated(InvalidState):</i></div>
<div><i> message = _("Container %(container)s is
associated with "</i></div>
<div><i> "instance %(instance)s.")</i></div>
<div><i><br>
</i></div>
<div><i>class PodAssociated(InvalidState):</i></div>
<div><i> message = _("Pod %(pod)s is associated with
instance %(instance)s.")</i></div>
<div><i><br>
</i></div>
<div><i>class ServiceAssociated(InvalidState):</i></div>
<div><i> message = _("Service %(service)s is associated
with "</i></div>
<div><i> "instance %(instance)s.")</i></div>
</div>
</div>
<div><i><br>
</i></div>
<div><i>NodeAssociated: it is used but definition missing</i></div>
<div><br>
</div>
<div><i>BayModelAssociated: it is used but definition missing</i></div>
<div><br>
</div>
<div>* APIs: the APIs below seem to be ported from Ironic Node,
but it seems we won't need them all. Again, I think we should
purge some of them that does not make sense. In addition,
these APIs are defined without being call. Does it make sense
remove them for now, and add them one by one later when they
are actually needed.</div>
<div><br>
</div>
</div>
</blockquote>
Agree they should be removed now and added as needed later.<br>
<br>
<blockquote
cite="mid:CAFNUc+RYrKQw17Zc==96BxCGrjmECH7pg4LyOcZhCn2smScOfQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div><i>def reserve_bay(self, tag, bay_id):</i></div>
<div><i> """Reserve a bay.</i></div>
<div><i><br>
</i></div>
<div><i>def release_bay(self, tag, bay_id):</i></div>
<div><i> """Release the reservation on a bay.</i></div>
<div><i><br>
</i></div>
<div><i>def reserve_baymodel(self, tag, baymodel_id):</i></div>
<div><i> """Reserve a baymodel.</i></div>
<div><i><br>
</i></div>
<div><i>def release_baymodel(self, tag, baymodel_id):</i></div>
<div><i> """Release the reservation on a baymodel.</i></div>
<div><i><br>
</i></div>
<div><i>def reserve_container(self, tag, container_id):</i></div>
<div><i> """Reserve a container.</i></div>
<div><i><br>
</i></div>
<div><i>def reserve_node(self, tag, node_id):</i></div>
<div><i> """Reserve a node.</i></div>
<div><i><br>
</i></div>
<div><i>def release_node(self, tag, node_id):</i></div>
<div><i> """Release the reservation on a node.</i></div>
<div><i><br>
</i></div>
<div><i>def reserve_pod(self, tag, pod_id):</i></div>
<div><i> """Reserve a pod.</i></div>
<div><i><br>
</i></div>
<div><i>def release_pod(self, tag, pod_id):</i></div>
<div><i> """Release the reservation on a pod.</i></div>
<div><i><br>
</i></div>
<div><i>def reserve_service(self, tag, service_id):</i></div>
<div><i> """Reserve a service.</i></div>
<div><i><br>
</i></div>
<div><i>def release_service(self, tag, service_id):</i></div>
<div><i> """Release the reservation on a service.</i></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>