from sfa.util.sfalogging import logger
from sfa.util.xrn import Xrn, urn_to_hrn
-from sfa.util.threadmanager import ThreadManager
from sfa.util.version import version_core
from sfa.util.callids import Callids
+from sfa.server.threadmanager import ThreadManager
+
from sfa.rspecs.rspec_converter import RSpecConverter
from sfa.rspecs.version_manager import VersionManager
from sfa.rspecs.rspec import RSpec
# get the rspec from the aggregate
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
threads.run(_ListResources, aggregate, server, [cred], options, call_id)
if caller_hrn == aggregate and aggregate != api.hrn:
continue
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
# Just send entire RSpec to each aggregate
threads.run(_CreateSliver, aggregate, server, xrn, [cred], rspec.toxml(), users, call_id)
if caller_hrn == aggregate and aggregate != api.hrn:
continue
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
threads.run(_RenewSliver, server, xrn, [cred], expiration_time, call_id)
# 'and' the results
return reduce (lambda x,y: x and y, threads.get_results() , True)
if caller_hrn == aggregate and aggregate != api.hrn:
continue
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
threads.run(_DeleteSliver, server, xrn, [cred], call_id)
threads.get_results()
return 1
threads = ThreadManager()
for aggregate in api.aggregates:
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
threads.run (_SliverStatus, server, slice_xrn, [cred], call_id)
results = threads.get_results()
if caller_hrn == aggregate and aggregate != api.hrn:
continue
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
threads.run(_ListSlices, server, [cred], call_id)
# combime results
continue
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
threads.run(server.GetTicket, xrn, [cred], aggregate_rspec, users)
results = threads.get_results()
if caller_hrn == aggregate and aggregate != api.hrn:
continue
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
threads.run(server.Start, xrn, cred)
threads.get_results()
return 1
if caller_hrn == aggregate and aggregate != api.hrn:
continue
interface = api.aggregates[aggregate]
- server = api.get_server(interface, cred)
+ server = api.server_proxy(interface, cred)
threads.run(server.Stop, xrn, cred)
threads.get_results()
return 1