X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Frspecs%2Faggregates%2Frspec_manager_max.py;h=c055d2d3466cc17c00887deb538f328e21f54a80;hb=06b330f0ee047bdb107e43e82b1d7356c876bc15;hp=7f0a253694a7417b1236a76d3c8a9c9db0ad3e9f;hpb=657e8290ebbb4d6b6bcf337a3bc03aff9b42e62b;p=sfa.git diff --git a/sfa/rspecs/aggregates/rspec_manager_max.py b/sfa/rspecs/aggregates/rspec_manager_max.py index 7f0a2536..c055d2d3 100644 --- a/sfa/rspecs/aggregates/rspec_manager_max.py +++ b/sfa/rspecs/aggregates/rspec_manager_max.py @@ -3,13 +3,13 @@ from sfa.util.rspec import RSpec import sys import pdb -from sfa.util.namespace import * +from sfa.util.xrn import get_authority +from sfa.util.plxrn import hrn_to_pl_slicename from sfa.util.rspec import * from sfa.util.specdict import * from sfa.util.faults import * from sfa.util.storage import * from sfa.util.policy import Policy -from sfa.util.debug import log from sfa.server.aggregate import Aggregates from sfa.server.registry import Registries from sfa.util.faults import * @@ -22,15 +22,15 @@ SFA_MAX_CANNED_RSPEC = '/etc/sfa/max_physical_canned.xml' topology = {} -class GeniOutOfResource(GeniFault): +class SfaOutOfResource(SfaFault): def __init__(self, interface): faultString = "Interface " + interface + " not available" - GeniFault.__init__(self, 100, faultString, '') + SfaFault.__init__(self, 100, faultString, '') -class GeniNoPairRSpec(GeniFault): +class SfaNoPairRSpec(SfaFault): def __init__(self, interface, interface2): faultString = "Interface " + interface + " should be paired with " + interface2 - GeniFault.__init__(self, 100, faultString, '') + SfaFault.__init__(self, 100, faultString, '') # Returns a mapping from interfaces to the nodes they lie on and their peer interfaces # i -> node,i_peer @@ -140,7 +140,7 @@ def alloc_nodes(api,hrn, requested_ifs): # Taken from slices.py def create_slice_max_aggregate(api, hrn, nodes): - # Get the slice record from geni + # Get the slice record from SFA global topology topology = get_interface_map() slice = {} @@ -288,9 +288,9 @@ def create_slice(api, hrn, rspec_xml): for a in requested_interfaces: if (a not in current_hrn_interfaces and a in current_interfaces): - raise GeniOutOfResource(a) + raise SfaOutOfResource(a) if (topology[a][1] not in requested_interfaces): - raise GeniNoPairRSpec(a,topology[a][1]) + raise SfaNoPairRSpec(a,topology[a][1]) # Request OK # Allocations to delete