From: Andy Bavier Date: Tue, 5 Jul 2011 21:05:30 +0000 (-0400) Subject: Implement GetVersion call X-Git-Tag: sfa-1.0-27~24^2~6 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=3aa283bb537e96bee5f42b6911f59cef12995868;p=sfa.git Implement GetVersion call --- diff --git a/sfa/managers/aggregate_manager_eucalyptus.py b/sfa/managers/aggregate_manager_eucalyptus.py index cbd7bba4..4bd0c221 100644 --- a/sfa/managers/aggregate_manager_eucalyptus.py +++ b/sfa/managers/aggregate_manager_eucalyptus.py @@ -12,13 +12,16 @@ from lxml import etree as ET from sqlobject import * from sfa.util.faults import * -from sfa.util.xrn import urn_to_hrn +from sfa.util.xrn import urn_to_hrn, Xrn from sfa.util.rspec import RSpec from sfa.server.registry import Registries from sfa.trust.credential import Credential from sfa.plc.api import SfaAPI from sfa.util.plxrn import hrn_to_pl_slicename, slicename_to_hrn from sfa.util.callids import Callids +from sfa.util.sfalogging import sfa_logger +from sfa.rspecs.sfa_rspec import sfa_rspec_version +from sfa.util.version import version_core ## # The data structure used to represent a cloud. @@ -568,6 +571,19 @@ def CreateSliver(api, xrn, creds, xml, users, call_id): # with enough data for the client to understand what's happened return xml +def GetVersion(api): + xrn=Xrn(api.hrn) + request_rspec_versions = [dict(sfa_rspec_version)] + ad_rspec_versions = [dict(sfa_rspec_version)] + version_more = {'interface':'aggregate', + 'testbed':'myplc', + 'hrn':xrn.get_hrn(), + 'request_rspec_versions': request_rspec_versions, + 'ad_rspec_versions': ad_rspec_versions, + 'default_ad_rspec': dict(sfa_rspec_version) + } + return version_core(version_more) + def main(): init_server()