@@ -542,15 +542,6 @@ def rpc_notes(xopts)
542
542
}
543
543
end
544
544
545
- def rpc_report_auth_info ( xopts )
546
- ::ActiveRecord ::Base . connection_pool . with_connection {
547
- opts , wspace = init_db_opts_workspace ( xopts )
548
- res = self . framework . db . report_auth_info ( opts )
549
- return { :result => 'success' } if ( res )
550
- { :result => 'failed' }
551
- }
552
- end
553
-
554
545
def rpc_get_auth_info ( xopts )
555
546
::ActiveRecord ::Base . connection_pool . with_connection {
556
547
opts , wspace = init_db_opts_workspace ( xopts )
@@ -880,42 +871,6 @@ def rpc_loots(xopts)
880
871
}
881
872
end
882
873
883
- # requires host, port, user, pass, ptype, and active
884
- def rpc_report_cred ( xopts )
885
- ::ActiveRecord ::Base . connection_pool . with_connection {
886
- opts , wspace = init_db_opts_workspace ( xopts )
887
- res = framework . db . find_or_create_cred ( opts )
888
- return { :result => 'success' } if res
889
- { :result => 'failed' }
890
- }
891
- end
892
-
893
- #right now workspace is the only option supported
894
- def rpc_creds ( xopts )
895
- ::ActiveRecord ::Base . connection_pool . with_connection {
896
- opts , wspace = init_db_opts_workspace ( xopts )
897
- limit = opts . delete ( :limit ) || 100
898
- offset = opts . delete ( :offset ) || 0
899
-
900
- ret = { }
901
- ret [ :creds ] = [ ]
902
- ::Mdm ::Cred . find ( :all , :include => { :service => :host } , :conditions => [ "hosts.workspace_id = ?" ,
903
- framework . db . workspace . id ] , :limit => limit , :offset => offset ) . each do |c |
904
- cred = { }
905
- cred [ :host ] = c . service . host . address if ( c . service . host )
906
- cred [ :updated_at ] = c . updated_at . to_i
907
- cred [ :port ] = c . service . port
908
- cred [ :proto ] = c . service . proto
909
- cred [ :sname ] = c . service . name
910
- cred [ :type ] = c . ptype
911
- cred [ :user ] = c . user
912
- cred [ :pass ] = c . pass
913
- cred [ :active ] = c . active
914
- ret [ :creds ] << cred
915
- end
916
- ret
917
- }
918
- end
919
874
920
875
def rpc_import_data ( xopts )
921
876
::ActiveRecord ::Base . connection_pool . with_connection {
0 commit comments