mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
Bug #3341: Temporary fix that fixes de broken pipe use but breaks the CLI SSL support for Ruby 1.8.7
This commit is contained in:
1 parent
8294534a57
commit
f40d69d0bd
2 files changed
+21
-2
No files matched your search
+10
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user