Public bug reported:

I am running OpenStack Mitaka on CentOS7.1 with VMware vSphere 5.5 Enterprise 
Plus.
In function get_datastore() of nova/virt/vmwareapi/ds_utils.py file, the 
following code comments:
      ......
      datastore_ret = session._call_method(vutil,
                                           "get_object_property",
                                           object,
                                           "datastore")
      # If there are no hosts in the cluster then an empty string is returned.
      if not datastore_ret:
          raise exception.DatastoreNotFound()

      ......

According to context, I think  this comments are incorrectness: 
   1)  We get datastore objects, not hosts object.
   2)  If there are no datastores in the cluster then raise exception, not 
return an empty string.

** Affects: nova
     Importance: Undecided
     Assignee: Zhou Jianming (zhoujm-cri)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Zhou Jianming (zhoujm-cri)

-- 
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/1674259

Title:
  code comments incorrectness

Status in OpenStack Compute (nova):
  New

Bug description:
  I am running OpenStack Mitaka on CentOS7.1 with VMware vSphere 5.5 Enterprise 
Plus.
  In function get_datastore() of nova/virt/vmwareapi/ds_utils.py file, the 
following code comments:
        ......
        datastore_ret = session._call_method(vutil,
                                             "get_object_property",
                                             object,
                                             "datastore")
        # If there are no hosts in the cluster then an empty string is returned.
        if not datastore_ret:
            raise exception.DatastoreNotFound()

        ......

  According to context, I think  this comments are incorrectness: 
     1)  We get datastore objects, not hosts object.
     2)  If there are no datastores in the cluster then raise exception, not 
return an empty string.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to