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:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -19,6 +19,7 @@ Test suite for the Hyper-V driver and related APIs.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import uuid
|
import uuid
|
||||||
@@ -151,6 +152,11 @@ class HyperVAPITestCase(basetestcase.BaseTestCase):
|
|||||||
finally:
|
finally:
|
||||||
super(HyperVAPITestCase, self).tearDown()
|
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):
|
def test_list_instances(self):
|
||||||
num_vms = self._hypervutils.get_vm_count()
|
num_vms = self._hypervutils.get_vm_count()
|
||||||
instances = self._conn.list_instances()
|
instances = self._conn.list_instances()
|
||||||
|
|||||||
Reference in New Issue
Block a user