extend GetVersion to expose:
[sfa.git] / sfa / managers / aggregate_manager_vini.py
index d974259..e79dcf4 100644 (file)
@@ -4,7 +4,8 @@ import traceback
 import sys
 
 from types import StringTypes
-from sfa.util.namespace import hrn_to_pl_slicename, urn_to_hrn
+from sfa.util.xrn import urn_to_hrn
+from sfa.util.plxrn import hrn_to_pl_slicename
 from sfa.util.rspec import *
 from sfa.util.specdict import *
 from sfa.util.faults import *
@@ -19,19 +20,17 @@ from sfa.managers.vini.vini_network import *
 from sfa.plc.api import SfaAPI
 from sfa.plc.slices import *
 from sfa.managers.aggregate_manager_pl import __get_registry_objects, __get_hostnames
+from sfa.util.version import version_core
 
 # VINI aggregate is almost identical to PLC aggregate for many operations, 
 # so lets just import the methods form the PLC manager
-
 from sfa.managers.aggregate_manager_pl import (
 start_slice, stop_slice, renew_slice, reset_slice, get_slices, get_ticket)
 
 
-def get_version():
-    version = {}
-    version['geni_api'] = 1
-    version['sfa'] = 1
-    return version
+def GetVersion(api):
+    return version_core({'interface':'aggregate',
+                         'testbed':'myplc.vini'})
 
 def slice_status(api, slice_xrn, creds):
     result = {}
@@ -59,7 +58,7 @@ def create_slice(api, xrn, creds, xml, users):
 
     hrn, type = urn_to_hrn(xrn)
     peer = None
-    reg_objects = __get_registry_objects(slice_xrn, creds, users)
+    reg_objects = __get_registry_objects(xrn, creds, users)
     slices = Slices(api)
     peer = slices.get_peer(hrn)
     sfa_peer = slices.get_sfa_peer(hrn)
@@ -96,7 +95,7 @@ def create_slice(api, xrn, creds, xml, users):
 
 def get_rspec(api, creds, options):
     # get slice's hrn from options
-    xrn = options.get('geni_slice_urn', None)
+    xrn = options.get('geni_slice_urn', '')
     hrn, type = urn_to_hrn(xrn)
     
     # look in cache first