diff options
author | Arnaud Legendre <alegendre@vmware.com> | 2014-08-22 13:50:27 -0700 |
---|---|---|
committer | Arnaud Legendre <arnaudleg@gmail.com> | 2014-08-22 14:28:53 -0700 |
commit | a3f81467e99b4bab28792a4659bad277a549eac4 (patch) | |
tree | 6e1823fc03bbef2b9df404f61f60aa43c93fbc5b | |
parent | d9ada2a29420ce4daf527e718c0c0eccdfbb82c6 (diff) | |
download | oslo-vmware-a3f81467e99b4bab28792a4659bad277a549eac4.tar.gz |
Add missing session parameter to get_summary
The session parameter is missing when calling the get_summary
method.
Change-Id: I56649ca5a647c502a3cc5b7103ae1c659cb1c57c
-rw-r--r-- | oslo/vmware/objects/datastore.py | 2 | ||||
-rw-r--r-- | tests/objects/test_datastore.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/oslo/vmware/objects/datastore.py b/oslo/vmware/objects/datastore.py index b46d8cd..73466fb 100644 --- a/oslo/vmware/objects/datastore.py +++ b/oslo/vmware/objects/datastore.py @@ -90,7 +90,7 @@ class Datastore(object): :return: list of HostSystem managed object references """ hosts = [] - summary = self.get_summary() + summary = self.get_summary(session) if not summary.accessible: return hosts host_mounts = session.invoke_api(vim_util, 'get_object_property', diff --git a/tests/objects/test_datastore.py b/tests/objects/test_datastore.py index e9f1242..ccf3b29 100644 --- a/tests/objects/test_datastore.py +++ b/tests/objects/test_datastore.py @@ -94,6 +94,7 @@ class DatastoreTestCase(base.TestCase): m2 = HostMount("m2", MountInfo('read', True, True)) m3 = HostMount("m3", MountInfo('readWrite', False, True)) m4 = HostMount("m4", MountInfo('readWrite', True, False)) + ds.get_summary.assert_called_once_with(session) class Prop(object): DatastoreHostMount = [m1, m2, m3, m4] |