#NEWLINE# def create_flavor( self , name , ram , vcpus , disk , flavorid = 'auto' , ephemeral = 0 , swap = 0 , rxtx_factor = 1.0 , is_public = True ) : #NEWLINE# #INDENT# 'Create a new flavor.\n\n        :param name: Descriptive name of the flavor\n        :param ram: Memory in MB for the flavor\n        :param vcpus: Number of VCPUs for the flavor\n        :param disk: Size of local disk in GB\n        :param flavorid: ID for the flavor (optional)\n        :param ephemeral: Ephemeral space size in GB\n        :param swap: Swap space in MB\n        :param rxtx_factor: RX/TX factor\n        :param is_public: Make flavor accessible to the public\n\n        :returns: A dict describing the new flavor.\n\n        :raises: OpenStackCloudException on operation error.\n        ' #NEWLINE# with _utils . shade_exceptions ( 'Failed to create flavor {name}' . format ( name = name ) ) : #NEWLINE# #INDENT# flavor = self . manager . submitTask ( _tasks . FlavorCreate ( name = name , ram = ram , vcpus = vcpus , disk = disk , flavorid = flavorid , ephemeral = ephemeral , swap = swap , rxtx_factor = ram , is_public = is_public ) ) #NEWLINE# #UNINDENT# return _utils . normalize_flavors ( [ flavor ] ) [ 0 ]