diff options
author | Victor Morales <victor.morales@intel.com> | 2017-11-20 16:38:28 -0800 |
---|---|---|
committer | Victor Morales <victor.morales@intel.com> | 2017-11-20 16:38:28 -0800 |
commit | f1f1ba5dac1b531c346758072c798ceb511100b3 (patch) | |
tree | a571f9e83be31abd3c63595c04a46dcd7e901a7d /bootstrap/vagrant-onap/lib/policy | |
parent | 25bfc6b99f73bd02047dcc13e64390140777402a (diff) |
Refactor clone and compile functions
The clone_all_* and compile_all_* functions share same instructions
for performing their functionality. This change pretends to reduce
the duplication of the code.
Change-Id: Ief63a5a58c79af85c829602b0451637424659438
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-Id: INT-339
Diffstat (limited to 'bootstrap/vagrant-onap/lib/policy')
-rwxr-xr-x | bootstrap/vagrant-onap/lib/policy | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/bootstrap/vagrant-onap/lib/policy b/bootstrap/vagrant-onap/lib/policy index 65a65a186..05ad32094 100755 --- a/bootstrap/vagrant-onap/lib/policy +++ b/bootstrap/vagrant-onap/lib/policy @@ -7,20 +7,6 @@ policy_repos=("policy/api" "policy/common" "policy/docker" \ "policy/drools-applications" "policy/drools-pdp" "policy/engine" \ "policy/gui" "policy/pap" "policy/pdp") -# clone_all_policy_repos() - Function that clones Policy source repo. -function clone_all_policy_repos { - for repo in ${policy_repos[@]}; do - clone_repo $repo $policy_src_folder${repo#*policy} - done -} - -# compile_all_policy_repos() - Function that compiles Policy source repo. -function compile_all_policy_repos { - for repo in ${policy_repos[@]}; do - compile_src $policy_src_folder${repo#*policy} - done -} - # _build_policy_images() - Function that build Policy docker images from source code function _build_policy_images { compile_src $policy_src_folder/docker @@ -59,9 +45,9 @@ function install_policy { # init_policy() - Function that initialize Policy services function init_policy { if [[ "$clone_repo" == "True" ]]; then - clone_all_policy_repos + clone_repos "policy" if [[ "$compile_repo" == "True" ]]; then - compile_all_policy_repos + compile_repos "policy" fi fi |