From: Thierry Parmentelat Date: Fri, 28 Jan 2011 08:40:56 +0000 (+0100) Subject: protect GetSlivers against possible failure X-Git-Tag: plcapi-5.0-26~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=aee4a5354abde7ae9363053bce1a7117a8ed7b5e;p=plcapi.git protect GetSlivers against possible failure --- diff --git a/PLC/Methods/GetSliceFamily.py b/PLC/Methods/GetSliceFamily.py index 48b3f224..79bcdd49 100644 --- a/PLC/Methods/GetSliceFamily.py +++ b/PLC/Methods/GetSliceFamily.py @@ -51,9 +51,12 @@ class GetSliceFamily(Method): # omf-control'ed slivers need the omf vserver reference image # this is to avoid asking users to set both tags 'omf_control' and 'vref' - if not vref and GetSliceOmfControl(self.api,self.caller).call(auth,slice_id): - SetSliceVref (self.api) (auth,slice_id,'omf') - vref='omf' + # protect against failure + try: + if not vref and GetSliceOmfControl(self.api,self.caller).call(auth,slice_id): + SetSliceVref (self.api) (auth,slice_id,'omf') + vref='omf' + except: pass # xxx would make sense to check the corresponding vserver rpms are available # in all node-families yum repos (and yumgroups, btw)