X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Frspecs%2Felements%2Fversions%2Fsfav1Sliver.py;h=7e9282f22b577f7ca6dc453f2407d924365992b6;hb=4a2337e7f70cef81a8de37829aa63fc941c4b96e;hp=f03753362f38f5aa5b0309b77bad27af4faa1eff;hpb=7d41479ffc629cabcab476a94e4e93be41b29ecf;p=sfa.git diff --git a/sfa/rspecs/elements/versions/sfav1Sliver.py b/sfa/rspecs/elements/versions/sfav1Sliver.py index f0375336..7e9282f2 100644 --- a/sfa/rspecs/elements/versions/sfav1Sliver.py +++ b/sfa/rspecs/elements/versions/sfav1Sliver.py @@ -1,10 +1,11 @@ from sfa.util.xrn import Xrn -from sfa.util.plxrn import PlXrn from sfa.util.xml import XmlElement + from sfa.rspecs.elements.element import Element from sfa.rspecs.elements.sliver import Sliver from sfa.rspecs.elements.versions.sfav1PLTag import SFAv1PLTag + class SFAv1Sliver: @staticmethod @@ -19,9 +20,6 @@ class SFAv1Sliver: if tags: for tag in tags: SFAv1Sliver.add_sliver_attribute(sliver_elem, tag['tagname'], tag['value']) - if sliver.get('sliver_id'): - name = PlXrn(xrn=sliver.get('sliver_id')).pl_slicename() - sliver_elem.set('name', name) @staticmethod def add_sliver_attribute(xml, name, value): @@ -41,7 +39,8 @@ class SFAv1Sliver: return attribs @staticmethod - def get_slivers(xml, filter={}): + def get_slivers(xml, filter=None): + if filter is None: filter={} xpath = './default:sliver | ./sliver' sliver_elems = xml.xpath(xpath) slivers = []