Closed huskercane closed 10 years ago
Thank you. I will see what I can do with this. If possible, I will include a fix in the 2.2.0 release which is (currently) scheduled for Monday.
If you have the chance, could you please check the 2.2.0 branch:
https://github.com/softlayer/softlayer-ruby/tree/Version_2.2.0
and see if that fixes the issue for you?
Upgraded and tried today, works great. thank you
Here is the sample code that I am using
!/usr/bin/env ruby
require 'softlayer_api' require 'pp'
softlayer_client = SoftLayer::Client.new()
server = SoftLayer::VirtualServer.server_with_id('5508708', client: softlayer_client)
puts server.inspect
server.capture_image('master_image', true, 'master_image_note')
Here is the output that I see home/rohits/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/xmlrpc/create.rb:202:in'
conv2value': Wrong type NilClass. Not allowed! (RuntimeError) from /home/rohits/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/xmlrpc/create.rb:118:in
block in methodCall' from /home/rohits/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/xmlrpc/create.rb:117:incollect' from /home/rohits/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/xmlrpc/create.rb:117:in
methodCall' from /home/rohits/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/xmlrpc/client.rb:285:incall2' from /home/rohits/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/xmlrpc/client.rb:267:in
call' from /home/rohits/.rvm/gems/ruby-2.1.1/gems/softlayer_api-2.1.1/lib/softlayer/Service.rb:278:incall_softlayer_api_with_params' from /home/rohits/.rvm/gems/ruby-2.1.1/gems/softlayer_api-2.1.1/lib/softlayer/APIParameterFilter.rb:201:in
method_missing' from /home/rohits/.rvm/gems/ruby-2.1.1/gems/softlayer_api-2.1.1/lib/softlayer/VirtualServer.rb:153:incapture_image' from ./create_image2.rb:12:in
It does work if I do this
require 'softlayer_api' require 'pp'
softlayer_client = SoftLayer::Client.new()
virtual_guest_service = SoftLayer::Service.new("SoftLayer_Virtual_Guest")
CAUTION - hardcoding server id here
server = virtual_guest_service.object_with_id("5508708") block_devices = server.getBlockDevices
puts server.inspect
img1 = server.createArchiveTransaction("master-image", [{"id" => block_devices[0]['id']}], "master-image") puts img1.inspect