Nov 13, 2013
iControl EM Proxy Issues
Hi All,
Trying to use the ruby f5-icontrol library to interact with Enterprise Manager's iControl proxy capability. So far I have had little luck. I have the following script, and it is functional in returning info from EM, except for when I attempt to run the get_context_id method.
require 'f5-icontrol'
require 'pp'
wsdls = ['Management.EM']
b = F5::IControl.new('myem', 'admin', 'thepassword', wsdls).get_interfaces
l = {}
l['devices'] = b['Management.EM'].get_devices()
l['context'] = b['Management.EM'].get_context_id()
pp l
This results in the following error:
/usr/share/ruby/rexml/parsers/baseparser.rb:411:in `block in pull_event': Undefined prefix E found (REXML::UndefinedNamespaceException)
from /usr/share/ruby/set.rb:232:in `each_key'
from /usr/share/ruby/set.rb:232:in `each'
from /usr/share/ruby/rexml/parsers/baseparser.rb:409:in `pull_event'
from /usr/share/ruby/rexml/parsers/baseparser.rb:183:in `pull'
from /usr/share/ruby/rexml/parsers/streamparser.rb:16:in `parse'
from /usr/share/ruby/rexml/document.rb:243:in `parse_stream'
from /usr/local/share/gems/gems/soap2r-1.5.8/lib/xsd/xmlparser/rexmlparser.rb:27:in `do_parse'
from /usr/local/share/gems/gems/soap2r-1.5.8/lib/soap/parser.rb:102:in `parse'
from /usr/local/share/gems/gems/soap2r-1.5.8/lib/soap/processor.rb:39:in `unmarshal'
from /usr/local/share/gems/gems/soap2r-1.5.8/lib/soap/rpc/proxy.rb:291:in `unmarshal'
from /usr/local/share/gems/gems/soap2r-1.5.8/lib/soap/rpc/proxy.rb:190:in `route'
from /usr/local/share/gems/gems/soap2r-1.5.8/lib/soap/rpc/proxy.rb:149:in `call'
from /usr/local/share/gems/gems/soap2r-1.5.8/lib/soap/rpc/driver.rb:151:in `call'
from (eval):6:in `get_context_id'
from em2.rb:11:in `'
I'm running ruby 2.0.0p247, EM 3.1.1 (40.7), and have tried f5-icontrol gems for v11.3.0 and v11.4.1.
Any ideas?
Thanks.