Revision 0dc421ea src/oca/ruby/OpenNebula.rb

View differences:

src/oca/ruby/OpenNebula.rb
84 84

  
85 85

  
86 86
            one_secret=~/^(.+?):(.+)$/
87
            @one_auth  = "#{$1}:#{Digest::SHA1.hexdigest($2)}"
87
            user=$1
88
            password=$2
89
            
90
            if password.match(/^ssh:/)
91
                @one_auth = "#{user}:#{password.split(':').last}"
92
            else
93
                @one_auth = "#{user}:#{Digest::SHA1.hexdigest(password)}"
94
            end
88 95

  
89 96
            if endpoint
90 97
                @one_endpoint=endpoint

Also available in: Unified diff