tower 0.3.4__py3-none-linux_armv6l.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.
- tower/__init__.py +4 -0
- tower/__main__.py +38 -0
- tower/client.py +115 -0
- tower/tower_api_client/__init__.py +7 -0
- tower/tower_api_client/api/__init__.py +1 -0
- tower/tower_api_client/api/default/__init__.py +0 -0
- tower/tower_api_client/api/default/accept_invitation.py +150 -0
- tower/tower_api_client/api/default/cancel_run.py +159 -0
- tower/tower_api_client/api/default/claim_device_login_ticket.py +154 -0
- tower/tower_api_client/api/default/create_account.py +150 -0
- tower/tower_api_client/api/default/create_api_key.py +142 -0
- tower/tower_api_client/api/default/create_apps.py +150 -0
- tower/tower_api_client/api/default/create_device_login_ticket.py +131 -0
- tower/tower_api_client/api/default/create_secret.py +150 -0
- tower/tower_api_client/api/default/create_session.py +150 -0
- tower/tower_api_client/api/default/create_team.py +150 -0
- tower/tower_api_client/api/default/delete_api_key.py +142 -0
- tower/tower_api_client/api/default/delete_app.py +146 -0
- tower/tower_api_client/api/default/delete_secret.py +104 -0
- tower/tower_api_client/api/default/delete_team.py +150 -0
- tower/tower_api_client/api/default/delete_team_invitation.py +167 -0
- tower/tower_api_client/api/default/deploy_app.py +166 -0
- tower/tower_api_client/api/default/describe_app.py +165 -0
- tower/tower_api_client/api/default/describe_app_version.py +163 -0
- tower/tower_api_client/api/default/describe_device_login_session.py +154 -0
- tower/tower_api_client/api/default/describe_run.py +172 -0
- tower/tower_api_client/api/default/describe_secrets_key.py +160 -0
- tower/tower_api_client/api/default/describe_session.py +125 -0
- tower/tower_api_client/api/default/export_secrets.py +218 -0
- tower/tower_api_client/api/default/generate_app_statistics.py +129 -0
- tower/tower_api_client/api/default/generate_run_statistics.py +160 -0
- tower/tower_api_client/api/default/get_app_run_logs.py +159 -0
- tower/tower_api_client/api/default/invite_team_member.py +163 -0
- tower/tower_api_client/api/default/leave_team.py +150 -0
- tower/tower_api_client/api/default/list_api_keys.py +125 -0
- tower/tower_api_client/api/default/list_app_environments.py +150 -0
- tower/tower_api_client/api/default/list_app_versions.py +146 -0
- tower/tower_api_client/api/default/list_apps.py +247 -0
- tower/tower_api_client/api/default/list_my_team_invitations.py +129 -0
- tower/tower_api_client/api/default/list_runs.py +184 -0
- tower/tower_api_client/api/default/list_secret_environments.py +129 -0
- tower/tower_api_client/api/default/list_secrets.py +201 -0
- tower/tower_api_client/api/default/list_team_invitations.py +150 -0
- tower/tower_api_client/api/default/list_team_members.py +146 -0
- tower/tower_api_client/api/default/list_teams.py +125 -0
- tower/tower_api_client/api/default/refresh_session.py +129 -0
- tower/tower_api_client/api/default/remove_team_member.py +163 -0
- tower/tower_api_client/api/default/resend_team_invitation.py +167 -0
- tower/tower_api_client/api/default/run_app.py +176 -0
- tower/tower_api_client/api/default/stream_app_run_logs.py +100 -0
- tower/tower_api_client/api/default/update_account_slug.py +163 -0
- tower/tower_api_client/api/default/update_my_team_invitation.py +154 -0
- tower/tower_api_client/api/default/update_team.py +167 -0
- tower/tower_api_client/api/default/update_user.py +150 -0
- tower/tower_api_client/client.py +51 -0
- tower/tower_api_client/models/__init__.py +193 -0
- tower/tower_api_client/models/accept_invitation_params.py +49 -0
- tower/tower_api_client/models/accept_invitation_response.py +56 -0
- tower/tower_api_client/models/account.py +45 -0
- tower/tower_api_client/models/api_key.py +67 -0
- tower/tower_api_client/models/app.py +122 -0
- tower/tower_api_client/models/app_statistics.py +66 -0
- tower/tower_api_client/models/app_summary.py +81 -0
- tower/tower_api_client/models/app_version.py +71 -0
- tower/tower_api_client/models/cancel_run_response.py +56 -0
- tower/tower_api_client/models/claim_device_login_ticket_params.py +49 -0
- tower/tower_api_client/models/claim_device_login_ticket_response.py +49 -0
- tower/tower_api_client/models/create_account_params.py +91 -0
- tower/tower_api_client/models/create_account_params_flags_struct.py +38 -0
- tower/tower_api_client/models/create_account_response.py +56 -0
- tower/tower_api_client/models/create_api_key_params.py +49 -0
- tower/tower_api_client/models/create_api_key_response.py +56 -0
- tower/tower_api_client/models/create_app_params.py +57 -0
- tower/tower_api_client/models/create_app_response.py +56 -0
- tower/tower_api_client/models/create_device_login_ticket_response.py +94 -0
- tower/tower_api_client/models/create_secret_params.py +70 -0
- tower/tower_api_client/models/create_secret_response.py +56 -0
- tower/tower_api_client/models/create_session_params.py +56 -0
- tower/tower_api_client/models/create_session_response.py +56 -0
- tower/tower_api_client/models/create_team_params.py +56 -0
- tower/tower_api_client/models/create_team_response.py +56 -0
- tower/tower_api_client/models/delete_api_key_params.py +49 -0
- tower/tower_api_client/models/delete_api_key_response.py +56 -0
- tower/tower_api_client/models/delete_app_response.py +56 -0
- tower/tower_api_client/models/delete_team_invitation_params.py +49 -0
- tower/tower_api_client/models/delete_team_invitation_response.py +56 -0
- tower/tower_api_client/models/delete_team_params.py +49 -0
- tower/tower_api_client/models/delete_team_response.py +56 -0
- tower/tower_api_client/models/deploy_app_response.py +56 -0
- tower/tower_api_client/models/describe_app_response.py +75 -0
- tower/tower_api_client/models/describe_app_version_response.py +56 -0
- tower/tower_api_client/models/describe_device_login_session_response.py +56 -0
- tower/tower_api_client/models/describe_run_response.py +56 -0
- tower/tower_api_client/models/describe_secrets_key_response.py +49 -0
- tower/tower_api_client/models/describe_session_response.py +56 -0
- tower/tower_api_client/models/error_detail.py +54 -0
- tower/tower_api_client/models/error_model.py +109 -0
- tower/tower_api_client/models/export_secrets_response.py +75 -0
- tower/tower_api_client/models/export_user_secrets_params.py +49 -0
- tower/tower_api_client/models/exported_secret.py +62 -0
- tower/tower_api_client/models/generate_app_statistics_response.py +56 -0
- tower/tower_api_client/models/generate_run_statistics_response.py +85 -0
- tower/tower_api_client/models/get_run_log_line.py +47 -0
- tower/tower_api_client/models/get_run_logs_output_body.py +65 -0
- tower/tower_api_client/models/invite_team_member_params.py +58 -0
- tower/tower_api_client/models/invite_team_member_response.py +65 -0
- tower/tower_api_client/models/leave_team_response.py +56 -0
- tower/tower_api_client/models/list_api_keys_response.py +65 -0
- tower/tower_api_client/models/list_app_environments_response.py +50 -0
- tower/tower_api_client/models/list_app_versions_response.py +65 -0
- tower/tower_api_client/models/list_apps_response.py +75 -0
- tower/tower_api_client/models/list_apps_status_item.py +11 -0
- tower/tower_api_client/models/list_my_team_invitations_response.py +65 -0
- tower/tower_api_client/models/list_runs_response.py +75 -0
- tower/tower_api_client/models/list_secret_environments_response.py +50 -0
- tower/tower_api_client/models/list_secrets_response.py +75 -0
- tower/tower_api_client/models/list_team_invitations_response.py +65 -0
- tower/tower_api_client/models/list_team_members_response.py +65 -0
- tower/tower_api_client/models/list_teams_response.py +65 -0
- tower/tower_api_client/models/log_line.py +62 -0
- tower/tower_api_client/models/log_line_error.py +47 -0
- tower/tower_api_client/models/pagination.py +59 -0
- tower/tower_api_client/models/parameter.py +52 -0
- tower/tower_api_client/models/refresh_session_response.py +66 -0
- tower/tower_api_client/models/remove_team_member_params.py +49 -0
- tower/tower_api_client/models/remove_team_member_response.py +56 -0
- tower/tower_api_client/models/resend_team_invitation_params.py +57 -0
- tower/tower_api_client/models/resend_team_invitation_response.py +56 -0
- tower/tower_api_client/models/run.py +129 -0
- tower/tower_api_client/models/run_app_params.py +72 -0
- tower/tower_api_client/models/run_app_params_parameters.py +43 -0
- tower/tower_api_client/models/run_app_response.py +56 -0
- tower/tower_api_client/models/run_results.py +73 -0
- tower/tower_api_client/models/run_statistics.py +52 -0
- tower/tower_api_client/models/secret.py +62 -0
- tower/tower_api_client/models/series_point.py +52 -0
- tower/tower_api_client/models/session.py +73 -0
- tower/tower_api_client/models/statistics_settings.py +38 -0
- tower/tower_api_client/models/team.py +75 -0
- tower/tower_api_client/models/team_invitation.py +61 -0
- tower/tower_api_client/models/token.py +38 -0
- tower/tower_api_client/models/update_account_slug_params.py +49 -0
- tower/tower_api_client/models/update_account_slug_response.py +56 -0
- tower/tower_api_client/models/update_my_team_invitation_params.py +56 -0
- tower/tower_api_client/models/update_my_team_invitation_response.py +39 -0
- tower/tower_api_client/models/update_team_params.py +58 -0
- tower/tower_api_client/models/update_team_response.py +56 -0
- tower/tower_api_client/models/update_user_params.py +71 -0
- tower/tower_api_client/models/update_user_response.py +56 -0
- tower/tower_api_client/models/user.py +90 -0
- tower/tower_api_client/types.py +44 -0
- tower-0.3.4.data/scripts/tower +0 -0
- tower-0.3.4.dist-info/METADATA +115 -0
- tower-0.3.4.dist-info/RECORD +156 -0
- tower-0.3.4.dist-info/WHEEL +4 -0
- tower-0.3.4.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.describe_app_version_response import DescribeAppVersionResponse
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
name: str,
|
|
13
|
+
num: str,
|
|
14
|
+
*,
|
|
15
|
+
client: AuthenticatedClient,
|
|
16
|
+
) -> Dict[str, Any]:
|
|
17
|
+
url = "{}/apps/{name}/versions/{num}".format(client.base_url, name=name, num=num)
|
|
18
|
+
|
|
19
|
+
headers: Dict[str, str] = client.get_headers()
|
|
20
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
"method": "get",
|
|
24
|
+
"url": url,
|
|
25
|
+
"headers": headers,
|
|
26
|
+
"cookies": cookies,
|
|
27
|
+
"timeout": client.get_timeout(),
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _parse_response(
|
|
32
|
+
*, response: httpx.Response
|
|
33
|
+
) -> Optional[DescribeAppVersionResponse]:
|
|
34
|
+
if response.status_code == 200:
|
|
35
|
+
response_200 = DescribeAppVersionResponse.from_dict(response.json())
|
|
36
|
+
|
|
37
|
+
return response_200
|
|
38
|
+
return None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _build_response(
|
|
42
|
+
*, response: httpx.Response
|
|
43
|
+
) -> Response[DescribeAppVersionResponse]:
|
|
44
|
+
return Response(
|
|
45
|
+
status_code=HTTPStatus(response.status_code),
|
|
46
|
+
content=response.content,
|
|
47
|
+
headers=response.headers,
|
|
48
|
+
parsed=_parse_response(response=response),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def sync_detailed(
|
|
53
|
+
name: str,
|
|
54
|
+
num: str,
|
|
55
|
+
*,
|
|
56
|
+
client: AuthenticatedClient,
|
|
57
|
+
) -> Response[DescribeAppVersionResponse]:
|
|
58
|
+
"""Describe app version
|
|
59
|
+
|
|
60
|
+
Describe an app version for an app in the current account.
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
name (str): The name of the app to get the version for.
|
|
64
|
+
num (str): The version string to get the version for.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
Response[DescribeAppVersionResponse]
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
kwargs = _get_kwargs(
|
|
71
|
+
name=name,
|
|
72
|
+
num=num,
|
|
73
|
+
client=client,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
response = httpx.request(
|
|
77
|
+
verify=client.verify_ssl,
|
|
78
|
+
**kwargs,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return _build_response(response=response)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def sync(
|
|
85
|
+
name: str,
|
|
86
|
+
num: str,
|
|
87
|
+
*,
|
|
88
|
+
client: AuthenticatedClient,
|
|
89
|
+
) -> Optional[DescribeAppVersionResponse]:
|
|
90
|
+
"""Describe app version
|
|
91
|
+
|
|
92
|
+
Describe an app version for an app in the current account.
|
|
93
|
+
|
|
94
|
+
Args:
|
|
95
|
+
name (str): The name of the app to get the version for.
|
|
96
|
+
num (str): The version string to get the version for.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Response[DescribeAppVersionResponse]
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
return sync_detailed(
|
|
103
|
+
name=name,
|
|
104
|
+
num=num,
|
|
105
|
+
client=client,
|
|
106
|
+
).parsed
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
async def asyncio_detailed(
|
|
110
|
+
name: str,
|
|
111
|
+
num: str,
|
|
112
|
+
*,
|
|
113
|
+
client: AuthenticatedClient,
|
|
114
|
+
) -> Response[DescribeAppVersionResponse]:
|
|
115
|
+
"""Describe app version
|
|
116
|
+
|
|
117
|
+
Describe an app version for an app in the current account.
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
name (str): The name of the app to get the version for.
|
|
121
|
+
num (str): The version string to get the version for.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
Response[DescribeAppVersionResponse]
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
kwargs = _get_kwargs(
|
|
128
|
+
name=name,
|
|
129
|
+
num=num,
|
|
130
|
+
client=client,
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
134
|
+
response = await _client.request(**kwargs)
|
|
135
|
+
|
|
136
|
+
return _build_response(response=response)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
async def asyncio(
|
|
140
|
+
name: str,
|
|
141
|
+
num: str,
|
|
142
|
+
*,
|
|
143
|
+
client: AuthenticatedClient,
|
|
144
|
+
) -> Optional[DescribeAppVersionResponse]:
|
|
145
|
+
"""Describe app version
|
|
146
|
+
|
|
147
|
+
Describe an app version for an app in the current account.
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
name (str): The name of the app to get the version for.
|
|
151
|
+
num (str): The version string to get the version for.
|
|
152
|
+
|
|
153
|
+
Returns:
|
|
154
|
+
Response[DescribeAppVersionResponse]
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
return (
|
|
158
|
+
await asyncio_detailed(
|
|
159
|
+
name=name,
|
|
160
|
+
num=num,
|
|
161
|
+
client=client,
|
|
162
|
+
)
|
|
163
|
+
).parsed
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import Client
|
|
7
|
+
from ...models.describe_device_login_session_response import (
|
|
8
|
+
DescribeDeviceLoginSessionResponse,
|
|
9
|
+
)
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
device_code: str,
|
|
15
|
+
*,
|
|
16
|
+
client: Client,
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
url = "{}/login/device/{device_code}".format(
|
|
19
|
+
client.base_url, device_code=device_code
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
headers: Dict[str, str] = client.get_headers()
|
|
23
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
"method": "get",
|
|
27
|
+
"url": url,
|
|
28
|
+
"headers": headers,
|
|
29
|
+
"cookies": cookies,
|
|
30
|
+
"timeout": client.get_timeout(),
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _parse_response(
|
|
35
|
+
*, response: httpx.Response
|
|
36
|
+
) -> Optional[DescribeDeviceLoginSessionResponse]:
|
|
37
|
+
if response.status_code == 200:
|
|
38
|
+
response_200 = DescribeDeviceLoginSessionResponse.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_200
|
|
41
|
+
return None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _build_response(
|
|
45
|
+
*, response: httpx.Response
|
|
46
|
+
) -> Response[DescribeDeviceLoginSessionResponse]:
|
|
47
|
+
return Response(
|
|
48
|
+
status_code=HTTPStatus(response.status_code),
|
|
49
|
+
content=response.content,
|
|
50
|
+
headers=response.headers,
|
|
51
|
+
parsed=_parse_response(response=response),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def sync_detailed(
|
|
56
|
+
device_code: str,
|
|
57
|
+
*,
|
|
58
|
+
client: Client,
|
|
59
|
+
) -> Response[DescribeDeviceLoginSessionResponse]:
|
|
60
|
+
"""Describe device login session
|
|
61
|
+
|
|
62
|
+
Checks if a device login code has been claimed and returns the user session if so.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
device_code (str): The device code to check.
|
|
66
|
+
|
|
67
|
+
Returns:
|
|
68
|
+
Response[DescribeDeviceLoginSessionResponse]
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
kwargs = _get_kwargs(
|
|
72
|
+
device_code=device_code,
|
|
73
|
+
client=client,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
response = httpx.request(
|
|
77
|
+
verify=client.verify_ssl,
|
|
78
|
+
**kwargs,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return _build_response(response=response)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def sync(
|
|
85
|
+
device_code: str,
|
|
86
|
+
*,
|
|
87
|
+
client: Client,
|
|
88
|
+
) -> Optional[DescribeDeviceLoginSessionResponse]:
|
|
89
|
+
"""Describe device login session
|
|
90
|
+
|
|
91
|
+
Checks if a device login code has been claimed and returns the user session if so.
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
device_code (str): The device code to check.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
Response[DescribeDeviceLoginSessionResponse]
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
return sync_detailed(
|
|
101
|
+
device_code=device_code,
|
|
102
|
+
client=client,
|
|
103
|
+
).parsed
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
async def asyncio_detailed(
|
|
107
|
+
device_code: str,
|
|
108
|
+
*,
|
|
109
|
+
client: Client,
|
|
110
|
+
) -> Response[DescribeDeviceLoginSessionResponse]:
|
|
111
|
+
"""Describe device login session
|
|
112
|
+
|
|
113
|
+
Checks if a device login code has been claimed and returns the user session if so.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
device_code (str): The device code to check.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
Response[DescribeDeviceLoginSessionResponse]
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
kwargs = _get_kwargs(
|
|
123
|
+
device_code=device_code,
|
|
124
|
+
client=client,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
128
|
+
response = await _client.request(**kwargs)
|
|
129
|
+
|
|
130
|
+
return _build_response(response=response)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
async def asyncio(
|
|
134
|
+
device_code: str,
|
|
135
|
+
*,
|
|
136
|
+
client: Client,
|
|
137
|
+
) -> Optional[DescribeDeviceLoginSessionResponse]:
|
|
138
|
+
"""Describe device login session
|
|
139
|
+
|
|
140
|
+
Checks if a device login code has been claimed and returns the user session if so.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
device_code (str): The device code to check.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Response[DescribeDeviceLoginSessionResponse]
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
await asyncio_detailed(
|
|
151
|
+
device_code=device_code,
|
|
152
|
+
client=client,
|
|
153
|
+
)
|
|
154
|
+
).parsed
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.describe_run_response import DescribeRunResponse
|
|
8
|
+
from ...models.error_model import ErrorModel
|
|
9
|
+
from ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
name: str,
|
|
14
|
+
seq: int,
|
|
15
|
+
*,
|
|
16
|
+
client: AuthenticatedClient,
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
url = "{}/apps/{name}/runs/{seq}".format(client.base_url, name=name, seq=seq)
|
|
19
|
+
|
|
20
|
+
headers: Dict[str, str] = client.get_headers()
|
|
21
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
"method": "get",
|
|
25
|
+
"url": url,
|
|
26
|
+
"headers": headers,
|
|
27
|
+
"cookies": cookies,
|
|
28
|
+
"timeout": client.get_timeout(),
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _parse_response(
|
|
33
|
+
*, response: httpx.Response
|
|
34
|
+
) -> Optional[Union[DescribeRunResponse, ErrorModel]]:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = DescribeRunResponse.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_200
|
|
39
|
+
if response.status_code == 401:
|
|
40
|
+
response_401 = ErrorModel.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_401
|
|
43
|
+
if response.status_code == 404:
|
|
44
|
+
response_404 = ErrorModel.from_dict(response.json())
|
|
45
|
+
|
|
46
|
+
return response_404
|
|
47
|
+
return None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _build_response(
|
|
51
|
+
*, response: httpx.Response
|
|
52
|
+
) -> Response[Union[DescribeRunResponse, ErrorModel]]:
|
|
53
|
+
return Response(
|
|
54
|
+
status_code=HTTPStatus(response.status_code),
|
|
55
|
+
content=response.content,
|
|
56
|
+
headers=response.headers,
|
|
57
|
+
parsed=_parse_response(response=response),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def sync_detailed(
|
|
62
|
+
name: str,
|
|
63
|
+
seq: int,
|
|
64
|
+
*,
|
|
65
|
+
client: AuthenticatedClient,
|
|
66
|
+
) -> Response[Union[DescribeRunResponse, ErrorModel]]:
|
|
67
|
+
"""Describe run
|
|
68
|
+
|
|
69
|
+
Describe a run of an app.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
name (str): The name of the app to fetch runs for.
|
|
73
|
+
seq (int): The number of the run to fetch.
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
Response[Union[DescribeRunResponse, ErrorModel]]
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
kwargs = _get_kwargs(
|
|
80
|
+
name=name,
|
|
81
|
+
seq=seq,
|
|
82
|
+
client=client,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
response = httpx.request(
|
|
86
|
+
verify=client.verify_ssl,
|
|
87
|
+
**kwargs,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
return _build_response(response=response)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def sync(
|
|
94
|
+
name: str,
|
|
95
|
+
seq: int,
|
|
96
|
+
*,
|
|
97
|
+
client: AuthenticatedClient,
|
|
98
|
+
) -> Optional[Union[DescribeRunResponse, ErrorModel]]:
|
|
99
|
+
"""Describe run
|
|
100
|
+
|
|
101
|
+
Describe a run of an app.
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
name (str): The name of the app to fetch runs for.
|
|
105
|
+
seq (int): The number of the run to fetch.
|
|
106
|
+
|
|
107
|
+
Returns:
|
|
108
|
+
Response[Union[DescribeRunResponse, ErrorModel]]
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
return sync_detailed(
|
|
112
|
+
name=name,
|
|
113
|
+
seq=seq,
|
|
114
|
+
client=client,
|
|
115
|
+
).parsed
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
async def asyncio_detailed(
|
|
119
|
+
name: str,
|
|
120
|
+
seq: int,
|
|
121
|
+
*,
|
|
122
|
+
client: AuthenticatedClient,
|
|
123
|
+
) -> Response[Union[DescribeRunResponse, ErrorModel]]:
|
|
124
|
+
"""Describe run
|
|
125
|
+
|
|
126
|
+
Describe a run of an app.
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
name (str): The name of the app to fetch runs for.
|
|
130
|
+
seq (int): The number of the run to fetch.
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
Response[Union[DescribeRunResponse, ErrorModel]]
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
kwargs = _get_kwargs(
|
|
137
|
+
name=name,
|
|
138
|
+
seq=seq,
|
|
139
|
+
client=client,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
143
|
+
response = await _client.request(**kwargs)
|
|
144
|
+
|
|
145
|
+
return _build_response(response=response)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
async def asyncio(
|
|
149
|
+
name: str,
|
|
150
|
+
seq: int,
|
|
151
|
+
*,
|
|
152
|
+
client: AuthenticatedClient,
|
|
153
|
+
) -> Optional[Union[DescribeRunResponse, ErrorModel]]:
|
|
154
|
+
"""Describe run
|
|
155
|
+
|
|
156
|
+
Describe a run of an app.
|
|
157
|
+
|
|
158
|
+
Args:
|
|
159
|
+
name (str): The name of the app to fetch runs for.
|
|
160
|
+
seq (int): The number of the run to fetch.
|
|
161
|
+
|
|
162
|
+
Returns:
|
|
163
|
+
Response[Union[DescribeRunResponse, ErrorModel]]
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
return (
|
|
167
|
+
await asyncio_detailed(
|
|
168
|
+
name=name,
|
|
169
|
+
seq=seq,
|
|
170
|
+
client=client,
|
|
171
|
+
)
|
|
172
|
+
).parsed
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ...client import AuthenticatedClient
|
|
7
|
+
from ...models.describe_secrets_key_response import DescribeSecretsKeyResponse
|
|
8
|
+
from ...types import UNSET, Response, Unset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
client: AuthenticatedClient,
|
|
14
|
+
format_: Union[Unset, None, str] = UNSET,
|
|
15
|
+
) -> Dict[str, Any]:
|
|
16
|
+
url = "{}/secrets/key".format(client.base_url)
|
|
17
|
+
|
|
18
|
+
headers: Dict[str, str] = client.get_headers()
|
|
19
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
20
|
+
|
|
21
|
+
params: Dict[str, Any] = {}
|
|
22
|
+
params["format"] = format_
|
|
23
|
+
|
|
24
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
"method": "get",
|
|
28
|
+
"url": url,
|
|
29
|
+
"headers": headers,
|
|
30
|
+
"cookies": cookies,
|
|
31
|
+
"timeout": client.get_timeout(),
|
|
32
|
+
"params": params,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(
|
|
37
|
+
*, response: httpx.Response
|
|
38
|
+
) -> Optional[DescribeSecretsKeyResponse]:
|
|
39
|
+
if response.status_code == 200:
|
|
40
|
+
response_200 = DescribeSecretsKeyResponse.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
return None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _build_response(
|
|
47
|
+
*, response: httpx.Response
|
|
48
|
+
) -> Response[DescribeSecretsKeyResponse]:
|
|
49
|
+
return Response(
|
|
50
|
+
status_code=HTTPStatus(response.status_code),
|
|
51
|
+
content=response.content,
|
|
52
|
+
headers=response.headers,
|
|
53
|
+
parsed=_parse_response(response=response),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def sync_detailed(
|
|
58
|
+
*,
|
|
59
|
+
client: AuthenticatedClient,
|
|
60
|
+
format_: Union[Unset, None, str] = UNSET,
|
|
61
|
+
) -> Response[DescribeSecretsKeyResponse]:
|
|
62
|
+
"""Describe encryption key
|
|
63
|
+
|
|
64
|
+
Gets the encryption key used for encrypting secrets that you want to create in Tower.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
format_ (Union[Unset, None, str]): The format to return the key in. Options are 'pkcs1'
|
|
68
|
+
and 'spki'.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Response[DescribeSecretsKeyResponse]
|
|
72
|
+
"""
|
|
73
|
+
|
|
74
|
+
kwargs = _get_kwargs(
|
|
75
|
+
client=client,
|
|
76
|
+
format_=format_,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
response = httpx.request(
|
|
80
|
+
verify=client.verify_ssl,
|
|
81
|
+
**kwargs,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
return _build_response(response=response)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def sync(
|
|
88
|
+
*,
|
|
89
|
+
client: AuthenticatedClient,
|
|
90
|
+
format_: Union[Unset, None, str] = UNSET,
|
|
91
|
+
) -> Optional[DescribeSecretsKeyResponse]:
|
|
92
|
+
"""Describe encryption key
|
|
93
|
+
|
|
94
|
+
Gets the encryption key used for encrypting secrets that you want to create in Tower.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
format_ (Union[Unset, None, str]): The format to return the key in. Options are 'pkcs1'
|
|
98
|
+
and 'spki'.
|
|
99
|
+
|
|
100
|
+
Returns:
|
|
101
|
+
Response[DescribeSecretsKeyResponse]
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
return sync_detailed(
|
|
105
|
+
client=client,
|
|
106
|
+
format_=format_,
|
|
107
|
+
).parsed
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
async def asyncio_detailed(
|
|
111
|
+
*,
|
|
112
|
+
client: AuthenticatedClient,
|
|
113
|
+
format_: Union[Unset, None, str] = UNSET,
|
|
114
|
+
) -> Response[DescribeSecretsKeyResponse]:
|
|
115
|
+
"""Describe encryption key
|
|
116
|
+
|
|
117
|
+
Gets the encryption key used for encrypting secrets that you want to create in Tower.
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
format_ (Union[Unset, None, str]): The format to return the key in. Options are 'pkcs1'
|
|
121
|
+
and 'spki'.
|
|
122
|
+
|
|
123
|
+
Returns:
|
|
124
|
+
Response[DescribeSecretsKeyResponse]
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
kwargs = _get_kwargs(
|
|
128
|
+
client=client,
|
|
129
|
+
format_=format_,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
133
|
+
response = await _client.request(**kwargs)
|
|
134
|
+
|
|
135
|
+
return _build_response(response=response)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
async def asyncio(
|
|
139
|
+
*,
|
|
140
|
+
client: AuthenticatedClient,
|
|
141
|
+
format_: Union[Unset, None, str] = UNSET,
|
|
142
|
+
) -> Optional[DescribeSecretsKeyResponse]:
|
|
143
|
+
"""Describe encryption key
|
|
144
|
+
|
|
145
|
+
Gets the encryption key used for encrypting secrets that you want to create in Tower.
|
|
146
|
+
|
|
147
|
+
Args:
|
|
148
|
+
format_ (Union[Unset, None, str]): The format to return the key in. Options are 'pkcs1'
|
|
149
|
+
and 'spki'.
|
|
150
|
+
|
|
151
|
+
Returns:
|
|
152
|
+
Response[DescribeSecretsKeyResponse]
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
return (
|
|
156
|
+
await asyncio_detailed(
|
|
157
|
+
client=client,
|
|
158
|
+
format_=format_,
|
|
159
|
+
)
|
|
160
|
+
).parsed
|