softlayer_messaging 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/softlayer/messaging.rb +3 -3
- data/lib/softlayer/messaging/client.rb +3 -3
- metadata +1 -1
data/lib/softlayer/messaging.rb
CHANGED
@@ -7,9 +7,9 @@ module SoftLayer
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def load_endpoint
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
f = File.open(File.join(File.dirname(File.expand_path(__FILE__)),
|
11
|
+
'../../resources/config.json'), "r")
|
12
|
+
JSON.parse(f.read)['endpoints']
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -6,10 +6,10 @@ module SoftLayer::Messaging
|
|
6
6
|
attr_accessor :auth, :resource
|
7
7
|
def initialize(account, options={})
|
8
8
|
@account = account
|
9
|
-
options[:datacenter] ||=
|
10
|
-
options[:network] ||=
|
9
|
+
options[:datacenter] ||= 'dal05'
|
10
|
+
options[:network] ||= 'public'
|
11
11
|
if not options[:endpoint]
|
12
|
-
options[:endpoint] = "https://#{SoftLayer.endpoints[options[:datacenter]][options[:network]]}"
|
12
|
+
options[:endpoint] = "https://#{SoftLayer.endpoints[options[:datacenter].to_s][options[:network].to_s]}"
|
13
13
|
end
|
14
14
|
@base_resource = RestClient::Resource.new(options[:endpoint])
|
15
15
|
@endpoint = "#{options[:endpoint]}/v1/#{account}"
|