omnata-plugin-devkit 0.13.2a188__tar.gz → 0.13.3__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.2a188 → omnata_plugin_devkit-0.13.3}/PKG-INFO +1 -1
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/pyproject.toml +1 -1
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CONFIGURE_APIS.sql.jinja +6 -2
- omnata_plugin_devkit-0.13.3/src/omnata_plugin_devkit/jinja_templates/CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING.sql.jinja +54 -0
- omnata_plugin_devkit-0.13.2a188/src/omnata_plugin_devkit/jinja_templates/CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING.sql.jinja +0 -82
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/LICENSE +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/README.md +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/airbyte_wrapper.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/cli/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/development.ipynb +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/development_session.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/initialiser.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/API_LIMITS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/ASSIGN_OUTBOUND_TARGET_TYPE.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CHECK_CONNECTION_PROGRESS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CONFIGURATION_FORM.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CONNECTION_FORM.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CONNECTION_TEST.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CONSTRUCT_FORM_OPTION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CREATE_BILLING_EVENTS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CREATE_GENERIC_SECRET_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CREATE_NETWORK_RULE_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CREATE_NETWORK_RULE_OBJECT_FROM_EXISTING.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/CREATE_OAUTH_SECRET_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/DROP_NETWORK_RULES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/DROP_SECRETS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/FETCH_CONNECTIONS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/FETCH_SYNCS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/FETCH_SYNC_BRANCHES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/GET_MISSING_APP_PRIVILEGES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/INBOUND_LIST_STREAMS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/LIST_APP_SPECIFICATIONS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/LIST_STAGES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/NETWORK_ADDRESSES.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/NGROK_POST_TUNNEL_FIELDS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/OUTBOUND_RECORD_VALIDATOR.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/PENDING_API_CONFIGURATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/POST_INSTALL_ACTIONS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/RENAME_CONNECTION_METHODS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/RETRIEVE_NETWORK_RULE_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/RETRIEVE_SECRETS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/RETRIEVE_SECRETS_UDF.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/SET_CONNECTION_OBJECTS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/SET_EAI_ENABLED.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/SET_EAI_SPECIFICATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/SET_SI_SPECIFICATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/SYNC.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/TEST_CALLBACK.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/TEST_OAUTH_TOKEN_EXISTS.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/TUNNEL_TEST.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/UPDATE_API_CONFIGURATION.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/UPDATE_GENERIC_SECRET_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/UPDATE_GENERIC_SECRET_OBJECT_OLD.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/UPDATE_NETWORK_RULE_OBJECT.sql.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/jinja_templates/manifest.yml.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/native_app_packaging.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/plugin_registration.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/plugin_template/icon.svg +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/plugin_template/plugin.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/plugin_template/plugin_development.ipynb +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/plugin_template/requirements.txt +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/plugin_uploader.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/api/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/api/config.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/api/constants.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/api/exceptions.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/api/secure_path.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/api/secure_utils.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/api/utils/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/api/utils/types.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/app/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/app/snow_connector.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/plugins/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/models.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/package/__init__.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/package_utils.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/snowpark_shared.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/venv.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/plugins/snowpark/zipper.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/snowcli/cli/templates/environment.yml.jinja +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/streamlit/plugin_configuration.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/test_step_definitions.py +0 -0
- {omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/utils.py +0 -0
|
@@ -106,7 +106,9 @@ try{
|
|
|
106
106
|
binds:[]
|
|
107
107
|
} ).execute();
|
|
108
108
|
}
|
|
109
|
-
catch(e){
|
|
109
|
+
catch(e){
|
|
110
|
+
snowflake.log("error", e.message);
|
|
111
|
+
}
|
|
110
112
|
|
|
111
113
|
// Create the single-argument version only when exactly one other application is visible,
|
|
112
114
|
// hard-coding the resolved sync engine name for callers that don't specify one.
|
|
@@ -128,7 +130,9 @@ try{
|
|
|
128
130
|
binds:[]
|
|
129
131
|
} ).execute();
|
|
130
132
|
}
|
|
131
|
-
catch(e){
|
|
133
|
+
catch(e){
|
|
134
|
+
snowflake.log("error", e.message);
|
|
135
|
+
}
|
|
132
136
|
}
|
|
133
137
|
|
|
134
138
|
// Collect all visible EAIs. V2 EAIs contain "__" and are always considered.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
create or replace procedure PLUGIN.CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING(SECRET_NAME VARCHAR,SECRET_TO_CLONE VARCHAR,KEYS_TO_INCLUDE ARRAY)
|
|
2
|
+
returns object
|
|
3
|
+
language javascript
|
|
4
|
+
COMMENT = $$
|
|
5
|
+
Creates a generic secret object, using an existing object as a starting point.
|
|
6
|
+
$$
|
|
7
|
+
execute as owner
|
|
8
|
+
as
|
|
9
|
+
$$
|
|
10
|
+
try{
|
|
11
|
+
// retrieve the existing secrets
|
|
12
|
+
var results = snowflake.createStatement( {
|
|
13
|
+
sqlText: `call RETRIEVE_SECRETS(null,?)`,
|
|
14
|
+
binds:[SECRET_TO_CLONE]
|
|
15
|
+
} ).execute();
|
|
16
|
+
results.next();
|
|
17
|
+
var procResult = results.getColumnValue(1);
|
|
18
|
+
if (procResult.success===false){
|
|
19
|
+
throw procResult.error;
|
|
20
|
+
}
|
|
21
|
+
var existingSecrets = procResult.data;
|
|
22
|
+
if (KEYS_TO_INCLUDE != null){
|
|
23
|
+
// pick out the specific keys from the KEYS_TO_INCLUDE array
|
|
24
|
+
existingSecrets = KEYS_TO_INCLUDE.reduce((acc,key) => {
|
|
25
|
+
acc[key] = existingSecrets[key];
|
|
26
|
+
return acc;
|
|
27
|
+
}, {})
|
|
28
|
+
}
|
|
29
|
+
// create the secret object by calling the regular proc
|
|
30
|
+
var results = snowflake.createStatement( {
|
|
31
|
+
sqlText: `call CREATE_GENERIC_SECRET_OBJECT(?,?)`,
|
|
32
|
+
binds:[SECRET_NAME,JSON.stringify(existingSecrets)]
|
|
33
|
+
} ).execute();
|
|
34
|
+
results.next();
|
|
35
|
+
var procResult = results.getColumnValue(1);
|
|
36
|
+
if (procResult.success===false){
|
|
37
|
+
throw procResult.error;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
"success": true,
|
|
41
|
+
"data": null
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch(e){
|
|
45
|
+
return {
|
|
46
|
+
"success": false,
|
|
47
|
+
"error": `CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING: ${String(e)}`
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
$$
|
|
51
|
+
;
|
|
52
|
+
|
|
53
|
+
grant usage on procedure PLUGIN.CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING(VARCHAR,VARCHAR,ARRAY)
|
|
54
|
+
to application role OMNATA_MANAGEMENT;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
create or replace procedure PLUGIN.CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING(
|
|
2
|
-
SECRET_NAME VARCHAR,
|
|
3
|
-
SECRET_TO_CLONE VARCHAR,
|
|
4
|
-
KEYS_TO_INCLUDE ARRAY,
|
|
5
|
-
NEW_CONTENTS_TO_MERGE VARCHAR DEFAULT NULL
|
|
6
|
-
)
|
|
7
|
-
returns object
|
|
8
|
-
language python
|
|
9
|
-
RUNTIME_VERSION = '3.10'
|
|
10
|
-
PACKAGES = ({{packages}})
|
|
11
|
-
HANDLER = 'run'
|
|
12
|
-
COMMENT = $$
|
|
13
|
-
Creates a generic secret object using an existing secret as the seed.
|
|
14
|
-
- KEYS_TO_INCLUDE (optional): if provided, restrict the cloned content to
|
|
15
|
-
these keys before any merging.
|
|
16
|
-
- NEW_CONTENTS_TO_MERGE (optional): JSON object string whose entries are
|
|
17
|
-
merged on top of the cloned content (overwriting matching keys). Use
|
|
18
|
-
this to add or update fields in one shot without a second proc call.
|
|
19
|
-
The write itself is delegated to CREATE_GENERIC_SECRET_OBJECT, which uses a
|
|
20
|
-
dollar-quoted SECRET_STRING literal to avoid bind-parameter escape
|
|
21
|
-
interpretation that corrupts newlines in PEM values.
|
|
22
|
-
$$
|
|
23
|
-
execute as owner
|
|
24
|
-
as
|
|
25
|
-
$$
|
|
26
|
-
import json
|
|
27
|
-
from logging import getLogger
|
|
28
|
-
logger = getLogger(__name__)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def _call_proc(session, sql, params):
|
|
32
|
-
rows = session.sql(sql, params=params).collect()
|
|
33
|
-
if not rows:
|
|
34
|
-
raise RuntimeError(f"delegate proc returned no rows: {sql}")
|
|
35
|
-
val = rows[0][0]
|
|
36
|
-
if isinstance(val, str):
|
|
37
|
-
try:
|
|
38
|
-
val = json.loads(val)
|
|
39
|
-
except json.JSONDecodeError:
|
|
40
|
-
pass
|
|
41
|
-
if isinstance(val, dict) and val.get('success') is False:
|
|
42
|
-
raise RuntimeError(val.get('error') or f"delegate proc failed: {sql}")
|
|
43
|
-
return val.get('data') if isinstance(val, dict) else val
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def run(session, secret_name, secret_to_clone, keys_to_include, new_contents_to_merge):
|
|
47
|
-
try:
|
|
48
|
-
existing = _call_proc(
|
|
49
|
-
session,
|
|
50
|
-
"call PLUGIN.RETRIEVE_SECRETS(NULL, ?)",
|
|
51
|
-
[secret_to_clone],
|
|
52
|
-
) or {}
|
|
53
|
-
if not isinstance(existing, dict):
|
|
54
|
-
existing = {}
|
|
55
|
-
if keys_to_include is not None:
|
|
56
|
-
existing = {k: existing[k] for k in keys_to_include if k in existing}
|
|
57
|
-
if new_contents_to_merge is not None:
|
|
58
|
-
try:
|
|
59
|
-
new_dict = json.loads(new_contents_to_merge)
|
|
60
|
-
except (TypeError, json.JSONDecodeError) as parse_err:
|
|
61
|
-
raise ValueError(
|
|
62
|
-
f"NEW_CONTENTS_TO_MERGE must be a JSON object string: {parse_err}"
|
|
63
|
-
) from parse_err
|
|
64
|
-
if not isinstance(new_dict, dict):
|
|
65
|
-
raise ValueError("NEW_CONTENTS_TO_MERGE must decode to a JSON object")
|
|
66
|
-
existing = {**existing, **new_dict}
|
|
67
|
-
_call_proc(
|
|
68
|
-
session,
|
|
69
|
-
"call PLUGIN.CREATE_GENERIC_SECRET_OBJECT(?, ?)",
|
|
70
|
-
[secret_name, json.dumps(existing)],
|
|
71
|
-
)
|
|
72
|
-
return {"success": True, "data": None}
|
|
73
|
-
except Exception as e:
|
|
74
|
-
return {
|
|
75
|
-
"success": False,
|
|
76
|
-
"error": f"CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING: {str(e)}",
|
|
77
|
-
}
|
|
78
|
-
$$
|
|
79
|
-
;
|
|
80
|
-
|
|
81
|
-
grant usage on procedure PLUGIN.CREATE_GENERIC_SECRET_OBJECT_FROM_EXISTING(VARCHAR, VARCHAR, ARRAY, VARCHAR)
|
|
82
|
-
to application role OMNATA_MANAGEMENT;
|
|
File without changes
|
|
File without changes
|
{omnata_plugin_devkit-0.13.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/__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
|
|
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.2a188 → omnata_plugin_devkit-0.13.3}/src/omnata_plugin_devkit/utils.py
RENAMED
|
File without changes
|