<div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">Hi,</div><div class="gmail_quote"><br></div><div class="gmail_quote">2014-04-29 10:28 GMT+09:00 Matthew Farina <span dir="ltr"><<a href="mailto:matt@mattfarina.com" target="_blank">matt@mattfarina.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<div><div><br>
</div>
<div><b>3. Where would JSON schemas come from?</b></div>
<div><b><br>
</b></div>
<div>It depends on each OpenStack service. Glance and Marconi (soon) offer schemas directly through the API - so they are directly responsible for maintaining this - we'd just consume it. We could probably cache a local version to minimize requests.</div>
<div><br>
</div>
<div>For services that do not offer schemas yet, we'd have to use local schema files. There's a project called Tempest which does integration tests for OpenStack clusters, and it uses schema files. So there might be a possibility of using their files in the
future. If this is not possible, we'd write them ourselves. It took me 1-2 days to write the entire Nova API. Once a schema file has been fully tested and signed off as 100% operational, it can be frozen as a set version.</div>
</div></div></blockquote><div><br></div></div><div>Can we convert the schema files from Tempest into something we can use?</div></div></div></div></blockquote><div><br></div><div>just FYI</div><div><br></div><div>Now Tempest contains schemas for Nova API only, and the schemas of request</div>
<div>and response are stored into different directories.</div><div>We can see</div><div> request schema: <a href="https://github.com/openstack/tempest/tree/master/etc/schemas/compute">https://github.com/openstack/tempest/tree/master/etc/schemas/compute</a></div>
<div> response schema: <a href="https://github.com/openstack/tempest/tree/master/tempest/api_schema/compute">https://github.com/openstack/tempest/tree/master/tempest/api_schema/compute</a></div><div><br></div><div>In the future, the way to handle these schemas in Tempest is one of the topics in the next</div>
<div>summit.</div><div><a href="http://junodesignsummit.sched.org/event/e3999a28ec02aa14b69ad67848be570a">http://junodesignsummit.sched.org/event/e3999a28ec02aa14b69ad67848be570a</a><br></div><div><br></div><div>Nova also contains request schema under</div>
<div><a href="https://github.com/openstack/nova/tree/master/nova/api/openstack/compute/schemas/v3">https://github.com/openstack/nova/tree/master/nova/api/openstack/compute/schemas/v3</a></div><div>These schemas are used only for Nova v3 API, there is nothing for v2 API(current) because</div>
<div>v2 API does not use jsonschema.</div><div><br></div><div><br></div><div>Thanks</div><div>Ken'ichi Ohmichi</div><div><br></div></div></div></div>