[Openstack] creating a security group curling nova v1.1 api
Alejandro Comisario
alejandro.comisario at mercadolibre.com
Tue Jan 10 15:51:09 UTC 2012
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" -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" -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://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 <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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120110/97bc1171/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/97bc1171/attachment.png>
More information about the Openstack
mailing list