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
This commit is contained in:
Alessandro Pilotti 2012-09-09 18:01:18 +03:00
parent 245365dab0
commit 824956b5c8
4 changed files with 6 additions and 0 deletions

View File

@ -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()