← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1525913] [NEW] vmwareapi get vcenter cluster

 

Public bug reported:


In liberty nova/virt/vmwareapi/vm_util.py
def get_cluster_ref_by_name(session, cluster_name):
    """Get reference to the vCenter cluster with the specified name."""
    all_clusters = get_all_cluster_mors(session)
    for cluster in all_clusters:
        if (hasattr(cluster, 'propSet') and
                    cluster.propSet[0].val == cluster_name):
            return cluster.obj
when all_cluster is None,this code may cause error:TypeError: 'NoneType' object is not iterable,and nova-computer would't up

** Affects: nova
     Importance: Undecided
     Assignee: linbing (hawkerous)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => linbing (hawkerous)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1525913

Title:
  vmwareapi get vcenter cluster

Status in OpenStack Compute (nova):
  New

Bug description:
  
  In liberty nova/virt/vmwareapi/vm_util.py
  def get_cluster_ref_by_name(session, cluster_name):
      """Get reference to the vCenter cluster with the specified name."""
      all_clusters = get_all_cluster_mors(session)
      for cluster in all_clusters:
          if (hasattr(cluster, 'propSet') and
                      cluster.propSet[0].val == cluster_name):
              return cluster.obj
  when all_cluster is None,this code may cause error:TypeError: 'NoneType' object is not iterable,and nova-computer would't up

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


Follow ups