diff options
51 files changed, 474 insertions, 19 deletions
diff --git a/lib/_commons b/lib/_commons index 90f73d2..d433b46 100755 --- a/lib/_commons +++ b/lib/_commons @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# # update_repos() - Function that updates linux repositories function update_repos { diff --git a/lib/_composed_functions b/lib/_composed_functions index 9f2d0a1..71268c8 100755 --- a/lib/_composed_functions +++ b/lib/_composed_functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# # build_docker_image() - Build Docker container image from source code function build_docker_image { diff --git a/lib/_installers b/lib/_installers index 3273f8c..52dc20b 100755 --- a/lib/_installers +++ b/lib/_installers @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/_commons source /var/onap/_onap_functions diff --git a/lib/_onap_functions b/lib/_onap_functions index c5ee7fc..07dc637 100755 --- a/lib/_onap_functions +++ b/lib/_onap_functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# # create_configuration_files() - Store credentials in files function create_configuration_files { @@ -1,8 +1,15 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions - # compile_aai_repos() - Function that compiles AAI source repo. function compile_aai_repos { local repos="aai/aai-common aai/resources aai/logging-service aai/traversal" @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/sdnc source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions diff --git a/lib/config/env-vars b/lib/config/env-vars index a3a4c33..2cd766f 100755 --- a/lib/config/env-vars +++ b/lib/config/env-vars @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# # URL repository git_url="https://git.onap.org/" @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions diff --git a/lib/files/aio_inventory.cfg b/lib/files/aio_inventory.cfg index d7ab09b..4aa655d 100644 --- a/lib/files/aio_inventory.cfg +++ b/lib/files/aio_inventory.cfg @@ -1,3 +1,12 @@ +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# + [all] localhost ansible_connection=local diff --git a/lib/files/all-in-one b/lib/files/all-in-one index efdb2bf..60a8efa 100644 --- a/lib/files/all-in-one +++ b/lib/files/all-in-one @@ -1,3 +1,12 @@ +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# + # These initial groups are the only groups required to be modified. The # additional groups are for more control of the environment. [control] diff --git a/lib/functions b/lib/functions index 198074b..e3354fc 100755 --- a/lib/functions +++ b/lib/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/_commons source /var/onap/config/env-vars diff --git a/lib/integration b/lib/integration index 3f106ab..42e49c3 100755 --- a/lib/integration +++ b/lib/integration @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions diff --git a/lib/multicloud b/lib/multicloud index ff6f970..337acdd 100755 --- a/lib/multicloud +++ b/lib/multicloud @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions diff --git a/lib/openstack b/lib/openstack index 53e474d..c698138 100755 --- a/lib/openstack +++ b/lib/openstack @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions source /var/onap/ccsdk @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/functions diff --git a/tests/_test_base b/tests/_test_base index b30632d..59b80a5 100755 --- a/tests/_test_base +++ b/tests/_test_base @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# if [[ "$debug" == "True" ]]; then set -o xtrace diff --git a/tests/asserts b/tests/asserts index 441b9f0..37c0f79 100755 --- a/tests/asserts +++ b/tests/asserts @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap/commons diff --git a/tests/test_aai b/tests/test_aai index dd027d2..d403f9b 100755 --- a/tests/test_aai +++ b/tests/test_aai @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/aai diff --git a/tests/test_appc b/tests/test_appc index f567d7f..5d76e21 100755 --- a/tests/test_appc +++ b/tests/test_appc @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/appc diff --git a/tests/test_ccsdk b/tests/test_ccsdk index 28de270..da374b4 100755 --- a/tests/test_ccsdk +++ b/tests/test_ccsdk @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/ccsdk diff --git a/tests/test_dcae b/tests/test_dcae index 3c5400f..2e75ede 100755 --- a/tests/test_dcae +++ b/tests/test_dcae @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/dcae diff --git a/tests/test_dmaap b/tests/test_dmaap index 22cb4b7..f0d612e 100755 --- a/tests/test_dmaap +++ b/tests/test_dmaap @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/dmaap diff --git a/tests/test_integration b/tests/test_integration index 7032788..5ab23a7 100755 --- a/tests/test_integration +++ b/tests/test_integration @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/integration diff --git a/tests/test_mr b/tests/test_mr index ad1bcd2..e433934 100755 --- a/tests/test_mr +++ b/tests/test_mr @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/mr diff --git a/tests/test_msb b/tests/test_msb index 0848d33..1a8fbe8 100755 --- a/tests/test_msb +++ b/tests/test_msb @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/msb diff --git a/tests/test_mso b/tests/test_mso index 6a6bef7..8d05520 100755 --- a/tests/test_mso +++ b/tests/test_mso @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/mso diff --git a/tests/test_multicloud b/tests/test_multicloud index 1b5b85d..2a17406 100755 --- a/tests/test_multicloud +++ b/tests/test_multicloud @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/multicloud diff --git a/tests/test_policy b/tests/test_policy index b666cf9..889d8e8 100755 --- a/tests/test_policy +++ b/tests/test_policy @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/policy diff --git a/tests/test_portal b/tests/test_portal index d20f173..8bf9383 100755 --- a/tests/test_portal +++ b/tests/test_portal @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/portal diff --git a/tests/test_robot b/tests/test_robot index 165755c..f05523e 100755 --- a/tests/test_robot +++ b/tests/test_robot @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/robot diff --git a/tests/test_sdc b/tests/test_sdc index 6765780..a708963 100755 --- a/tests/test_sdc +++ b/tests/test_sdc @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/sdc diff --git a/tests/test_sdnc b/tests/test_sdnc index c4ddc56..685bebd 100755 --- a/tests/test_sdnc +++ b/tests/test_sdnc @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/sdnc diff --git a/tests/test_vfc b/tests/test_vfc index 3fadeaf..38eab54 100755 --- a/tests/test_vfc +++ b/tests/test_vfc @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/vfc diff --git a/tests/test_vid b/tests/test_vid index 79a4152..55e5746 100755 --- a/tests/test_vid +++ b/tests/test_vid @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/vid diff --git a/tests/test_vnfsdk b/tests/test_vnfsdk index cd29a97..5c3a7c6 100755 --- a/tests/test_vnfsdk +++ b/tests/test_vnfsdk @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/vnfsdk diff --git a/tests/test_vvp b/tests/test_vvp index 8e9594d..e38bd05 100755 --- a/tests/test_vvp +++ b/tests/test_vvp @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# source /var/onap_tests/_test_base source /var/onap/vvp diff --git a/tools/run.sh b/tools/run.sh index b09ddde..b0cdcb9 100755 --- a/tools/run.sh +++ b/tools/run.sh @@ -1,4 +1,12 @@ #!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017-2018 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################# function usage { cat <<EOF diff --git a/tools/setup.sh b/tools/setup.sh index 54d10bf..7a12825 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -8,7 +8,17 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -vagrant_version=2.1.1 +set -o nounset +set -o pipefail + +vagrant_version=2.2.0 +if ! $(vagrant version &>/dev/null); then + enable_vagrant_install=true +else + if [[ "$vagrant_version" != "$(vagrant version | awk 'NR==1{print $3}')" ]]; then + enable_vagrant_install=true + fi +fi function usage { cat <<EOF @@ -31,6 +41,10 @@ while getopts ":p:" OPTION; do ;; esac done +if [[ -z "${provider+x}" ]]; then + usage + exit 1 +fi case $provider in "virtualbox" | "libvirt" ) @@ -47,17 +61,20 @@ packages=() case ${ID,,} in *suse) INSTALLER_CMD="sudo -H -E zypper -q install -y --no-recommends" + packages+=(python-devel) # Vagrant installation - vagrant_pgp="pgp_keys.asc" - wget -q https://keybase.io/hashicorp/$vagrant_pgp - wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.rpm - gpg --quiet --with-fingerprint $vagrant_pgp - sudo rpm --import $vagrant_pgp - sudo rpm --checksig vagrant_${vagrant_version}_x86_64.rpm - sudo rpm --install vagrant_${vagrant_version}_x86_64.rpm - rm vagrant_${vagrant_version}_x86_64.rpm - rm $vagrant_pgp + if [[ "${enable_vagrant_install+x}" ]]; then + vagrant_pgp="pgp_keys.asc" + wget -q https://keybase.io/hashicorp/$vagrant_pgp + wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.rpm + gpg --quiet --with-fingerprint $vagrant_pgp + sudo rpm --import $vagrant_pgp + sudo rpm --checksig vagrant_${vagrant_version}_x86_64.rpm + sudo rpm --install vagrant_${vagrant_version}_x86_64.rpm + rm vagrant_${vagrant_version}_x86_64.rpm + rm $vagrant_pgp + fi case $VAGRANT_DEFAULT_PROVIDER in virtualbox) @@ -79,11 +96,14 @@ case ${ID,,} in ubuntu|debian) libvirt_group="libvirtd" INSTALLER_CMD="sudo -H -E apt-get -y -q=3 install" + packages+=(python-dev) # Vagrant installation - wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.deb - sudo dpkg -i vagrant_${vagrant_version}_x86_64.deb - rm vagrant_${vagrant_version}_x86_64.deb + if [[ "${enable_vagrant_install+x}" ]]; then + wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.deb + sudo dpkg -i vagrant_${vagrant_version}_x86_64.deb + rm vagrant_${vagrant_version}_x86_64.deb + fi case $VAGRANT_DEFAULT_PROVIDER in virtualbox) @@ -94,7 +114,7 @@ case ${ID,,} in ;; libvirt) # vagrant-libvirt dependencies - packages+=(qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev) + packages+=(qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev cpu-checker) # NFS packages+=(nfs-kernel-server) ;; @@ -106,11 +126,14 @@ case ${ID,,} in PKG_MANAGER=$(which dnf || which yum) sudo $PKG_MANAGER updateinfo INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -q -y install" + packages+=(python-devel) # Vagrant installation - wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.rpm - $INSTALLER_CMD vagrant_${vagrant_version}_x86_64.rpm - rm vagrant_${vagrant_version}_x86_64.rpm + if [[ "${enable_vagrant_install+x}" ]]; then + wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.rpm + $INSTALLER_CMD vagrant_${vagrant_version}_x86_64.rpm + rm vagrant_${vagrant_version}_x86_64.rpm + fi case $VAGRANT_DEFAULT_PROVIDER in virtualbox) @@ -130,8 +153,39 @@ case ${ID,,} in esac +# Enable Nested-Virtualization +vendor_id=$(lscpu|grep "Vendor ID") +if [[ $vendor_id == *GenuineIntel* ]]; then + kvm_ok=$(cat /sys/module/kvm_intel/parameters/nested) + if [[ $kvm_ok == 'N' ]]; then + echo "Enable Intel Nested-Virtualization" + rmmod kvm-intel + echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf + modprobe kvm-intel + fi +else + kvm_ok=$(cat /sys/module/kvm_amd/parameters/nested) + if [[ $kvm_ok == '0' ]]; then + echo "Enable AMD Nested-Virtualization" + rmmod kvm-amd + sh -c "echo 'options kvm-amd nested=1' >> /etc/modprobe.d/dist.conf" + modprobe kvm-amd + fi +fi +modprobe vhost_net + ${INSTALLER_CMD} ${packages[@]} +if ! which pip; then + curl -sL https://bootstrap.pypa.io/get-pip.py | sudo python +fi +sudo -H pip install --upgrade pip +sudo -H pip install tox +if [[ ${http_proxy+x} ]]; then + vagrant plugin install vagrant-proxyconf +fi if [ $VAGRANT_DEFAULT_PROVIDER == libvirt ]; then vagrant plugin install vagrant-libvirt - sudo usermod -a -G $libvirt_group $USER + sudo usermod -a -G $libvirt_group $USER # This might require to reload user's group assigments + sudo systemctl restart libvirtd + kvm-ok fi |