agilicus 1.259.7__py3-none-any.whl → 1.260.1__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.
- agilicus/agilicus_api/api_client.py +1 -1
- agilicus/agilicus_api/configuration.py +1 -1
- agilicus/agilicus_api_README.md +1 -1
- agilicus/input_helpers.py +35 -0
- agilicus/main.py +3 -0
- agilicus/orgs.py +9 -4
- {agilicus-1.259.7.dist-info → agilicus-1.260.1.dist-info}/METADATA +1 -1
- {agilicus-1.259.7.dist-info → agilicus-1.260.1.dist-info}/RECORD +11 -11
- {agilicus-1.259.7.dist-info → agilicus-1.260.1.dist-info}/LICENSE.txt +0 -0
- {agilicus-1.259.7.dist-info → agilicus-1.260.1.dist-info}/WHEEL +0 -0
- {agilicus-1.259.7.dist-info → agilicus-1.260.1.dist-info}/entry_points.txt +0 -0
@@ -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.
|
80
|
+
self.user_agent = 'OpenAPI-Generator/1.260.1/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.06.21\n"\
|
390
|
-
"SDK Package Version: 1.
|
390
|
+
"SDK Package Version: 1.260.1".\
|
391
391
|
format(env=sys.platform, pyversion=sys.version)
|
392
392
|
|
393
393
|
def get_host_settings(self):
|
agilicus/agilicus_api_README.md
CHANGED
@@ -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.06.21
|
7
|
-
- Package version: 1.
|
7
|
+
- Package version: 1.260.1
|
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/input_helpers.py
CHANGED
@@ -2,6 +2,8 @@ import csv
|
|
2
2
|
import sys
|
3
3
|
import agilicus
|
4
4
|
import click
|
5
|
+
import dateparser
|
6
|
+
import datetime
|
5
7
|
|
6
8
|
from typing import Any, Dict
|
7
9
|
|
@@ -194,3 +196,36 @@ def get_objects_by_location(location, objects: Dict[str, Any]) -> Dict[str, Any]
|
|
194
196
|
result[key] = val
|
195
197
|
|
196
198
|
return result
|
199
|
+
|
200
|
+
|
201
|
+
class HumanReadableDateType(click.ParamType):
|
202
|
+
"""
|
203
|
+
HumanReadableDateType allows us accept human-readable date, converting them
|
204
|
+
into proper datetime objects.
|
205
|
+
"""
|
206
|
+
|
207
|
+
settings = {"RETURN_AS_TIMEZONE_AWARE": True}
|
208
|
+
name = "human readable datetime"
|
209
|
+
|
210
|
+
def __init__(self):
|
211
|
+
self._value = None
|
212
|
+
|
213
|
+
def convert(self, value, param, ctx):
|
214
|
+
if isinstance(value, datetime.datetime):
|
215
|
+
return value
|
216
|
+
try:
|
217
|
+
result = dateparser.parse(value, settings=self.settings)
|
218
|
+
except Exception as exc:
|
219
|
+
print(f"failed to parse: {exc}")
|
220
|
+
self.fail(str(exc), param, ctx)
|
221
|
+
if result is None:
|
222
|
+
self.fail(
|
223
|
+
(
|
224
|
+
f"'{value}' is not a valid human-readable date. "
|
225
|
+
"E.g. '2024-05-01T00:20:20.000Z' or 'yesterday'"
|
226
|
+
),
|
227
|
+
param=param,
|
228
|
+
ctx=ctx,
|
229
|
+
)
|
230
|
+
|
231
|
+
return result
|
agilicus/main.py
CHANGED
@@ -1028,6 +1028,9 @@ def list_useful_orgs_(ctx, **kwargs):
|
|
1028
1028
|
@click.option("--shard", default=None)
|
1029
1029
|
@click.option("--cluster", default=None)
|
1030
1030
|
@click.option("--subdomain", default=None)
|
1031
|
+
@click.option(
|
1032
|
+
"--created-since", default=None, type=input_helpers.HumanReadableDateType()
|
1033
|
+
)
|
1031
1034
|
@click.option("--updated-since", default=None, type=click.DateTime())
|
1032
1035
|
@click.option("--list-children", default=True, type=bool)
|
1033
1036
|
@click.option("--enabled", default=None, type=bool)
|
agilicus/orgs.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import dataclasses
|
2
2
|
import json
|
3
|
+
import operator
|
3
4
|
|
4
5
|
import requests
|
5
6
|
|
@@ -37,7 +38,7 @@ def get_org_by_dictionary(ctx, org_id):
|
|
37
38
|
return (org_dict_by_id, org_dict_by_name)
|
38
39
|
|
39
40
|
|
40
|
-
def query(ctx, org_id=None, page_size=None, **kwargs):
|
41
|
+
def query(ctx, org_id=None, created_since=None, page_size=None, **kwargs):
|
41
42
|
token = context.get_token(ctx)
|
42
43
|
|
43
44
|
org_id = get_org_from_input_or_ctx(ctx, org_id)
|
@@ -50,15 +51,19 @@ def query(ctx, org_id=None, page_size=None, **kwargs):
|
|
50
51
|
|
51
52
|
apiclient = context.get_apiclient(ctx, token)
|
52
53
|
if kwargs.get("page_at_id", None) is not None:
|
53
|
-
|
54
|
+
resp = get_many_entries(
|
54
55
|
apiclient.org_api.list_orgs,
|
55
56
|
"orgs",
|
56
57
|
page_size=page_size,
|
57
58
|
maximum=kwargs.get("limit", None),
|
58
59
|
**params,
|
59
60
|
)
|
60
|
-
|
61
|
-
|
61
|
+
else:
|
62
|
+
resp = apiclient.org_api.list_orgs(**params).orgs
|
63
|
+
if created_since is not None:
|
64
|
+
resp = [org for org in resp if org.created and org.created >= created_since]
|
65
|
+
resp = sorted(resp, key=operator.itemgetter("created"))
|
66
|
+
return resp
|
62
67
|
|
63
68
|
|
64
69
|
def query_suborgs(ctx, org_id=None, **kwargs):
|
@@ -71,9 +71,9 @@ agilicus/agilicus_api/api/users_api.py,sha256=xhcIheRgjfMpQ3RbekgnOp3ODUUm6deY1H
|
|
71
71
|
agilicus/agilicus_api/api/users_api_mock.py,sha256=wA_xiqL3Pz3KjljKlsmf5NveLZS1FpbaKJHBp7QvarY,15411
|
72
72
|
agilicus/agilicus_api/api/whoami_api.py,sha256=c95A5Rfll7idVIb09yTzUjqAVDpyVlRugUjprI5JBbo,7941
|
73
73
|
agilicus/agilicus_api/api/whoami_api_mock.py,sha256=rlvZoWnMCqORMZBg7SOv6d3xp52kELdh6wXcCaIZ93w,346
|
74
|
-
agilicus/agilicus_api/api_client.py,sha256=
|
74
|
+
agilicus/agilicus_api/api_client.py,sha256=I9ZM7SRER3QnseT7-UhGkjb6ftxirm55O_nSAFrwPYQ,38845
|
75
75
|
agilicus/agilicus_api/apis/__init__.py,sha256=aJZD7x-umdSni6ZBr4XxzpH8pwtU9hA5LlCDxcqa1Q8,2224
|
76
|
-
agilicus/agilicus_api/configuration.py,sha256=
|
76
|
+
agilicus/agilicus_api/configuration.py,sha256=Beg1By_amZD90nXPlwZO_biErR7mhOOOUaS73J3TkaA,18447
|
77
77
|
agilicus/agilicus_api/docs/APIKey.md,sha256=4cKuz4_l9HcEDnUrLwYbEnn9C2WoDayrjfrY1Ixgaf4,1747
|
78
78
|
agilicus/agilicus_api/docs/APIKeyIntrospect.md,sha256=nJ-zkuFm3JMbWFDYYN_vYyQk1snGBtBvIxtCQxamhAU,1019
|
79
79
|
agilicus/agilicus_api/docs/APIKeyIntrospectAuthorizationInfo.md,sha256=7RApOOLjvWQs5sw2jb25g7i3Kta1BiEY-s8VRXfppH8,725
|
@@ -2508,7 +2508,7 @@ agilicus/agilicus_api/test/test_x509_root_certificate.py,sha256=H82JE5XkABLdxrdI
|
|
2508
2508
|
agilicus/agilicus_api/test/test_x509_root_certificate_spec.py,sha256=Avjjv9atO5hYlSmAJU1CzS7M0l-0bPs6q4N5iXSoMcs,2832
|
2509
2509
|
agilicus/agilicus_api/test/test_x509_root_certificate_status.py,sha256=6Iw5aUxT4lNJnOHK0ehotwh-niT9tuSCJIjRe1DKlRg,2846
|
2510
2510
|
agilicus/agilicus_api/test/test_xss_settings.py,sha256=Stf0gqkOTrsfpeYF22QDlz85_Nny56SSwv5dpFZoNQU,2746
|
2511
|
-
agilicus/agilicus_api_README.md,sha256=
|
2511
|
+
agilicus/agilicus_api_README.md,sha256=HbAfJbtzSZG7ZyZ4VnJweX4tm74kzO5SeRx60WnvFJU,161008
|
2512
2512
|
agilicus/aliases.ini,sha256=MxqiVo2f2xdUDVF1YDkNW36AIqN8hrYjlTVfraEUZXY,455
|
2513
2513
|
agilicus/amq.py,sha256=yxi-YTbJPVl10s78Hlr1dmrQR63iaSIoROGVILzFPmE,1775
|
2514
2514
|
agilicus/apps.py,sha256=uYNUNy5rCYjx90KnR_X_aESof9xzSuLYT5w8myN_VVE,52091
|
@@ -2549,7 +2549,7 @@ agilicus/general_helpers.py,sha256=38sDwoo00ocQeJs_2VNAQeRzxNBSIdRutTf5o8wky8A,2
|
|
2549
2549
|
agilicus/hash.py,sha256=5_ymnLNjVbXnxiPVhd8Mur5vQMrn6Zhfjhgg4nygmEA,260
|
2550
2550
|
agilicus/hosts/hosts.py,sha256=U9Z_9JWkW5b5wKO1kxULhFvEENh1J75xSd9F_KQxseA,7150
|
2551
2551
|
agilicus/hosts/hosts_main.py,sha256=Eb8qv9LdDlGHE3W4hfeu3v_wN6Yug8ATKnjl1o2fMVc,3785
|
2552
|
-
agilicus/input_helpers.py,sha256=
|
2552
|
+
agilicus/input_helpers.py,sha256=h4cRAIK11W5MnlAUjUsRIDS18jXS3UjouU8HQZtD15g,6404
|
2553
2553
|
agilicus/issuers.py,sha256=FcBWGErwUekpx-ZMTW9W8_wPlANEx54QlNVcDRWycvU,44308
|
2554
2554
|
agilicus/keyring.py,sha256=G-AsU9V7J7WPK94wSCy1Bf-Zy4CcqPise_vab3220LI,1788
|
2555
2555
|
agilicus/keyring_storage.py,sha256=tQEfDPW27xEdjPIBnjAyZOAG3wHlk3KQ2DSKYr4B5fM,2996
|
@@ -2558,10 +2558,10 @@ agilicus/labels/labels_main.py,sha256=ptJ34mf-iVaf8ezf3RWLcpeP2O0ntezS4tqJ0ks0el
|
|
2558
2558
|
agilicus/launchers.py,sha256=r4nctnVtfP-Ho_HXEfAiMaMqJI0u7pbieHSS3Vd0QBE,11361
|
2559
2559
|
agilicus/logs.py,sha256=tS8c_sdre1Dncrl59GVGQ0L3d2jtwlVjvIMl3SHJraY,766
|
2560
2560
|
agilicus/lookups.py,sha256=MNmNsKpP7Fq_poLAnL9xo_iptFilKM9ziGLyIe8VKaw,669
|
2561
|
-
agilicus/main.py,sha256=
|
2561
|
+
agilicus/main.py,sha256=SCcayJjWCxeII63Alk-bWacHyr1VYORPfMpMQjvV8dE,269882
|
2562
2562
|
agilicus/messages.py,sha256=Ydm-VhAsK23UnYdstv_HsOybBODfui5ubKc7F8R_dsw,5187
|
2563
2563
|
agilicus/metrics.py,sha256=v4rwpvqDzeNG5GKNoZ7t34X5qUgly5IW2s-kXlS2vQM,2315
|
2564
|
-
agilicus/orgs.py,sha256=
|
2564
|
+
agilicus/orgs.py,sha256=THcm1Me58PJ7Lai4LHptBitaymH0TXVXapFd7WZ3Mpg,14399
|
2565
2565
|
agilicus/output/__init__.py,sha256=UKZbHS4t15vazJuN46FN-3HHqkxMXU0p3df2VcsSLcY,110
|
2566
2566
|
agilicus/output/column_builder.py,sha256=TWo4t8ygaTUv7qjD_moDroD1bKzzyTIao0FmLy5gs4o,4284
|
2567
2567
|
agilicus/output/console.py,sha256=xBURxlA7H1kmQ7zIKuifs_aQJq1cvmCJ5CtQVSo3_Ns,400
|
@@ -2599,8 +2599,8 @@ agilicus/trusted_certs/trusted_certs_main.py,sha256=6dHHWXvNIcUa_nA9ptigL4Vibe4n
|
|
2599
2599
|
agilicus/users.py,sha256=JT7TIiUOtSFXPOdxmIVFm7ygZTH1FjsIkD9j-vjLuMM,38474
|
2600
2600
|
agilicus/version.py,sha256=G9OFdL1v_4dLDfk6I6taDNypM5bbO-JHAwilsu9LYgg,23
|
2601
2601
|
agilicus/whoami.py,sha256=kqghtWMgZOd2rhKmfguDwCTm6A3gNS8Kj-S2IBxBtl0,206
|
2602
|
-
agilicus-1.
|
2603
|
-
agilicus-1.
|
2604
|
-
agilicus-1.
|
2605
|
-
agilicus-1.
|
2606
|
-
agilicus-1.
|
2602
|
+
agilicus-1.260.1.dist-info/LICENSE.txt,sha256=Zq4tqiCroC2CVrBB_PWjapRdvpae23nljdiaSkOzUho,1061
|
2603
|
+
agilicus-1.260.1.dist-info/METADATA,sha256=BZymIJhRbbsOpUHYvHX5ADC7avEJNBih2yuvNhROupM,3822
|
2604
|
+
agilicus-1.260.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
2605
|
+
agilicus-1.260.1.dist-info/entry_points.txt,sha256=a66hGozzLkHu0IewFzIMbSAhMTNTddUaA2T3_16Gb_s,51
|
2606
|
+
agilicus-1.260.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|