git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ec3e398
)
updated calls to accept/support urn format where necessary
author
Tony Mack
<tmack@cs.princeton.edu>
Mon, 18 Jan 2010 17:36:30 +0000
(17:36 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Mon, 18 Jan 2010 17:36:30 +0000
(17:36 +0000)
sfa/managers/aggregate_manager_eucalyptus.py
patch
|
blob
|
history
sfa/managers/aggregate_manager_max.py
patch
|
blob
|
history
sfa/managers/aggregate_manager_openflow.py
patch
|
blob
|
history
sfa/managers/aggregate_manager_vini.py
patch
|
blob
|
history
diff --git
a/sfa/managers/aggregate_manager_eucalyptus.py
b/sfa/managers/aggregate_manager_eucalyptus.py
index
fa0f8b2
..
dd15377
100644
(file)
--- a/
sfa/managers/aggregate_manager_eucalyptus.py
+++ b/
sfa/managers/aggregate_manager_eucalyptus.py
@@
-222,8
+222,9
@@
class ZoneResultParser(object):
return clusterList
return clusterList
-def get_rspec(api,
h
rn, origin_hrn):
+def get_rspec(api,
x
rn, origin_hrn):
global cloud
global cloud
+ hrn = urn_to_hrn(xrn)[0]
conn = getEucaConnection()
if not conn:
conn = getEucaConnection()
if not conn:
@@
-256,7
+257,8
@@
def get_rspec(api, hrn, origin_hrn):
"""
Hook called via 'sfi.py create'
"""
"""
Hook called via 'sfi.py create'
"""
-def create_slice(api, hrn, xml):
+def create_slice(api, xrn, xml):
+ hrn = urn_to_hrn(xrn)[0]
return True
def main():
return True
def main():
diff --git
a/sfa/managers/aggregate_manager_max.py
b/sfa/managers/aggregate_manager_max.py
index
5c12875
..
d341034
100644
(file)
--- a/
sfa/managers/aggregate_manager_max.py
+++ b/
sfa/managers/aggregate_manager_max.py
@@
-248,7
+248,8
@@
def create_slice_max_aggregate(api, hrn, nodes):
return 1
return 1
-def get_rspec(api, hrn):
+def get_rspec(api, xrn):
+ hrn = urn_to_hrn(xrn)[0]
# Eg. config line:
# plc.princeton.sapan vlan23,vlan45
# Eg. config line:
# plc.princeton.sapan vlan23,vlan45
@@
-261,8
+262,9
@@
def get_rspec(api, hrn):
return (ret_rspec)
return (ret_rspec)
-def create_slice(api,
h
rn, rspec_xml):
+def create_slice(api,
x
rn, rspec_xml):
global topology
global topology
+ hrn = urn_to_hrn(xrn)[0]
topology = get_interface_map()
# Check if everything in rspec is either allocated by hrn
topology = get_interface_map()
# Check if everything in rspec is either allocated by hrn
diff --git
a/sfa/managers/aggregate_manager_openflow.py
b/sfa/managers/aggregate_manager_openflow.py
index
a745b6e
..
d2507eb
100755
(executable)
--- a/
sfa/managers/aggregate_manager_openflow.py
+++ b/
sfa/managers/aggregate_manager_openflow.py
@@
-89,23
+89,28
@@
def msg_aggrMgr(cred, hrn, msg_id):
print "IO error"
return 0
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)
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)
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)
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)
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)
if DEBUG: print "Received create_slice call"
slice_id = generate_slide_id(cred, hrn)
@@
-126,7
+131,8
@@
def create_slice(cred, hrn, rspec):
print "IO error"
return 0
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)
if DEBUG: print "Received get_rspec call"
slice_id = generate_slide_id(cred, hrn)
diff --git
a/sfa/managers/aggregate_manager_vini.py
b/sfa/managers/aggregate_manager_vini.py
index
e8f879c
..
b4d0984
100644
(file)
--- a/
sfa/managers/aggregate_manager_vini.py
+++ b/
sfa/managers/aggregate_manager_vini.py
@@
-132,7
+132,8
@@
def create_slice_vini_aggregate(api, hrn, nodes):
return 1
return 1
-def get_rspec(api, hrn):
+def get_rspec(api, xrn):
+ hrn = urn_to_hrn(xrn)[0]
topo = Topology(api)
if (hrn):
slicename = hrn_to_pl_slicename(hrn)
topo = Topology(api)
if (hrn):
slicename = hrn_to_pl_slicename(hrn)
@@
-151,7
+152,8
@@
def get_rspec(api, hrn):
"""
Hook called via 'sfi.py create'
"""
"""
Hook called via 'sfi.py create'
"""
-def create_slice(api, hrn, xml):
+def create_slice(api, xrn, xml):
+ hrn = urn_to_hrn(xrn)[0]
### Check the whitelist
### It consists of lines of the form: <slice hrn> <bw>
whitelist = {}
### Check the whitelist
### It consists of lines of the form: <slice hrn> <bw>
whitelist = {}