From: Tony Mack Date: Fri, 31 Aug 2012 00:50:48 +0000 (-0400) Subject: interface elements in the manifest rspec should contain a sliver id attribute X-Git-Tag: sfa-3.0-0~119 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6e1c06bcdfc5810e7254d2ad58aa22e52bccfcaf;p=sfa.git interface elements in the manifest rspec should contain a sliver id attribute --- diff --git a/sfa/openstack/osaggregate.py b/sfa/openstack/osaggregate.py index fd4c7508..09d9f465 100644 --- a/sfa/openstack/osaggregate.py +++ b/sfa/openstack/osaggregate.py @@ -166,8 +166,10 @@ class OSAggregate: if_xrn = PlXrn(auth=self.driver.hrn, interface='node%s' % (instance.hostId)) if_client_id = Xrn(if_xrn.urn, type='interface', id="eth%s" %if_index).urn + if_sliver_id = Xrn(rspec_node['sliver_id'], type='slice', id="eth%s" %if_index).urn interface = Interface({'component_id': if_xrn.urn, - 'client_id': if_client_id}) + 'client_id': if_client_id, + 'sliver_id': if_sliver_id}) interface['ips'] = [{'address': private_ip['addr'], #'netmask': private_ip['network'], 'type': private_ip['version']}] diff --git a/sfa/rspecs/elements/versions/pgv2Interface.py b/sfa/rspecs/elements/versions/pgv2Interface.py index 29845913..7144fa9b 100644 --- a/sfa/rspecs/elements/versions/pgv2Interface.py +++ b/sfa/rspecs/elements/versions/pgv2Interface.py @@ -8,7 +8,7 @@ class PGv2Interface: def add_interfaces(xml, interfaces): if isinstance(interfaces, list): for interface in interfaces: - if_elem = xml.add_instance('interface', interface, ['component_id', 'client_id']) + if_elem = xml.add_instance('interface', interface, ['component_id', 'client_id', 'sliver_id']) ips = interface.get('ips', []) for ip in ips: if_elem.add_instance('ip', {'address': ip.get('address'),