Skip to content

Commit

Permalink
Corrected headers for all files
Browse files Browse the repository at this point in the history
  • Loading branch information
voetberg committed Aug 2, 2024
1 parent 6c975cd commit 9e3f36b
Show file tree
Hide file tree
Showing 42 changed files with 421 additions and 335 deletions.
13 changes: 13 additions & 0 deletions atlas/check_ami
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/usr/bin/env python
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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.
'''
Copyright European Organization for Nuclear Research (CERN) 2013
Expand Down
14 changes: 9 additions & 5 deletions atlas/check_disabled_rses
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#!/usr/bin/env python
# Copyright European Organization for Nuclear Research (CERN)
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Authors:
# - Cedric Serfon, <[email protected]>, 2015-2016
# 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 json
import requests
Expand Down
22 changes: 12 additions & 10 deletions atlas/check_injecting_rules
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/usr/bin/env python
# Copyright European Organization for Nuclear Research (CERN) 2013
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# Authors:
# - Martin Barisits, <[email protected]>, 2016
# - Thomas Beermann, <[email protected]>, 2019
# - Donata Mielaikaite, <[email protected]>, 2020
# - Eric Vaandering, <[email protected]>, 2020
# 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.

"""
Probe to check the backlog of injecting rules.
Expand All @@ -19,14 +21,14 @@ import sys
import traceback

from prometheus_client import CollectorRegistry, Gauge, push_to_gateway
from utils import probe_metrics

from rucio.common.config import config_get
from rucio.db.sqla import models
from rucio.db.sqla.constants import RuleState
from rucio.db.sqla.session import get_session
from rucio.db.sqla.util import get_count

from utils import probe_metrics

# Exit statuses
OK, WARNING, CRITICAL, UNKNOWN = 0, 1, 2, 3

Expand Down
16 changes: 10 additions & 6 deletions atlas/check_lost_files
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#!/usr/bin/env python
# Copyright European Organization for Nuclear Research (CERN) 2015
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# Authors:
# - Tomas Javurek, Cedric Serfon, 2015
# - Alexander Bogdanchikov, 2019-2020
# 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 os
import sys
Expand Down
17 changes: 15 additions & 2 deletions atlas/check_map_voms_roles
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/usr/bin/env python
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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.
"""
Copyright European Organization for Nuclear Research (CERN)
Expand All @@ -17,12 +30,12 @@
import os
import sys

from VOMSAdmin.VOMSCommands import VOMSAdminProxy

from rucio.client import Client
from rucio.common.config import config_get
from rucio.common.exception import Duplicate

from VOMSAdmin.VOMSCommands import VOMSAdminProxy

UNKNOWN = 3
CRITICAL = 2
WARNING = 1
Expand Down
21 changes: 15 additions & 6 deletions atlas/check_quotas
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#!/usr/bin/env python3
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# Copyright European Organization for Nuclear Research (CERN)
# 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.

# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
Expand All @@ -18,20 +29,18 @@
# Set quotas for users on their country's localgroupdisk
# Set quotas for all users on scratchdisk

from __future__ import print_function
import json
import sys

import requests

from rucio.api.rse import get_rse, parse_rse_expression, get_rse_usage, list_rse_attributes
from rucio.api.account import list_accounts
from rucio.api.account_limit import set_local_account_limit
from rucio.api.config import get
from rucio.db.sqla.session import get_session
from rucio.api.rse import get_rse, get_rse_usage, list_rse_attributes, parse_rse_expression
from rucio.common.config import config_get
from rucio.common.exception import RucioException, RSENotFound, AccountNotFound

from rucio.common.exception import AccountNotFound, RSENotFound, RucioException
from rucio.db.sqla.session import get_session

UNKNOWN = 3
CRITICAL = 2
Expand Down
21 changes: 4 additions & 17 deletions atlas/check_rse_attributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright 2012-2019 CERN for the benefit of the ATLAS collaboration.
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,32 +12,19 @@
# 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.
#
# Authors:
# - Vincent Garonne <[email protected]>, 2013-2014
# - David Cameron <[email protected]>, 2014-2015,2020
# - Tomas Kouba <[email protected]>, 2014
# - Cedric Serfon <[email protected]>, 2016-2019
# - Dimitrios Christidis <[email protected]>, 2019
# - Mario Lassnig <[email protected]>, 2019
#
# PY3K COMPATIBLE

from __future__ import print_function

import json
import sys
import traceback


import requests

from rucio.db.sqla.session import get_session
from rucio.common.exception import RucioException, RSENotFound
from rucio.common.config import config_get
from rucio.core.rse import add_rse_attribute, get_rses_with_attribute, del_rse_attribute, get_rse_usage, get_rse
from rucio.common.exception import RSENotFound, RucioException
from rucio.core.rse import add_rse_attribute, del_rse_attribute, get_rse, get_rse_usage, get_rses_with_attribute
from rucio.core.rse_expression_parser import parse_expression

from rucio.db.sqla.session import get_session

UNKNOWN = 3
CRITICAL = 2
Expand Down
19 changes: 12 additions & 7 deletions atlas/check_rules
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/env python
# Copyright European Organization for Nuclear Research (CERN) 2013
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# Authors:
# - Wen Guan, <[email protected]>, 2014
# 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.

'''
Probe to check rules.
Expand All @@ -16,10 +21,10 @@ import datetime
import sys
import time

from rucio.db.sqla.session import get_session

from utils import probe_metrics

from rucio.db.sqla.session import get_session

# Exit statuses
OK, WARNING, CRITICAL, UNKNOWN = 0, 1, 2, 3

Expand Down
13 changes: 13 additions & 0 deletions atlas/check_set_rse_space_limits
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/usr/bin/env python
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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.
"""
Copyright European Organization for Nuclear Research (CERN) 2014
Expand Down
10 changes: 2 additions & 8 deletions atlas/check_site_status
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright 2012-2020 CERN for the benefit of the ATLAS collaboration.
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,23 +12,17 @@
# 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.
#
# Authors:
# - Cedric Serfon <[email protected]>, 2014-2022
# - Mario Lassnig <[email protected]>, 2020
#

import json
import os
import sys

import requests

from rucio.api.rse import get_rse_protocols, list_rses, update_rse
from rucio.common.config import config_get
from rucio.api.rse import list_rses, update_rse, get_rse_protocols
from rucio.transfertool.fts3 import FTS3Transfertool


UNKNOWN = 3
CRITICAL = 2
WARNING = 1
Expand Down
12 changes: 2 additions & 10 deletions atlas/check_storage_space
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright 2012-2020 CERN for the benefit of the ATLAS collaboration.
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,25 +12,17 @@
# 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.
#
# Authors:
# - Wen Guan <[email protected]>, 2014
# - Sylvain Blunier <[email protected]>, 2016
# - Tomas Javurek <[email protected]>, 2016
# - Cedric Serfon <[email protected]>, 2015-2017
# - Dimitrios Christidis <[email protected]>, 2019
# - Mario Lassnig <[email protected]>, 2020

import json
import os
import sys

import gfal2

from rucio.api.rse import get_rse, list_rse_attributes, list_rses, set_rse_usage
from rucio.common.config import config_get
from rucio.common.exception import RSEProtocolNotSupported
from rucio.rse import rsemanager as rsemgr
from rucio.api.rse import list_rses, list_rse_attributes, get_rse, set_rse_usage

OK, WARNING, CRITICAL, UNKNOWN = 0, 1, 2, 3

Expand Down
19 changes: 12 additions & 7 deletions atlas/check_stresstest_dids_requests_replicas_daily
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/env python
# Copyright European Organization for Nuclear Research (CERN) 2013
# Copyright European Organization for Nuclear Research (CERN) since 2012
#
# 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
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# Authors:
# - Wen Guan, <[email protected]>, 2014
# 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.

'''
Probe to check dids, requests and replicas by daily.
Expand All @@ -16,10 +21,10 @@ import datetime
import sys
import time

from rucio.db.sqla.session import get_session

from utils import probe_metrics

from rucio.db.sqla.session import get_session

# Exit statuses
OK, WARNING, CRITICAL, UNKNOWN = 0, 1, 2, 3

Expand Down
Loading

0 comments on commit 9e3f36b

Please sign in to comment.