summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorAlessandro Pilotti <ap@pilotti.it>2012-09-09 18:01:18 +0300
committerAlessandro Pilotti <ap@pilotti.it>2012-09-09 18:01:18 +0300
commit059940646802fb400c4e59b46d805f40ba61b70f (patch)
treea30f49cc7415fb90c2201fdb09377008f2c06c42 /nova/tests
parentf14bf21152fb996897acf5e46a5dbdff832318c2 (diff)
Adds get_available_resource to hyperv driver
Fixes Bug #1048263 update_available_resource was changed to get_available_resource. This fix implements implements the method in the hyperv driver Change-Id: Id018877c563aab7f75618ada318b6422ab06c7b7
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_multiprocessing.p.gzbin0 -> 270 bytes
-rw-r--r--nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_shutil.p.gzbin0 -> 298 bytes
-rw-r--r--nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_wmi.p.gzbin0 -> 1013 bytes
-rw-r--r--nova/tests/test_hypervapi.py6
4 files changed, 6 insertions, 0 deletions
diff --git a/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_multiprocessing.p.gz b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_multiprocessing.p.gz
new file mode 100644
index 000000000..3f50a76e0
--- /dev/null
+++ b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_multiprocessing.p.gz
Binary files differ
diff --git a/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_shutil.p.gz b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_shutil.p.gz
new file mode 100644
index 000000000..35126ad4b
--- /dev/null
+++ b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_shutil.p.gz
Binary files differ
diff --git a/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_wmi.p.gz b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_wmi.p.gz
new file mode 100644
index 000000000..1a34569d1
--- /dev/null
+++ b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_wmi.p.gz
Binary files differ
diff --git a/nova/tests/test_hypervapi.py b/nova/tests/test_hypervapi.py
index 49a411862..0ae65feaf 100644
--- a/nova/tests/test_hypervapi.py
+++ b/nova/tests/test_hypervapi.py
@@ -19,6 +19,7 @@ Test suite for the Hyper-V driver and related APIs.
"""
import os
+import platform
import shutil
import sys
import uuid
@@ -151,6 +152,11 @@ class HyperVAPITestCase(basetestcase.BaseTestCase):
finally:
super(HyperVAPITestCase, self).tearDown()
+ def test_get_available_resource(self):
+ dic = self._conn.get_available_resource()
+
+ self.assertEquals(dic['hypervisor_hostname'], platform.node())
+
def test_list_instances(self):
num_vms = self._hypervutils.get_vm_count()
instances = self._conn.list_instances()