From: tierno Date: Thu, 22 Nov 2018 16:05:54 +0000 (+0000) Subject: (bug 554) adding license headers X-Git-Tag: v5.0.0~10 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=d125caf630021538f19aadab045b5d17def67cdd;p=osm%2FNBI.git (bug 554) adding license headers Change-Id: Ife52d39b8bc8dcce5cbc26665ef15271d738d2a7 Signed-off-by: tierno --- diff --git a/.gitignore-common b/.gitignore-common index 6eb4b243..bfe57860 100644 --- a/.gitignore-common +++ b/.gitignore-common @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This is a template with common files to be igonored, after clone make a copy to .gitignore # cp .gitignore-common .gitignore diff --git a/Dockerfile.fromdeb b/Dockerfile.fromdeb index 120630ab..f6139b79 100644 --- a/Dockerfile.fromdeb +++ b/Dockerfile.fromdeb @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This creates som/NBI docker from from last stable package FROM ubuntu:16.04 diff --git a/Dockerfile.local b/Dockerfile.local index c76bc27d..dbd8313f 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # This creates osm/NBI docker from local NBI source code FROM ubuntu:16.04 diff --git a/Jenkinsfile b/Jenkinsfile index 48102c7f..e283f05e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,3 +1,17 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ properties([ parameters([ string(defaultValue: env.BRANCH_NAME, description: '', name: 'GERRIT_BRANCH'), diff --git a/devops-stages/stage-archive.sh b/devops-stages/stage-archive.sh index 1d38921c..36d341f4 100755 --- a/devops-stages/stage-archive.sh +++ b/devops-stages/stage-archive.sh @@ -1,4 +1,18 @@ #!/bin/sh + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + MDG=NBI rm -rf pool rm -rf dists diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 4784abd2..b47e1380 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -1,2 +1,16 @@ #!/bin/sh + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + tox -e flake8 diff --git a/osm_nbi/admin_topics.py b/osm_nbi/admin_topics.py index 091ac88a..b1c9ac7b 100644 --- a/osm_nbi/admin_topics.py +++ b/osm_nbi/admin_topics.py @@ -1,5 +1,18 @@ # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # import logging from uuid import uuid4 from hashlib import sha256 diff --git a/osm_nbi/base_topic.py b/osm_nbi/base_topic.py index 2060c4c9..49df35e9 100644 --- a/osm_nbi/base_topic.py +++ b/osm_nbi/base_topic.py @@ -1,5 +1,18 @@ # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import logging from uuid import uuid4 from http import HTTPStatus diff --git a/osm_nbi/descriptor_topics.py b/osm_nbi/descriptor_topics.py index 71f51e25..3a65c0b0 100644 --- a/osm_nbi/descriptor_topics.py +++ b/osm_nbi/descriptor_topics.py @@ -1,5 +1,18 @@ # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import tarfile import yaml import json diff --git a/osm_nbi/engine.py b/osm_nbi/engine.py index 4713b89f..1eff5e18 100644 --- a/osm_nbi/engine.py +++ b/osm_nbi/engine.py @@ -1,5 +1,18 @@ # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import logging from osm_common import dbmongo, dbmemory, fslocal, msglocal, msgkafka, version as common_version from osm_common.dbbase import DbException diff --git a/osm_nbi/html_out.py b/osm_nbi/html_out.py index 6b596d77..94793acb 100644 --- a/osm_nbi/html_out.py +++ b/osm_nbi/html_out.py @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """ Contains html text in variables to make and html response """ diff --git a/osm_nbi/html_public/login.js b/osm_nbi/html_public/login.js index 3a78a8ee..20c4c976 100755 --- a/osm_nbi/html_public/login.js +++ b/osm_nbi/html_public/login.js @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + var login_form = document.getElementById('login_form'); var f_user = document.getElementById('f_user'); var f_pass = document.getElementById('f_pass'); diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 13019851..d9f76a35 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -1,5 +1,18 @@ # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # import logging from uuid import uuid4 from http import HTTPStatus diff --git a/osm_nbi/nbi.cfg b/osm_nbi/nbi.cfg index 5d5a22fc..e206522a 100644 --- a/osm_nbi/nbi.cfg +++ b/osm_nbi/nbi.cfg @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [/] # tools.secureheaders.on = True tools.sessions.on = True diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index b7a6990b..c6a06fd7 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -1,6 +1,19 @@ #!/usr/bin/python3 # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import cherrypy import time import json diff --git a/osm_nbi/osm-nbi.service b/osm_nbi/osm-nbi.service index 52ab70b4..dbd24d20 100644 --- a/osm_nbi/osm-nbi.service +++ b/osm_nbi/osm-nbi.service @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [Unit] Description=NBI server (OSM NBI) diff --git a/osm_nbi/tests/cirros_ns/cirros_nsd.yaml b/osm_nbi/tests/cirros_ns/cirros_nsd.yaml index 5c4e2149..c013b563 100644 --- a/osm_nbi/tests/cirros_ns/cirros_nsd.yaml +++ b/osm_nbi/tests/cirros_ns/cirros_nsd.yaml @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + nsd-catalog: nsd: - id: cirros_nsd diff --git a/osm_nbi/tests/cirros_vnf/cirros_vnfd.yaml b/osm_nbi/tests/cirros_vnf/cirros_vnfd.yaml index 94fa5f1f..5f4388d1 100644 --- a/osm_nbi/tests/cirros_vnf/cirros_vnfd.yaml +++ b/osm_nbi/tests/cirros_vnf/cirros_vnfd.yaml @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + vnfd-catalog: vnfd: - id: cirros_vnfd diff --git a/osm_nbi/tests/clear-all.sh b/osm_nbi/tests/clear-all.sh index dd954176..dc9dca73 100755 --- a/osm_nbi/tests/clear-all.sh +++ b/osm_nbi/tests/clear-all.sh @@ -1,4 +1,18 @@ #! /bin/bash + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # author: Alfonso Tierno # Script that uses the test NBI URL to clean database. See usage diff --git a/osm_nbi/tests/create-ping-pong.sh b/osm_nbi/tests/create-ping-pong.sh index 7ef1cf7d..47447a7e 100755 --- a/osm_nbi/tests/create-ping-pong.sh +++ b/osm_nbi/tests/create-ping-pong.sh @@ -1,5 +1,18 @@ #! /bin/bash +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + export NBI_URL=https://localhost:9999/osm USERNAME=admin PASSWORD=admin @@ -30,7 +43,6 @@ TOKEN=`curl --insecure -H "Content-Type: application/yaml" -H "Accept: applicati 2>/dev/null | awk '($1=="id:"){print $2}'`; echo token: $TOKEN - # VNFD ######### #insert PKG @@ -44,8 +56,6 @@ VNFD2_ID=`curl --insecure -w "%{http_code}\n" -H "Content-Type: application/gzip 2>/dev/null | awk '($1=="id:"){print $2}'` echo pong_vnfd: $VNFD2_ID - - # NSD ######### #insert PKG @@ -54,7 +64,6 @@ NSD1_ID=`curl --insecure -w "%{http_code}\n" -H "Content-Type: application/gzip" 2>/dev/null | awk '($1=="id:"){print $2}'` echo ping_pong_nsd: $NSD1_ID - # NSRS ############## #add nsr diff --git a/osm_nbi/tests/delete-all.sh b/osm_nbi/tests/delete-all.sh index d8cb4748..643b6070 100755 --- a/osm_nbi/tests/delete-all.sh +++ b/osm_nbi/tests/delete-all.sh @@ -1,16 +1,26 @@ #! /bin/bash +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + export NBI_URL=https://localhost:9999/osm USERNAME=admin PASSWORD=admin PROJECT=admin - - #get token TOKEN=`curl --insecure -H "Content-Type: application/yaml" -H "Accept: application/yaml" --data "{username: $USERNAME, password: $PASSWORD, project_id: $PROJECT}" ${NBI_URL}/admin/v1/tokens 2>/dev/null | awk '($1=="id:"){print $2}' ` ; echo $TOKEN - echo deleting all #DELETE ALL diff --git a/osm_nbi/tests/test.py b/osm_nbi/tests/test.py index 51e14940..73c96c16 100755 --- a/osm_nbi/tests/test.py +++ b/osm_nbi/tests/test.py @@ -1,6 +1,19 @@ #! /usr/bin/python3 # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import getopt import sys import requests diff --git a/osm_nbi/tests/upload.py b/osm_nbi/tests/upload.py index 5fe4f076..d256801a 100755 --- a/osm_nbi/tests/upload.py +++ b/osm_nbi/tests/upload.py @@ -1,6 +1,19 @@ #! /usr/bin/python3 # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import getopt import sys import requests diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index b8953b55..f6b93a5c 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -1,5 +1,18 @@ # -*- coding: utf-8 -*- +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from jsonschema import validate as js_v, exceptions as js_e from http import HTTPStatus