<description>The port where the aggregate is to be found.</description>
</variable>
- <variable id="api_version" type="int">
- <name>Aggregate Manager API Version</name>
- <value>1</value>
- <description>The Aggregate API version</description>
- </variable>
-
</variablelist>
</category>
class XMLRPCServerProxy(xmlrpclib.ServerProxy):
def __init__(self, url, transport, allow_none=True, verbose=False):
# remember url for GetVersion
+ # xxx not sure this is still needed as SfaServerProxy has this too
self.url=url
xmlrpclib.ServerProxy.__init__(self, url, transport, allow_none=allow_none, verbose=verbose)
# essentially a union of the core version, the generic version (this code) and
# whatever the driver needs to expose
- def GetVersion(self, api):
+ def GetVersion(self, api, options):
xrn=Xrn(api.hrn)
version = version_core()
version_generic = {'interface':'aggregate',
'sfa': 2,
- 'geni_api': api.config.SFA_AGGREGATE_API_VERSION,
+ 'geni_api': 2,
'hrn':xrn.get_hrn(),
'urn':xrn.get_urn(),
}
f.write("%s %s %s\n" % (instId, ipaddr, hrn))
f.close()
- def GetVersion(api):
+ def GetVersion(api, options):
version_manager = VersionManager()
ad_rspec_versions = []
xrn=Xrn(api.hrn)
version_more = {'interface':'aggregate',
'sfa': 1,
- 'geni_api': api.config.SFA_AGGREGATE_API_VERSION,
+ 'geni_api': '2',
'testbed':'myplc',
'hrn':xrn.get_hrn(),
'geni_request_rspec_versions': request_rspec_versions,
from sfa.trust.sfaticket import SfaTicket
from sfa.util.version import version_core
-def GetVersion(api):
+def GetVersion(api, options):
return version_core({'interface':'component',
'testbed':'myplc'})
def __init__ (self): pass
# The GENI GetVersion call
- def GetVersion(self, api):
+ def GetVersion(self, api, options):
peers = dict ( [ (hrn,interface.get_url()) for (hrn,interface) in api.registries.iteritems()
if hrn != api.hrn])
xrn=Xrn(api.hrn)
# self.caching=False
self.caching=True
- def GetVersion(self, api):
+ def GetVersion(self, api, options):
# peers explicitly in aggregates.xml
peers =dict ([ (peername,interface.get_url()) for (peername,interface) in api.aggregates.iteritems()
if peername != api.hrn])
xrn=Xrn(api.hrn, 'authority+sa')
version_more = {'interface':'slicemgr',
'sfa': 2,
- 'geni_api': api.config.SFA_AGGREGATE_API_VERSION,
+ 'geni_api': 2,
'hrn' : xrn.get_hrn(),
'urn' : xrn.get_urn(),
'peers': peers,
@return version
"""
interfaces = ['registry','aggregate', 'slicemgr', 'component']
- accepts = []
+ accepts = [
+ Parameter(dict, "Options")
+ ]
returns = Parameter(dict, "Version information")
- def call(self):
+ # API v2 specifies options is optional, so..
+ def call(self, options={}):
self.api.logger.info("interface: %s\tmethod-name: %s" % (self.api.interface, self.name))
- return self.api.manager.GetVersion(self.api)
+ return self.api.manager.GetVersion(self.api, options)
Converts the specified result into a standard GENI compliant
response
"""
+ # as of dec 13 2011 we only support API v2
if self.interface.lower() in ['aggregate', 'slicemgr']:
- if hasattr(self.config, 'SFA_AGGREGATE_API_VERSION') and \
- self.config.SFA_AGGREGATE_API_VERSION == 2:
- result = self.prepare_response_v2_am(result)
+ result = self.prepare_response_v2_am(result)
return XmlrpcApi.prepare_response(self, result, method)