Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
46ece655
Commit
46ece655
authored
2 months ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Updated update_license script
parent
cefde14a
No related branches found
No related tags found
2 merge requests
!359
Release TeraFlowSDN 5.0
,
!358
Resolve "Update copyright headers for R5"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/update_license_headers.py
+20
-13
20 additions, 13 deletions
scripts/update_license_headers.py
with
20 additions
and
13 deletions
scripts/update_license_headers.py
+
20
−
13
View file @
46ece655
#!/bin/bash
#!/bin/bash
# Copyright 2022-202
4
ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
# Copyright 2022-202
5
ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# you may not use this file except in compliance with the License.
...
@@ -27,14 +27,14 @@ FILE_PATH_SKIPPED = 'out-skipped.txt'
...
@@ -27,14 +27,14 @@ FILE_PATH_SKIPPED = 'out-skipped.txt'
FILE_PATH_NO_HEADER
=
'
out-no-header.txt
'
FILE_PATH_NO_HEADER
=
'
out-no-header.txt
'
FILE_PATH_UPDATED
=
'
out-updated.txt
'
FILE_PATH_UPDATED
=
'
out-updated.txt
'
STR_NEW_COPYRIGHT
=
'
Copyright 2022-202
4
ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
'
STR_NEW_COPYRIGHT
=
'
Copyright 2022-202
5
ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
'
RE_OLD_COPYRIGHTS
=
[
RE_OLD_COPYRIGHTS
=
[
r
'
Copyright\ 2021\-202
3
\ H2020\ TeraFlow\ \(https\:\/\/www\.teraflow\-h2020\.eu\/\)
'
,
r
'
Copyright\ 2021\-202
[0-9]
\ H2020\ TeraFlow\ \(https\:\/\/www\.teraflow\-h2020\.eu\/\)
'
,
r
'
Copyright\ 2022\-202
3
\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\ \(https\:\/\/tfs\.etsi\.org\/\)
'
,
r
'
Copyright\ 2022\-202
[0-9]
\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\ \(https\:\/\/tfs\.etsi\.org\/\)
'
,
r
'
Copyright\ 2022\-202
4
\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\ \(https\:\/\/tfs\.etsi\.org\/\)
'
,
r
'
Copyright\ 2022\-202
[0-9]
\ ETSI\ TeraFlowSDN\ \-\ TFS\ OSG\
/SDG\
\(https\:\/\/tfs\.etsi\.org\/\)
'
,
r
'
Copyright\ 2022\-202
4
\ ETSI\ TeraFlowSDN\ \
-\
TFS\
OSG\/SDG
\ \(https\:\/\/tfs\.etsi\.org\/\)
'
,
r
'
Copyright\ 2022\-202
[0-9]
\ ETSI\
OSG\/SDG\
TeraFlowSDN\ \
(
TFS\
)
\ \(https\:\/\/tfs\.etsi\.org\/\)
'
,
r
'
Copyright\ 2022\-202
4
\ ETSI\
OSG\/
SDG\ TeraFlowSDN\ \(TFS\)\ \(https\:\/\/tfs\.etsi\.org\/\)
'
,
r
'
Copyright\ 2022\-202
[0-4]
\ ETSI\ SDG\ TeraFlowSDN\ \(TFS\)\ \(https\:\/\/tfs\.etsi\.org\/\)
'
,
]
]
RE_OLD_COPYRIGHTS
=
[
RE_OLD_COPYRIGHTS
=
[
(
re
.
compile
(
r
'
.*{}.*
'
.
format
(
re_old_copyright
)),
re
.
compile
(
re_old_copyright
))
(
re
.
compile
(
r
'
.*{}.*
'
.
format
(
re_old_copyright
)),
re
.
compile
(
re_old_copyright
))
...
@@ -57,8 +57,6 @@ def skip_file(file_path : str) -> bool:
...
@@ -57,8 +57,6 @@ def skip_file(file_path : str) -> bool:
if
file_path
.
endswith
(
'
.jar
'
):
return
True
if
file_path
.
endswith
(
'
.jar
'
):
return
True
if
file_path
.
endswith
(
'
.onnx
'
):
return
True
if
file_path
.
endswith
(
'
.onnx
'
):
return
True
if
file_path
.
endswith
(
'
/tstat
'
):
return
True
if
file_path
.
endswith
(
'
/tstat
'
):
return
True
if
file_path
.
endswith
(
'
/.gitignore
'
):
return
True
if
file_path
.
endswith
(
'
/.gitkeep
'
):
return
True
if
file_path
.
endswith
(
'
/coverage/.coverage
'
):
return
True
if
file_path
.
endswith
(
'
/coverage/.coverage
'
):
return
True
if
file_path
.
endswith
(
'
/grpc/grpcurl/grpcurl
'
):
return
True
if
file_path
.
endswith
(
'
/grpc/grpcurl/grpcurl
'
):
return
True
if
file_path
.
endswith
(
'
/probe/probe-tfs/target/x86_64-unknown-linux-musl/release/tfsagent
'
):
return
True
if
file_path
.
endswith
(
'
/probe/probe-tfs/target/x86_64-unknown-linux-musl/release/tfsagent
'
):
return
True
...
@@ -70,6 +68,7 @@ def skip_file(file_path : str) -> bool:
...
@@ -70,6 +68,7 @@ def skip_file(file_path : str) -> bool:
if
'
/hackfest/netconf-oc/openconfig/
'
in
file_path
:
return
True
if
'
/hackfest/netconf-oc/openconfig/
'
in
file_path
:
return
True
if
'
/hackfest/tapi/server/tapi_server/
'
in
file_path
:
return
True
if
'
/hackfest/tapi/server/tapi_server/
'
in
file_path
:
return
True
if
'
/hackfest/kafka/kafka_2.13-2.8.0/
'
in
file_path
:
return
True
if
'
/hackfest/kafka/kafka_2.13-2.8.0/
'
in
file_path
:
return
True
if
'
/hackfest5/clab-hackfest5/
'
in
file_path
:
return
True
if
'
/.git/
'
in
file_path
:
return
True
if
'
/.git/
'
in
file_path
:
return
True
if
'
/.vscode/
'
in
file_path
:
return
True
if
'
/.vscode/
'
in
file_path
:
return
True
if
'
/.pytest_cache/
'
in
file_path
:
return
True
if
'
/.pytest_cache/
'
in
file_path
:
return
True
...
@@ -81,16 +80,24 @@ def skip_file(file_path : str) -> bool:
...
@@ -81,16 +80,24 @@ def skip_file(file_path : str) -> bool:
file_name
=
file_path_parts
[
-
1
]
file_name
=
file_path_parts
[
-
1
]
return
file_name
in
{
'
LICENSE
'
,
'
VERSION
'
}
return
file_name
in
{
'
LICENSE
'
,
'
VERSION
'
}
if
'
/device/service/drivers/gnmi_openconfig/git/
'
in
file_path
:
return
True
if
'
/device/service/drivers/gnmi_openconfig/git/
'
in
file_path
:
return
True
if
'
/device/service/drivers/gnmi_openconfig/gnmi/gnmi
'
in
file_path
:
return
True
if
'
/device/service/drivers/gnmi_openconfig/gnmi/Acknowledgement.txt
'
in
file_path
:
return
True
if
'
/device/service/drivers/openconfig/templates/
'
in
file_path
:
if
'
/device/service/drivers/openconfig/templates/
'
in
file_path
:
if
file_path
.
endswith
(
'
.xml
'
):
return
True
if
file_path
.
endswith
(
'
.xml
'
):
return
True
file_path_parts
=
file_path
.
split
(
'
/
'
)
file_path_parts
=
file_path
.
split
(
'
/
'
)
file_name
=
file_path_parts
[
-
1
]
file_name
=
file_path_parts
[
-
1
]
if
file_name
.
startswith
(
'
openconfig_
'
)
and
file_name
.
endswith
(
'
.py
'
):
return
True
if
file_name
.
startswith
(
'
openconfig_
'
)
and
file_name
.
endswith
(
'
.py
'
):
return
True
return
False
return
False
if
'
/nbi/service/rest_server/nbi_plugins/ietf_network/bindings/
'
in
file_path
:
return
True
if
'
/device/service/drivers/smartnic/
'
in
file_path
:
if
'
/nbi/service/rest_server/nbi_plugins/ietf_network_slice/bindings/
'
in
file_path
:
return
True
if
file_path
.
startswith
(
'
openconfig-
'
):
return
True
if
'
/nbi/service/rest_server/nbi_plugins/ietf_l3vpn/yang/
'
in
file_path
:
return
True
if
file_path
.
startswith
(
'
ietf-
'
):
return
True
if
'
/nbi/service/rest_server/nbi_plugins/ietf_network/yang/
'
in
file_path
:
return
True
if
file_path
.
endswith
(
'
references_probes_libraries.txt
'
):
return
True
return
False
if
'
/nbi/service/ietf_network/bindings/
'
in
file_path
:
return
True
if
'
/nbi/service/ietf_network_slice/bindings/
'
in
file_path
:
return
True
if
'
/nbi/service/ietf_l3vpn/yang/
'
in
file_path
:
return
True
if
'
/nbi/service/ietf_network/yang/
'
in
file_path
:
return
True
if
'
/tests/tools/mock_qkd_nodes/yang/
'
in
file_path
:
return
True
if
'
/ztp/target/
'
in
file_path
:
return
True
if
'
/ztp/target/
'
in
file_path
:
return
True
if
'
/policy/target/
'
in
file_path
:
return
True
if
'
/policy/target/
'
in
file_path
:
return
True
if
'
/dlt/gateway/_legacy
'
in
file_path
:
return
True
if
'
/dlt/gateway/_legacy
'
in
file_path
:
return
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment