← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1640395] Re: Missing 'ports' attribute when GET firewall-groups

 

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 <y.furukawa_2@xxxxxxxxxxxxxx>
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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1640395

Title:
  Missing 'ports' attribute when GET firewall-groups

Status in neutron:
  Fix Released

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": ""
      }
    ]
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1640395/+subscriptions


References