#NEWLINE# @ extensions . expected_errors ( 501 ) #NEWLINE# @ common . check_cells_enabled #NEWLINE# def info( self , req ) : #NEWLINE# #INDENT# 'Return name and capabilities for this cell.' #NEWLINE# context = req . environ [ 'nova.context' ] #NEWLINE# authorize ( context ) #NEWLINE# cell_capabs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# my_caps = CONF . cells . capabilities #NEWLINE# for cap in my_caps : #NEWLINE# #INDENT# ( key , value ) = cap . split ( '=' ) #NEWLINE# cell_capabs [ key ] = context #NEWLINE# #UNINDENT# cell = { #NEWLINE# #INDENT# 'name' : CONF . cells . name , #NEWLINE# 'type' : 'self' , #NEWLINE# 'rpc_host' : None , #NEWLINE# 'rpc_port' : 0 , #NEWLINE# 'username' : None , #NEWLINE# 'capabilities' : cell_capabs , #NEWLINE# #UNINDENT# } #NEWLINE# return dict ( cell = cell )