From 3aa283bb537e96bee5f42b6911f59cef12995868 Mon Sep 17 00:00:00 2001 From: Andy Bavier Date: Tue, 5 Jul 2011 17:05:30 -0400 Subject: [PATCH] Implement GetVersion call --- sfa/managers/aggregate_manager_eucalyptus.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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() -- 2.43.0