Merge "Use provider tree in virt FakeDriver"
This commit is contained in:
commit
dd159932d6
|
@ -490,6 +490,35 @@ class FakeDriver(driver.ComputeDriver):
|
|||
host_status['cpu_info'] = jsonutils.dumps(cpu_info)
|
||||
return host_status
|
||||
|
||||
def update_provider_tree(self, provider_tree, nodename, allocations=None):
|
||||
inventory = {
|
||||
'VCPU': {
|
||||
'total': self.vcpus,
|
||||
'reserved': 0,
|
||||
'min_unit': 1,
|
||||
'max_unit': self.vcpus,
|
||||
'step_size': 1,
|
||||
'allocation_ratio': 16,
|
||||
},
|
||||
'MEMORY_MB': {
|
||||
'total': self.memory_mb,
|
||||
'reserved': 512,
|
||||
'min_unit': 1,
|
||||
'max_unit': self.memory_mb,
|
||||
'step_size': 1,
|
||||
'allocation_ratio': 1.5,
|
||||
},
|
||||
'DISK_GB': {
|
||||
'total': self.local_gb,
|
||||
'reserved': 0,
|
||||
'min_unit': 1,
|
||||
'max_unit': self.local_gb,
|
||||
'step_size': 1,
|
||||
'allocation_ratio': 1,
|
||||
},
|
||||
}
|
||||
provider_tree.update_inventory(nodename, inventory)
|
||||
|
||||
def ensure_filtering_rules_for_instance(self, instance, network_info):
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue