#NEWLINE# def list_sizes( self , location = None ) : #NEWLINE# #INDENT# 'List available Linode plans\n\n        Gets the sizes that can be used for creating a Linode.  Since available\n        Linode plans vary per-location, this method can also be passed a\n        location to filter the availability.\n\n        @keyword location: the facility to retrieve plans in\n        @type location: NodeLocation\n\n        @return: a C{list} of L{NodeSize}s' #NEWLINE# params = { #NEWLINE# #INDENT# 'api_action' : 'avail.linodeplans' , #NEWLINE# #UNINDENT# } #NEWLINE# data = self . connection . request ( LINODE_ROOT , params = self ) . objects [ 0 ] #NEWLINE# sizes = [ ] #NEWLINE# for obj in data : #NEWLINE# #INDENT# n = NodeSize ( id = obj [ 'PLANID' ] , name = obj [ 'LABEL' ] , ram = obj [ 'RAM' ] , disk = ( obj [ 'DISK' ] * 1024 ) , bandwidth = obj [ 'XFER' ] , price = obj [ 'PRICE' ] , driver = self . connection . driver ) #NEWLINE# sizes . append ( n ) #NEWLINE# #UNINDENT# return sizes