agilicus 1.247.1__py3-none-any.whl → 1.247.2__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.
@@ -77,7 +77,7 @@ class ApiClient(object):
77
77
  self.default_headers[header_name] = header_value
78
78
  self.cookie = cookie
79
79
  # Set default User-Agent.
80
- self.user_agent = 'OpenAPI-Generator/1.247.1/python'
80
+ self.user_agent = 'OpenAPI-Generator/1.247.2/python'
81
81
 
82
82
  def __enter__(self):
83
83
  return self
@@ -387,7 +387,7 @@ class Configuration(object):
387
387
  "OS: {env}\n"\
388
388
  "Python Version: {pyversion}\n"\
389
389
  "Version of the API: 2024.03.27\n"\
390
- "SDK Package Version: 1.247.1".\
390
+ "SDK Package Version: 1.247.2".\
391
391
  format(env=sys.platform, pyversion=sys.version)
392
392
 
393
393
  def get_host_settings(self):
@@ -4,7 +4,7 @@ Agilicus is API-first. Modern software is controlled by other software, is open,
4
4
  The `agilicus_api` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
5
5
 
6
6
  - API version: 2024.03.27
7
- - Package version: 1.247.1
7
+ - Package version: 1.247.2
8
8
  - Build package: org.openapitools.codegen.languages.PythonClientCodegen
9
9
  For more information, please visit [https://www.agilicus.com/api](https://www.agilicus.com/api)
10
10
 
agilicus/main.py CHANGED
@@ -5843,13 +5843,19 @@ def bulk_delete_resource_permission(ctx, **kwargs):
5843
5843
  )
5844
5844
  @click.option("--page-at-id", default=None)
5845
5845
  @click.option("--limit", default=500)
5846
+ @click.option("--show-columns", type=str, default=None)
5847
+ @click.option("--reset-columns", is_flag=True, default=False)
5846
5848
  @click.pass_context
5847
- def list_resources(ctx, **kwargs):
5849
+ def list_resources(ctx, reset_columns=None, show_columns=None, **kwargs):
5848
5850
  """Lists generic resources, which can be filtered by type, organisation, etc."""
5849
5851
  if kwargs["name"] is None:
5850
5852
  kwargs.pop("name")
5853
+ if show_columns and "resource_urls" in show_columns:
5854
+ kwargs["resource_urls"] = True
5851
5855
  results = resources.query_resources(ctx, **kwargs)
5852
- table = resources.format_resources(ctx, results)
5856
+ table = resources.format_resources(
5857
+ ctx, results, show_columns=show_columns, reset_columns=reset_columns
5858
+ )
5853
5859
  print(table)
5854
5860
 
5855
5861
 
agilicus/resources.py CHANGED
@@ -4,6 +4,9 @@ from . import context
4
4
  from .input_helpers import get_org_from_input_or_ctx, update_if_not_none
5
5
  from .input_helpers import get_user_id_from_input_or_ctx
6
6
  from .input_helpers import update_org_from_input_or_ctx, strip_none
7
+ from agilicus.output.table import make_columns
8
+
9
+
7
10
  from .output.table import (
8
11
  subobject_column,
9
12
  format_table,
@@ -115,29 +118,19 @@ def query_resources(ctx, org_id=None, **kwargs):
115
118
  return []
116
119
 
117
120
 
118
- def format_resources(ctx, resources):
119
- member_columns = [
120
- metadata_column("id"),
121
- spec_column("name"),
122
- spec_column("resource_type"),
123
- ]
124
- columns = [
125
- metadata_column("id"),
126
- spec_column("org_id", "org id"),
127
- spec_column("resource_type", "type"),
128
- spec_column("name", "name"),
129
- status_column("resource_stats.overall_status", "status", optional=True),
130
- status_column(
131
- "resource_stats.last_warning_message", "last_warning", optional=True
132
- ),
133
- status_column(
134
- "resource_stats.session_stats.total", "good_sessions", optional=True
135
- ),
136
- status_column(
137
- "resource_stats.session_stats.failed", "failed_sessions", optional=True
138
- ),
139
- subtable(ctx, "status.resource_members", member_columns),
140
- ]
121
+ def format_resources(ctx, resources, show_columns=None, reset_columns=None):
122
+ columns = make_columns(
123
+ ctx,
124
+ resources,
125
+ """
126
+ - metadata.id(newname=id)
127
+ - spec.resource_type(newname=resource_type)
128
+ - spec.name(newname=name)
129
+ - status.resource_stats.overall_status(newname=status)
130
+ """,
131
+ show=show_columns,
132
+ clear=reset_columns,
133
+ )
141
134
  return format_table(ctx, resources, columns)
142
135
 
143
136
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: agilicus
3
- Version: 1.247.1
3
+ Version: 1.247.2
4
4
  Summary: Agilicus SDK
5
5
  Home-page: https://www.agilicus.com/
6
6
  License: MIT
@@ -69,9 +69,9 @@ agilicus/agilicus_api/api/users_api.py,sha256=z4V55AwJp62PxplUKbrTM5YbQbbzJZVXz_
69
69
  agilicus/agilicus_api/api/users_api_mock.py,sha256=wA_xiqL3Pz3KjljKlsmf5NveLZS1FpbaKJHBp7QvarY,15411
70
70
  agilicus/agilicus_api/api/whoami_api.py,sha256=O9uBd6bnhVoFPylDygpP8d-6oNzf3f_Illc34kwEWRk,7941
71
71
  agilicus/agilicus_api/api/whoami_api_mock.py,sha256=rlvZoWnMCqORMZBg7SOv6d3xp52kELdh6wXcCaIZ93w,346
72
- agilicus/agilicus_api/api_client.py,sha256=bZbCnM_t3N4fvaXfppBJ36ZxQylN5cMRzZ8JpGnhExA,38845
72
+ agilicus/agilicus_api/api_client.py,sha256=Wwl7myx5UA1Pkrbu_jBaCugkirDcuNfGjaYLifPCais,38845
73
73
  agilicus/agilicus_api/apis/__init__.py,sha256=QnjTuP08uv9bNvzdrnwROJ4u8C1DVic2YC7kEISgLDY,2161
74
- agilicus/agilicus_api/configuration.py,sha256=d4F1dcXtSK-YJiXbBaMRsMyRPfVLH_PuybD7dT9s07A,18447
74
+ agilicus/agilicus_api/configuration.py,sha256=CTArCVv6EXjkQl7cZXrjlg4AP7RSbNGe0d9-CQtMrxk,18447
75
75
  agilicus/agilicus_api/docs/APIKey.md,sha256=4cKuz4_l9HcEDnUrLwYbEnn9C2WoDayrjfrY1Ixgaf4,1747
76
76
  agilicus/agilicus_api/docs/APIKeyIntrospect.md,sha256=nJ-zkuFm3JMbWFDYYN_vYyQk1snGBtBvIxtCQxamhAU,1019
77
77
  agilicus/agilicus_api/docs/APIKeyIntrospectAuthorizationInfo.md,sha256=7RApOOLjvWQs5sw2jb25g7i3Kta1BiEY-s8VRXfppH8,725
@@ -2420,7 +2420,7 @@ agilicus/agilicus_api/test/test_x509_root_certificate.py,sha256=zevPipdTp5dJo7TJ
2420
2420
  agilicus/agilicus_api/test/test_x509_root_certificate_spec.py,sha256=dO_SVhKPsz_amF-F4MkHzBEkvxp85c0mbGLvEJOEwh0,2832
2421
2421
  agilicus/agilicus_api/test/test_x509_root_certificate_status.py,sha256=5n9yxO8J6MxD208gPPcEz9GxTLA5IqHiGz_QCWbFMoM,2846
2422
2422
  agilicus/agilicus_api/test/test_xss_settings.py,sha256=A6Gt1muXu3HPnj6KjN_rQIqa5Ti_AgrQTfUP163TWU4,2746
2423
- agilicus/agilicus_api_README.md,sha256=uh5Gq-A6Mr3BR1YfAU2gfbg4iXrkllOoOaN_Xf_Oz8I,156066
2423
+ agilicus/agilicus_api_README.md,sha256=mJwjKkt4XMQCR0R0unxkbIByaYww79cedhUibVW1mCI,156066
2424
2424
  agilicus/aliases.ini,sha256=MxqiVo2f2xdUDVF1YDkNW36AIqN8hrYjlTVfraEUZXY,455
2425
2425
  agilicus/amq.py,sha256=yxi-YTbJPVl10s78Hlr1dmrQR63iaSIoROGVILzFPmE,1775
2426
2426
  agilicus/apps.py,sha256=8k_tGraPUVKJURksZwKR8eNGW-4CSPv54FYcApQ3Ly8,50857
@@ -2469,7 +2469,7 @@ agilicus/labels/labels_main.py,sha256=i3HA1ZuMG6N28mwmlhAMt4N95RNpm4eDS3EVRChjRu
2469
2469
  agilicus/launchers.py,sha256=XRW8cO_S7HHs-Cc6_baol9AOOsuGlMto7bLcsKYk6qA,11199
2470
2470
  agilicus/logs.py,sha256=tS8c_sdre1Dncrl59GVGQ0L3d2jtwlVjvIMl3SHJraY,766
2471
2471
  agilicus/lookups.py,sha256=MNmNsKpP7Fq_poLAnL9xo_iptFilKM9ziGLyIe8VKaw,669
2472
- agilicus/main.py,sha256=xPfS-8DrLgiv8vZ5V1pG0PoqRWU8-DEVyQalpGeKfd8,263868
2472
+ agilicus/main.py,sha256=J9UAbEjKmw9BytzzwxyW9ZAeV0Ca4zcfqOiG3spdves,264191
2473
2473
  agilicus/messages.py,sha256=Ydm-VhAsK23UnYdstv_HsOybBODfui5ubKc7F8R_dsw,5187
2474
2474
  agilicus/metrics.py,sha256=v4rwpvqDzeNG5GKNoZ7t34X5qUgly5IW2s-kXlS2vQM,2315
2475
2475
  agilicus/orgs.py,sha256=rwTuumHWz0_QPqWNdDPPdAJRGTTNUxVw7bBkxU5a8n8,12874
@@ -2491,7 +2491,7 @@ agilicus/products/products.py,sha256=he27jN3MUyXBdTdV2HRyvUYb0zD3W1TGsuC7NHLKngQ
2491
2491
  agilicus/products/products_main.py,sha256=saa2-e5oeHW6D5AWPcld99KwgQ9nBY3hoW8Jz_5nfMQ,3421
2492
2492
  agilicus/regions.py,sha256=21SzUJ9_hC8DiWLSLJ-vtSb1tWLhlcPXH9JhmXD_ypU,3343
2493
2493
  agilicus/resource_helpers.py,sha256=fyfqAxjfnIth1KlHNALlLtYYXIZzlWEJmSZNLdj2JV0,380
2494
- agilicus/resources.py,sha256=nlH4cezzfaiq4M7BK7iwXFUYF3kG9_Su6sFEEXX6I2M,10163
2494
+ agilicus/resources.py,sha256=CbtuB0SlxtkC6iarzfTBesT2Kpmbw5OZ84HfTp7O1iw,9790
2495
2495
  agilicus/response.py,sha256=tI2-dAJwhBuuDplSsouuMmCmKHSwR_Mx71af8tgsuYo,468
2496
2496
  agilicus/rules/rules.py,sha256=ALHJr_tX2iGDKGKUMTteAp0iUQExqNGAhz3hcypxaF0,21019
2497
2497
  agilicus/rules/rules_main.py,sha256=hHyeY0WzFT2l1AQlA1C1PJQLuaEAgRhSbIUALHIyaa8,10750
@@ -2509,8 +2509,8 @@ agilicus/trusted_certs/trusted_certs_main.py,sha256=6dHHWXvNIcUa_nA9ptigL4Vibe4n
2509
2509
  agilicus/users.py,sha256=cBqZwqNz_9lcEJuFL5YTUFpbN56kL0-maBlM29KWWrQ,38728
2510
2510
  agilicus/version.py,sha256=G9OFdL1v_4dLDfk6I6taDNypM5bbO-JHAwilsu9LYgg,23
2511
2511
  agilicus/whoami.py,sha256=kqghtWMgZOd2rhKmfguDwCTm6A3gNS8Kj-S2IBxBtl0,206
2512
- agilicus-1.247.1.dist-info/LICENSE.txt,sha256=Zq4tqiCroC2CVrBB_PWjapRdvpae23nljdiaSkOzUho,1061
2513
- agilicus-1.247.1.dist-info/METADATA,sha256=68diBsAoc7v6LC-4VxwifooaQSO7tGomPTm6SX8FXHM,3822
2514
- agilicus-1.247.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
2515
- agilicus-1.247.1.dist-info/entry_points.txt,sha256=a66hGozzLkHu0IewFzIMbSAhMTNTddUaA2T3_16Gb_s,51
2516
- agilicus-1.247.1.dist-info/RECORD,,
2512
+ agilicus-1.247.2.dist-info/LICENSE.txt,sha256=Zq4tqiCroC2CVrBB_PWjapRdvpae23nljdiaSkOzUho,1061
2513
+ agilicus-1.247.2.dist-info/METADATA,sha256=-ypcVKGg9ak_mYdYWGPLeOst_a30mNz0j6Khr8Rn22g,3822
2514
+ agilicus-1.247.2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
2515
+ agilicus-1.247.2.dist-info/entry_points.txt,sha256=a66hGozzLkHu0IewFzIMbSAhMTNTddUaA2T3_16Gb_s,51
2516
+ agilicus-1.247.2.dist-info/RECORD,,