This repository was archived by the owner on Feb 8, 2021. It is now read-only.
File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 17
17
import json
18
18
19
19
class HyperClient (object ):
20
- def __init__ (self , url ):
21
- self . base_url = url
20
+ def __init__ (self ):
21
+ pass
22
22
23
23
def ping (self ):
24
24
try :
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class HyperHTTPClient(
33
33
api .HyperClient ):
34
34
35
35
def __init__ (self , url = 'unix://var/run/hyper.sock' ):
36
- super (HyperHTTPClient , self ).__init__ (url )
36
+ super (HyperHTTPClient , self ).__init__ ()
37
37
self .base_url = url
38
38
self ._version = DEFAULT_VERSION
39
39
self .timeout = TIMEOUT
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ def get_available_resource(self, nodename):
286
286
287
287
memory = hostinfo .get_memory_usage ()
288
288
disk = hostinfo .get_disk_usage ()
289
- cur_hv_type = hv_type .KVM #todo: check
289
+ cur_hv_type = hv_type .HYPER #todo: check
290
290
stats = {
291
291
'vcpus' : hostinfo .get_total_vcpus (),
292
292
'vcpus_used' : hostinfo .get_vcpus_used (self .list_instances (True )),
@@ -295,7 +295,7 @@ def get_available_resource(self, nodename):
295
295
'local_gb' : disk ['total' ] / units .Gi ,
296
296
'local_gb_used' : disk ['used' ] / units .Gi ,
297
297
'disk_available_least' : disk ['available' ] / units .Gi ,
298
- 'hypervisor_type' : 'kvm ' , #todo: check
298
+ 'hypervisor_type' : 'hyper ' , #todo: check
299
299
'hypervisor_version' : utils .convert_version_to_int ('1.0' ),
300
300
'hypervisor_hostname' : self ._nodename ,
301
301
'cpu_info' : '?' ,
You can’t perform that action at this time.
0 commit comments