From 8a9959420c4bfac41ebccc7e57a253d6eae1cc91 Mon Sep 17 00:00:00 2001 From: earthmant Date: Mon, 7 Jun 2021 16:40:13 +0300 Subject: [PATCH] permit isolated network type --- CHANGELOG.txt | 2 ++ cloudify_vcd/network_tasks.py | 12 +++++++----- plugin.yaml | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 00d5f15..e13fe36 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,3 +2,5 @@ - New version. 2.0.1: - Attempt to decrease amount of superfluous API requests, however these calls are almost all inside of the client library. +2.0.2: + - CYBL-1179: Permit isolated network type. diff --git a/cloudify_vcd/network_tasks.py b/cloudify_vcd/network_tasks.py index a7da8a6..3e373fa 100644 --- a/cloudify_vcd/network_tasks.py +++ b/cloudify_vcd/network_tasks.py @@ -29,14 +29,16 @@ def create_network(external_network, ctx, **__): - network = find_resource_id_from_relationship_by_type( - ctx.instance, REL_NETWORK_GW) - if network and 'network_name' not in network_config: - network_config['network_name'] = network + network_type = get_network_type(ctx.node.type_hierarchy) + if network_type != 'isolated_vdc_network': + network = find_resource_id_from_relationship_by_type( + ctx.instance, REL_NETWORK_GW) + if network and 'network_name' not in network_config: + network_config['network_name'] = network network = network_class( network_id, - get_network_type(ctx.node.type_hierarchy), + network_type, network_client, network_vdc, kwargs=network_config) diff --git a/plugin.yaml b/plugin.yaml index c969370..49c0042 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -3,7 +3,7 @@ plugins: vcd: executor: central_deployment_agent package_name: cloudify-vcloud-plugin - package_version: '2.0.1' + package_version: '2.0.2' data_types: