dt-extensions-sdk 1.1.7__py3-none-any.whl → 1.1.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dt-extensions-sdk
3
- Version: 1.1.7
3
+ Version: 1.1.8
4
4
  Project-URL: Documentation, https://github.com/dynatrace-extensions/dt-extensions-python-sdk#readme
5
5
  Project-URL: Issues, https://github.com/dynatrace-extensions/dt-extensions-python-sdk/issues
6
6
  Project-URL: Source, https://github.com/dynatrace-extensions/dt-extensions-python-sdk
@@ -1,7 +1,7 @@
1
- dynatrace_extension/__about__.py,sha256=VBKHua6arVUqC3Y_XtiYN45BWPreV_mbmmN1Bq42_VQ,112
1
+ dynatrace_extension/__about__.py,sha256=pm-K9JZTFRwIzFyc-6GXETDQNV0BHdoX979iqLHl_fQ,112
2
2
  dynatrace_extension/__init__.py,sha256=XYHyWducrLWengm6jcCZMYAHzaQwQfoJKzKT4QvhTxE,779
3
3
  dynatrace_extension/cli/__init__.py,sha256=eg2YQkeboIfJ_hcUGp1WFEvT-moa2qGGN-L9RjTbxCM,128
4
- dynatrace_extension/cli/main.py,sha256=x0IUINQH8d-8YSEPyO9zdNgMDo-qJYt0MgO16Ibxzzg,16525
4
+ dynatrace_extension/cli/main.py,sha256=XPFSKn_4C4S39tEJNm-mOUIjOgw5FmU_a0Prk9ipyUY,16545
5
5
  dynatrace_extension/cli/schema.py,sha256=Fiks7vS69M52O3_pvdzkKk2X0zBhE8maforvRY9eUIU,3359
6
6
  dynatrace_extension/cli/create/__init__.py,sha256=_MjYuWPJo7_NbGRqjWZ9DNzkfevz_Br2Yc90__f22yY,73
7
7
  dynatrace_extension/cli/create/create.py,sha256=Wkkp4AuRID18k9EUJdVZ3GP2US35OF5h6jooKJY2CLM,2784
@@ -26,8 +26,8 @@ dynatrace_extension/sdk/vendor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
26
26
  dynatrace_extension/sdk/vendor/mureq/LICENSE,sha256=_rKBhB1pJYXjxjBCdOSIkv_slxWbhEXVBXXZs1MdpQQ,684
27
27
  dynatrace_extension/sdk/vendor/mureq/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  dynatrace_extension/sdk/vendor/mureq/mureq.py,sha256=gKzGiPmZ2g74Nb8K_6bu0f2coWZHZiZ2aXGzG2Pimlg,15102
29
- dt_extensions_sdk-1.1.7.dist-info/METADATA,sha256=sUYVLisO_ICY8VFe91nCSbsOcgIqAZBrTwn76xE4tRU,2793
30
- dt_extensions_sdk-1.1.7.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
31
- dt_extensions_sdk-1.1.7.dist-info/entry_points.txt,sha256=pweyOCgENGHjOlT6_kXYaBPOrE3p18K0UettqnNlnoE,55
32
- dt_extensions_sdk-1.1.7.dist-info/licenses/LICENSE.txt,sha256=k7kok_OTpJ5sfb5ANni8wu-Q1lXw8OQjNZXdrTGhFKc,1087
33
- dt_extensions_sdk-1.1.7.dist-info/RECORD,,
29
+ dt_extensions_sdk-1.1.8.dist-info/METADATA,sha256=elOFKmf7X07WaTo3wPPKqrQKmSRRLP5LBrFo8NcjYQQ,2793
30
+ dt_extensions_sdk-1.1.8.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
31
+ dt_extensions_sdk-1.1.8.dist-info/entry_points.txt,sha256=pweyOCgENGHjOlT6_kXYaBPOrE3p18K0UettqnNlnoE,55
32
+ dt_extensions_sdk-1.1.8.dist-info/licenses/LICENSE.txt,sha256=k7kok_OTpJ5sfb5ANni8wu-Q1lXw8OQjNZXdrTGhFKc,1087
33
+ dt_extensions_sdk-1.1.8.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2023-present Dynatrace LLC
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "1.1.7"
4
+ __version__ = "1.1.8"
@@ -7,6 +7,8 @@ from pathlib import Path
7
7
  from typing import List, Optional
8
8
 
9
9
  import typer
10
+ from dtcli.server_api import upload as dt_cli_upload
11
+ from dtcli.server_api import validate as dt_cli_validate
10
12
  from rich.console import Console
11
13
 
12
14
  from ..__about__ import __version__
@@ -277,7 +279,7 @@ def upload(
277
279
  :param api_token: The Dynatrace API token
278
280
  :param validate: If true, only validate the extension and exit
279
281
  """
280
- action = "upload" if not validate else "validate"
282
+
281
283
  zip_file_path = extension_path
282
284
  if extension_path is None:
283
285
  extension_path = Path(".")
@@ -299,9 +301,11 @@ def upload(
299
301
  console.print("Set the --api-token parameter or the DT_API_TOKEN environment variable", style="bold red")
300
302
  sys.exit(1)
301
303
 
302
- command = ["dt", "ext", action, "--tenant-url", api_url, "--api-token", api_token, f"{zip_file_path}"]
303
- run_process(command, print_message=f"{action} extension {zip_file_path} to {api_url}")
304
- console.print(f"Extension {zip_file_path} uploaded to {api_url}", style="bold green")
304
+ if validate:
305
+ dt_cli_validate(f"{zip_file_path}", api_url, api_token)
306
+ else:
307
+ dt_cli_upload(f"{zip_file_path}", api_url, api_token)
308
+ console.print(f"Extension {zip_file_path} uploaded to {api_url}", style="bold green")
305
309
 
306
310
 
307
311
  @app.command(help="Generate root and developer certificates and key")