Missing 'ports' attribute when GET firewall-groups

Bug #1640395 reported by Yushiro FURUKAWA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Yushiro FURUKAWA

Bug Description

In current fwaas-v2, "ports" attribute is missing when following requests:

  * GET v2.0/fwaas/firewall_groups/
  * GET v2.0/fwaas/firewall_groups/{firewall_group_id}

It seems plugin layer does not have method 'get_firewall_groups'.

[How to reproduce]
$ source devstack/openrc admin admin
$ export TOKEN=`openstack token issue | grep ' id ' | get_field 2`
$ curl -X POST -d '{"firewall_group":{"name":"fwg"}}' -H "x-auth-token:$TOKEN" 192.168.122.181:9696/v2.0/fwaas/firewall_groups
{
  "firewall_group": {
    "status": "INACTIVE",
    "description": "",
    "ingress_firewall_policy_id": null,
    "id": "04b9e7a5-abb1-410f-87b2-0b5ad559d02d",
    "name": "fwg",
    "admin_state_up": true,
    "tenant_id": "1c6afc3649a845029606ff83aeb81209",
    "ports": [],
    "project_id": "1c6afc3649a845029606ff83aeb81209",
    "public": false,
    "egress_firewall_policy_id": null
  }
}

$ curl -s -X GET -H "x-auth-token:$TOKEN" 192.168.122.181:9696/v2.0/fwaas/firewall_groups/04b9e7a5-abb1-410f-87b2-0b5ad559d02d | jq "."
{
  "firewall_group": {
    "status": "INACTIVE",
    "public": false,
    "egress_firewall_policy_id": null,
    "name": "fwg1",
    "admin_state_up": true,
    "tenant_id": "1c6afc3649a845029606ff83aeb81209",
    "project_id": "1c6afc3649a845029606ff83aeb81209",
    "id": "04b9e7a5-abb1-410f-87b2-0b5ad559d02d",
    "ingress_firewall_policy_id": null,
    "description": ""
  }
}

$ curl -s -X PUT -d '{"firewall_group":{"name":"change"}}' -H "x-auth-token:$TOKEN" 192.168.122.181:9696/v2.0/fwaas/firewall_groups/04b9e7a5-abb1-410f-87b2-0b5ad5
59d02d | jq "."
{
  "firewall_group": {
    "status": "INACTIVE",
    "description": "",
    "ingress_firewall_policy_id": null,
    "id": "04b9e7a5-abb1-410f-87b2-0b5ad559d02d",
    "name": "change",
    "admin_state_up": true,
    "tenant_id": "1c6afc3649a845029606ff83aeb81209",
    "ports": [],
    "project_id": "1c6afc3649a845029606ff83aeb81209",
    "public": false,
    "egress_firewall_policy_id": null
  }
}

$ curl -s -X GET -H "x-auth-token:$TOKEN" 192.168.122.181:9696/v2.0/fwaas/firewall_groups | jq "."
{
  "firewall_groups": [
    {
      "status": "INACTIVE",
      "public": false,
      "egress_firewall_policy_id": null,
      "name": "change",
      "admin_state_up": true,
      "tenant_id": "1c6afc3649a845029606ff83aeb81209",
      "project_id": "1c6afc3649a845029606ff83aeb81209",
      "id": "04b9e7a5-abb1-410f-87b2-0b5ad559d02d",
      "ingress_firewall_policy_id": null,
      "description": ""
    }
  ]
}

Tags: fwaas
Changed in neutron:
assignee: nobody → Sridar Kandaswamy (skandasw)
Changed in neutron:
status: New → Confirmed
Revision history for this message
Andreas Scheuring (andreas-scheuring) wrote :

just checked, the spec does specify this. Unfortunately there's no API documentation for the firewall-group feature. See bug [1]

[1] https://bugs.launchpad.net/openstack-api-site/+bug/1640437

Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-fwaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/423047

Changed in neutron:
assignee: Sridar Kandaswamy (skandasw) → Yushiro FURUKAWA (y-furukawa-2)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-fwaas (master)

Reviewed: https://review.openstack.org/423047
Committed: https://git.openstack.org/cgit/openstack/neutron-fwaas/commit/?id=0fe3b406927545859aa33d4ccdcc8871b81e44eb
Submitter: Jenkins
Branch: master

commit 0fe3b406927545859aa33d4ccdcc8871b81e44eb
Author: Yushiro FURUKAWA <email address hidden>
Date: Fri Jan 20 12:04:01 2017 +0900

    Fix 'ports' attribute for firewall_group

    This commit fixes 'ports' attribute for firewall_group and enable to
    return 'ports' as a POST/GET response.

    Change-Id: I2052d977dd9b426e2384d49ee14259aabe6f5a49
    Closes-Bug: #1640395

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-fwaas 10.0.0.0b3

This issue was fixed in the openstack/neutron-fwaas 10.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.