File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 112.9.1:
2- - Fix a bug introduced in 2.7.6 when setting fixed ip via args.
2+ - Fix a bug introduced in 2.7.6 when setting fixed_ip via args.
33 - Update CircleCI v2.
442.9.0:
55 - Add Support for backup/restore actions.
Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ node_templates:
5353 target : private_subnet
5454 - type : cloudify.openstack.port_connected_to_security_group
5555 target : security_group
56+ # interfaces:
57+ # cloudify.interfaces.lifecycle:
58+ # create:
59+ # inputs:
60+ # args:
61+ # name: os_port
62+ # fixed_ips:
63+ # - ip_address: { get_input: fixed_ip }
64+ # subnet_id: { get_attribute: [ private_subnet, external_id ] }
5665
5766 security_group :
5867 type : cloudify.openstack.nodes.SecurityGroup
Original file line number Diff line number Diff line change @@ -286,8 +286,19 @@ def _handle_fixed_ips(port):
286286 if subnet_id :
287287 fixed_ips_element ['subnet_id' ] = subnet_id
288288
289+ if 'fixed_ips' not in port and not fixed_ips_element :
290+ return
291+
292+ elif 'fixed_ips' not in port and fixed_ips_element :
293+ port ['fixed_ips' ] = [fixed_ips_element ]
294+
295+ addresses = [ip .get ('ip_address' ) for ip in port ['fixed_ips' ]]
296+ subnets = [net .get ('subnet_id' ) for net in port ['fixed_ips' ]]
297+
289298 # applying fixed ip parameter, if available
290- if fixed_ips_element :
299+ if fixed_ips_element and not \
300+ (fixed_ips_element .get ('ip_address' ) in addresses or
301+ fixed_ips_element .get ('subnet_id' ) in subnets ):
291302 port ['fixed_ips' ] = [fixed_ips_element ]
292303
293304
You can’t perform that action at this time.
0 commit comments