X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Frspecs%2Felements%2Fversions%2Fpgv2Link.py;h=5e0a8282e9e7b9ac8e2e82a4daf62be98bd87bcc;hb=9ccab1d9285ffba1fe79a6c27efe56c823e945f6;hp=44317be27fd64fde2a21e74660d98c7112adbda7;hpb=037578a7bee4db0bacb84f728db6bf2735bf9e33;p=sfa.git diff --git a/sfa/rspecs/elements/versions/pgv2Link.py b/sfa/rspecs/elements/versions/pgv2Link.py index 44317be2..5e0a8282 100644 --- a/sfa/rspecs/elements/versions/pgv2Link.py +++ b/sfa/rspecs/elements/versions/pgv2Link.py @@ -49,11 +49,11 @@ class PGv2Link: # get capacity, latency and packet_loss from first property property_fields = ['capacity', 'latency', 'packet_loss'] property_elems = link_elem.xpath('./default:property | ./property') - if len(propery_elems) > 0: + if len(property_elems) > 0: prop = property_elems[0] for attrib in ['capacity', 'latency', 'packet_loss']: - if attrib in prop: - link[attrib] = prop[attrib] + if attrib in prop.attrib: + link[attrib] = prop.attrib[attrib] # get interfaces iface_elems = link_elem.xpath('./default:interface_ref | ./interface_ref')