Hi Gavin,
You can do this:
rpcs = ('get_route_information',
'get_mpls_lsp_information')
for rpc in rpcs:
resp = getattr(dev.rpc, rpc)()
If your RPC calls require arguments, things get more complicated. In that case, you can do something like this:
rpcs_and_args = (('get_software_information',{'brief':True}),
('get_interface_information',{'descriptions':True,'interface-name':'lo0.0'}))
for (rpc,args) in rpcs_and_args:
resp = getattr(dev.rpc, rpc)(**args)
Hope that helps,
--Stacy