In http://developer.openstack.org/api-ref-networking-v2-ext.html#createFirewall, "firewall_policy_id" is required when creating the firewall.
[How to reproduce] $ source devstack/openrc admin admin $ export TOKEN=`openstack token issue| grep ' id ' | get_field 2` $ neutron firewall-policy-create policy1 Created a new firewall_policy: +----------------+--------------------------------------+ | Field | Value | +----------------+--------------------------------------+ | audited | False | | description | | | firewall_rules | | | id | 5c640f90-a1ab-4c14-ad93-fd03cd84ca0c | | name | policy1 | | shared | False | | tenant_id | 6fe0e915471c4db4a4620b9da159b826 | +----------------+--------------------------------------+
$ curl -s -X POST -d '{"firewall":{}}' -H "x-auth-token:$TOKEN" localhost:9696/v2.0/fw/firewalls | jq "." { "NeutronError": { "message": "Failed to parse request. Required attribute 'firewall_policy_id' not specified", "type": "HTTPBadRequest", "detail": "" } }
$ curl -s -X POST -d '{"firewall":{"firewall_policy_id":"5c640f90-a1ab-4c14-ad93-fd03cd84ca0c"}}' -H "x-auth-token:$TOKEN" localhost:9696/v2.0 /fw/firewalls | jq "." { "firewall": { "status": "INACTIVE", "router_ids": [], "name": "", "admin_state_up": true, "tenant_id": "6fe0e915471c4db4a4620b9da159b826", "firewall_policy_id": "5c640f90-a1ab-4c14-ad93-fd03cd84ca0c", "id": "8e6d05da-4a9f-4db1-bb35-d3e4bfe8577d", "description": "" } }
In http:// developer. openstack. org/api- ref-networking- v2-ext. html#createFire wall, policy_ id" is required when creating the firewall.
"firewall_
[How to reproduce] policy- create policy1 ------- ---+--- ------- ------- ------- ------- ------- + ------- ---+--- ------- ------- ------- ------- ------- + a1ab-4c14- ad93-fd03cd84ca 0c | 4a4620b9da159b8 26 | ------- ---+--- ------- ------- ------- ------- ------- +
$ source devstack/openrc admin admin
$ export TOKEN=`openstack token issue| grep ' id ' | get_field 2`
$ neutron firewall-
Created a new firewall_policy:
+------
| Field | Value |
+------
| audited | False |
| description | |
| firewall_rules | |
| id | 5c640f90-
| name | policy1 |
| shared | False |
| tenant_id | 6fe0e915471c4db
+------
$ curl -s -X POST -d '{"firewall":{}}' -H "x-auth- token:$ TOKEN" localhost: 9696/v2. 0/fw/firewalls | jq "." policy_ id' not specified",
{
"NeutronError": {
"message": "Failed to parse request. Required attribute 'firewall_
"type": "HTTPBadRequest",
"detail": ""
}
}
$ curl -s -X POST -d '{"firewall" :{"firewall_ policy_ id":"5c640f90- a1ab-4c14- ad93-fd03cd84ca 0c"}}' -H "x-auth- token:$ TOKEN" localhost:9696/v2.0 state_up" : true, b4a4620b9da159b 826", policy_ id": "5c640f90- a1ab-4c14- ad93-fd03cd84ca 0c", 4a9f-4db1- bb35-d3e4bfe857 7d",
/fw/firewalls | jq "."
{
"firewall": {
"status": "INACTIVE",
"router_ids": [],
"name": "",
"admin_
"tenant_id": "6fe0e915471c4d
"firewall_
"id": "8e6d05da-
"description": ""
}
}