Skip to content

Commit 0fa12eb

Browse files
authored
Merge pull request #245 from cloudify-cosmo/2.9.1-build
2.9.1 build
2 parents e65ed54 + 6f5a8d3 commit 0fa12eb

File tree

8 files changed

+67
-53
lines changed

8 files changed

+67
-53
lines changed

.circleci/config.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: 2
2+
3+
checkout:
4+
post:
5+
- >
6+
if [ -n "$CI_PULL_REQUEST" ]; then
7+
PR_ID=${CI_PULL_REQUEST##*/}
8+
git fetch origin +refs/pull/$PR_ID/merge:
9+
git checkout -qf FETCH_HEAD
10+
fi
11+
12+
jobs:
13+
14+
unittests:
15+
docker:
16+
- image: circleci/python:2.7.15-stretch
17+
steps:
18+
- checkout
19+
- run:
20+
name: Download pip
21+
command: curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
22+
- run:
23+
name: Install pip
24+
command: sudo python get-pip.py
25+
- run:
26+
name: Install virtualenv
27+
command: pip install --user virtualenv
28+
- run:
29+
name: Init virtualenv
30+
command: virtualenv env
31+
- run:
32+
name: install tox
33+
command: pip install --user tox
34+
- run: /home/circleci/.local/bin/tox -e flake8
35+
- run: /home/circleci/.local/bin/tox -e py27
36+
37+
workflows:
38+
version: 2
39+
tests:
40+
jobs:
41+
- unittests

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

CHANGELOG.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2.9.1:
2+
- Fix a bug introduced in 2.7.6 when setting fixed_ip via args.
3+
- Update CircleCI v2.
14
2.9.0:
25
- Add Support for backup/restore actions.
36
- Fix bug in server-port-floating-ip handling.

blueprints/port-fixed-ip.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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

circle.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

neutron_plugin/port.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,18 @@ def _handle_fixed_ips(port):
286286
if subnet_id:
287287
fixed_ips_element['subnet_id'] = subnet_id
288288

289+
fixed_ips = port.get(
290+
'fixed_ips',
291+
[] if not fixed_ips_element else [fixed_ips_element])
292+
addresses = [ip.get('ip_address') for ip in fixed_ips]
293+
subnets = [net.get('subnet_id') for net in fixed_ips]
289294
# applying fixed ip parameter, if available
290-
if fixed_ips_element:
291-
port['fixed_ips'] = [fixed_ips_element]
295+
if fixed_ips_element and not \
296+
(fixed_ips_element.get('ip_address') in addresses or
297+
fixed_ips_element.get('subnet_id') in subnets):
298+
fixed_ips.append(fixed_ips_element)
299+
if fixed_ips:
300+
port['fixed_ips'] = fixed_ips
292301

293302

294303
def _handle_security_groups(port):

plugin.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
plugins:
66
openstack:
77
executor: central_deployment_agent
8-
source: https://github.com/cloudify-cosmo/cloudify-openstack-plugin/archive/2.9.0.zip
8+
source: https://github.com/cloudify-cosmo/cloudify-openstack-plugin/archive/2.9.1.zip
99
package_name: cloudify-openstack-plugin
10-
package_version: '2.9.0'
10+
package_version: '2.9.1'
1111

1212
data_types:
1313
cloudify.openstack.types.custom_configuration:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
setup(
2020
zip_safe=True,
2121
name='cloudify-openstack-plugin',
22-
version='2.9.0',
22+
version='2.9.1',
2323
author='Cloudify',
2424
author_email='[email protected]',
2525
packages=[

0 commit comments

Comments
 (0)