X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Frspecs%2Faggregates%2Frspec_manager_openflow.py;h=a745b6ea9b71d279b82ce114e061aabc27b027cf;hb=3d7237fa0b5f2b4a60cb97c7fb3b6aecfd94558a;hp=314f21a20d8d8234a5320c2042144c672c1825c7;hpb=022458c172f0fa883401665d444e874eef04f215;p=sfa.git diff --git a/sfa/rspecs/aggregates/rspec_manager_openflow.py b/sfa/rspecs/aggregates/rspec_manager_openflow.py index 314f21a2..a745b6ea 100755 --- a/sfa/rspecs/aggregates/rspec_manager_openflow.py +++ b/sfa/rspecs/aggregates/rspec_manager_openflow.py @@ -1,6 +1,6 @@ from sfa.util.faults import * -from sfa.util.misc import * -from sfa.util.rspec import Rspec +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 * @@ -14,7 +14,7 @@ import sys import socket import struct -# Message IDs for all the GENI light calls +# Message IDs for all the SFA light calls # This will be used by the aggrMgr controller SFA_GET_RESOURCES = 101 SFA_CREATE_SLICE = 102 @@ -147,11 +147,17 @@ def get_rspec(cred, hrn=None): print "IO error" return None +""" +Returns the request context required by sfatables. At some point, this mechanism should be changed +to refer to "contexts", which is the information that sfatables is requesting. But for now, we just +return the basic information needed in a dict. +""" def fetch_context(slice_hrn, user_hrn, contexts): - return None + base_context = {'sfa':{'user':{'hrn':user_hrn}}} + return base_context def main(): - r = Rspec() + r = RSpec() r.parseFile(sys.argv[1]) rspec = r.toDict() create_slice(None,'plc',rspec)