From e0349474eec070ab688375a1a4b0f2b12e1361c5 Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Thu, 9 Nov 2023 17:21:02 +0000
Subject: [PATCH] Hackfest #3:

- Added missing headers
---
 src/tests/hackfest3/grpc/addPolicy.sh              | 13 +++++++++++++
 src/tests/hackfest3/grpc/removePolicy.sh           | 13 +++++++++++++
 src/tests/hackfest3/int/build_p4.sh                | 13 +++++++++++++
 src/tests/hackfest3/int/connect_to_mininet.sh      |  1 +
 src/tests/hackfest3/int/copy_int_helpers.sh        | 13 +++++++++++++
 src/tests/hackfest3/int/install-scapy.sh           | 13 +++++++++++++
 src/tests/hackfest3/int/receive.py                 | 14 ++++++++++++++
 src/tests/hackfest3/int/send.py                    | 13 +++++++++++++
 .../hackfest3/int/solution/timestamp/receive2.py   | 14 ++++++++++++++
 .../hackfest3/new-probe/connect_to_mininet.sh      |  1 +
 src/tests/hackfest3/new-probe/copy.sh              | 13 +++++++++++++
 src/tests/hackfest3/new-probe/ping2.py             | 14 ++++++++++++++
 .../new-probe/solution/connect_to_mininet.sh       |  1 +
 src/tests/hackfest3/new-probe/solution/copy.sh     | 13 +++++++++++++
 src/tests/hackfest3/new-probe/solution/ping2.py    | 14 ++++++++++++++
 15 files changed, 163 insertions(+)

diff --git a/src/tests/hackfest3/grpc/addPolicy.sh b/src/tests/hackfest3/grpc/addPolicy.sh
index cc7c88523..71300d3ac 100755
--- a/src/tests/hackfest3/grpc/addPolicy.sh
+++ b/src/tests/hackfest3/grpc/addPolicy.sh
@@ -1,3 +1,16 @@
 #!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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.
 
 ./grpcurl/grpcurl -plaintext -d @ localhost:30060 policy.PolicyService/PolicyAddService  < policyAddService.json
diff --git a/src/tests/hackfest3/grpc/removePolicy.sh b/src/tests/hackfest3/grpc/removePolicy.sh
index 989edf7df..fc6103f41 100755
--- a/src/tests/hackfest3/grpc/removePolicy.sh
+++ b/src/tests/hackfest3/grpc/removePolicy.sh
@@ -1,4 +1,17 @@
 #!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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.
 
 # Remove policy
 ./grpcurl/grpcurl -plaintext -d @ localhost:30060 policy.PolicyService/PolicyDelete  < removePolicyRule.json
diff --git a/src/tests/hackfest3/int/build_p4.sh b/src/tests/hackfest3/int/build_p4.sh
index befff7999..184fe17ec 100755
--- a/src/tests/hackfest3/int/build_p4.sh
+++ b/src/tests/hackfest3/int/build_p4.sh
@@ -1,4 +1,17 @@
 #!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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.
 
 get_next_backup_dir() {
   local prefix="/home/teraflow/controller/src/tests/hackfest3/p4/backup"
diff --git a/src/tests/hackfest3/int/connect_to_mininet.sh b/src/tests/hackfest3/int/connect_to_mininet.sh
index bba3eaa9a..a82d3767f 100755
--- a/src/tests/hackfest3/int/connect_to_mininet.sh
+++ b/src/tests/hackfest3/int/connect_to_mininet.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 # Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/src/tests/hackfest3/int/copy_int_helpers.sh b/src/tests/hackfest3/int/copy_int_helpers.sh
index 25cce5aa3..726ff55df 100755
--- a/src/tests/hackfest3/int/copy_int_helpers.sh
+++ b/src/tests/hackfest3/int/copy_int_helpers.sh
@@ -1,4 +1,17 @@
 #!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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.
 
 # get container id
 CONTAINER=`docker ps | grep mininet | cut -f1 -d" "`
diff --git a/src/tests/hackfest3/int/install-scapy.sh b/src/tests/hackfest3/int/install-scapy.sh
index cf6c4f02f..9cfa948f6 100755
--- a/src/tests/hackfest3/int/install-scapy.sh
+++ b/src/tests/hackfest3/int/install-scapy.sh
@@ -1,4 +1,17 @@
 #!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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.
 
 sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list
 sed -i 's|security.debian.org|archive.debian.org/debian-security/|g' /etc/apt/sources.list
diff --git a/src/tests/hackfest3/int/receive.py b/src/tests/hackfest3/int/receive.py
index 49592cdab..fb1aac1ca 100644
--- a/src/tests/hackfest3/int/receive.py
+++ b/src/tests/hackfest3/int/receive.py
@@ -1,4 +1,18 @@
 #!/usr/bin/env python3
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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 sys
 import struct
 
diff --git a/src/tests/hackfest3/int/send.py b/src/tests/hackfest3/int/send.py
index 4a996ae90..38b4b4d62 100644
--- a/src/tests/hackfest3/int/send.py
+++ b/src/tests/hackfest3/int/send.py
@@ -1,4 +1,17 @@
 #!/usr/bin/env python3
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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 argparse
 import sys
diff --git a/src/tests/hackfest3/int/solution/timestamp/receive2.py b/src/tests/hackfest3/int/solution/timestamp/receive2.py
index 9aea2c5a9..0c749f9a4 100644
--- a/src/tests/hackfest3/int/solution/timestamp/receive2.py
+++ b/src/tests/hackfest3/int/solution/timestamp/receive2.py
@@ -1,4 +1,18 @@
 #!/usr/bin/env python3
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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 sys
 import struct
 
diff --git a/src/tests/hackfest3/new-probe/connect_to_mininet.sh b/src/tests/hackfest3/new-probe/connect_to_mininet.sh
index bba3eaa9a..a82d3767f 100755
--- a/src/tests/hackfest3/new-probe/connect_to_mininet.sh
+++ b/src/tests/hackfest3/new-probe/connect_to_mininet.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 # Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/src/tests/hackfest3/new-probe/copy.sh b/src/tests/hackfest3/new-probe/copy.sh
index 183880856..a01bc3235 100755
--- a/src/tests/hackfest3/new-probe/copy.sh
+++ b/src/tests/hackfest3/new-probe/copy.sh
@@ -1,4 +1,17 @@
 #!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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.
 
 # get container id
 CONTAINER=`docker ps | grep mininet | cut -f1 -d" "`
diff --git a/src/tests/hackfest3/new-probe/ping2.py b/src/tests/hackfest3/new-probe/ping2.py
index 8b308d120..a58c68c91 100644
--- a/src/tests/hackfest3/new-probe/ping2.py
+++ b/src/tests/hackfest3/new-probe/ping2.py
@@ -1,3 +1,17 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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 socket, re, time, subprocess, sys
 
 # Path of the socket inside mininet container
diff --git a/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh b/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh
index bba3eaa9a..a82d3767f 100755
--- a/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh
+++ b/src/tests/hackfest3/new-probe/solution/connect_to_mininet.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 # Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/src/tests/hackfest3/new-probe/solution/copy.sh b/src/tests/hackfest3/new-probe/solution/copy.sh
index 183880856..a01bc3235 100755
--- a/src/tests/hackfest3/new-probe/solution/copy.sh
+++ b/src/tests/hackfest3/new-probe/solution/copy.sh
@@ -1,4 +1,17 @@
 #!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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.
 
 # get container id
 CONTAINER=`docker ps | grep mininet | cut -f1 -d" "`
diff --git a/src/tests/hackfest3/new-probe/solution/ping2.py b/src/tests/hackfest3/new-probe/solution/ping2.py
index 5856a2409..7f3a97c83 100644
--- a/src/tests/hackfest3/new-probe/solution/ping2.py
+++ b/src/tests/hackfest3/new-probe/solution/ping2.py
@@ -1,3 +1,17 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# 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 socket, re, time, subprocess, sys
 
 socket_path = "/tmp/sock"
-- 
GitLab