mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
Bug #3341: Temporary fix that fixes de broken pipe use but breaks the CLI SSL support for Ruby 1.8.7
(cherry picked from commit f40d69d0bdb22712b2b8b2f68fde235f68c2e725)
This commit is contained in:
parent
464ec1b4b1
commit
1363fdacdd
@ -370,7 +370,16 @@ EOT
|
||||
endpoint=options[:endpoint]
|
||||
end
|
||||
|
||||
@@client=OpenNebula::Client.new(secret, endpoint, :sync => true)
|
||||
# This breaks the CLI SSL support for Ruby 1.8.7, but is necessary
|
||||
# in order to do template updates, otherwise you get the broken pipe
|
||||
# error (bug #3341)
|
||||
if RUBY_VERSION < '1.9'
|
||||
sync = false
|
||||
else
|
||||
sync = true
|
||||
end
|
||||
|
||||
@@client=OpenNebula::Client.new(secret, endpoint, :sync => sync)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -162,10 +162,20 @@ class OneUserHelper < OpenNebulaHelper::OneHelper
|
||||
# Authenticate with oned using the token/passwd and set/generate the
|
||||
# authentication token for the user
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# This breaks the CLI SSL support for Ruby 1.8.7, but is necessary
|
||||
# in order to do template updates, otherwise you get the broken pipe
|
||||
# error (bug #3341)
|
||||
if RUBY_VERSION < '1.9'
|
||||
sync = false
|
||||
else
|
||||
sync = true
|
||||
end
|
||||
|
||||
token = auth.login_token(username, options[:time])
|
||||
login_client = OpenNebula::Client.new("#{username}:#{token}",
|
||||
nil,
|
||||
:sync => true)
|
||||
:sync => sync)
|
||||
|
||||
user = OpenNebula::User.new(User.build_xml, login_client)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user