-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7258 from chrisburr/legacy-adaptor-selector
[9.0] Support selecting legacy adaptor client
- Loading branch information
Showing
13 changed files
with
106 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env python | ||
import argparse | ||
import os | ||
|
||
import DIRAC | ||
from DIRAC.Core.Utilities.ReturnValues import returnValueOrRaise | ||
|
||
|
||
def parse_args(): | ||
parser = argparse.ArgumentParser(description="Setup DIRAC CS for running integration tests with DiracX") | ||
parser.add_argument("--disable-vo", nargs="+", help="Disable a VO", default=[]) | ||
parser.add_argument("--url", help="URL of the DiracX services") | ||
parser.add_argument("--credentials-dir", help="Directory where hostcert.pem/hostkey.pem can be found") | ||
args = parser.parse_args() | ||
|
||
DIRAC.initialize( | ||
host_credentials=( | ||
f"{args.credentials_dir}/hostcert.pem", | ||
f"{args.credentials_dir}/hostkey.pem", | ||
) | ||
) | ||
|
||
main(args.url, args.disable_vo) | ||
|
||
|
||
def main(url: str, disabled_vos: list[str]): | ||
from DIRAC.ConfigurationSystem.Client.CSAPI import CSAPI | ||
|
||
csAPI = CSAPI() | ||
|
||
returnValueOrRaise(csAPI.createSection("DiracX")) | ||
|
||
if url: | ||
returnValueOrRaise(csAPI.setOption("DiracX/URL", url)) | ||
|
||
if disabled_vos: | ||
returnValueOrRaise(csAPI.setOption("DiracX/DisabledVOs", ",".join(disabled_vos))) | ||
|
||
returnValueOrRaise(csAPI.commit()) | ||
|
||
|
||
if __name__ == "__main__": | ||
parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters