iris-pex-embedded-python 3.5.6b7__tar.gz → 3.5.6b9__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.
- {iris_pex_embedded_python-3.5.6b7/src/iris_pex_embedded_python.egg-info → iris_pex_embedded_python-3.5.6b9}/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/pyproject.toml +1 -1
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_remote.py +22 -11
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Service/Remote/Rest/v1.cls +39 -13
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9/src/iris_pex_embedded_python.egg-info}/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/LICENSE +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/README.md +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/setup.cfg +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/setup.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/__init__.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/Common.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/Director.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/Message.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/Test.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/PEX/Utils.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/cls/Grongier/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/__init__.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/__main__.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_business_host.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_cli.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_common.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_director.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_utils.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/__init__.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/__main__.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_async_request.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_business_host.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_business_operation.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_business_process.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_business_service.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_cli.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_common.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_debugpy.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_decorators.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_director.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_dispatch.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_generator_request.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_inbound_adapter.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_iris.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_local.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_log_manager.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_message.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_message_validator.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_outbound_adapter.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_private_session_duplex.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_private_session_process.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_serialization.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_utils.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Common.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Director.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Generator/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Generator/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Generator/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Generator/Message/StartPickle.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Generator/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Message.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Projection.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Service/Remote/Handler.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Test.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Utils.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Wrapper.cls +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
- {iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
|
@@ -16,7 +16,7 @@ import json
|
|
|
16
16
|
import os
|
|
17
17
|
import signal
|
|
18
18
|
import time
|
|
19
|
-
from typing import Any, Dict, List, Optional
|
|
19
|
+
from typing import Any, Dict, List, Optional, Union
|
|
20
20
|
|
|
21
21
|
import requests
|
|
22
22
|
import urllib3
|
|
@@ -50,19 +50,19 @@ class _RemoteDirector:
|
|
|
50
50
|
return resp.json()
|
|
51
51
|
|
|
52
52
|
def _post(self, path: str, body: Optional[dict] = None) -> Any:
|
|
53
|
-
b = {"namespace": self._namespace, **(body or {})}
|
|
54
53
|
resp = requests.post(
|
|
55
|
-
f"{self._base}{path}", json=
|
|
56
|
-
|
|
54
|
+
f"{self._base}{path}", json=(body or {}),
|
|
55
|
+
params={"namespace": self._namespace},
|
|
56
|
+
auth=self._auth, verify=self._verify, timeout=30,
|
|
57
57
|
)
|
|
58
58
|
resp.raise_for_status()
|
|
59
59
|
return resp.json()
|
|
60
60
|
|
|
61
61
|
def _put(self, path: str, body: Optional[dict] = None) -> Any:
|
|
62
|
-
b = {"namespace": self._namespace, **(body or {})}
|
|
63
62
|
resp = requests.put(
|
|
64
|
-
f"{self._base}{path}", json=
|
|
65
|
-
|
|
63
|
+
f"{self._base}{path}", json=(body or {}),
|
|
64
|
+
params={"namespace": self._namespace},
|
|
65
|
+
auth=self._auth, verify=self._verify, timeout=30,
|
|
66
66
|
)
|
|
67
67
|
resp.raise_for_status()
|
|
68
68
|
return resp.json()
|
|
@@ -190,18 +190,29 @@ class _RemoteDirector:
|
|
|
190
190
|
target: Optional[str],
|
|
191
191
|
message=None, # ignored remotely — not serialisable over HTTP
|
|
192
192
|
classname: Optional[str] = None,
|
|
193
|
-
body: Optional[str] = None,
|
|
193
|
+
body: Optional[Union[str, dict]] = None,
|
|
194
|
+
restart: bool = True,
|
|
194
195
|
) -> dict:
|
|
195
|
-
"""Returns a dict: {"classname": "...", "body": "...", "truncated": false}
|
|
196
|
+
"""Returns a dict: {"classname": "...", "body": "...", "truncated": false}.
|
|
197
|
+
|
|
198
|
+
If *restart* is True the target component is stopped and restarted on
|
|
199
|
+
the server before the test message is dispatched.
|
|
200
|
+
"""
|
|
196
201
|
payload: dict = {"target": target or ""}
|
|
197
202
|
if classname:
|
|
198
203
|
payload["classname"] = classname
|
|
199
|
-
if body:
|
|
204
|
+
if body is not None:
|
|
200
205
|
payload["body"] = body
|
|
206
|
+
if restart:
|
|
207
|
+
payload["restart"] = True
|
|
201
208
|
try:
|
|
202
209
|
return self._check_error(self._post("/test", payload))
|
|
203
210
|
except requests.exceptions.HTTPError as exc:
|
|
204
|
-
|
|
211
|
+
try:
|
|
212
|
+
err_msg = exc.response.json().get("error", str(exc))
|
|
213
|
+
except Exception:
|
|
214
|
+
err_msg = str(exc)
|
|
215
|
+
raise RuntimeError(err_msg) from exc
|
|
205
216
|
|
|
206
217
|
# ------------------------------------------------------------------
|
|
207
218
|
# Export
|
|
@@ -44,6 +44,15 @@ ClassMethod GetNsParam() As %String [ Internal, Private ]
|
|
|
44
44
|
Quit $select(ns="":"USER", 1:ns)
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
/// Return the namespace, preferring a body field over the query parameter.
|
|
48
|
+
ClassMethod ResolveNs(dyna As %DynamicObject = "") As %String [ Internal, Private ]
|
|
49
|
+
{
|
|
50
|
+
Set ns = ""
|
|
51
|
+
If $isobject(dyna) { Set ns = dyna.%Get("namespace") }
|
|
52
|
+
If ns = "" { Set ns = ..GetNsParam() }
|
|
53
|
+
Quit ns
|
|
54
|
+
}
|
|
55
|
+
|
|
47
56
|
ClassMethod GetStatus() As %Status
|
|
48
57
|
{
|
|
49
58
|
Try {
|
|
@@ -68,7 +77,7 @@ ClassMethod PostStart() As %Status
|
|
|
68
77
|
{
|
|
69
78
|
Try {
|
|
70
79
|
Set dyna = {}.%FromJSON(%request.Content)
|
|
71
|
-
Set ns = dyna
|
|
80
|
+
Set ns = ..ResolveNs(dyna)
|
|
72
81
|
Set production = dyna.%Get("production")
|
|
73
82
|
If ns '= "" { Do ..NamespaceCheck(ns) New $NAMESPACE Set $NAMESPACE = ns }
|
|
74
83
|
If production = "" { Set production = $Get(^Ens.Configuration("csp","LastProduction")) }
|
|
@@ -82,8 +91,8 @@ ClassMethod PostStart() As %Status
|
|
|
82
91
|
ClassMethod PostStop() As %Status
|
|
83
92
|
{
|
|
84
93
|
Try {
|
|
85
|
-
Set dyna = {}.%FromJSON(%request.Content)
|
|
86
|
-
Set ns = dyna
|
|
94
|
+
Try { Set dyna = {}.%FromJSON(%request.Content) } Catch { Set dyna = {} }
|
|
95
|
+
Set ns = ..ResolveNs(dyna)
|
|
87
96
|
If ns '= "" { Do ..NamespaceCheck(ns) New $NAMESPACE Set $NAMESPACE = ns }
|
|
88
97
|
$$$ThrowOnError(##class(Ens.Director).StopProduction())
|
|
89
98
|
Return ..%WriteResponse({"status": "stopped"}.%ToJSON())
|
|
@@ -95,8 +104,8 @@ ClassMethod PostStop() As %Status
|
|
|
95
104
|
ClassMethod PostKill() As %Status
|
|
96
105
|
{
|
|
97
106
|
Try {
|
|
98
|
-
Set dyna = {}.%FromJSON(%request.Content)
|
|
99
|
-
Set ns = dyna
|
|
107
|
+
Try { Set dyna = {}.%FromJSON(%request.Content) } Catch { Set dyna = {} }
|
|
108
|
+
Set ns = ..ResolveNs(dyna)
|
|
100
109
|
If ns '= "" { Do ..NamespaceCheck(ns) New $NAMESPACE Set $NAMESPACE = ns }
|
|
101
110
|
$$$ThrowOnError(##class(Ens.Director).StopProduction(10, 1))
|
|
102
111
|
Return ..%WriteResponse({"status": "killed"}.%ToJSON())
|
|
@@ -108,8 +117,8 @@ ClassMethod PostKill() As %Status
|
|
|
108
117
|
ClassMethod PostRestart() As %Status
|
|
109
118
|
{
|
|
110
119
|
Try {
|
|
111
|
-
Set dyna = {}.%FromJSON(%request.Content)
|
|
112
|
-
Set ns = dyna
|
|
120
|
+
Try { Set dyna = {}.%FromJSON(%request.Content) } Catch { Set dyna = {} }
|
|
121
|
+
Set ns = ..ResolveNs(dyna)
|
|
113
122
|
If ns '= "" { Do ..NamespaceCheck(ns) New $NAMESPACE Set $NAMESPACE = ns }
|
|
114
123
|
$$$ThrowOnError(##class(Ens.Director).RestartProduction())
|
|
115
124
|
Return ..%WriteResponse({"status": "restarted"}.%ToJSON())
|
|
@@ -121,8 +130,8 @@ ClassMethod PostRestart() As %Status
|
|
|
121
130
|
ClassMethod PostUpdate() As %Status
|
|
122
131
|
{
|
|
123
132
|
Try {
|
|
124
|
-
Set dyna = {}.%FromJSON(%request.Content)
|
|
125
|
-
Set ns = dyna
|
|
133
|
+
Try { Set dyna = {}.%FromJSON(%request.Content) } Catch { Set dyna = {} }
|
|
134
|
+
Set ns = ..ResolveNs(dyna)
|
|
126
135
|
If ns '= "" { Do ..NamespaceCheck(ns) New $NAMESPACE Set $NAMESPACE = ns }
|
|
127
136
|
$$$ThrowOnError(##class(Ens.Director).UpdateProduction())
|
|
128
137
|
Return ..%WriteResponse({"status": "updated"}.%ToJSON())
|
|
@@ -169,7 +178,7 @@ ClassMethod PutDefault() As %Status
|
|
|
169
178
|
{
|
|
170
179
|
Try {
|
|
171
180
|
Set dyna = {}.%FromJSON(%request.Content)
|
|
172
|
-
Set ns = dyna
|
|
181
|
+
Set ns = ..ResolveNs(dyna)
|
|
173
182
|
Set production = dyna.%Get("production")
|
|
174
183
|
If ns '= "" { Do ..NamespaceCheck(ns) New $NAMESPACE Set $NAMESPACE = ns }
|
|
175
184
|
Set ^Ens.Configuration("csp","LastProduction") = production
|
|
@@ -241,18 +250,33 @@ ClassMethod GetExport() As %Status
|
|
|
241
250
|
}
|
|
242
251
|
|
|
243
252
|
/// POST /test
|
|
244
|
-
/// Body: {"target":"Python.MyOp", "classname":"Python.MyMsg", "body":"{}", "namespace":"USER"}
|
|
253
|
+
/// Body: {"target":"Python.MyOp", "classname":"Python.MyMsg", "body":"{}", "namespace":"USER", "restart":true}
|
|
254
|
+
/// If "restart" is true the target component is stopped and restarted before the test message is dispatched. (Default true)
|
|
245
255
|
/// Returns: {"classname":"...", "body":"...", "session_id":"..."}
|
|
246
256
|
ClassMethod PostTest() As %Status
|
|
247
257
|
{
|
|
248
258
|
Try {
|
|
259
|
+
// Capture output to avoid writing directly to the response stream, which would break the JSON format. We'll include captured output in the response.
|
|
260
|
+
set sc = $$BeginCapture^%SYS.Capture(.msg)
|
|
261
|
+
|
|
249
262
|
Set dyna = {}.%FromJSON(%request.Content)
|
|
250
263
|
Set target = dyna.%Get("target")
|
|
251
264
|
Set classname = dyna.%Get("classname")
|
|
252
265
|
Set body = dyna.%Get("body")
|
|
253
|
-
Set
|
|
266
|
+
Set restart = dyna.%Get("restart")
|
|
267
|
+
If restart = "" { Set restart = 1 }
|
|
268
|
+
Set ns = ..ResolveNs(dyna)
|
|
254
269
|
If ns '= "" { Do ..NamespaceCheck(ns) New $NAMESPACE Set $NAMESPACE = ns }
|
|
255
270
|
|
|
271
|
+
// Optionally restart the target component before testing
|
|
272
|
+
If restart {
|
|
273
|
+
$$$ThrowOnError(##class(Ens.Director).EnableConfigItem(target, 0, 1))
|
|
274
|
+
$$$ThrowOnError(##class(Ens.Director).EnableConfigItem(target, 1, 1))
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// Normalize body: if it arrived as a JSON object, serialize it to a string
|
|
278
|
+
If $isobject(body) { Set body = body.%ToJSON() }
|
|
279
|
+
|
|
256
280
|
// Build the request message
|
|
257
281
|
If classname '= "" {
|
|
258
282
|
Set message = ##class(IOP.Message).%New()
|
|
@@ -277,8 +301,10 @@ ClassMethod PostTest() As %Status
|
|
|
277
301
|
Set result.classname = ""
|
|
278
302
|
Set result.body = ""
|
|
279
303
|
}
|
|
304
|
+
set sc = $$EndCapture^%SYS.Capture(msg,.msgArray)
|
|
280
305
|
Return ..%WriteResponse(result.%ToJSON())
|
|
281
306
|
} Catch ex {
|
|
307
|
+
set sc = $$EndCapture^%SYS.Capture(msg,.msgArray)
|
|
282
308
|
Return ..%WriteErrorResponse(ex.DisplayString())
|
|
283
309
|
}
|
|
284
310
|
}
|
|
@@ -309,7 +335,7 @@ ClassMethod PutMigrate() As %DynamicObject
|
|
|
309
335
|
// Get the request body
|
|
310
336
|
set dyna = {}.%FromJSON(%request.Content)
|
|
311
337
|
set body = dyna.%Get("body")
|
|
312
|
-
set namespace = dyna
|
|
338
|
+
set namespace = ..ResolveNs(dyna)
|
|
313
339
|
set targetDirectory = dyna.%Get("remote_folder")
|
|
314
340
|
set packageName = dyna.%Get("package")
|
|
315
341
|
// check for namespace existence and user permissions against namespace
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/__init__.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/__init__.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_cli.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_common.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_director.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/grongier/pex/_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_async_request.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_business_host.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_business_operation.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_business_process.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_business_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_generator_request.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_inbound_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_log_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_message_validator.py
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_outbound_adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/_serialization.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Common.cls
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Director.cls
RENAMED
|
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
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Message.cls
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Projection.cls
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Test.cls
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Utils.cls
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/cls/IOP/Wrapper.cls
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.5.6b7 → iris_pex_embedded_python-3.5.6b9}/src/iop/wsgi/handlers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|