from sfa.util.config import Config
from sfa.util.version import version_core
from sfa.util.cache import Cache
from sfa.util.config import Config
from sfa.util.version import version_core
from sfa.util.cache import Cache
-from sfa.util.record import SfaRecord, UserRecord, SliceRecord, NodeRecord, AuthorityRecord
+
+from sfa.storage.record import SfaRecord, UserRecord, SliceRecord, NodeRecord, AuthorityRecord
from sfa.rspecs.rspec import RSpec
from sfa.rspecs.rspec_converter import RSpecConverter
from sfa.rspecs.version_manager import VersionManager
from sfa.rspecs.rspec import RSpec
from sfa.rspecs.rspec_converter import RSpecConverter
from sfa.rspecs.version_manager import VersionManager
import sfa.client.xmlrpcprotocol as xmlrpcprotocol
from sfa.client.client_helper import pg_users_arg, sfa_users_arg
import sfa.client.xmlrpcprotocol as xmlrpcprotocol
from sfa.client.client_helper import pg_users_arg, sfa_users_arg
# cache version for 24 hours
cache.add(cache_key, version, ttl= 60*60*24)
self.logger.info("Updating cache file %s" % cache_file)
cache.save_to_file(cache_file)
# cache version for 24 hours
cache.add(cache_key, version, ttl= 60*60*24)
self.logger.info("Updating cache file %s" % cache_file)
cache.save_to_file(cache_file)
if self.server_supports_options_arg(server):
options = {'call_id': unique_call_id()}
call_args.append(options)
if self.server_supports_options_arg(server):
options = {'call_id': unique_call_id()}
call_args.append(options)
server_version = self.get_cached_server_version(server)
if 'sfa' in server_version:
# just request the version the client wants
server_version = self.get_cached_server_version(server)
if 'sfa' in server_version:
# just request the version the client wants
else:
# this must be a protogeni aggregate. We should request a v2 ad rspec
# regardless of what the client user requested
else:
# this must be a protogeni aggregate. We should request a v2 ad rspec
# regardless of what the client user requested
call_args = [creds, options]
result = server.ListResources(*call_args)
call_args = [creds, options]
result = server.ListResources(*call_args)
options = {'call_id': unique_call_id()}
call_args.append(options)
result = server.CreateSliver(*call_args)
options = {'call_id': unique_call_id()}
call_args.append(options)
result = server.CreateSliver(*call_args)
# get a ticket for the specified slice
def get_ticket(self, opts, args):
# get a ticket for the specified slice
def get_ticket(self, opts, args):
if self.server_supports_options_arg(server):
options = {'call_id': unique_call_id()}
call_args.append(options)
if self.server_supports_options_arg(server):
options = {'call_id': unique_call_id()}
call_args.append(options)
options = {'call_id': unique_call_id()}
call_args.append(options)
result = server.SliverStatus(*call_args)
options = {'call_id': unique_call_id()}
call_args.append(options)
result = server.SliverStatus(*call_args)