diff --git a/utils/mininet/multi_switch_mininet.py b/utils/mininet/multi_switch_mininet.py index 97d4ff75..8ebd5e8f 100755 --- a/utils/mininet/multi_switch_mininet.py +++ b/utils/mininet/multi_switch_mininet.py @@ -1,20 +1,7 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 - -# Copyright 2013-present Barefoot Networks, Inc. -# -# 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. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import argparse import importlib diff --git a/utils/mininet/p4_mininet.py b/utils/mininet/p4_mininet.py index ea6417df..b6f39f5e 100644 --- a/utils/mininet/p4_mininet.py +++ b/utils/mininet/p4_mininet.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# 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. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import os import socket diff --git a/utils/mininet/single_switch_mininet.py b/utils/mininet/single_switch_mininet.py index b6b72b5e..446475ec 100755 --- a/utils/mininet/single_switch_mininet.py +++ b/utils/mininet/single_switch_mininet.py @@ -1,20 +1,7 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 - -# Copyright 2013-present Barefoot Networks, Inc. -# -# 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. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import argparse from subprocess import PIPE, Popen diff --git a/utils/netstat.py b/utils/netstat.py index 6c813905..6779e956 100644 --- a/utils/netstat.py +++ b/utils/netstat.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# 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. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import psutil diff --git a/utils/p4_mininet.py b/utils/p4_mininet.py index 44148d22..ddb77392 100644 --- a/utils/p4_mininet.py +++ b/utils/p4_mininet.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# 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. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import os import tempfile diff --git a/utils/p4apprunner.py b/utils/p4apprunner.py index 6dba5d45..ec14c16d 100755 --- a/utils/p4apprunner.py +++ b/utils/p4apprunner.py @@ -1,18 +1,8 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# 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 + +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # -# 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. +# SPDX-License-Identifier: Apache-2.0 diff --git a/utils/p4runtime_lib/bmv2.py b/utils/p4runtime_lib/bmv2.py index 67254f65..ae6767ef 100644 --- a/utils/p4runtime_lib/bmv2.py +++ b/utils/p4runtime_lib/bmv2.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# 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. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 from p4.tmp import p4config_pb2 from .switch import SwitchConnection diff --git a/utils/p4runtime_lib/convert.py b/utils/p4runtime_lib/convert.py index 91fe5538..22b747bf 100644 --- a/utils/p4runtime_lib/convert.py +++ b/utils/p4runtime_lib/convert.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# 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. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import math import re import socket diff --git a/utils/p4runtime_lib/error_utils.py b/utils/p4runtime_lib/error_utils.py index 0c04a317..1325b0c3 100644 --- a/utils/p4runtime_lib/error_utils.py +++ b/utils/p4runtime_lib/error_utils.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# 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. +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 import sys diff --git a/utils/p4runtime_lib/helper.py b/utils/p4runtime_lib/helper.py index eb631eb8..55a79c44 100644 --- a/utils/p4runtime_lib/helper.py +++ b/utils/p4runtime_lib/helper.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# 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. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import re import google.protobuf.text_format diff --git a/utils/p4runtime_lib/simple_controller.py b/utils/p4runtime_lib/simple_controller.py index 773d0b2f..35fcd795 100755 --- a/utils/p4runtime_lib/simple_controller.py +++ b/utils/p4runtime_lib/simple_controller.py @@ -1,20 +1,8 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright 2017-present Open Networking Foundation -# -# 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. + +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import argparse import json import os diff --git a/utils/p4runtime_lib/switch.py b/utils/p4runtime_lib/switch.py index 19c468ee..df0675d6 100644 --- a/utils/p4runtime_lib/switch.py +++ b/utils/p4runtime_lib/switch.py @@ -1,18 +1,6 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Open Networking Foundation -# -# 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. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 from abc import abstractmethod from datetime import datetime from queue import Queue diff --git a/utils/p4runtime_switch.py b/utils/p4runtime_switch.py index 542b41c4..35c6f831 100644 --- a/utils/p4runtime_switch.py +++ b/utils/p4runtime_switch.py @@ -1,19 +1,7 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2017-present Barefoot Networks, Inc. -# Copyright 2017-present Open Networking Foundation -# -# 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. +# SPDX-FileCopyrightText: 2017 Barefoot Networks, Inc. +# SPDX-FileCopyrightText: 2017 Open Networking Foundation # +# SPDX-License-Identifier: Apache-2.0 import os import tempfile diff --git a/utils/run_exercise.py b/utils/run_exercise.py index 4c0d8fbc..672f1998 100755 --- a/utils/run_exercise.py +++ b/utils/run_exercise.py @@ -1,25 +1,15 @@ #!/usr/bin/env python3 -# SPDX-License-Identifier: Apache-2.0 -# Copyright 2013-present Barefoot Networks, Inc. -# -# 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. + +# SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc. # +# SPDX-License-Identifier: Apache-2.0 + # Adapted by Robert MacDavid (macdavid@cs.princeton.edu) from scripts found in # the p4app repository (https://github.com/p4lang/p4app) # # We encourage you to dissect this script to better understand the BMv2/Mininet # environment used by the P4 tutorial. -# + import argparse import json import os diff --git a/vm-ubuntu-20.04/p4.vim b/vm-ubuntu-20.04/p4.vim index 2f626a67..d1707e7c 100644 --- a/vm-ubuntu-20.04/p4.vim +++ b/vm-ubuntu-20.04/p4.vim @@ -1,3 +1,4 @@ +" SPDX-FileCopyrightText: 2014 Barefoot Networks, Inc. " SPDX-License-Identifier: Apache-2.0 " Vim syntax file " Language: P4_16 diff --git a/vm-ubuntu-20.04/p4_16-mode.el b/vm-ubuntu-20.04/p4_16-mode.el index 41ca56b7..3479fd6e 100644 --- a/vm-ubuntu-20.04/p4_16-mode.el +++ b/vm-ubuntu-20.04/p4_16-mode.el @@ -1,7 +1,7 @@ ;;; p4_16-mode.el --- Support for the P4_16 programming language +;; SPDX-FileCopyrightText: 2016 Barefoot Networks, Inc. ;; SPDX-License-Identifier: Apache-2.0 -;; Copyright (C) 2016- Barefoot Networks ;; Author: Vladimir Gurevich ;; Maintainer: Vladimir Gurevich ;; Created: 15 April 2017 diff --git a/vm-ubuntu-24.04/p4.vim b/vm-ubuntu-24.04/p4.vim index 2f626a67..d1707e7c 100644 --- a/vm-ubuntu-24.04/p4.vim +++ b/vm-ubuntu-24.04/p4.vim @@ -1,3 +1,4 @@ +" SPDX-FileCopyrightText: 2014 Barefoot Networks, Inc. " SPDX-License-Identifier: Apache-2.0 " Vim syntax file " Language: P4_16 diff --git a/vm-ubuntu-24.04/p4_16-mode.el b/vm-ubuntu-24.04/p4_16-mode.el index 41ca56b7..3479fd6e 100644 --- a/vm-ubuntu-24.04/p4_16-mode.el +++ b/vm-ubuntu-24.04/p4_16-mode.el @@ -1,7 +1,7 @@ ;;; p4_16-mode.el --- Support for the P4_16 programming language +;; SPDX-FileCopyrightText: 2016 Barefoot Networks, Inc. ;; SPDX-License-Identifier: Apache-2.0 -;; Copyright (C) 2016- Barefoot Networks ;; Author: Vladimir Gurevich ;; Maintainer: Vladimir Gurevich ;; Created: 15 April 2017 diff --git a/vm/p4.vim b/vm/p4.vim index 2f626a67..d1707e7c 100644 --- a/vm/p4.vim +++ b/vm/p4.vim @@ -1,3 +1,4 @@ +" SPDX-FileCopyrightText: 2014 Barefoot Networks, Inc. " SPDX-License-Identifier: Apache-2.0 " Vim syntax file " Language: P4_16 diff --git a/vm/p4_16-mode.el b/vm/p4_16-mode.el index 474c73e0..d10df091 100644 --- a/vm/p4_16-mode.el +++ b/vm/p4_16-mode.el @@ -1,7 +1,7 @@ ;;; p4_16-mode.el --- Support for the P4_16 programming language +;; SPDX-FileCopyrightText: 2016 Barefoot Networks, Inc. ;; SPDX-License-Identifier: Apache-2.0 -;; Copyright (C) 2016- Barefoot Networks ;; Author: Vladimir Gurevich ;; Maintainer: Vladimir Gurevich ;; Created: 15 April 2017