From d8005908993595549a2a9b598b679705e4f5fc08 Mon Sep 17 00:00:00 2001 From: cima Date: Wed, 16 Dec 2015 13:45:14 +0100 Subject: [PATCH 1/5] [src] added support for port ranges in network firewall --- cloudstack_plugin/network.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cloudstack_plugin/network.py b/cloudstack_plugin/network.py index 966b079..031395a 100644 --- a/cloudstack_plugin/network.py +++ b/cloudstack_plugin/network.py @@ -104,8 +104,15 @@ def create(ctx, **kwargs): acl_type = acl.get('type') for port in acl_ports: + # Specifying port ranges "start_port:end_port" + ports = str(port).split(':') + start_port = int(ports[0]) + if len(ports) == 1: + end_port = start_port + elif len(ports) == 2: + end_port = int(ports[1]) create_acl(cloud_driver, acl_protocol, acl_list.id, - acl_cidr, port, port, acl_type) + acl_cidr, start_port, end_port, acl_type) else: ctx.logger.info('Creating network: {0}'.format(network_name)) From fedc10b169591ec2bd54d8de3489e079a4396abc Mon Sep 17 00:00:00 2001 From: cima Date: Wed, 16 Dec 2015 13:57:12 +0100 Subject: [PATCH 2/5] use ICCLab repository --- plugin.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.yaml b/plugin.yaml index b7763d4..8d04687 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -5,7 +5,7 @@ plugins: cloudstack: executor: central_deployment_agent - source: https://github.com/cloudify-cosmo/cloudify-cloudstack-plugin/archive/1.2.1.zip + source: https://github.com/icclab/cloudify-cloudstack-plugin/archive/1.2.1-build.zip node_types: cloudify.cloudstack.nodes.VirtualMachine: From a09ad98d8ddec8ca818c67e3906dd7e7989e6ca3 Mon Sep 17 00:00:00 2001 From: cima Date: Wed, 16 Dec 2015 14:57:05 +0100 Subject: [PATCH 3/5] Revert "use ICCLab repository" This reverts commit fedc10b169591ec2bd54d8de3489e079a4396abc. --- plugin.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.yaml b/plugin.yaml index 8d04687..b7763d4 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -5,7 +5,7 @@ plugins: cloudstack: executor: central_deployment_agent - source: https://github.com/icclab/cloudify-cloudstack-plugin/archive/1.2.1-build.zip + source: https://github.com/cloudify-cosmo/cloudify-cloudstack-plugin/archive/1.2.1.zip node_types: cloudify.cloudstack.nodes.VirtualMachine: From f637b6424cc60d4118af716768529e053db59bb9 Mon Sep 17 00:00:00 2001 From: cima Date: Thu, 17 Dec 2015 13:23:44 +0100 Subject: [PATCH 4/5] added network firewall port specification error handling --- cloudstack_plugin/network.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cloudstack_plugin/network.py b/cloudstack_plugin/network.py index 031395a..cc79a06 100644 --- a/cloudstack_plugin/network.py +++ b/cloudstack_plugin/network.py @@ -111,6 +111,11 @@ def create(ctx, **kwargs): end_port = start_port elif len(ports) == 2: end_port = int(ports[1]) + else: + raise NonRecoverableError( + 'Port may be a single port or a port range ' + 'in the format start_port:end_port.' + 'Entered: {0}'.format(port)) create_acl(cloud_driver, acl_protocol, acl_list.id, acl_cidr, start_port, end_port, acl_type) From 16a0bfeb24ec71c26e2a20f85171a3f28c6982ee Mon Sep 17 00:00:00 2001 From: cima Date: Thu, 3 Mar 2016 11:51:54 +0100 Subject: [PATCH 5/5] [src] use icclab repo --- plugin.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.yaml b/plugin.yaml index b7763d4..8d04687 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -5,7 +5,7 @@ plugins: cloudstack: executor: central_deployment_agent - source: https://github.com/cloudify-cosmo/cloudify-cloudstack-plugin/archive/1.2.1.zip + source: https://github.com/icclab/cloudify-cloudstack-plugin/archive/1.2.1-build.zip node_types: cloudify.cloudstack.nodes.VirtualMachine: