omnata-plugin-devkit 0.13.13__tar.gz → 0.14.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.
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/PKG-INFO +3 -3
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/pyproject.toml +3 -3
- omnata_plugin_devkit-0.14.0/src/omnata_plugin_devkit/jinja_templates/CREATE_BILLING_EVENTS.sql.jinja +92 -0
- omnata_plugin_devkit-0.13.13/src/omnata_plugin_devkit/jinja_templates/CREATE_BILLING_EVENTS.sql.jinja +0 -45
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/LICENSE +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/README.md +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/airbyte_wrapper.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/cli/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/development.ipynb +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/development_session.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/initialiser.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/API_LIMITS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/ASSIGN_OUTBOUND_TARGET_TYPE.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CHECK_CONNECTION_PROGRESS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CONFIGURATION_FORM.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CONFIGURE_APIS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CONNECTION_FORM.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CONNECTION_TEST.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CONSTRUCT_FORM_OPTION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CREATE_GENERIC_SECRET_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CREATE_NETWORK_RULE_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CREATE_NETWORK_RULE_OBJECT_FROM_EXISTING.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/CREATE_OAUTH_SECRET_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/DROP_CONFIGURATION_DEFINITION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/DROP_INTEGRATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/DROP_NETWORK_RULES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/DROP_SECRETS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/DROP_SPECIFICATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/FETCH_CONNECTIONS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/FETCH_SYNCS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/FETCH_SYNC_BRANCHES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/GET_MISSING_APP_PRIVILEGES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/INBOUND_LIST_STREAMS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/LIST_APP_SPECIFICATIONS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/LIST_STAGES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/NETWORK_ADDRESSES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/NGROK_POST_TUNNEL_FIELDS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/OUTBOUND_RECORD_VALIDATOR.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/PENDING_API_CONFIGURATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/POST_INSTALL_ACTIONS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/RENAME_CONNECTION_METHODS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/RETRIEVE_NETWORK_RULE_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/RETRIEVE_SECRETS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/RETRIEVE_SECRETS_UDF.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/SET_CONNECTION_OBJECTS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/SET_EAI_ACTIVE.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/SET_EAI_SPECIFICATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/SET_SI_SPECIFICATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/SYNC.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/TEST_CALLBACK.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/TEST_OAUTH_TOKEN_EXISTS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/TUNNEL_TEST.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/UPDATE_API_CONFIGURATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/UPDATE_GENERIC_SECRET_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/UPDATE_GENERIC_SECRET_OBJECT_OLD.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/UPDATE_NETWORK_RULE_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/jinja_templates/manifest.yml.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/native_app_packaging.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/plugin_registration.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/plugin_template/icon.svg +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/plugin_template/plugin.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/plugin_template/plugin_development.ipynb +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/plugin_template/requirements.txt +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/plugin_uploader.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/api/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/api/config.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/api/constants.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/api/exceptions.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/api/secure_path.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/api/secure_utils.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/api/utils/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/api/utils/types.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/app/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/app/snow_connector.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/plugins/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/models.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/package/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/package_utils.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/snowpark_shared.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/venv.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/zipper.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/snowcli/cli/templates/environment.yml.jinja +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/streamlit/plugin_configuration.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/test_step_definitions.py +0 -0
- {omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/utils.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: omnata-plugin-devkit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.0
|
|
4
4
|
Summary:
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: James Weakley
|
|
7
7
|
Author-email: james.weakley@omnata.com
|
|
8
|
-
Requires-Python: >=3.10
|
|
8
|
+
Requires-Python: >=3.10,<3.14
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
14
|
Requires-Dist: behave (>=1.2,<2.0)
|
|
15
15
|
Requires-Dist: behave_pandas (>=0.5.0,<0.6.0)
|
|
16
|
-
Requires-Dist: omnata-plugin-runtime (>=0.
|
|
16
|
+
Requires-Dist: omnata-plugin-runtime (>=0.14.0)
|
|
17
17
|
Requires-Dist: omnata_cli (>=0.2.3,<0.3.0)
|
|
18
18
|
Requires-Dist: pyparsing (>=3.0)
|
|
19
19
|
Requires-Dist: python-slugify (>=8,<9)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "omnata-plugin-devkit"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.14.0"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["James Weakley <james.weakley@omnata.com>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -8,9 +8,9 @@ packages = [{ include = "omnata_plugin_devkit", from = "src" }]
|
|
|
8
8
|
|
|
9
9
|
[tool.poetry.dependencies]
|
|
10
10
|
# support 3.10 - 3.13
|
|
11
|
-
python = ">=3.10,
|
|
11
|
+
python = ">=3.10, <3.14"
|
|
12
12
|
omnata_cli = "^0.2.3"
|
|
13
|
-
omnata-plugin-runtime = ">=0.
|
|
13
|
+
omnata-plugin-runtime = ">=0.14.0"
|
|
14
14
|
#pandas = "^2,<=2.3.3"
|
|
15
15
|
#numpy = "<=2.3.5"
|
|
16
16
|
#jinja2 = "^3,<=3.1.6"
|
omnata_plugin_devkit-0.14.0/src/omnata_plugin_devkit/jinja_templates/CREATE_BILLING_EVENTS.sql.jinja
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
create or replace procedure PLUGIN.CREATE_BILLING_EVENTS(BILLING_EVENT_REQUEST OBJECT)
|
|
2
|
+
returns object
|
|
3
|
+
language python
|
|
4
|
+
RUNTIME_VERSION = '3.10'
|
|
5
|
+
PACKAGES = ({{packages}})
|
|
6
|
+
IMPORTS = ('/app.zip')
|
|
7
|
+
HANDLER = 'run'
|
|
8
|
+
COMMENT = $$
|
|
9
|
+
Instructs the plugin app to create a set of billing events.
|
|
10
|
+
This is done so that the billing is associated with the plugin listing instead of the sync engine.
|
|
11
|
+
This is a legacy proc, replaced by the one below it which takes complete billing events from the sync engine.
|
|
12
|
+
$$
|
|
13
|
+
execute as owner
|
|
14
|
+
as
|
|
15
|
+
$$
|
|
16
|
+
from logging import getLogger
|
|
17
|
+
from omnata_plugin_runtime.logging import log_exception
|
|
18
|
+
import json
|
|
19
|
+
logger = getLogger(__name__)
|
|
20
|
+
def run(session,billing_event_request):
|
|
21
|
+
try:
|
|
22
|
+
logger.info('plugin entrypoint wrapper')
|
|
23
|
+
from omnata_plugin_runtime.plugin_entrypoints import PluginEntrypoint
|
|
24
|
+
logger.info('importing plugin {{plugin_class_name}} from module {{plugin_class_module}}')
|
|
25
|
+
entrypoint = PluginEntrypoint(session=session,
|
|
26
|
+
plugin_fqn='{{plugin_fqn}}',
|
|
27
|
+
module_name='{{plugin_class_module}}',
|
|
28
|
+
class_name='{{plugin_class_name}}'
|
|
29
|
+
)
|
|
30
|
+
result = entrypoint.create_billing_events(session,billing_event_request)
|
|
31
|
+
logger.info(f'result from plugin: {result}')
|
|
32
|
+
return {
|
|
33
|
+
"success": True,
|
|
34
|
+
"data": result
|
|
35
|
+
}
|
|
36
|
+
except Exception as exception:
|
|
37
|
+
log_exception(exception,logger)
|
|
38
|
+
return {
|
|
39
|
+
"success": False,
|
|
40
|
+
"error": f"CREATE_BILLING_EVENTS: {str(exception)}"
|
|
41
|
+
}
|
|
42
|
+
$$
|
|
43
|
+
;
|
|
44
|
+
|
|
45
|
+
grant usage on procedure PLUGIN.CREATE_BILLING_EVENTS(OBJECT)
|
|
46
|
+
to application role OMNATA_MANAGEMENT;
|
|
47
|
+
|
|
48
|
+
create or replace procedure PLUGIN.CREATE_BILLING_EVENTS(BILLING_EVENT_REQUEST ARRAY)
|
|
49
|
+
returns object
|
|
50
|
+
language python
|
|
51
|
+
RUNTIME_VERSION = '3.10'
|
|
52
|
+
PACKAGES = ({{packages}})
|
|
53
|
+
IMPORTS = ('/app.zip')
|
|
54
|
+
HANDLER = 'run'
|
|
55
|
+
COMMENT = $$
|
|
56
|
+
Instructs the plugin app to create a set of billing events which are provided from the sync engine.
|
|
57
|
+
This is done so that the billing is associated with the plugin listing instead of the sync engine.
|
|
58
|
+
$$
|
|
59
|
+
execute as owner
|
|
60
|
+
as
|
|
61
|
+
$$
|
|
62
|
+
from logging import getLogger
|
|
63
|
+
from omnata_plugin_runtime.logging import log_exception
|
|
64
|
+
import json
|
|
65
|
+
logger = getLogger(__name__)
|
|
66
|
+
def run(session,billing_event_request):
|
|
67
|
+
try:
|
|
68
|
+
logger.info('plugin entrypoint wrapper')
|
|
69
|
+
from omnata_plugin_runtime.plugin_entrypoints import PluginEntrypoint
|
|
70
|
+
logger.info('importing plugin {{plugin_class_name}} from module {{plugin_class_module}}')
|
|
71
|
+
entrypoint = PluginEntrypoint(session=session,
|
|
72
|
+
plugin_fqn='{{plugin_fqn}}',
|
|
73
|
+
module_name='{{plugin_class_module}}',
|
|
74
|
+
class_name='{{plugin_class_name}}'
|
|
75
|
+
)
|
|
76
|
+
result = entrypoint.create_billing_events_from_sync_engine(session,billing_event_request)
|
|
77
|
+
logger.info(f'result from plugin: {result}')
|
|
78
|
+
return {
|
|
79
|
+
"success": True,
|
|
80
|
+
"data": result
|
|
81
|
+
}
|
|
82
|
+
except Exception as exception:
|
|
83
|
+
log_exception(exception,logger)
|
|
84
|
+
return {
|
|
85
|
+
"success": False,
|
|
86
|
+
"error": f"CREATE_BILLING_EVENTS: {str(exception)}"
|
|
87
|
+
}
|
|
88
|
+
$$
|
|
89
|
+
;
|
|
90
|
+
|
|
91
|
+
grant usage on procedure PLUGIN.CREATE_BILLING_EVENTS(ARRAY)
|
|
92
|
+
to application role OMNATA_MANAGEMENT;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
create or replace procedure PLUGIN.CREATE_BILLING_EVENTS(BILLING_EVENT_REQUEST OBJECT)
|
|
2
|
-
returns object
|
|
3
|
-
language python
|
|
4
|
-
RUNTIME_VERSION = '3.10'
|
|
5
|
-
PACKAGES = ({{packages}})
|
|
6
|
-
IMPORTS = ('/app.zip')
|
|
7
|
-
HANDLER = 'run'
|
|
8
|
-
COMMENT = $$
|
|
9
|
-
Instructs the plugin app to create a set of billing events.
|
|
10
|
-
This is done so that the billing is associated with the plugin listing instead of the sync engine.
|
|
11
|
-
$$
|
|
12
|
-
execute as owner
|
|
13
|
-
as
|
|
14
|
-
$$
|
|
15
|
-
from logging import getLogger
|
|
16
|
-
from omnata_plugin_runtime.logging import log_exception
|
|
17
|
-
import json
|
|
18
|
-
logger = getLogger(__name__)
|
|
19
|
-
def run(session,billing_event_request):
|
|
20
|
-
try:
|
|
21
|
-
logger.info('plugin entrypoint wrapper')
|
|
22
|
-
from omnata_plugin_runtime.plugin_entrypoints import PluginEntrypoint
|
|
23
|
-
logger.info('importing plugin {{plugin_class_name}} from module {{plugin_class_module}}')
|
|
24
|
-
entrypoint = PluginEntrypoint(session=session,
|
|
25
|
-
plugin_fqn='{{plugin_fqn}}',
|
|
26
|
-
module_name='{{plugin_class_module}}',
|
|
27
|
-
class_name='{{plugin_class_name}}'
|
|
28
|
-
)
|
|
29
|
-
result = entrypoint.create_billing_events(session,billing_event_request)
|
|
30
|
-
logger.info(f'result from plugin: {result}')
|
|
31
|
-
return {
|
|
32
|
-
"success": True,
|
|
33
|
-
"data": result
|
|
34
|
-
}
|
|
35
|
-
except Exception as exception:
|
|
36
|
-
log_exception(exception,logger)
|
|
37
|
-
return {
|
|
38
|
-
"success": False,
|
|
39
|
-
"error": f"CREATE_BILLING_EVENTS: {str(exception)}"
|
|
40
|
-
}
|
|
41
|
-
$$
|
|
42
|
-
;
|
|
43
|
-
|
|
44
|
-
grant usage on procedure PLUGIN.CREATE_BILLING_EVENTS(OBJECT)
|
|
45
|
-
to application role OMNATA_MANAGEMENT;
|
|
File without changes
|
|
File without changes
|
{omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/initialiser.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
|
|
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
|
|
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
|
|
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
|
{omnata_plugin_devkit-0.13.13 → omnata_plugin_devkit-0.14.0}/src/omnata_plugin_devkit/utils.py
RENAMED
|
File without changes
|