<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
HI Asha,
<div class=""><br class="">
</div>
<div class="">It looks like your curl command is malformed, which is why you’re getting all the curl errors.  You need to quote the entirety of the payload, like so:</div>
<div class=""><br class="">
</div>
<div class=""><span style="font-size: 13px;" class="">curl -X POST -H 'content-type:application/json' -H 'X-Project-Id: 12345' -d '{ "name": "container1" ,"type": "rsa","secret_refs": [ { "name": "private_key", "secret_ref":"</span><a href="http://localhost:9311/v1/secrets/b9e474a4-aed9-4d5b-98a7-5f2127aad81f" target="_blank" style="font-size: 13px;" class="">http://localhost:9311/v1/secrets/b9e474a4-aed9-4d5b-98a7-5f2127aad81f</a><span style="font-size: 13px;" class="">"
 }, { "name": "public_key", "secret_ref":"</span><a href="http://localhost:9311/v1/secrets/c49e4b6a-7ec1-4a81-9ee5-58647102e5b6" target="_blank" style="font-size: 13px;" class="">http://localhost:9311/v1/secrets/c49e4b6a-7ec1-4a81-9ee5-58647102e5b6</a><span style="font-size: 13px;" class="">"
 } , { "name": "private_key_passphrase", "secret_ref":"</span><a href="http://localhost:9311/v1/secrets/3cd2fdc8-e30d-4f33-a1d8-81aa0bc2c47e" target="_blank" style="font-size: 13px;" class="">http://localhost:9311/v1/secrets/3cd2fdc8-e30d-4f33-a1d8-81aa0bc2c47e</a><span style="font-size: 13px;" class="">"
 } ] }' </span><font size="2" class=""><a href="http://localhost:9311/v1/containers" class="">http://localhost:9311/v1/containers</a></font></div>
<div class=""><br class="">
</div>
<div class="">Or else your shell splits the payload and you get all the errors you listed.</div>
<div class=""><br class="">
</div>
<div class="">-Doug</div>
<div class=""><br class="">
<div class="">--------------------<br class="">
Douglas Mendizábal<br class="">
IRC: redrobot<br class="">
PGP Key: 245C 7B6F 70E9 D8F3 F5D5  0CC9 AD14 1F30 2D58 923C </div>
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Mar 16, 2015, at 5:24 PM, Asha Seshagiri <<a href="mailto:asha.seshagiri@gmail.com" class="">asha.seshagiri@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi All,
<div class=""><br clear="all" class="">
<div class="">
<div style="font-size:12.8000001907349px" class="">Could any one help me out with the execution of the command for creating the container .</div>
<div style="font-size:12.8000001907349px" class="">Please find the command and the response below :</div>
<div style="font-size:12.8000001907349px" class=""><br class="">
</div>
<div style="font-size:12.8000001907349px" class="">
<div class="">root@barbican:~# curl -X POST -H 'content-type:application/json' -H 'X-Project-Id: 12345' -d { "name": "container1" ,"type": "rsa","secret_refs": [ { "name": "private_key", "secret_ref":"<a href="http://localhost:9311/v1/secrets/b9e474a4-aed9-4d5b-98a7-5f2127aad81f" target="_blank" class="">http://localhost:9311/v1/secrets/b9e474a4-aed9-4d5b-98a7-5f2127aad81f</a>"
 }, { "name": "public_key", "secret_ref":"<a href="http://localhost:9311/v1/secrets/c49e4b6a-7ec1-4a81-9ee5-58647102e5b6" target="_blank" class="">http://localhost:9311/v1/secrets/c49e4b6a-7ec1-4a81-9ee5-58647102e5b6</a>" } , { "name": "private_key_passphrase",
 "secret_ref":"<a href="http://localhost:9311/v1/secrets/3cd2fdc8-e30d-4f33-a1d8-81aa0bc2c47e" target="_blank" class="">http://localhost:9311/v1/secrets/3cd2fdc8-e30d-4f33-a1d8-81aa0bc2c47e</a>" } ] } <a href="http://localhost:9311/v1/containers" target="_blank" class="">http://localhost:9311/v1/containers</a></div>
<div class="">curl: (6) Could not resolve host: name</div>
<div class="">curl: (6) Could not resolve host: container1</div>
<div class="">curl: (6) Could not resolve host: ,type</div>
<div class="">curl: (6) Could not resolve host: rsa,secret_refs</div>
<div class="">curl: (3) [globbing] bad range specification in column 2</div>
<div class="">curl: (3) [globbing] unmatched brace in column 1</div>
<div class="">curl: (6) Could not resolve host: name</div>
<div class="">curl: (6) Could not resolve host: private_key,</div>
<div class="">curl: (6) Could not resolve host: secret_ref:http</div>
<div class="">curl: (3) [globbing] unmatched close brace/bracket in column 1</div>
<div class="">curl: (3) [globbing] unmatched brace in column 1</div>
<div class="">curl: (6) Could not resolve host: name</div>
<div class="">curl: (6) Could not resolve host: public_key,</div>
<div class="">curl: (6) Could not resolve host: secret_ref:http</div>
<div class="">curl: (3) [globbing] unmatched close brace/bracket in column 1</div>
<div class="">curl: (6) Could not resolve host: ,</div>
<div class="">curl: (3) [globbing] unmatched brace in column 1</div>
<div class="">curl: (6) Could not resolve host: name</div>
<div class="">curl: (6) Could not resolve host: private_key_passphrase,</div>
<div class="">curl: (6) Could not resolve host: secret_ref:http</div>
<div class="">curl: (3) [globbing] unmatched close brace/bracket in column 1</div>
<div class="">curl: (3) [globbing] unmatched close brace/bracket in column 1</div>
<div class="">curl: (3) [globbing] unmatched close brace/bracket in column 1</div>
<div class="">{"code": 400, "description": "Malformed JSON", "title": "Bad Request"}root@barbican:~#</div>
<div class=""><br class="">
</div>
<div class="">Also I got the secret references by using the following command and selected the highlighted secret from the list  :</div>
<div class=""><br class="">
</div>
<div class="">url -H 'Accept: application/json' -H 'X-Project-Id:12345' <a href="http://localhost:9311/v1/secrets" target="_blank" class="">http://localhost:9311/v1/secrets</a>                                                            {"secrets": [{"status":
 "ACTIVE", "secret_type": "opaque", "updated": "2015-03-10T21:23:52.843606", "name": null, "algorithm": null, "created": "2015-03-10T21:23:52.838400", "secret_ref": "<a href="http://localhost:9311/v1/secrets/de9502e5-42b2-4b17-8d8b-932dbc40604e" target="_blank" class="">http://localhost:9311/v1/secrets/de9502e5-42b2-4b17-8d8b-932dbc40604e</a>",
 "content_types": {"default": "text/plain"}, "expiration": null, "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-10T21:40:10.476840", "name": null, "algorithm": null, "created": "2015-03-10T21:40:10.473810",
 "secret_ref": "<a href="http://localhost:9311/v1/secrets/a7af62f1-b763-4643-813f-e268326967e3" target="_blank" class="">http://localhost:9311/v1/secrets/a7af62f1-b763-4643-813f-e268326967e3</a>", "content_types": {"default": "text/plain"}, "expiration": null,
 "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-11T19:02:03.381427", "name": null, "algorithm": null, "created": "2015-03-11T19:02:03.381427", <b class="">"secret_ref": "<a href="http://localhost:9311/v1/secrets/b9e474a4-aed9-4d5b-98a7-5f2127aad81f" target="_blank" class="">http://localhost:9311/v1/secrets/b9e474a4-aed9-4d5b-98a7-5f2127aad81f</a>",</b> "expiration":
 null, "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-11T21:36:11.555639", "name": null, "algorithm": null, "created": "2015-03-11T21:36:11.555639", <b class="">"secret_ref": "<a href="http://localhost:9311/v1/secrets/c49e4b6a-7ec1-4a81-9ee5-58647102e5b6" target="_blank" class="">http://localhost:9311/v1/secrets/c49e4b6a-7ec1-4a81-9ee5-58647102e5b6</a>", </b>"expiration":
 null, "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-11T22:22:49.473581", "name": null, "algorithm": null, "created": "2015-03-11T22:22:49.473581", "secret_ref": "<a href="http://localhost:9311/v1/secrets/5ebc1454-785f-4001-bc22-dd25957e8de3" target="_blank" class="">http://localhost:9311/v1/secrets/5ebc1454-785f-4001-bc22-dd25957e8de3</a>",
 "expiration": null, "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-13T15:25:35.989442", "name": null, "algorithm": null, "created": "2015-03-13T15:25:35.989442", "secret_ref": "<a href="http://localhost:9311/v1/secrets/13c7c239-0571-4471-820c-7f782855ee67" target="_blank" class="">http://localhost:9311/v1/secrets/13c7c239-0571-4471-820c-7f782855ee67</a>",
 "expiration": null, "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-13T15:38:14.930289", "name": null, "algorithm": null, "created": "2015-03-13T15:37:16.926344", <b class="">"secret_ref": "<a href="http://localhost:9311/v1/secrets/3cd2fdc8-e30d-4f33-a1d8-81aa0bc2c47e" target="_blank" class="">http://localhost:9311/v1/secrets/3cd2fdc8-e30d-4f33-a1d8-81aa0bc2c47e</a>", </b>"content_types":
 {"default": "text/plain"}, "expiration": null, "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-13T15:42:44.570773", "name": null, "algorithm": null, "created": "2015-03-13T15:40:55.906374", "secret_ref":
 "<a href="http://localhost:9311/v1/secrets/51cce32e-2427-4d84-8853-6b90d52e7d96" target="_blank" class="">http://localhost:9311/v1/secrets/51cce32e-2427-4d84-8853-6b90d52e7d96</a>", "content_types": {"default": "application/octet-stream"}, "expiration": null,
 "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-13T19:55:59.922138", "name": null, "algorithm": null, "created": "2015-03-13T19:55:59.919010", "secret_ref": "<a href="http://localhost:9311/v1/secrets/9ae128cb-072c-491c-8cfd-2b82d82e44e5" target="_blank" class="">http://localhost:9311/v1/secrets/9ae128cb-072c-491c-8cfd-2b82d82e44e5</a>",
 "content_types": {"default": "text/plain"}, "expiration": null, "bit_length": null, "mode": null}, {"status": "ACTIVE", "secret_type": "opaque", "updated": "2015-03-13T20:02:12.341703", "name": null, "algorithm": null, "created": "2015-03-13T20:02:12.338562",
 "secret_ref": "<a href="http://localhost:9311/v1/secrets/9fcae609-49a1-450a-bbe6-c28238bb1671" target="_blank" class="">http://localhost:9311/v1/secrets/9fcae609-49a1-450a-bbe6-c28238bb1671</a>", "content_types": {"default": "text/plain"}, "expiration": null,
 "bit_length": null, "mode": null}], "total": 12, "next": "<a href="http://localhost:9311/v1/secrets?limit=10&offset=10" target="_blank" class="">http://localhost:9311/v1/secrets?limit=10&offset=10</a>"}root@barbican:~#</div>
<div class=""><br class="">
</div>
<div class="">Thanks in advance.</div>
</div>
</div>
-- <br class="">
<div class="gmail_signature">
<div class=""><em class="">Thanks and Regards,</em></div>
<div class=""><em class="">Asha Seshagiri</em></div>
</div>
</div>
</div>
__________________________________________________________________________<br class="">
OpenStack Development Mailing List (not for usage questions)<br class="">
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" class="">
OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br class="">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>