-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
#The following is not essential
import socket
import struct
+from sfa.util.faults import *
+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
SFA_GET_RESOURCES = 101
if DEBUG: print "Received reset_slices call"
return msg_aggrMgr(SFA_RESET_SLICES)
-def create_slice(cred, hrn, rspec):
- if DEBUG: print "Received create_slice call"
+def CreateSliver(cred, hrn, rspec):
+ if DEBUG: print "Received CreateSliver call"
slice_id = generate_slide_id(cred, hrn)
msg = struct.pack('> B%ds%ds' % (len(slice_id)+1, len(rspec)), SFA_CREATE_SLICE, slice_id, rspec)
print "IO error"
return 0
-def get_rspec(cred, hrn=None):
- if DEBUG: print "Received get_rspec call"
+def ListResources(cred, hrn=None):
+ if DEBUG: print "Received ListResources call"
slice_id = generate_slide_id(cred, hrn)
msg = struct.pack('> B%ds' % len(slice_id), SFA_GET_RESOURCES, slice_id)
r = RSpec()
r.parseFile(sys.argv[1])
rspec = r.toDict()
- create_slice(None,'plc',rspec)
+ CreateSliver(None,'plc',rspec)
if __name__ == "__main__":
main()