From ac738e8d675e3cddabda01e35871869a2b687947 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 3 Feb 2010 22:11:29 +0000 Subject: [PATCH] fix bug in get_slices --- sfa/managers/component_manager_pl.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sfa/managers/component_manager_pl.py b/sfa/managers/component_manager_pl.py index 2e1b3c3f..2f795580 100644 --- a/sfa/managers/component_manager_pl.py +++ b/sfa/managers/component_manager_pl.py @@ -38,8 +38,13 @@ def reset_slice(api, xrn): api.nodemanager.ReCreate(slicename) def get_slices(api): - slicenames = api.nodemanager.GetXIDs().keys() - return slicenames + # this returns a tuple, the data we want is at index 1 + xids = api.nodemanager.GetXIDs() + # unfortunately the data we want is given to us as + # a string but we really want it as a dict + # lets eval it + slices = eval(xids[1]) + return slices.keys() def roboot(): os.system("/sbin/reboot") -- 2.47.0