From: Tony Mack Date: Thu, 30 Aug 2012 19:09:49 +0000 (-0400) Subject: added client_id attribute to interface elements X-Git-Tag: sfa-2.1-14~25^2~8 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=f638d340be5ca1d205dfdec973951782f55ba1b1 added client_id attribute to interface elements --- diff --git a/sfa/openstack/osaggregate.py b/sfa/openstack/osaggregate.py index 35dcf505..29497aac 100644 --- a/sfa/openstack/osaggregate.py +++ b/sfa/openstack/osaggregate.py @@ -132,8 +132,10 @@ class OSAggregate: for private_ip in addresses.get('private', []): if_xrn = PlXrn(auth=self.driver.hrn, - interface='node%s:eth0' % (instance.hostId)) - interface = Interface({'component_id': if_xrn.urn}) + interface='node%s' % (instance.hostId)) + if_client_id = Xrn(if_xrn.urn, type='interface', id="eth%s" %if_index).urn + interface = Interface({'component_id': if_xrn.urn, + 'client_id': if_client_id}) interface['ips'] = [{'address': private_ip['addr'], #'netmask': private_ip['network'], 'type': 'ipv%s' % str(private_ip['version'])}]