diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2020-07-15 23:55:00 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-15 23:55:00 +0000 |
commit | 2ae8776b0405b1c2075feebbe2cda38ee8269746 (patch) | |
tree | 271cf168b0c6c51b6e77f2da90c4bef201d2549e /controlloop/common | |
parent | e87b18923c23a1a0fbfaae1c75645a577b96c892 (diff) | |
parent | 480c931b5b332b3ffdbfa68e067b9830b416d7eb (diff) |
Merge "Update-config simulator prop. with mvn assembly."
Diffstat (limited to 'controlloop/common')
-rw-r--r-- | controlloop/common/feature-controlloop-utils/src/assembly/assemble_zip.xml | 105 | ||||
-rw-r--r-- | controlloop/common/feature-controlloop-utils/src/main/feature/install/enable | 38 |
2 files changed, 63 insertions, 80 deletions
diff --git a/controlloop/common/feature-controlloop-utils/src/assembly/assemble_zip.xml b/controlloop/common/feature-controlloop-utils/src/assembly/assemble_zip.xml index 26e6676b7..70421a3fa 100644 --- a/controlloop/common/feature-controlloop-utils/src/assembly/assemble_zip.xml +++ b/controlloop/common/feature-controlloop-utils/src/assembly/assemble_zip.xml @@ -21,55 +21,64 @@ <!-- Defines how we build the .zip file which is our distribution. --> <assembly - xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>feature-controlloop-utils-package</id> - <formats> - <format>zip</format> - </formats> + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + <id>feature-controlloop-utils-package</id> + <formats> + <format>zip</format> + </formats> - <includeBaseDirectory>false</includeBaseDirectory> + <includeBaseDirectory>false</includeBaseDirectory> - <fileSets> - <fileSet> - <directory>target</directory> - <outputDirectory>lib/feature</outputDirectory> - <includes> - <include>feature-controlloop-utils-${project.version}.jar</include> - </includes> - </fileSet> - <fileSet> - <directory>target/assembly/lib</directory> - <outputDirectory>lib/dependencies</outputDirectory> - <includes> - <include>*.jar</include> - </includes> - </fileSet> - <fileSet> - <directory>src/main/feature/config</directory> - <outputDirectory>config</outputDirectory> - <fileMode>0644</fileMode> - <excludes/> - </fileSet> - <fileSet> - <directory>src/main/feature/bin</directory> - <outputDirectory>bin</outputDirectory> - <fileMode>0744</fileMode> - <excludes/> - </fileSet> - <fileSet> - <directory>src/main/feature/db</directory> - <outputDirectory>db</outputDirectory> - <fileMode>0744</fileMode> - <excludes/> - </fileSet> - <fileSet> - <directory>src/main/feature/install</directory> - <outputDirectory>install</outputDirectory> - <fileMode>0744</fileMode> - <excludes/> - </fileSet> - </fileSets> + <fileSets> + <fileSet> + <directory>target</directory> + <outputDirectory>lib/feature</outputDirectory> + <includes> + <include>feature-controlloop-utils-${project.version}.jar</include> + </includes> + </fileSet> + <fileSet> + <directory>target/assembly/lib</directory> + <outputDirectory>lib/dependencies</outputDirectory> + <includes> + <include>*.jar</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/feature/config</directory> + <outputDirectory>config</outputDirectory> + <fileMode>0644</fileMode> + <excludes/> + </fileSet> + <fileSet> + <directory>src/main/feature/bin</directory> + <outputDirectory>bin</outputDirectory> + <fileMode>0744</fileMode> + <excludes/> + </fileSet> + <fileSet> + <directory>../controller-frankfurt/src/test/resources/config</directory> + <outputDirectory>config</outputDirectory> + <fileMode>0644</fileMode> + <excludes/> + <includes> + <include>frankfurt-http-client.properties</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/feature/db</directory> + <outputDirectory>db</outputDirectory> + <fileMode>0744</fileMode> + <excludes/> + </fileSet> + <fileSet> + <directory>src/main/feature/install</directory> + <outputDirectory>install</outputDirectory> + <fileMode>0744</fileMode> + <excludes/> + </fileSet> + </fileSets> </assembly> diff --git a/controlloop/common/feature-controlloop-utils/src/main/feature/install/enable b/controlloop/common/feature-controlloop-utils/src/main/feature/install/enable index 1b2b4d6f2..682f05ec2 100644 --- a/controlloop/common/feature-controlloop-utils/src/main/feature/install/enable +++ b/controlloop/common/feature-controlloop-utils/src/main/feature/install/enable @@ -20,40 +20,14 @@ # ============LICENSE_END========================================================= ## +# This is to rename the original files as there is a single property file packaged +# with a different name, utilized to handle all http clients instead of using the originals. +# So, just keeping the original files safe during enable. + for actor in AAI SO SDNC VFC GUARD do FILE=${POLICY_HOME}/config/${actor}-http-client.properties - if [[ -f ${FILE} && ${actor} != GUARD ]]; then - case ${actor} in - AAI) - PORT=6666 - ;; - SO) - PORT=6667 - ;; - VFC) - PORT=6668 - ;; - SDNC) - PORT=6670 - ;; - esac - sed -i.ofc \ - -e "s/^http.client.services.${actor}.https[\s\t]*=.*/http.client.services.${actor}.https=false/g" \ - -e "s/^http.client.services.${actor}.host[\s\t]*=.*/http.client.services.${actor}.host=localhost/g" \ - -e "s/^http.client.services.${actor}.userName[\s\t]*=.*/http.client.services.${actor}.userName=policy/g" \ - -e "s/^http.client.services.${actor}.password[\s\t]*=.*/http.client.services.${actor}.password=policy/g" \ - -e "s/^http.client.services.${actor}.port[\s\t]*=.*/http.client.services.${actor}.port=${PORT}/g" \ - -e "s/^http.client.services.${actor}.contextUriPath[\s\t]*=.*/http.client.services.${actor}.contextUriPath=/g" \ - ${FILE} - else - sed -i.ofc \ - -e "s/^http.client.services.${actor}.https[\s\t]*=.*/http.client.services.${actor}.https=false/g" \ - -e "s/^http.client.services.${actor}.host[\s\t]*=.*/http.client.services.${actor}.host=localhost/g" \ - -e "s/^http.client.services.${actor}.port[\s\t]*=.*/http.client.services.${actor}.port=6669/g" \ - -e "s!^http.client.services.${actor}.contextUriPath[\s\t]*=.*!http.client.services.${actor}.contextUriPath=policy/pdpx/v1/!g" \ - -e "s/^http.client.services.${actor}.userName[\s\t]*=.*/http.client.services.${actor}.userName=/g" \ - -e "s/^http.client.services.${actor}.password[\s\t]*=.*/http.client.services.${actor}.password=/g" \ - ${FILE} + if [[ ! -f ${FILE}.ofc ]]; then + mv ${FILE} ${FILE}.ofc fi done |