OpenOrchestrator 1.3.1__py3-none-any.whl → 2.0.0rc1__py3-none-any.whl
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.
- OpenOrchestrator/__main__.py +66 -12
- OpenOrchestrator/common/connection_frame.py +10 -4
- OpenOrchestrator/database/base.py +8 -0
- OpenOrchestrator/database/constants.py +3 -15
- OpenOrchestrator/database/db_util.py +110 -37
- OpenOrchestrator/database/logs.py +3 -15
- OpenOrchestrator/database/queues.py +3 -15
- OpenOrchestrator/database/schedulers.py +32 -0
- OpenOrchestrator/database/triggers.py +7 -16
- OpenOrchestrator/orchestrator/application.py +13 -8
- OpenOrchestrator/orchestrator/datetime_input.py +2 -2
- OpenOrchestrator/orchestrator/popups/constant_popup.py +8 -6
- OpenOrchestrator/orchestrator/popups/credential_popup.py +10 -8
- OpenOrchestrator/orchestrator/popups/generic_popups.py +15 -2
- OpenOrchestrator/orchestrator/popups/trigger_popup.py +25 -14
- OpenOrchestrator/orchestrator/tabs/constants_tab.py +5 -2
- OpenOrchestrator/orchestrator/tabs/logging_tab.py +3 -0
- OpenOrchestrator/orchestrator/tabs/queue_tab.py +4 -1
- OpenOrchestrator/orchestrator/tabs/schedulers_tab.py +45 -0
- OpenOrchestrator/orchestrator/tabs/settings_tab.py +2 -5
- OpenOrchestrator/orchestrator/tabs/trigger_tab.py +9 -5
- OpenOrchestrator/orchestrator/test_helper.py +17 -0
- OpenOrchestrator/orchestrator_connection/connection.py +21 -4
- OpenOrchestrator/scheduler/application.py +3 -2
- OpenOrchestrator/scheduler/run_tab.py +16 -6
- OpenOrchestrator/scheduler/runner.py +51 -63
- OpenOrchestrator/scheduler/settings_tab.py +90 -14
- OpenOrchestrator/scheduler/util.py +8 -0
- OpenOrchestrator/tests/__init__.py +0 -0
- OpenOrchestrator/tests/db_test_util.py +40 -0
- OpenOrchestrator/tests/test_db_util.py +372 -0
- OpenOrchestrator/tests/test_orchestrator_connection.py +142 -0
- OpenOrchestrator/tests/test_trigger_polling.py +143 -0
- OpenOrchestrator/tests/ui_tests/__init__.py +0 -0
- OpenOrchestrator/tests/ui_tests/test_constants_tab.py +167 -0
- OpenOrchestrator/tests/ui_tests/test_logging_tab.py +180 -0
- OpenOrchestrator/tests/ui_tests/test_queues_tab.py +126 -0
- OpenOrchestrator/tests/ui_tests/test_schedulers_tab.py +47 -0
- OpenOrchestrator/tests/ui_tests/test_trigger_tab.py +243 -0
- OpenOrchestrator/tests/ui_tests/ui_util.py +151 -0
- openorchestrator-2.0.0rc1.dist-info/METADATA +158 -0
- openorchestrator-2.0.0rc1.dist-info/RECORD +55 -0
- {openorchestrator-1.3.1.dist-info → openorchestrator-2.0.0rc1.dist-info}/WHEEL +1 -1
- OpenOrchestrator/scheduler/connection_frame.py +0 -96
- openorchestrator-1.3.1.dist-info/METADATA +0 -60
- openorchestrator-1.3.1.dist-info/RECORD +0 -39
- {openorchestrator-1.3.1.dist-info → openorchestrator-2.0.0rc1.dist-info/licenses}/LICENSE +0 -0
- {openorchestrator-1.3.1.dist-info → openorchestrator-2.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -1,96 +0,0 @@
|
|
1
|
-
"""This module contains a single class: ConnectionFrame."""
|
2
|
-
|
3
|
-
import os
|
4
|
-
import tkinter
|
5
|
-
from tkinter import ttk, messagebox
|
6
|
-
|
7
|
-
from OpenOrchestrator.common import crypto_util
|
8
|
-
from OpenOrchestrator.database import db_util
|
9
|
-
|
10
|
-
|
11
|
-
# pylint: disable-next=too-many-ancestors
|
12
|
-
class ConnectionFrame(ttk.Frame):
|
13
|
-
"""A ttk.Frame object that contains two ttk.Entry and
|
14
|
-
two ttk.Button used to enter a connection string and
|
15
|
-
encryption key and to connect to the database.
|
16
|
-
"""
|
17
|
-
def __init__(self, parent: tkinter.Widget):
|
18
|
-
super().__init__(parent)
|
19
|
-
|
20
|
-
frame = ttk.Frame(self)
|
21
|
-
frame.columnconfigure(1, weight=1)
|
22
|
-
frame.pack(fill='both')
|
23
|
-
|
24
|
-
ttk.Label(frame, text="Connection string:").grid(row=0, column=0, sticky='w')
|
25
|
-
|
26
|
-
self.conn_entry = ttk.Entry(frame)
|
27
|
-
self.conn_entry.grid(row=0, column=1, sticky='ew')
|
28
|
-
|
29
|
-
self.conn_button = ttk.Button(frame, text="Connect", command=self._connect)
|
30
|
-
self.conn_button.grid(row=0, column=2, sticky='e')
|
31
|
-
|
32
|
-
ttk.Label(frame, text="Encryption key:").grid(row=1, column=0, sticky='w')
|
33
|
-
|
34
|
-
self.key_entry = ttk.Entry(frame)
|
35
|
-
self.key_entry.grid(row=1, column=1, sticky='ew')
|
36
|
-
|
37
|
-
self.disconn_button = ttk.Button(frame, text="Disconnect", command=self._disconnect, state='disabled')
|
38
|
-
self.disconn_button.grid(row=1, column=2, sticky='e')
|
39
|
-
|
40
|
-
self._initial_connect()
|
41
|
-
|
42
|
-
def _connect(self) -> None:
|
43
|
-
"""Validate the connection string and encryption key
|
44
|
-
and connect to the database.
|
45
|
-
"""
|
46
|
-
conn_string = self.conn_entry.get()
|
47
|
-
crypto_key = self.key_entry.get()
|
48
|
-
|
49
|
-
if not crypto_util.validate_key(crypto_key):
|
50
|
-
messagebox.showerror("Invalid encryption key", "The entered encryption key is not a valid AES key.")
|
51
|
-
return
|
52
|
-
|
53
|
-
if db_util.connect(conn_string):
|
54
|
-
crypto_util.set_key(crypto_key)
|
55
|
-
self._set_state(True)
|
56
|
-
|
57
|
-
def _disconnect(self) -> None:
|
58
|
-
db_util.disconnect()
|
59
|
-
crypto_util.set_key(None)
|
60
|
-
self._set_state(False)
|
61
|
-
|
62
|
-
def _set_state(self, connected: bool) -> None:
|
63
|
-
if connected:
|
64
|
-
self.conn_entry.configure(state='disabled')
|
65
|
-
self.key_entry.configure(state='disabled')
|
66
|
-
self.conn_button.configure(state='disabled')
|
67
|
-
self.disconn_button.configure(state='normal')
|
68
|
-
else:
|
69
|
-
self.conn_entry.configure(state='normal')
|
70
|
-
self.key_entry.configure(state='normal')
|
71
|
-
self.conn_button.configure(state='normal')
|
72
|
-
self.disconn_button.configure(state='disabled')
|
73
|
-
|
74
|
-
def _initial_connect(self) -> None:
|
75
|
-
"""Check the environment for a connection string
|
76
|
-
and encryption key and connect to the database if both
|
77
|
-
are found.
|
78
|
-
"""
|
79
|
-
conn_string = os.environ.get('OpenOrchestratorConnString', None)
|
80
|
-
if conn_string:
|
81
|
-
self.conn_entry.insert(0, conn_string)
|
82
|
-
|
83
|
-
crypto_key = os.environ.get('OpenOrchestratorKey', None)
|
84
|
-
if crypto_key:
|
85
|
-
self.key_entry.insert(0, crypto_key)
|
86
|
-
|
87
|
-
if conn_string and crypto_key:
|
88
|
-
self._connect()
|
89
|
-
|
90
|
-
def new_key(self):
|
91
|
-
"""Creates a new encryption key and inserts it
|
92
|
-
into the key entry.
|
93
|
-
"""
|
94
|
-
key = crypto_util.generate_key().decode()
|
95
|
-
self.key_entry.delete(0, 'end')
|
96
|
-
self.key_entry.insert(0, key)
|
@@ -1,60 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.2
|
2
|
-
Name: OpenOrchestrator
|
3
|
-
Version: 1.3.1
|
4
|
-
Summary: A package containing OpenOrchestrator and OpenOrchestrator Scheduler
|
5
|
-
Author-email: ITK Development <itk-rpa@mkb.aarhus.dk>
|
6
|
-
Project-URL: Homepage, https://github.com/itk-dev-rpa/OpenOrchestrator
|
7
|
-
Project-URL: Bug Tracker, https://github.com/itk-dev-rpa/OpenOrchestrator/issues
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
10
|
-
Classifier: Operating System :: Microsoft :: Windows
|
11
|
-
Requires-Python: >=3.11
|
12
|
-
Description-Content-Type: text/markdown
|
13
|
-
License-File: LICENSE
|
14
|
-
Requires-Dist: cryptography>=41.0.3
|
15
|
-
Requires-Dist: cronsim>=2.6
|
16
|
-
Requires-Dist: SQLAlchemy>=2.0.22
|
17
|
-
Requires-Dist: pyodbc>=4.0.39
|
18
|
-
Requires-Dist: nicegui==1.4.12
|
19
|
-
Provides-Extra: dev
|
20
|
-
Requires-Dist: pylint; extra == "dev"
|
21
|
-
|
22
|
-
# OpenOrchestrator
|
23
|
-
|
24
|
-
Read the documentation [here](https://itk-dev-rpa.github.io/OpenOrchestrator-docs).
|
25
|
-
|
26
|
-
Package is located at https://pypi.org/project/OpenOrchestrator/
|
27
|
-
|
28
|
-
## Usage for Orchestrator admins
|
29
|
-
This module is used to run Orchestrator or Scheduler from the command line.
|
30
|
-
|
31
|
-
`python -m OpenOrchestrator -o` for orchestrator.
|
32
|
-
|
33
|
-
`python -m OpenOrchestrator -s` for scheduler.
|
34
|
-
|
35
|
-
## Usage for RPA developers
|
36
|
-
Import the connection module to your RPA code and get access to the orchestrator methods;
|
37
|
-
|
38
|
-
- logging status to OpenOrchestrator
|
39
|
-
- getting credentials and constants from OpenOrchestrator
|
40
|
-
- creating, getting and updating job elements in a queue
|
41
|
-
|
42
|
-
Run the code with arguments
|
43
|
-
```bash
|
44
|
-
python run.py "<process name>" "<connection string>" "<secret key>" "<arguments>"
|
45
|
-
```
|
46
|
-
|
47
|
-
```python
|
48
|
-
# run.py
|
49
|
-
# connect to OpenOprchestrator and log something
|
50
|
-
from OpenOrchestrator.orchestrator_connection.connection import OrchestratorConnection
|
51
|
-
|
52
|
-
oc = OrchestratorConnection.create_connection_from_args()
|
53
|
-
oc.log_trace("open orchestrator connected.")
|
54
|
-
```
|
55
|
-
|
56
|
-
|
57
|
-
## Setup
|
58
|
-
Requires Python 3.10 or later.
|
59
|
-
|
60
|
-
Install using `pip install OpenOrchestrator`
|
@@ -1,39 +0,0 @@
|
|
1
|
-
OpenOrchestrator/__init__.py,sha256=i4Ir68mBu7rrqhlEE6Qh_uyble599jaEWCEMf8g58tI,179
|
2
|
-
OpenOrchestrator/__main__.py,sha256=Oe3SbWqw3zUhpQpspUaS6mMddXxVvvV-pJbuBU_1GgA,518
|
3
|
-
OpenOrchestrator/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
OpenOrchestrator/common/connection_frame.py,sha256=NuRwbEZviOExszhspbETvHcMi7pS4cgOnwQBvAqAZc4,2838
|
5
|
-
OpenOrchestrator/common/crypto_util.py,sha256=VJ7fgxyjrW-bGQmsGVKXLUk98pcZGXG4faHtwxCWDDk,2440
|
6
|
-
OpenOrchestrator/common/datetime_util.py,sha256=4I70tz6WZGZ3xdxodJhdHJID14Y9myJTShFArOWCSpA,534
|
7
|
-
OpenOrchestrator/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
-
OpenOrchestrator/database/constants.py,sha256=ik6lY6IR8EOyKEg-N70X-0U654i3nFb3u-XWhqbUbJU,2404
|
9
|
-
OpenOrchestrator/database/db_util.py,sha256=YI6QU61LVm-WkMtLlHPDZMFkXsApRiEtD7jShDN9J8E,28736
|
10
|
-
OpenOrchestrator/database/logs.py,sha256=h2BztjmDRhj8TACYN3LK5c9hIqn5xCs9m_LDUdYYHEk,1623
|
11
|
-
OpenOrchestrator/database/queues.py,sha256=GYrTktg-RiHef-nFAXGAR9Ne0MIiRipxkAXv-CGc0_Q,2292
|
12
|
-
OpenOrchestrator/database/triggers.py,sha256=cO3-dq5-Ib4P_F6p5EgU02XgaRaiIgs6CKqsY0SnDBk,4028
|
13
|
-
OpenOrchestrator/database/truncated_string.py,sha256=v5TvMn3Sof9sG3RzHZx5_wRGBZ5IcJTsiyIO20MjehA,521
|
14
|
-
OpenOrchestrator/orchestrator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
OpenOrchestrator/orchestrator/application.py,sha256=Sb0rMrlFsvwkXuTLvBLqTUNqFSYjvdrAz3keiQYiUvY,3224
|
16
|
-
OpenOrchestrator/orchestrator/datetime_input.py,sha256=GmQ7kVe_QgOsFF7okJJshjaTQ7P-Epe3lxOJ1u21Z0k,3011
|
17
|
-
OpenOrchestrator/orchestrator/popups/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
OpenOrchestrator/orchestrator/popups/constant_popup.py,sha256=58Yhyz7dW0I_1Vly0U54NEpwWHhEmwLr34z2nUpQAgs,3435
|
19
|
-
OpenOrchestrator/orchestrator/popups/credential_popup.py,sha256=4uY4mhD-EGOnOCu9GN4JPecoCbKj067kdSs1kMutpv8,3909
|
20
|
-
OpenOrchestrator/orchestrator/popups/generic_popups.py,sha256=wV5isJrwFGUBpDhDpuOzzURwU4NTp4l5mzMDg-KebKw,1061
|
21
|
-
OpenOrchestrator/orchestrator/popups/trigger_popup.py,sha256=4cnZxzXieb473H4zqH37TvTsXyj0Bk2YwPURIcrVL_w,10034
|
22
|
-
OpenOrchestrator/orchestrator/tabs/constants_tab.py,sha256=dSnfWbZeCndsd8vzVEyRJFEyEUPnP-RAY2YwCCi7Omw,2485
|
23
|
-
OpenOrchestrator/orchestrator/tabs/logging_tab.py,sha256=kLl2QplqGEkvWwmXlr3wfZEFf-XXqctOeQN8hcpMBQw,3589
|
24
|
-
OpenOrchestrator/orchestrator/tabs/queue_tab.py,sha256=ZjN_rWUZ99alunztxEMMI-OYIYvzMlulwmzuMoO2wlU,5820
|
25
|
-
OpenOrchestrator/orchestrator/tabs/settings_tab.py,sha256=9_B5K__GtUVWFxBD4XQ1KiGOx5a7VxiMz4WjJHoWuVE,852
|
26
|
-
OpenOrchestrator/orchestrator/tabs/trigger_tab.py,sha256=bBIyQSbfL6zBEiA8ZlhzVR3u6AdsAOlp-L5MVW4rz08,4035
|
27
|
-
OpenOrchestrator/orchestrator_connection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
|
-
OpenOrchestrator/orchestrator_connection/connection.py,sha256=whw3pbCiTwVoy4bmgdkaxBjPOpsHhGmpz7dHGlsYZjY,8923
|
29
|
-
OpenOrchestrator/scheduler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
|
-
OpenOrchestrator/scheduler/application.py,sha256=vjDzW8x0MwS9giFI6UOlhtFqUPHKbsRnrb6-HY8jWOI,1620
|
31
|
-
OpenOrchestrator/scheduler/connection_frame.py,sha256=Ufltek3jyX0Fm20A5JxSGQPuftqtY5BvodfLFOkmm8U,3378
|
32
|
-
OpenOrchestrator/scheduler/run_tab.py,sha256=QP-hoZEJAI5A-T7kV1lFCftpTm_e_R3T8I2Fg9BHxnA,5779
|
33
|
-
OpenOrchestrator/scheduler/runner.py,sha256=5F9eGlo8AsUx8WgeGxCe4k33NBPUzpsqTnVRS7_NaGQ,8348
|
34
|
-
OpenOrchestrator/scheduler/settings_tab.py,sha256=AQxt5HxPn4sLfj-6GwyAQ8ffJ35D0PHLBVoi8W3tu2A,613
|
35
|
-
openorchestrator-1.3.1.dist-info/LICENSE,sha256=4-Kjm-gkbiOLCBYMzsVJZEepdsm2vk8QesNOASvi9mg,1068
|
36
|
-
openorchestrator-1.3.1.dist-info/METADATA,sha256=bUdhPWKlsWDPn9DBm1ekvZMJ-QPly4hDrPNB2OIBdX8,1929
|
37
|
-
openorchestrator-1.3.1.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
38
|
-
openorchestrator-1.3.1.dist-info/top_level.txt,sha256=2btKMQESHuRC_ICbCjHTHH_-us2G7CyeskeaSTTL07Y,17
|
39
|
-
openorchestrator-1.3.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|