summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb2541onap <tb2541@att.com>2018-10-15 13:26:39 -0400
committertb2541onap <tb2541@att.com>2018-10-15 13:36:53 -0400
commitc306f8990406933d1a10eaa46cc9a045bd0d7f03 (patch)
treea1cad2a4cf26093d7cb4c2a6fa2a6914711cf6ed
parent1943cd6c3fd5b70209089d9d2135ffb344f0405a (diff)
Policy Reconfiguration change to function parms
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 <tb2541@att.com>
-rw-r--r--dcae-cli/ChangeLog.md4
-rw-r--r--dcae-cli/dcae_cli/_version.py2
-rw-r--r--dcae-cli/dcae_cli/commands/component/commands.py4
-rw-r--r--dcae-cli/dcae_cli/util/discovery.py4
-rw-r--r--dcae-cli/pom.xml2
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.
<groupId>org.onap.dcaegen2.platform.cli</groupId>
<artifactId>dcae-cli</artifactId>
<name>dcaegen2-platform-cli-dcae-cli</name>
- <version>2.11.0</version>
+ <version>2.11.1</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>