X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Faggregate_manager_openflow.py;h=928589775abf95bf9da142d4089f435c36f2f1a0;hb=06b330f0ee047bdb107e43e82b1d7356c876bc15;hp=a745b6ea9b71d279b82ce114e061aabc27b027cf;hpb=3d7237fa0b5f2b4a60cb97c7fb3b6aecfd94558a;p=sfa.git diff --git a/sfa/managers/aggregate_manager_openflow.py b/sfa/managers/aggregate_manager_openflow.py index a745b6ea..92858977 100755 --- a/sfa/managers/aggregate_manager_openflow.py +++ b/sfa/managers/aggregate_manager_openflow.py @@ -1,18 +1,19 @@ -from sfa.util.faults import * -from sfa.util.namespace import * -from sfa.util.rspec import RSpec -from sfa.server.registry import Registries -from sfa.util.config import Config -from sfa.plc.nodes import * import sys +import socket +import struct + #The following is not essential #from soaplib.wsgi_soap import SimpleWSGISoapApp #from soaplib.serializers.primitive import * #from soaplib.serializers.clazz import * -import socket -import struct +from sfa.util.faults import * +from sfa.util.xrn import urn_to_hrn +from sfa.util.rspec import RSpec +from sfa.server.registry import Registries +from sfa.util.config import Config +from sfa.plc.nodes import * # Message IDs for all the SFA light calls # This will be used by the aggrMgr controller @@ -89,23 +90,28 @@ def msg_aggrMgr(cred, hrn, msg_id): print "IO error" return 0 -def start_slice(cred, hrn): +def start_slice(cred, xrn): + hrn = urn_to_hrn(xrn)[0] if DEBUG: print "Received start_slice call" return msg_aggrMgr(SFA_START_SLICE) -def stop_slice(cred, hrn): +def stop_slice(cred, xrn): + hrn = urn_to_hrn(xrn)[0] if DEBUG: print "Received stop_slice call" return msg_aggrMgr(SFA_STOP_SLICE) -def delete_slice(cred, hrn): +def delete_slice(cred, xrn): + hrn = urn_to_hrn(xrn)[0] if DEBUG: print "Received delete_slice call" return msg_aggrMgr(SFA_DELETE_SLICE) -def reset_slices(cred, hrn): +def reset_slices(cred, xrn): + hrn = urn_to_hrn(xrn)[0] if DEBUG: print "Received reset_slices call" return msg_aggrMgr(SFA_RESET_SLICES) -def create_slice(cred, hrn, rspec): +def create_slice(cred, xrn, rspec): + hrn = urn_to_hrn(xrn)[0] if DEBUG: print "Received create_slice call" slice_id = generate_slide_id(cred, hrn) @@ -126,7 +132,8 @@ def create_slice(cred, hrn, rspec): print "IO error" return 0 -def get_rspec(cred, hrn=None): +def get_rspec(cred, xrn=None): + hrn = urn_to_hrn(xrn)[0] if DEBUG: print "Received get_rspec call" slice_id = generate_slide_id(cred, hrn)