<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">the fastest way to learn the API is to
run quantum client with -v:<br>
# quantum port-create --request-format xml net1 -v<br>
.....<br>
REQ: curl -i <a class="moz-txt-link-freetext" href="http://localhost:9696/v2.0/ports.xml">http://localhost:9696/v2.0/ports.xml</a> -X POST -H
"X-Auth-Token: 22ac5a38128949adaa852282a9ec8bd3" -H "Content-Type:
application/xml" -H "Accept: application/xml" -H "User-Agent:
python-quantumclient" -d '<?xml version="1.0"
encoding="UTF-8"?><br>
<port xmlns=<a class="moz-txt-link-rfc2396E" href="http://openstack.org/quantum/api/v2.0">"http://openstack.org/quantum/api/v2.0"</a>
xmlns:quantum=<a class="moz-txt-link-rfc2396E" href="http://openstack.org/quantum/api/v2.0">"http://openstack.org/quantum/api/v2.0"</a>
xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>><network_id>671cc79b-5f53-4e68-ba35-7effbe015706</network_id><admin_state_up
quantum:type="bool">True</admin_state_up></port>'<br>
<br>
On 05/24/2013 06:47 PM, Thomas Kärgel wrote:<br>
</div>
<blockquote cite="mid:519F455D.90102@b1-systems.de" type="cite">
<pre wrap="">Hi,
i'm tryning to create a port in quantum via a curl:
curl -H "X-Auth-Token: 978ed39cd13645c5a7024ad9d954c914" -d '<?xml
version="1.0" encoding="UTF-8"?><port admin_state_up="true"
device_id="d21f15c5-a7f0-47eb-854d-330e1227f572" name="test"
network_id="9e770d5c-238a-4317-a129-9fd96dca8a6b"></port>' -H
"Content-Type: application/xml; charset=UTF-8" -H "Accept:
application/xml" <a class="moz-txt-link-freetext" href="http://quantumserver:9696/v2.0/ports.xml">http://quantumserver:9696/v2.0/ports.xml</a>
the answer i get from quantum is:
<QuantumError>
Unable to find 'port' in request body
</QuantumError>
What am i doing wrong? I think I'm not seeing the forest for the trees.
Best regards
Thomas
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Mailing list: <a class="moz-txt-link-freetext" href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a>
Post to : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a>
Unsubscribe : <a class="moz-txt-link-freetext" href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a>
More help : <a class="moz-txt-link-freetext" href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a>
</pre>
</blockquote>
<br>
</body>
</html>