Networking API v2.0 (CURRENT): Update Network Request missing the 'qos-policy-id' parameter.

Bug #1630134 reported by Gilles Dubreuil
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Anindita Das
openstack-api-site
Invalid
Undecided
Pallavi

Bug Description

The API reference http://developer.openstack.org/api-ref/networking/v2/index.html doesn't reflect the fact a Qos Policy linked to an existing network can be updated:

$ curl -s -H "X-Auth-Token: $OS_TOKEN" http://${OS_HOST}:9696/v2.0/qos/policies | python -mjson.tool{
    "policies": [
        {
            "description": "This policy limits the ports to 10Mbit max.",
            "id": "c4e80891-5d77-480f-8970-a7223fd72f4b",
            "name": "10Mbit",
            "rules": [],
            "shared": false,
            "tenant_id": "5a23535b5dda4770bccc856d0167e53f"
        }
    ]
}

$ curl -s -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json" http://${OS_HOST}:9696/v2.0/networks/b18d3079-fcaa-41b7-8aec-0d009789fff8| python -mjson.tool
{
    "network": {
        "admin_state_up": false,
        "id": "b18d3079-fcaa-41b7-8aec-0d009789fff8",
        "mtu": 0,
        "name": "cristalnet",
        "port_security_enabled": true,
        "provider:network_type": "vxlan",
        "provider:physical_network": null,
        "provider:segmentation_id": 39,
        "qos_policy_id": null,
        "router:external": false,
        "shared": true,
        "status": "ACTIVE",
        "subnets": [],
        "tenant_id": "5a23535b5dda4770bccc856d0167e53f",
        "vlan_transparent": null
    }
}

$ curl -s \
> -X PUT \
> -H "X-Auth-Token: $OS_TOKEN" \
> -H "Content-Type: application/json" \
> -d '{"network": { "qos_policy_id": "c4e80891-5d77-480f-8970-a7223fd72f4b" } }' \
> http://${OS_HOST}:9696/v2.0/networks/b18d3079-fcaa-41b7-8aec-0d009789fff8 | python -mjson.tool
{
    "network": {
        "admin_state_up": false,
        "id": "b18d3079-fcaa-41b7-8aec-0d009789fff8",
        "mtu": 0,
        "name": "cristalnet",
        "port_security_enabled": true,
        "provider:network_type": "vxlan",
        "provider:physical_network": null,
        "provider:segmentation_id": 39,
        "qos_policy_id": "c4e80891-5d77-480f-8970-a7223fd72f4b",
        "router:external": false,
        "shared": true,
        "status": "ACTIVE",
        "subnets": [],
        "tenant_id": "5a23535b5dda4770bccc856d0167e53f",
        "vlan_transparent": null
    }
}

Tags: doc
description: updated
Pallavi (pallavi-s)
Changed in neutron:
assignee: nobody → Pallavi (pallavi-s)
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

As per [1] and [2] , it seems that this is not an issue with Neutron, but in fact with the API reference doc.

[1]: https://github.com/openstack/neutron/blob/b9e7611373ad1eac4e4df618596ebb32b677ce45/neutron/extensions/qos.py#L125

[2] :
usage: neutron net-update [-h] [--request-format {json}] [--name NAME]
                          [--description DESCRIPTION]
                          [--qos-policy QOS_POLICY | --no-qos-policy]
                          [--dns-domain DNS_DOMAIN | --no-dns-domain]
                          NETWORK

tags: added: doc
Revision history for this message
Dariusz Smigiel (smigiel-dariusz) wrote :

Added openstack-api-site, but now I'm not sure, if it belongs there. Maybe this doc is already moved to neutron-lib?

Pallavi (pallavi-s)
Changed in neutron:
assignee: Pallavi (pallavi-s) → nobody
Changed in openstack-api-site:
assignee: nobody → Pallavi (pallavi-s)
Revision history for this message
Victor Morales (electrocucaracha) wrote : Draft - MSR September 2016

Darek, besides the effort in OVO, do you have something in mind that the team has been done during the last month?

Summary
========
As part of the effort to offer rolling upgrades in Neutron the team has been focused mainly in the implementation of Oslo-Versioned Objects. Resulting this effort in 85% of the patches have been merged, those changes relocate model classes avoiding cyclic imports. However, the progress in the creation and integration of OVO classes has 91% completed, that means 88 patchsets are under review and there 15 OVO classes which haven’t started their integration.

OVO Neutron Status Dashboard - https://docs.google.com/spreadsheets/d/1FeeQlQITsZSj_wpOXiLbS36dirb_arX0XEWBdFVPMB8/edit#gid=1434170112
Bi-weekly upgrades work status 9/19/2016 - http://lists.openstack.org/pipermail/openstack-dev/2016-September/104434.html

Doug Wiegley (dougwig)
Changed in neutron:
status: New → Confirmed
importance: Undecided → High
Changed in openstack-api-site:
status: New → Invalid
Changed in neutron:
assignee: nobody → Anindita Das (anindita-das)
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lib (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-lib (master)

Reviewed: https://review.openstack.org/428244
Committed: https://git.openstack.org/cgit/openstack/neutron-lib/commit/?id=89ae75c486c9d447c83006a91334276a79013780
Submitter: Jenkins
Branch: master

commit 89ae75c486c9d447c83006a91334276a79013780
Author: Anindita Das <email address hidden>
Date: Thu Feb 2 16:27:04 2017 +0000

    api-ref: Add 'qos_policy_id' parameter to PUT

    Adds the 'qos_policy_id' request parameter to the Update Network
    api. (see defect)

    Change-Id: Ifc4e3cce093bc6109d8f5529e9c72bd133b44831
    Closes-Bug: #1630134

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

This issue was fixed in the openstack/neutron-lib 1.2.0 release.

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.