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 00000000..3f50a76e Binary files /dev/null and b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_multiprocessing.p.gz 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 00000000..35126ad4 Binary files /dev/null and b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_shutil.p.gz 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 00000000..1a34569d Binary files /dev/null and b/nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_wmi.p.gz differ diff --git a/nova/tests/test_hypervapi.py b/nova/tests/test_hypervapi.py index 49a41186..0ae65fea 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()