jamesn-softlayer-ruby 0.7.0.0 → 0.7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes +5 -1
- data/lib/softlayer.rb +1 -0
- data/lib/softlayer/baseclass.rb +1 -1
- data/sample/cdnlayerupload.rb +1 -3
- metadata +1 -1
data/Changes
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
|
2
|
-
Changes since 0.
|
2
|
+
Changes since 0.7.0
|
3
|
+
|
4
|
+
account for the off chance we are calling a method and @authHeader is nil in slapiCall
|
5
|
+
fix a bug that would cause classes to be nil in declareClasses if we only passed soap service names (not method names as the commit says)
|
3
6
|
|
7
|
+
Changes since 0.6.3
|
4
8
|
|
5
9
|
Added a CDNLayer sample
|
6
10
|
Refactor slapiCall and realCall to clean up a bit of a mess, fix method parameter handling, and cleans up header handling. There's a bit of an api change here.
|
data/lib/softlayer.rb
CHANGED
data/lib/softlayer/baseclass.rb
CHANGED
@@ -230,7 +230,7 @@ module SoftLayer
|
|
230
230
|
h = args[:headers]
|
231
231
|
a = args[:args]
|
232
232
|
y = args[:yield]
|
233
|
-
@slapi.headerhandler << @authHeader unless @slapi.headerhandler.include?(@authHeader)
|
233
|
+
@slapi.headerhandler << @authHeader unless (@slapi.headerhandler.include?(@authHeader) || @authHeader.nil?)
|
234
234
|
h.each {|e| @slapi.headerhandler << e }
|
235
235
|
args = []
|
236
236
|
a.each { |k,v| args.push(v) }
|
data/sample/cdnlayerupload.rb
CHANGED
@@ -48,16 +48,14 @@ SLAPICLASSES = [ 'SoftLayer::Account', 'SoftLayer::Network::ContentDelivery::Acc
|
|
48
48
|
SoftLayer::declareClasses(:ruby => SLAPICLASSES)
|
49
49
|
account = SoftLayer::Account.new(:user => AUTH_USER, :key => AUTH_KEY, :initParam => ACCT_ID)
|
50
50
|
account.objectMask={'cdnAccountName' => nil}
|
51
|
-
cdnacct = nil
|
52
51
|
|
53
52
|
# Get the accout number by matching the name that was in ARGV[2]
|
53
|
+
cdnacct = nil
|
54
54
|
account.getCdnAccounts.each do |c|
|
55
55
|
# pp c
|
56
56
|
cdnacct = SoftLayer::Network::ContentDelivery::Account.new(:initParam => c['id']) if c['cdnAccountName'] == CDN_ACCT
|
57
57
|
end
|
58
58
|
|
59
|
-
cdnacct.getPopNames
|
60
|
-
|
61
59
|
fname = File.basename(INFILE)
|
62
60
|
# base64 encode the file
|
63
61
|
b64 = [IO.read(INFILE)].pack("m")
|