nova net-list not return network uuid but id instead

Bug #1162409 reported by Zhi Yan Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Zhi Yan Liu
Grizzly
Fix Released
High
Unassigned

Bug Description

os-networks API (index, show and create) return network id but not uuid even uuid field available.

network_dict function in the extension should not use "in" checking for a Network model object.
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/os_networks.py#L50

Zhi Yan Liu (lzy-dev)
Changed in nova:
status: New → In Progress
assignee: nobody → Zhi Yan Liu (lzy-dev)
Revision history for this message
Haiwei Xu (xu-haiwei) wrote :

Hi,
I am also concerned about the commands "nova net-list" and "nova network-list" .
The difference between the two commands is just ID or UUID is outputed.
Could you please tell us how you will fix the problem more or less?
Thank you.

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote : Re: [Bug 1162409] Re: nova net-list not return network uuid but id instead

Hi, just change
"nova/api/openstack/compute/contrib/os_networks.py#L50" to: "if 'uuid'
in dict(network.iteritems()):". I will deliver it asap, with ut.

On Mon, Apr 1, 2013 at 9:49 AM, Haiwei Xu <email address hidden> wrote:
> Hi,
> I am also concerned about the commands "nova net-list" and "nova network-list" .
> The difference between the two commands is just ID or UUID is outputed.
> Could you please tell us how you will fix the problem more or less?
> Thank you.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1162409
>
> Title:
> nova net-list not return network uuid but id instead
>
> Status in OpenStack Compute (Nova):
> In Progress
>
> Bug description:
> os-networks API (index, show and create) return network id but not
> uuid even uuid field available.
>
> network_dict function in the extension should not use "in" checking for a Network model object.
> https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/contrib/os_networks.py#L50
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/1162409/+subscriptions

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

Haiwei, I just temporarily change "nova/api/openstack/compute/contrib/os_networks.py#L50" to: "if 'uuid' in dict(network.iteritems()):".

I will deliver a appropriate change asap.

Revision history for this message
Haiwei Xu (xu-haiwei) wrote :

Hi, Zhi Yan Liu

Sorry, I can't catch you yet.
Firstly, the subject "nova net-list not return network uuid but id instead" is ok?
As I know, the net-list command do return uuid. However, the network-list command returns id .
Do you mean the word "ID" in the first line of the net-list output should be UUID?
I just don't know what you are intented to do.

Can you explain it again? Thank you.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
importance: Undecided → High
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/25994
Committed: http://github.com/openstack/nova/commit/9254403281fad200f871c5e6ff052dc79c739d6e
Submitter: Jenkins
Branch: master

commit 9254403281fad200f871c5e6ff052dc79c739d6e
Author: Zhi Yan Liu <email address hidden>
Date: Fri Apr 5 22:06:18 2013 +0800

    Correct network uuid field for os-network extension

    "nova net-list" does not return network uuid even when the uuid is
    available, and instead returns only the id. This is because the
    "network_dict" function in the extension improperly uses "in" to check
    for a Network model object. This also reduces compatibility in the API.

    Fixes bug: 1162409

    Change-Id: I30d4c8bfa37d89123f35ee8cc7c67f0e819262a7
    Signed-off-by: Zhi Yan Liu <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/26610

tags: removed: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/26610
Committed: http://github.com/openstack/nova/commit/54fd249bd4fc90aed1c45f6ef356faa2ff98bb03
Submitter: Jenkins
Branch: stable/grizzly

commit 54fd249bd4fc90aed1c45f6ef356faa2ff98bb03
Author: Zhi Yan Liu <email address hidden>
Date: Fri Apr 5 22:06:18 2013 +0800

    Correct network uuid field for os-network extension

    "nova net-list" does not return network uuid even when the uuid is
    available, and instead returns only the id. This is because the
    "network_dict" function in the extension improperly uses "in" to check
    for a Network model object. This also reduces compatibility in the API.

    Fixes bug: 1162409

    Change-Id: I30d4c8bfa37d89123f35ee8cc7c67f0e819262a7
    Signed-off-by: Zhi Yan Liu <email address hidden>(cherry picked from commit 9254403281fad200f871c5e6ff052dc79c739d6e)

Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
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.