#NEWLINE# def add_storage_pool( sto , poolName , storageSystemName , first_avaliable ) : #NEWLINE# #INDENT# systems = sto . get_storage_systems ( ) #NEWLINE# for sys in systems : #NEWLINE# #INDENT# if ( ( sys [ 'name' ] == storageSystemName ) or first_avaliable ) : #NEWLINE# #INDENT# storageSystemUri = sys [ 'uri' ] #NEWLINE# ret = sto . add_storage_pool ( poolName , storageSystemUri ) #NEWLINE# if ( 'capacityLimit' in ret ) : #NEWLINE# #INDENT# print ( 'Name:                ' , ret [ 'name' ] ) #NEWLINE# print ( 'State:               ' , ret [ 'state' ] ) #NEWLINE# print ( 'Description:         ' , ret [ 'description' ] ) #NEWLINE# print ( 'RAID Type:           ' , ret [ 'supportedRAIDLevel' ] ) #NEWLINE# print ( 'Allocated Capacity : ' , ret [ 'allocatedCapacity' ] ) #NEWLINE# print ( 'Capacity Limit:      ' , ret [ 'capacityLimit' ] ) #NEWLINE# print ( 'Total Capacity       ' , ret [ 'totalCapacity' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# pprint ( ret ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# #UNINDENT# print ( 'Storage System not found' )