820
822
result = {'host': 'dummy'}
821
823
result.update(body)
822
824
return (200, result)
826
def get_os_hypervisors(self, **kw):
827
return (200, {"hypervisors": [
828
{'id': 1234, 'hypervisor_hostname': 'hyper1'},
829
{'id': 5678, 'hypervisor_hostname': 'hyper2'},
832
def get_os_hypervisors_detail(self, **kw):
833
return (200, {"hypervisors": [
835
'service': {'id': 1, 'host': 'compute1'},
837
'memory_mb': 10 * 1024,
840
'memory_mb_used': 5 * 1024,
841
'local_gb_used': 125,
842
'hypervisor_type': "xen",
843
'hypervisor_version': 3,
844
'hypervisor_hostname': "hyper1",
845
'free_ram_mb': 5 * 1024,
847
'current_workload': 2,
849
'cpu_info': 'cpu_info',
850
'disk_available_least': 100},
852
'service': {'id': 2, 'host': "compute2"},
854
'memory_mb': 10 * 1024,
857
'memory_mb_used': 5 * 1024,
858
'local_gb_used': 125,
859
'hypervisor_type': "xen",
860
'hypervisor_version': 3,
861
'hypervisor_hostname': "hyper2",
862
'free_ram_mb': 5 * 1024,
864
'current_workload': 2,
866
'cpu_info': 'cpu_info',
867
'disk_available_least': 100}
870
def get_os_hypervisors_hyper_search(self, **kw):
871
return (200, {'hypervisors': [
872
{'id': 1234, 'hypervisor_hostname': 'hyper1'},
873
{'id': 5678, 'hypervisor_hostname': 'hyper2'}
876
def get_os_hypervisors_hyper_servers(self, **kw):
877
return (200, {'hypervisors': [
879
'hypervisor_hostname': 'hyper1',
881
{'name': 'inst1', 'uuid': 'uuid1'},
882
{'name': 'inst2', 'uuid': 'uuid2'}
885
'hypervisor_hostname': 'hyper2',
887
{'name': 'inst3', 'uuid': 'uuid3'},
888
{'name': 'inst4', 'uuid': 'uuid4'}
892
def get_os_hypervisors_1234(self, **kw):
893
return (200, {'hypervisor':
895
'service': {'id': 1, 'host': 'compute1'},
897
'memory_mb': 10 * 1024,
900
'memory_mb_used': 5 * 1024,
901
'local_gb_used': 125,
902
'hypervisor_type': "xen",
903
'hypervisor_version': 3,
904
'hypervisor_hostname': "hyper1",
905
'free_ram_mb': 5 * 1024,
907
'current_workload': 2,
909
'cpu_info': 'cpu_info',
910
'disk_available_least': 100}})