Changeset 1561

Show
Ignore:
Timestamp:
04/25/08 15:05:33 (2 weeks ago)
Author:
kindlund
Message:

Added insert_host to API.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hive/trunk/data_webapp/app/apis/hc_database_api.rb

    r1550 r1561  
    77  api_method :insert_fingerprint, :expects => [:string], :returns => [:string] 
    88  api_method :insert_client, :expects => [:string], :returns => [:string] 
     9  api_method :insert_host, :expects => [:string], :returns => [:string] 
    910 
    1011  api_method :set_client_suspended, :expects => [:string], :returns => [:string] 
  • hive/trunk/data_webapp/app/controllers/hc_database_controller.rb

    r1550 r1561  
    162162  end 
    163163 
     164  def insert_host(obj_str) 
     165    obj_hash = YAML.load(obj_str) 
     166     
     167    # This needs to be BEFORE the insert 
     168    BeeJob.add_job("host",obj_hash) 
     169     
     170    insert(Host,obj_hash) 
     171  end 
     172 
    164173  def flip_false_pos() 
    165174    type = case params[:type]