Policy Reconfiguration change to function parms 94/70494/1
authortb2541onap <tb2541@att.com>
Mon, 15 Oct 2018 17:26:39 +0000 (13:26 -0400)
committertb2541onap <tb2541@att.com>
Mon, 15 Oct 2018 17:36:53 +0000 (13:36 -0400)
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>
dcae-cli/ChangeLog.md
dcae-cli/dcae_cli/_version.py
dcae-cli/dcae_cli/commands/component/commands.py
dcae-cli/dcae_cli/util/discovery.py
dcae-cli/pom.xml

index b0e97a3..18fe0be 100644 (file)
@@ -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.
index f8b2331..a0e51bf 100644 (file)
@@ -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"
index d91027f..b2483d1 100644 (file)
@@ -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)
index 0fc0165..e8d2ff8 100644 (file)
@@ -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
index 17d0a96..b6db3e6 100644 (file)
@@ -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>