[Openstack] creating a security group curling nova v1.1 api

Alejandro Comisario alejandro.comisario at mercadolibre.com
Tue Jan 10 18:37:24 UTC 2012


the content-type header was missing !
thanks !

meli <www.mercadolibre.com>
*Alejandro Comisario *
*Infrastructure IT - #melicloud Cloud Builder*
Arias 3751, Piso 7 (C1430CRG)
Ciudad de Buenos Aires - Argentina
Cel: +549(11) 15-3770-1857
Tel : +54(11) 4640-8443

On 01/10/2012 01:37 PM, Jay Pipes wrote:
> Check what is being sent by using the -v option. Perhaps the JSON you 
> are trying to send isn't going through properly?
>
> Cheers,
> -jay
>
> On Tue, Jan 10, 2012 at 10:51 AM, Alejandro Comisario 
> <alejandro.comisario at mercadolibre.com 
> <mailto:alejandro.comisario at mercadolibre.com>> wrote:
>
>     Hi guys, we have a diablo cluster with keystone.
>     We can successfully create servers, but when we try to add a rule
>     to the default security group, or create a new one, we get a 400
>     "badRequest" error.
>
>     Here we left the two requests, can anyone point where the solution
>     might be ?
>
>     LISTING THE DEFAULT SECURITY GROUP:
>     # curl -X GET "http://172.16.159.5:8774/v1.1/5/os-security-groups"
>     <http://172.16.159.5:8774/v1.1/5/os-security-groups> -H
>     "X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196" | python
>     -mjson.tool
>     RESP:
>     {
>         "security_groups": [
>             {
>                 "description": "default",
>                 "id": 67,
>                 "name": "default",
>                 "rules": [],
>                 "tenant_id": "5"
>             }
>         ]
>     }
>
>     TRYING TO CREATE A SECURITY GROUP:
>     # curl -X POST -d "{"security_group": {"name": "testSG",
>     "description": "testSG"}}"
>     "http://172.16.x.y:8774/v1.1/5/os-security-groups"
>     <http://172.16.x.y:8774/v1.1/5/os-security-groups> -H
>     "X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196"
>     RESP :
>     {"badRequest": {"message": "The server could not comply with the
>     request since it is either malformed or otherwise incorrect.",
>     "code": 400}}
>
>     TRYING TO ADD A RULE TO THE DEFAULT SECURITY GROUP:
>     # curl -X POST -d "{"security_group_rule": {"ip_protocol": "tcp",
>     "from_port": "22", "to_port": "22", "group_id": 67,
>     "parent_group_id": 16, "cidr": "0.0.0.0/0 <http://0.0.0.0/0>"}}"
>     "http://172.16.159.5:8774/v1.1/5/os-security-group-rules"
>     <http://172.16.159.5:8774/v1.1/5/os-security-group-rules> -H
>     "X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196"
>     RESP:
>     {"badRequest": {"message": "The server could not comply with the
>     request since it is either malformed or otherwise incorrect.",
>     "code": 400}}
>
>     PS: the token is the one obtained from keystone for tenant 5,
>     listing of SG is working ok, but creation of new SG nor adding a
>     new rule for that SG, is not.
>     PS1: Is the parent_group_id value, the same as group_id on the
>     "security_groups" database table ?
>
>     Best regards.
>     -- 
>     meli <http://www.mercadolibre.com>
>     *Alejandro Comisario *
>     *Infrastructure IT - #melicloud Cloud Builder*
>     Arias 3751, Piso 7 (C1430CRG)
>     Ciudad de Buenos Aires - Argentina
>     Cel: +549(11) 15-3770-1857
>     Tel : +54(11) 4640-8443 <tel:%2B54%2811%29%204640-8443>
>
>     _______________________________________________
>     Mailing list: https://launchpad.net/~openstack
>     <https://launchpad.net/%7Eopenstack>
>     Post to     : openstack at lists.launchpad.net
>     <mailto:openstack at lists.launchpad.net>
>     Unsubscribe : https://launchpad.net/~openstack
>     <https://launchpad.net/%7Eopenstack>
>     More help   : https://help.launchpad.net/ListHelp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120110/a1e5df14/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cloudbuilders-Logo-last-smallest.png
Type: image/png
Size: 13387 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120110/a1e5df14/attachment.png>


More information about the Openstack mailing list