Skip to content Skip to sidebar Skip to footer

Errors While Converting Python Script To Ruby

I am using a Python script which uses xmlrpclib: import xmlrpclib srv = xmlrpclib.ServerProxy('http://demo.myslice.info:7080/', allow_none=True) # authentication token auth = {'Au

Solution 1:

The Error was in the conversion. Instead of list inside list, I used dictionary. I solved it:

require "xmlrpc/client"
require "pp"

XMLRPC::Config.module_eval do
    remove_const :ENABLE_NIL_PARSER
    const_set :ENABLE_NIL_PARSER, true
end

ret = XMLRPC::Client.new2("http://demo.myslice.info:7080/")

auth = {"AuthMethod" => "password", "Username" => "guest", "AuthString" => "guest"}

pp ret.call("Get", auth, "slice", [["slice_hrn", "=" ,"ple.upmc.myslicedemo"]], {}, ["slice_hrn"])

Post a Comment for "Errors While Converting Python Script To Ruby"