|
|
|
@ -351,6 +351,10 @@ class PluginService:
|
|
|
|
@staticmethod
|
|
|
|
@staticmethod
|
|
|
|
def install_from_local_pkg(tenant_id: str, plugin_unique_identifiers: Sequence[str]):
|
|
|
|
def install_from_local_pkg(tenant_id: str, plugin_unique_identifiers: Sequence[str]):
|
|
|
|
manager = PluginInstaller()
|
|
|
|
manager = PluginInstaller()
|
|
|
|
|
|
|
|
for plugin_unique_identifier in plugin_unique_identifiers:
|
|
|
|
|
|
|
|
resp = manager.decode_plugin_from_identifier(tenant_id, plugin_unique_identifier)
|
|
|
|
|
|
|
|
PluginService._check_plugin_installation_availability(resp.verification)
|
|
|
|
|
|
|
|
|
|
|
|
return manager.install_from_identifiers(
|
|
|
|
return manager.install_from_identifiers(
|
|
|
|
tenant_id,
|
|
|
|
tenant_id,
|
|
|
|
plugin_unique_identifiers,
|
|
|
|
plugin_unique_identifiers,
|
|
|
|
@ -365,6 +369,8 @@ class PluginService:
|
|
|
|
returns plugin_unique_identifier
|
|
|
|
returns plugin_unique_identifier
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
manager = PluginInstaller()
|
|
|
|
manager = PluginInstaller()
|
|
|
|
|
|
|
|
plugin_decode_response = manager.decode_plugin_from_identifier(tenant_id, plugin_unique_identifier)
|
|
|
|
|
|
|
|
PluginService._check_plugin_installation_availability(plugin_decode_response.verification)
|
|
|
|
return manager.install_from_identifiers(
|
|
|
|
return manager.install_from_identifiers(
|
|
|
|
tenant_id,
|
|
|
|
tenant_id,
|
|
|
|
[plugin_unique_identifier],
|
|
|
|
[plugin_unique_identifier],
|
|
|
|
@ -421,6 +427,9 @@ class PluginService:
|
|
|
|
for plugin_unique_identifier in plugin_unique_identifiers:
|
|
|
|
for plugin_unique_identifier in plugin_unique_identifiers:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
manager.fetch_plugin_manifest(tenant_id, plugin_unique_identifier)
|
|
|
|
manager.fetch_plugin_manifest(tenant_id, plugin_unique_identifier)
|
|
|
|
|
|
|
|
plugin_decode_response = manager.decode_plugin_from_identifier(tenant_id, plugin_unique_identifier)
|
|
|
|
|
|
|
|
# check if the plugin is available to install
|
|
|
|
|
|
|
|
PluginService._check_plugin_installation_availability(plugin_decode_response.verification)
|
|
|
|
# already downloaded, skip
|
|
|
|
# already downloaded, skip
|
|
|
|
except Exception:
|
|
|
|
except Exception:
|
|
|
|
# plugin not installed, download and upload pkg
|
|
|
|
# plugin not installed, download and upload pkg
|
|
|
|
|