#NEWLINE# def get_available_resource( self , nodename ) : #NEWLINE# #INDENT# "Updates compute manager resource info on ComputeNode table.\n\n           Since we don't have a real hypervisor, pretend we have lots of\n           disk and ram.\n        " #NEWLINE# cpu_info = collections . OrderedDict ( [ ( 'arch' , 'x86_64' ) , ( 'model' , 'Nehalem' ) , ( 'vendor' , 'Intel' ) , ( 'features' , [ 'pge' , 'clflush' ] ) , ( 'topology' , { #NEWLINE# #INDENT# 'cores' : 1 , #NEWLINE# 'threads' : 1 , #NEWLINE# 'sockets' : 4 , #NEWLINE# #UNINDENT# } ) ] ) #NEWLINE# if ( nodename not in _FAKE_NODES ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# host_status = self . host_status_base . copy ( ) #NEWLINE# host_status . update ( self . resources . dump ( ) ) #NEWLINE# host_status [ 'hypervisor_hostname' ] = nodename #NEWLINE# host_status [ 'host_hostname' ] = nodename #NEWLINE# host_status [ 'host_name_label' ] = nodename #NEWLINE# host_status [ 'cpu_info' ] = jsonutils . dumps ( cpu_info ) #NEWLINE# return nodename