From: Tony Mack Date: Wed, 24 Oct 2012 17:17:32 +0000 (-0400) Subject: verify_slice_links() should exit if links are not supported at the aggregate X-Git-Tag: sfa-3.0-0~94 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=813448e56c4cc7f44bcbb3354ac7c95ef9c833b1;p=sfa.git verify_slice_links() should exit if links are not supported at the aggregate --- diff --git a/sfa/planetlab/plslices.py b/sfa/planetlab/plslices.py index be38155c..7e74592c 100644 --- a/sfa/planetlab/plslices.py +++ b/sfa/planetlab/plslices.py @@ -4,10 +4,9 @@ from collections import defaultdict from sfa.util.sfatime import utcparse, datetime_to_epoch from sfa.util.sfalogging import logger from sfa.util.xrn import Xrn, get_leaf, get_authority, urn_to_hrn - from sfa.rspecs.rspec import RSpec - from sfa.planetlab.vlink import VLink +from sfa.planetlab.topology import Topology from sfa.planetlab.plxrn import PlXrn, hrn_to_pl_slicename MAXINT = 2L**31-1 @@ -215,10 +214,15 @@ class PlSlices: return str(key) def verify_slice_links(self, slice, requested_links, nodes): - # nodes is undefined here + if not requested_links: return - + + # exit if links are not supported here + topology = Topology() + if not topology: + return + # build dict of nodes nodes_dict = {} interface_ids = []