    # File lib/fog/hp/requests/compute/create_server.rb, line 42
            def create_server(name, flavor_id, image_id, options = {})
              data = {
                'server' => {
                  'flavorRef'  => flavor_id,
                  'imageRef'   => image_id,
                  'name'       => name
                }
              }
              if options['metadata']
                data['server']['metadata'] = options['metadata']
              end
              if options['accessIPv4']
                data['server']['accessIPv4'] = options['accessIPv4']
              end
              if options['accessIPv6']
                data['server']['accessIPv6'] = options['accessIPv6']
              end
              if options['personality']
                data['server']['personality'] = []
                for file in options['personality']
                  data['server']['personality'] << {
                    'contents'  => Base64.encode64(file['contents']),
                    'path'      => file['path']
                  }
                end
              end
              min_count = options['min_count'] || 1
              max_count = options['max_count'] || min_count
              data['server']['min_count'] = min_count
              data['server']['max_count'] = max_count

              if options['key_name']
                data['server']['key_name'] = options['key_name']
              end
              if options['security_groups']
                data['server']['security_groups'] = []
                for sg in options['security_groups']
                  data['server']['security_groups'] << {
                    'name' => sg
                  }
                end
              end
              if options['availability_zone']
                data['server']['availability_zone'] = options['availability_zone']
              end

              request(
                :body     => Fog::JSON.encode(data),
                :expects  => 202,
                :method   => 'POST',
                :path     => 'servers.json'
              )
            end