    # File lib/fog/openstack/requests/compute/create_flavor.rb, line 12
            def create_flavor(attributes)
              # Get last flavor id
              flavor_ids = Array.new
              flavors = list_flavors_detail.body['flavors']
              flavors.each do |flavor|
                flavor_ids << flavor['id'].to_i
              end

              # Set flavor id
              attributes[:flavor_id] = attributes[:flavor_id] || flavor_ids.sort.last + 1

              data = {
                'flavor' => {
                  'name' => attributes[:name],
                  'ram' => attributes[:ram],
                  'vcpus' => attributes[:vcpus],
                  'disk' => attributes[:disk],
                  'id' => attributes[:flavor_id],
                  'swap' => attributes[:swap],
                  'OS-FLV-EXT-DATA:ephemeral' => attributes[:ephemeral],
                  'rxtx_factor' => attributes[:rxtx_factor]
                }
              }

              request(
                :body => MultiJson.encode(data),
                :expects => 200,
                :method => 'POST',
                :path => 'flavors'
              )
            end