From c306f8990406933d1a10eaa46cc9a045bd0d7f03 Mon Sep 17 00:00:00 2001 From: tb2541onap Date: Mon, 15 Oct 2018 13:26:39 -0400 Subject: Policy Reconfiguration change to function parms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated 2 Policy Reconfig functions to use a passed parameter Parameter needed since “consul_host” variable had been removed Change-Id: I1e967cbf1de2c832679be6e2d120a278cd48a5d4 Issue-ID: DCAEGEN2-576 Signed-off-by: tb2541onap --- dcae-cli/ChangeLog.md | 4 ++++ dcae-cli/dcae_cli/_version.py | 2 +- dcae-cli/dcae_cli/commands/component/commands.py | 4 ++-- dcae-cli/dcae_cli/util/discovery.py | 4 ++-- dcae-cli/pom.xml | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dcae-cli/ChangeLog.md b/dcae-cli/ChangeLog.md index b0e97a3..18fe0be 100644 --- a/dcae-cli/ChangeLog.md +++ b/dcae-cli/ChangeLog.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2.11.1] + +* Change to policy reconfiguration functions to pass consul_host as a parameter + ## [2.11.0] * Add Policy Configuration Support. diff --git a/dcae-cli/dcae_cli/_version.py b/dcae-cli/dcae_cli/_version.py index f8b2331..a0e51bf 100644 --- a/dcae-cli/dcae_cli/_version.py +++ b/dcae-cli/dcae_cli/_version.py @@ -19,4 +19,4 @@ # ECOMP is a trademark and service mark of AT&T Intellectual Property. # -*- coding: utf-8 -*- -__version__ = "2.11.0" +__version__ = "2.11.1" diff --git a/dcae-cli/dcae_cli/commands/component/commands.py b/dcae-cli/dcae_cli/commands/component/commands.py index d91027f..b2483d1 100644 --- a/dcae-cli/dcae_cli/commands/component/commands.py +++ b/dcae-cli/dcae_cli/commands/component/commands.py @@ -374,13 +374,13 @@ def reconfig(obj, policy_file, component): click.echo("") return - kvUpdated = dis.policy_update(policy_change_file) + kvUpdated = dis.policy_update(policy_change_file, dis.default_consul_host()) if kvUpdated: active_profile = profiles.get_profile() docker_logins = dis.get_docker_logins() - command = dis.build_policy_command(policy_reconfig_path, policy_change_file) + command = dis.build_policy_command(policy_reconfig_path, policy_change_file, dis.default_consul_host()) # Run the Policy Reconfig script client = du.get_docker_client(active_profile, docker_logins) diff --git a/dcae-cli/dcae_cli/util/discovery.py b/dcae-cli/dcae_cli/util/discovery.py index 0fc0165..e8d2ff8 100644 --- a/dcae-cli/dcae_cli/util/discovery.py +++ b/dcae-cli/dcae_cli/util/discovery.py @@ -614,7 +614,7 @@ def config_context(user, cname, cver, params, interface_map, instance_map, remove_config(conf_key, host) -def policy_update(policy_change_file): +def policy_update(policy_change_file, consul_host): # Determine if it is an 'updated_policies' or 'removed_policies' change, or if user included ALL policies policies = True if "policies" in policy_change_file.keys() else False @@ -726,7 +726,7 @@ def extract_policy_id(policy_folder, policy): return -def build_policy_command(policy_reconfig_path, policy_change_file): +def build_policy_command(policy_reconfig_path, policy_change_file, consul_host): """ Build command to execute the Policy Reconfig script in the Docker container """ # Determine if it is an 'updated_policies' and/or 'removed_policies' change, or if user included ALL policies diff --git a/dcae-cli/pom.xml b/dcae-cli/pom.xml index 17d0a96..b6db3e6 100644 --- a/dcae-cli/pom.xml +++ b/dcae-cli/pom.xml @@ -28,7 +28,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. org.onap.dcaegen2.platform.cli dcae-cli dcaegen2-platform-cli-dcae-cli - 2.11.0 + 2.11.1 http://maven.apache.org UTF-8 -- cgit 1.2.3-korg