<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<base href="x-msg://282/">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br>
<div>
<div>On May 30, 2012, at 8:33 AM, Day, Phil wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">
<div lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1" style="page: WordSection1; ">
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
Hi Folks,<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
I was looking for the full definition of the API requests, and I’m a tad confused by what I find here:<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<a href="http://api.openstack.org/" style="color: blue; text-decoration: underline; ">http://api.openstack.org/</a><o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
Specifically for Server Create there is both and “Server – Create” and “Server – Extended Create”, although as far as I can see the “extended create” isn’t actually an extension as such (the additional parameters are supported in the core servers module).<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
Also there seem to be a number of parameter values that aren’t specified in either interface entry, such as:<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
min_count<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
max_count<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
networks<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
key_name<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
So is the API document intended to be:<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 36pt; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -18pt; ">
<span>-<span style="font: normal normal normal 7pt/normal 'Times New Roman'; ">         <span class="Apple-converted-space"> </span></span></span>A formal specification of the Interface<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 36pt; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -18pt; ">
<span>-<span style="font: normal normal normal 7pt/normal 'Times New Roman'; ">         <span class="Apple-converted-space"> </span></span></span>A set of examples  (but if you want the details you need to read the code)<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
</div>
</div>
</span></blockquote>
<div><br>
</div>
<div>You should also look at:</div>
<div><br>
</div>
<div><a href="http://docs.openstack.org/api/">http://docs.openstack.org/api/</a></div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1" style="page: WordSection1; ">
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
Are there plans to define the validation schematics of interface parameters ?<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>There are WADL and XML Schemas for the core here:</div>
<div><br>
</div>
<div><a href="https://github.com/openstack/compute-api/blob/master/openstack-compute-api-2/src/os-compute-2.wadl">https://github.com/openstack/compute-api/blob/master/openstack-compute-api-2/src/os-compute-2.wadl</a></div>
<div><br>
</div>
<div>and here:</div>
<div><br>
</div>
<div><a href="https://github.com/openstack/compute-api/tree/master/openstack-compute-api-2/src/xsd">https://github.com/openstack/compute-api/tree/master/openstack-compute-api-2/src/xsd</a></div>
<div><br>
</div>
<div>nothing to validate the JSON...yet</div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1" style="page: WordSection1; ">
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
I have another specific question on what seems to be an inconsistency between the XML and JSON output of get server details:<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
The XML response defines the names of networks as values within the <addresses> section:<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<addresses><o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
        <network id="public"><o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
            <ip version="4" addr="67.23.10.132"/><o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
But in the JSON response it looks as if the network name is a structural element of the response:<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
"addresses":  {<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
            "public" : [<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
                {<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
                    "version": 4,<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
                    "addr": "67.23.10.132"<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
                },<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
i.e. depending on the value of the “label” field in the networks table of the nova database the structure of the JSON response seems to change (I may not be expressing that very well, my point is that “addresses” is fixed by the API definition, but “public”
 is defined per implementation ?<o:p></o:p></div>
<div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<o:p> </o:p></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>Addresses is fixed in both the XML and JSON.  public is implementation specific in both as well.</div>
<div><br>
</div>
<div><br>
</div>
<div>-jOrGe W.</div>
<div><br>
</div>
<div><br>
</div>
</div>
</body>
</html>