From: Tony Mack Date: Sat, 1 Oct 2011 02:28:08 +0000 (-0400) Subject: use sfa.rspecs.version_manager.VersionManager instead of sfa.rspecs.rspec_version... X-Git-Tag: sfa-1.1-1~171 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3ccb44d8d54fe8d9ef137038b9324e0d0aefadd2;p=sfa.git use sfa.rspecs.version_manager.VersionManager instead of sfa.rspecs.rspec_version.RSpecVersion --- diff --git a/sfa/client/sfi.py b/sfa/client/sfi.py index 3aaae801..838b2914 100755 --- a/sfa/client/sfi.py +++ b/sfa/client/sfi.py @@ -28,8 +28,7 @@ import sfa.util.xmlrpcprotocol as xmlrpcprotocol from sfa.util.config import Config from sfa.util.version import version_core from sfa.util.cache import Cache -from sfa.rspecs.rspec_version import RSpecVersion -from sfa.rspecs.pg_rspec import pg_rspec_request_version +from sfa.rspecs.version_manager import VersionManager AGGREGATE_PORT=12346 CM_PORT=12346 @@ -418,7 +417,7 @@ class Sfi: Returns true if server support the optional call_id arg, false otherwise. """ server_version = self.get_cached_server_version(server) - if 'sfa' in server_version: + if 'sfa' in server_version and 'code_tag' in server_version: code_tag = server_version['code_tag'] code_tag_parts = code_tag.split("-") @@ -937,14 +936,15 @@ class Sfi: delegated_cred = self.delegate_cred(cred, get_authority(self.authority)) creds.append(delegated_cred) if opts.rspec_version: + version_manager = VersionManager() server_version = self.get_cached_server_version(server) if 'sfa' in server_version: # just request the version the client wants - call_options['rspec_version'] = dict(RSpecVersion(opts.rspec_version)) + call_options['rspec_version'] = version_manager.get_version(opts.rspec_version).to_dict() else: # this must be a protogeni aggregate. We should request a v2 ad rspec # regardless of what the client user requested - call_options['rspec_version'] = dict(pg_rspec_request_version) + call_options['rspec_version'] = version_manager.get_version('ProtoGENI 2').to_dict() #panos add info options if opts.info: call_options['info'] = opts.info