dcache-pyclient 0.1.2__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/PKG-INFO +1 -1
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/pyproject.toml +1 -1
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/api.py +6 -1
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/cli/app.py +5 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/cli/commands.py +1 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/client.py +2 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/LICENSE +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/README.md +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/__init__.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/auth.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/cli/formatters.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/config.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/etc/ada.conf +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/exceptions.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/models.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/services/__init__.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/services/checksum.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/services/events.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/services/labels.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/services/namespace.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/services/staging.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/services/system.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/services/xattr.py +0 -0
- {dcache_pyclient-0.1.2 → dcache_pyclient-0.2.0}/src/ada/utils.py +0 -0
|
@@ -38,6 +38,7 @@ class DcacheAPI:
|
|
|
38
38
|
self,
|
|
39
39
|
base_url: str,
|
|
40
40
|
auth: AuthProvider,
|
|
41
|
+
verify: bool = True,
|
|
41
42
|
debug: bool = False,
|
|
42
43
|
) -> None:
|
|
43
44
|
self.base_url = base_url.rstrip("/")
|
|
@@ -50,8 +51,12 @@ class DcacheAPI:
|
|
|
50
51
|
"follow_redirects": True,
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
# verify: False to disable verification
|
|
53
55
|
ssl_ctx = auth.get_ssl_context()
|
|
54
|
-
if
|
|
56
|
+
if verify is False:
|
|
57
|
+
logger.warning("WARNING: No SSL verification, connection may be insecure!")
|
|
58
|
+
client_kwargs["verify"] = False
|
|
59
|
+
elif ssl_ctx:
|
|
55
60
|
client_kwargs["verify"] = ssl_ctx
|
|
56
61
|
|
|
57
62
|
self._client = httpx.Client(**client_kwargs)
|
|
@@ -41,6 +41,11 @@ def parse_args() -> argparse.ArgumentParser:
|
|
|
41
41
|
help="The dCache API URL to talk to."
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
+
parser.add_argument(
|
|
45
|
+
"--no-verify",
|
|
46
|
+
help="Disable SSL verification. Do not use in production, connection may be insecure!",
|
|
47
|
+
action="store_true")
|
|
48
|
+
|
|
44
49
|
parser.add_argument(
|
|
45
50
|
"--debug",
|
|
46
51
|
help="Run in debug mode (not yet implemented).",
|
|
@@ -57,6 +57,7 @@ class AdaClient:
|
|
|
57
57
|
proxy: Optional[str] = None,
|
|
58
58
|
igtf: bool = True,
|
|
59
59
|
config_paths: Optional[list[str]] = None,
|
|
60
|
+
verify: bool = True,
|
|
60
61
|
debug: bool = False,
|
|
61
62
|
) -> None:
|
|
62
63
|
# Load config from files and env vars
|
|
@@ -81,6 +82,7 @@ class AdaClient:
|
|
|
81
82
|
self._api = DcacheAPI(
|
|
82
83
|
base_url=self.config.api,
|
|
83
84
|
auth=self.auth,
|
|
85
|
+
verify=verify,
|
|
84
86
|
debug=self.config.debug,
|
|
85
87
|
)
|
|
86
88
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|