variable referenced before assignment in vmwareapi code

Bug #1177689 reported by Yaguang Tang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Yaguang Tang
Grizzly
Fix Released
High
Yaguang Tang

Bug Description

nova/virt/vmwareapi/vm_utils.py

557 for elem in data_stores:
558 ds_name = None
559 ds_type = None
560 ds_cap = None
561 ds_free = None
562 for prop in elem.propSet:
563 if prop.name == "summary.type":
564 ds_type = prop.val
565 elif prop.name == "summary.name":
566 ds_name = prop.val
567 elif prop.name == "summary.capacity":
568 ds_cap = prop.val
569 elif prop.name == "summary.freeSpace":
570 ds_free = prop.val
571 # Local storage identifier
572 if ds_type == "VMFS" or ds_type == "NFS":
573 data_store_name = ds_name
574 return elem.obj, data_store_name, ds_cap, ds_free
575
576 if data_store_name is None:
577 raise exception.DatastoreNotFound()

variable "data_store_name" referenced before assignment.

Tags: vmware
Yaguang Tang (heut2008)
Changed in nova:
assignee: nobody → Yaguang Tang (heut2008)
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/28512

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/28512
Committed: http://github.com/openstack/nova/commit/aeef5c3f1917969fc2dc524346784b197729a9e9
Submitter: Jenkins
Branch: master

commit aeef5c3f1917969fc2dc524346784b197729a9e9
Author: Yaguang Tang <email address hidden>
Date: Wed May 8 16:08:05 2013 +0800

    Fix variable referenced before assginment in vmwareapi code.

    Add unitests for VMwareapi vm_util.
    fix bug #1177689

    Change-Id: If16109ee626c197227affba122c2e4986d92d2df

Changed in nova:
status: In Progress → Fix Committed
dan wendlandt (danwent)
tags: added: vmware
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/28762

Changed in nova:
importance: Undecided → Critical
importance: Critical → Low
importance: Low → High
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/28762
Committed: http://github.com/openstack/nova/commit/b4d8cfea8ee94c7dbe1187f36de38b3eac6b5a79
Submitter: Jenkins
Branch: stable/grizzly

commit b4d8cfea8ee94c7dbe1187f36de38b3eac6b5a79
Author: Yaguang Tang <email address hidden>
Date: Wed May 8 16:08:05 2013 +0800

    Fix variable referenced before assginment in vmwareapi code.

    Add unitests for VMwareapi vm_util.
    fix bug #1177689

    Change-Id: If16109ee626c197227affba122c2e4986d92d2df
    (cherry picked from commit aeef5c3f1917969fc2dc524346784b197729a9e9)

tags: added: in-stable-grizzly
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
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.