Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions Core/scripts/dirac-install.py

This file was deleted.

1 change: 0 additions & 1 deletion dirac.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,6 @@ Operations
WriteProtocols = srm
WriteProtocols += dips
# FTS related options. See http://dirac.readthedocs.io/en/latest/AdministratorGuide/Systems/DataManagement/fts.html
FTSVersion = FTS3 # should only be that...
FTSPlacement
{
FTS3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Operations / DataManagement
* WriteProtocols (['srm', 'dips']): list of the possible protocols to be used to perform the write and remove operations. Overwritten at the level of a StorageElement configuration.
* AllowUserReplicaManagement (False): if set to True, clients without the FileCatalogManagement property can use the dirac-dms-remove-catalog-* commands to manipulate the file catalog.
* ForceIndexedMetadata (False): if True disables implicit creation of non-indexed Metadata.
* FTSVersion (FTS2): version of FTS to use. Possibilities: FTS3 or FTS2 (deprecated)
* FTSPlacement section:

- FTS3 section:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ In order for the transfers to be submitted to the FTS system, the following opti

* ``FTSMode`` must be True
* ``FTSBannedGroups`` should contain the list of groups for which you'd rather do direct transfers.
* ``UseNewFTS3`` should be True in order to use this new FTS system (soon to be deprecated)

========================
Operations configuration
========================

* DataManagement/FTSVersion: FTS2/FTS3. Set it to FTS3...
* DataManagement/FTSPlacement/FTS3/ServerPolicy: Policy to choose the FTS server see `FTSServer policy`_.
* DataManagement/FTSPlacement/FTS3/FTS3Plugin: Plugin to alter the behavior of the FTS3Agent

Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/Core/Base/Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __call__(self, func=None):
"Invalid dirac- console_scripts entry_point: "
+ repr(entrypoint)
+ "\n"
+ "All dirac- console_scripts should be wrapped in the DiracScript "
+ "All dirac- console_scripts should be wrapped in the Script "
+ "decorator to ensure extension overlays are applied correctly."
)
return entrypointFunc._func()
Expand Down
36 changes: 1 addition & 35 deletions src/DIRAC/Core/Security/m2crypto/X509Chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from DIRAC import S_OK, S_ERROR
from DIRAC.Core.Utilities import DErrno
from DIRAC.Core.Utilities.Decorators import executeOnlyIf, deprecated
from DIRAC.Core.Utilities.Decorators import executeOnlyIf
from DIRAC.ConfigurationSystem.Client.Helpers import Registry
from DIRAC.Core.Security.m2crypto import PROXY_OID, LIMITED_PROXY_OID, DIRAC_GROUP_OID, DEFAULT_PROXY_STRENGTH
from DIRAC.Core.Security.m2crypto.X509Certificate import X509Certificate
Expand Down Expand Up @@ -165,22 +165,6 @@ def __init__(self, certList=False, keyObj=False):
if keyObj:
self._keyObj = keyObj

@classmethod
@deprecated("Use loadChainFromFile instead", onlyOnce=True)
def instanceFromFile(cls, chainLocation):
"""Class method to generate a X509Chain from a file

:param chainLocation: path to the file

:returns: S_OK(X509Chain)
"""
chain = cls()
result = chain.loadChainFromFile(chainLocation)
if not result["OK"]:
return result

return S_OK(chain)

@staticmethod
def generateX509ChainFromSSLConnection(sslConnection):
"""Returns an instance of X509Chain from the SSL connection
Expand Down Expand Up @@ -393,24 +377,6 @@ def getIssuerCert(self):
return S_OK(self._certList[self.__firstProxyStep + 1])
return S_OK(self._certList[-1])

@deprecated("Only here for compatibility reason", onlyOnce=True)
@needPKey
def getPKeyObj(self):
"""
Get the pkey obj

:returns: ~M2Crypto.EVP.PKey object
"""
return S_OK(self._keyObj)

@deprecated("Only here for compatibility reason")
@needCertList
def getCertList(self):
"""
Get the cert list
"""
return S_OK(self._certList)

@needCertList
def getNumCertsInChain(self):
"""
Expand Down
35 changes: 0 additions & 35 deletions src/DIRAC/Core/Security/test/Test_X509Chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,33 +155,13 @@ def test_loadChainFromString_non_pem(get_X509Chain_class):
assert res["Errno"] == EX509


@parametrize("key_file", CERTKEYS)
def test_init_with_key(key_file, get_X509Chain_class):
"""Test init with key object as argument and check the content"""

chain1 = get_X509Chain_class()
chain1.loadKeyFromFile(key_file)

# Get the key and check the number of bits
keyObj = chain1.getPKeyObj()["Value"]

chain2 = get_X509Chain_class(keyObj=keyObj)
assert chain1.dumpPKeyToString() == chain2.dumpPKeyToString()
# Careful ! The two keys are the same object
assert chain2.getPKeyObj()["Value"] is keyObj


@parametrize("key_file", CERTKEYS)
def test_privatekey_without_password(key_file, get_X509Chain_class):
"""Test loading a key from a file, retrieve the object and check the content"""

X509Chain = get_X509Chain_class()
res = X509Chain.loadKeyFromFile(key_file)
assert res["OK"]
# Get the key and check the number of bits
res = X509Chain.getPKeyObj()
assert res["OK"]
assert res["Value"].size() == 512

# Check that the content of the object is correct.
# CAUTION ! The object is PKCS8, while the file contains PKCS1.
Expand All @@ -195,10 +175,6 @@ def test_privatekey_with_password(get_X509Chain_class):
X509Chain = get_X509Chain_class()
res = X509Chain.loadKeyFromFile(ENCRYPTEDKEY, password=ENCRYPTEDKEYPASS)
assert res["OK"]
# Get the key and check the number of bits
res = X509Chain.getPKeyObj()
assert res["OK"]
assert res["Value"].size() == 512


def test_privatekey_with_wrong_password(get_X509Chain_class):
Expand Down Expand Up @@ -233,17 +209,6 @@ def test_getCertInChain_too_far(get_X509Chain_class):
x509Chain.getCertInChain(1)


@parametrize("cert_file", CERTS)
def test_getCertList(cert_file, get_X509Chain_class):
""" " Load a chain, and get its length."""
x509Chain = get_X509Chain_class()
x509Chain.loadChainFromFile(cert_file)
# For a certificate, there should be only 1 certificate in the chain

assert len(x509Chain.getCertList()["Value"]) == 1
assert len(x509Chain.getCertList()["Value"]) == x509Chain.getNumCertsInChain()["Value"]


@parametrize("cert_file", CERTS)
def test_certProperties(cert_file, get_X509Chain_class):
"""Try on a certificate if it is a proxy, limited proxy, VOMS, valid proxy, rfc"""
Expand Down
7 changes: 0 additions & 7 deletions src/DIRAC/Core/Utilities/DIRACScript.py

This file was deleted.

7 changes: 0 additions & 7 deletions src/DIRAC/Core/Utilities/Os.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
by default on Error they return None
"""
import os
import shutil

import DIRAC
from DIRAC.Core.Utilities.Decorators import deprecated
from DIRAC.Core.Utilities.Subprocess import shellCall, systemCall
from DIRAC.Core.Utilities import List

Expand Down Expand Up @@ -145,8 +143,3 @@ def sourceEnv(timeout, cmdTuple, inputEnv=None):
result["stderr"] = stderr

return result


@deprecated("Will be removed in DIRAC 8.1", onlyOnce=True)
def which(executable):
return shutil.which(executable)
57 changes: 0 additions & 57 deletions src/DIRAC/Core/Utilities/test/Test_gCFG.py

This file was deleted.

1 change: 0 additions & 1 deletion src/DIRAC/RequestManagementSystem/ConfigTemplate.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ Agents
{
Location = DIRAC/DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister
FTSMode = False
UseNewFTS3 = True
FTSBannedGroups = dirac_user, lhcb_user
LogLevel = INFO
MaxAttempts = 256
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ def check(proxyStr, proxyProvider, name):
for result in [
chain.getRemainingSecs(),
chain.getIssuerCert(),
chain.getPKeyObj(),
chain.getCertList(),
chain.getNumCertsInChain(),
chain.generateProxyToString(3600),
chain.generateProxyToFile(proxyFile, 3600),
Expand Down
9 changes: 0 additions & 9 deletions src/DIRAC/WorkloadManagementSystem/DB/JobLoggingDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ def addLoggingRecord(
applicationStatus="idem",
date=None,
source="Unknown",
minor=None,
application=None,
):
"""Add a new entry to the JobLoggingDB table. One, two or all the three status
components (status, minorStatus, applicationStatus) can be specified.
Expand All @@ -46,13 +44,6 @@ def addLoggingRecord(
UTC time is used.
"""

# Backward compatibility
# FIXME: to remove in next version
if minor:
minorStatus = minor
if application:
applicationStatus = application

event = f"status/minor/app={status}/{minorStatus}/{applicationStatus}"
self.log.info("Adding record for job ", str(jobID) + ": '" + event + "' from " + source)

Expand Down
27 changes: 0 additions & 27 deletions src/DIRAC/WorkloadManagementSystem/Executor/JobScheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,33 +335,6 @@ def __getSitesRequired(self, jobManifest):

return S_OK((sites, bannedSites))

def __filterByPlatform(self, jobPlatform, userSites):
"""Filters out sites that have no CE with a matching platform."""
basePath = "/Resources/Sites"
filteredSites = set()

# FIXME: can use Resources().getSiteCEMapping()
for site in userSites:
if "." not in site:
# Invalid site name: Doesn't contain a dot!
self.jobLog.warn("Skipped invalid site name", site)
continue
grid = site.split(".")[0]
sitePath = cfgPath(basePath, grid, site, "CEs")
result = gConfig.getSections(sitePath)
if not result["OK"]:
self.jobLog.info("Failed to get CEs", "at site %s" % site)
continue
siteCEs = result["Value"]

for CEName in siteCEs:
CEPlatform = gConfig.getValue(cfgPath(sitePath, CEName, "OS"))
if jobPlatform == CEPlatform:
# Site has a CE with a matchin platform
filteredSites.add(site)

return S_OK(list(filteredSites))

def _getTagsFromManifest(self, jobManifest):
"""helper method to add a list of tags to the TQ from the job manifest content"""

Expand Down
Loading