yicloud-sdk-python 0.1.0__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.
- version.py +9 -0
- yicloud/__init__.py +7 -0
- yicloud/base/__init__.py +58 -0
- yicloud/base/auth/__init__.py +10 -0
- yicloud/base/auth/credential.py +64 -0
- yicloud/base/auth/sign.py +80 -0
- yicloud/base/client.py +313 -0
- yicloud/base/config.py +62 -0
- yicloud/base/errs/__init__.py +292 -0
- yicloud/base/log/__init__.py +43 -0
- yicloud/base/log/logger.py +123 -0
- yicloud/base/log/std.py +70 -0
- yicloud/base/msgs/__init__.py +226 -0
- yicloud/base/utils/__init__.py +6 -0
- yicloud/base/utils/helps.py +110 -0
- yicloud/base/utils/retry/__init__.py +27 -0
- yicloud/base/utils/retry/retry.py +162 -0
- yicloud/services/__init__.py +24 -0
- yicloud/services/bc/__init__.py +9 -0
- yicloud/services/bc/actions.py +23 -0
- yicloud/services/bc/client.py +19 -0
- yicloud/services/bc/models.py +61 -0
- yicloud/services/fs/__init__.py +29 -0
- yicloud/services/fs/actions.py +109 -0
- yicloud/services/fs/client.py +19 -0
- yicloud/services/fs/models.py +152 -0
- yicloud/services/iam/__init__.py +27 -0
- yicloud/services/iam/actions.py +304 -0
- yicloud/services/iam/client.py +19 -0
- yicloud/services/iam/models.py +276 -0
- yicloud/services/job/__init__.py +44 -0
- yicloud/services/job/actions.py +167 -0
- yicloud/services/job/client.py +19 -0
- yicloud/services/job/models.py +268 -0
- yicloud/services/mc/__init__.py +59 -0
- yicloud/services/mc/actions.py +221 -0
- yicloud/services/mc/client.py +21 -0
- yicloud/services/mc/models.py +322 -0
- yicloud/services/modelrepo/__init__.py +33 -0
- yicloud/services/modelrepo/actions.py +163 -0
- yicloud/services/modelrepo/client.py +19 -0
- yicloud/services/modelrepo/models.py +146 -0
- yicloud/services/modelset/__init__.py +45 -0
- yicloud/services/modelset/actions.py +130 -0
- yicloud/services/modelset/client.py +19 -0
- yicloud/services/modelset/models.py +356 -0
- yicloud/services/oss/__init__.py +25 -0
- yicloud/services/oss/actions.py +83 -0
- yicloud/services/oss/client.py +19 -0
- yicloud/services/oss/models.py +113 -0
- yicloud/services/registry/__init__.py +42 -0
- yicloud/services/registry/actions.py +208 -0
- yicloud/services/registry/client.py +19 -0
- yicloud/services/registry/models.py +183 -0
- yicloud_sdk_python-0.1.0.dist-info/METADATA +145 -0
- yicloud_sdk_python-0.1.0.dist-info/RECORD +59 -0
- yicloud_sdk_python-0.1.0.dist-info/WHEEL +5 -0
- yicloud_sdk_python-0.1.0.dist-info/licenses/LICENSE +202 -0
- yicloud_sdk_python-0.1.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Code generated from Go SDK's services/oss/models.go. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Optional, List
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# AuthType constants
|
|
8
|
+
class AuthType:
|
|
9
|
+
"""Authorization type constants matching Go SDK."""
|
|
10
|
+
CanonicalUser = "CanonicalUser"
|
|
11
|
+
GROUP = "GROUP"
|
|
12
|
+
PROJECT = "PROJECT"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# AuthMode constants
|
|
16
|
+
class AuthMode:
|
|
17
|
+
"""Authorization mode constants matching Go SDK."""
|
|
18
|
+
READONLY = "READONLY"
|
|
19
|
+
READWRITE = "READWRITE"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# State constants
|
|
23
|
+
class State:
|
|
24
|
+
"""Bucket state constants matching Go SDK."""
|
|
25
|
+
STATE_PENDING = "STATE_PENDING"
|
|
26
|
+
STATE_READY = "STATE_READY"
|
|
27
|
+
STATE_FAILED = "STATE_FAILED"
|
|
28
|
+
STATE_DELETED = "STATE_DELETED"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Auth constants
|
|
32
|
+
class Auth:
|
|
33
|
+
"""Authorization permission constants matching Go SDK."""
|
|
34
|
+
DENY = "DENY"
|
|
35
|
+
READONLY = "READONLY"
|
|
36
|
+
READWRITE = "READWRITE"
|
|
37
|
+
PUBLIC_READ = "PUBLIC_READ"
|
|
38
|
+
ADMIN = "ADMIN"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
@dataclass
|
|
42
|
+
class Authorization:
|
|
43
|
+
"""Authorization entry matching Go SDK's Authorization struct."""
|
|
44
|
+
Type: str = ""
|
|
45
|
+
Name: str = ""
|
|
46
|
+
Mode: str = ""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@dataclass
|
|
50
|
+
class CreateBucketRequest:
|
|
51
|
+
"""Create bucket request matching Go SDK's CreateBucketRequest struct."""
|
|
52
|
+
Bucket: str = ""
|
|
53
|
+
Description: Optional[str] = None
|
|
54
|
+
Authorizations: Optional[List[Authorization]] = None
|
|
55
|
+
Project: Optional[str] = None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@dataclass
|
|
59
|
+
class DeleteBucketRequest:
|
|
60
|
+
"""Delete bucket request matching Go SDK's DeleteBucketRequest struct."""
|
|
61
|
+
Bucket: str = ""
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@dataclass
|
|
65
|
+
class ListBucketsRequest:
|
|
66
|
+
"""List buckets request matching Go SDK's ListBucketsRequest struct."""
|
|
67
|
+
SortOrder: Optional[str] = None
|
|
68
|
+
Offset: Optional[int] = None
|
|
69
|
+
Limit: Optional[int] = None
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@dataclass
|
|
73
|
+
class UpdateBucketRequest:
|
|
74
|
+
"""Update bucket request matching Go SDK's UpdateBucketRequest struct."""
|
|
75
|
+
Bucket: str = ""
|
|
76
|
+
Description: Optional[str] = None
|
|
77
|
+
Authorizations: Optional[List[Authorization]] = None
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@dataclass
|
|
81
|
+
class GetBucketRequest:
|
|
82
|
+
"""Get bucket request matching Go SDK's GetBucketRequest struct."""
|
|
83
|
+
Bucket: Optional[str] = None
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@dataclass
|
|
87
|
+
class MessageResponse:
|
|
88
|
+
"""Message response matching Go SDK's MessageResponse struct."""
|
|
89
|
+
Message: str = ""
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
@dataclass
|
|
93
|
+
class BucketResponse:
|
|
94
|
+
"""Bucket response matching Go SDK's BucketResponse struct."""
|
|
95
|
+
Owner: str = ""
|
|
96
|
+
Bucket: str = ""
|
|
97
|
+
State: Optional[str] = None
|
|
98
|
+
Permission: Optional[str] = None
|
|
99
|
+
Authorizations: Optional[List[Authorization]] = None
|
|
100
|
+
Size: Optional[str] = None
|
|
101
|
+
Tenant: Optional[str] = None
|
|
102
|
+
Project: Optional[str] = None
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
@dataclass
|
|
106
|
+
class ListBucketsResponse:
|
|
107
|
+
"""List buckets response matching Go SDK's ListBucketsResponse struct."""
|
|
108
|
+
Total: int = 0
|
|
109
|
+
Items: List[BucketResponse] = None
|
|
110
|
+
|
|
111
|
+
def __post_init__(self):
|
|
112
|
+
if self.Items is None:
|
|
113
|
+
self.Items = []
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from yicloud.services.registry.client import RegistryClient as Client, client, use_client
|
|
2
|
+
from . import actions, models
|
|
3
|
+
|
|
4
|
+
from .actions import (
|
|
5
|
+
list_images,
|
|
6
|
+
delete_image,
|
|
7
|
+
list_project_repositories,
|
|
8
|
+
list_owner_repositories,
|
|
9
|
+
list_shared_repositories,
|
|
10
|
+
delete_repository,
|
|
11
|
+
create_repository,
|
|
12
|
+
list_project_images,
|
|
13
|
+
list_owner_images,
|
|
14
|
+
list_shared_images,
|
|
15
|
+
list_tenant_images,
|
|
16
|
+
list_cluster_images,
|
|
17
|
+
list_tenant_repositories,
|
|
18
|
+
list_cluster_repositories,
|
|
19
|
+
)
|
|
20
|
+
from .models import (
|
|
21
|
+
MaxLimit,
|
|
22
|
+
ImageResponse,
|
|
23
|
+
LabelResponse,
|
|
24
|
+
ListImagesReq,
|
|
25
|
+
ListTenantImagesReq,
|
|
26
|
+
ListClusterImagesReq,
|
|
27
|
+
ListTenantRepositoriesReq,
|
|
28
|
+
ListClusterRepositoriesReq,
|
|
29
|
+
ListImagesData,
|
|
30
|
+
DeleteImageReq,
|
|
31
|
+
ListProjectRepositoriesReq,
|
|
32
|
+
ListOwnerRepositoriesReq,
|
|
33
|
+
ListSharedRepositoriesReq,
|
|
34
|
+
RepositoryResponse,
|
|
35
|
+
ListRepositoriesData,
|
|
36
|
+
CreateRepositoryPermission,
|
|
37
|
+
CreateRepositoryReq,
|
|
38
|
+
DeleteRepositoryReq,
|
|
39
|
+
ProjectImagesReq,
|
|
40
|
+
OwnerImagesReq,
|
|
41
|
+
SharedImagesReq,
|
|
42
|
+
)
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
from yicloud.base import msgs
|
|
3
|
+
from yicloud.services.registry import models
|
|
4
|
+
from yicloud.services.registry.client import client
|
|
5
|
+
|
|
6
|
+
_PRODUCT_CODE = "registry"
|
|
7
|
+
_LAST_VERSION = "v1alpha1"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def list_images(ctx: Optional[dict], req: models.ListImagesReq) -> models.ListImagesData:
|
|
11
|
+
"""
|
|
12
|
+
GET /registry/v1alpha1/ListImages
|
|
13
|
+
Action: ListImages
|
|
14
|
+
|
|
15
|
+
Returns ListImagesData on success.
|
|
16
|
+
|
|
17
|
+
Raises YiCloudException on error.
|
|
18
|
+
"""
|
|
19
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListImages"
|
|
20
|
+
rsp = msgs.Rsp[models.ListImagesData]()
|
|
21
|
+
client.base.get(ctx, path, req, rsp)
|
|
22
|
+
return rsp.get_typed_data()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def delete_image(ctx: Optional[dict], req: models.DeleteImageReq) -> None:
|
|
26
|
+
"""
|
|
27
|
+
POST /registry/v1alpha1/DeleteImage
|
|
28
|
+
Action: DeleteImage
|
|
29
|
+
|
|
30
|
+
Raises YiCloudException on error.
|
|
31
|
+
"""
|
|
32
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/DeleteImage"
|
|
33
|
+
rsp = msgs.Rsp[None].empty()
|
|
34
|
+
client.base.post(ctx, path, req.__dict__, rsp)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def list_project_repositories(ctx: Optional[dict], req: models.ListProjectRepositoriesReq) -> models.ListRepositoriesData:
|
|
38
|
+
"""
|
|
39
|
+
GET /registry/v1alpha1/ListProjectRepositories
|
|
40
|
+
Action: ListProjectRepositories
|
|
41
|
+
|
|
42
|
+
Returns ListRepositoriesData on success.
|
|
43
|
+
|
|
44
|
+
Raises YiCloudException on error.
|
|
45
|
+
"""
|
|
46
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListProjectRepositories"
|
|
47
|
+
rsp = msgs.Rsp[models.ListRepositoriesData]()
|
|
48
|
+
client.base.get(ctx, path, req, rsp)
|
|
49
|
+
return rsp.get_typed_data()
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def list_owner_repositories(ctx: Optional[dict], req: models.ListOwnerRepositoriesReq) -> models.ListRepositoriesData:
|
|
53
|
+
"""
|
|
54
|
+
GET /registry/v1alpha1/ListOwnerRepositories
|
|
55
|
+
Action: ListOwnerRepositories
|
|
56
|
+
|
|
57
|
+
Returns ListRepositoriesData on success.
|
|
58
|
+
|
|
59
|
+
Raises YiCloudException on error.
|
|
60
|
+
"""
|
|
61
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListOwnerRepositories"
|
|
62
|
+
rsp = msgs.Rsp[models.ListRepositoriesData]()
|
|
63
|
+
client.base.get(ctx, path, req, rsp)
|
|
64
|
+
return rsp.get_typed_data()
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def list_shared_repositories(ctx: Optional[dict], req: models.ListSharedRepositoriesReq) -> models.ListRepositoriesData:
|
|
68
|
+
"""
|
|
69
|
+
GET /registry/v1alpha1/ListSharedRepositories
|
|
70
|
+
Action: ListSharedRepositories
|
|
71
|
+
|
|
72
|
+
Returns ListRepositoriesData on success.
|
|
73
|
+
|
|
74
|
+
Raises YiCloudException on error.
|
|
75
|
+
"""
|
|
76
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListSharedRepositories"
|
|
77
|
+
rsp = msgs.Rsp[models.ListRepositoriesData]()
|
|
78
|
+
client.base.get(ctx, path, req, rsp)
|
|
79
|
+
return rsp.get_typed_data()
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def delete_repository(ctx: Optional[dict], req: models.DeleteRepositoryReq) -> None:
|
|
83
|
+
"""
|
|
84
|
+
POST /registry/v1alpha1/DeleteRepository
|
|
85
|
+
Action: DeleteRepository
|
|
86
|
+
|
|
87
|
+
Raises YiCloudException on error.
|
|
88
|
+
"""
|
|
89
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/DeleteRepository"
|
|
90
|
+
rsp = msgs.Rsp[None].empty()
|
|
91
|
+
client.base.post(ctx, path, req.__dict__, rsp)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def create_repository(ctx: Optional[dict], req: models.CreateRepositoryReq) -> None:
|
|
95
|
+
"""
|
|
96
|
+
POST /registry/v1alpha1/CreateRepository
|
|
97
|
+
Action: CreateRepository
|
|
98
|
+
|
|
99
|
+
Raises YiCloudException on error.
|
|
100
|
+
"""
|
|
101
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/CreateRepository"
|
|
102
|
+
rsp = msgs.Rsp[None].empty()
|
|
103
|
+
client.base.post(ctx, path, req.__dict__, rsp)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def list_project_images(ctx: Optional[dict], req: models.ProjectImagesReq) -> models.ListImagesData:
|
|
107
|
+
"""
|
|
108
|
+
GET /registry/v1alpha1/ListProjectImages
|
|
109
|
+
Action: ListProjectImages
|
|
110
|
+
|
|
111
|
+
Returns ListImagesData on success.
|
|
112
|
+
|
|
113
|
+
Raises YiCloudException on error.
|
|
114
|
+
"""
|
|
115
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListProjectImages"
|
|
116
|
+
rsp = msgs.Rsp[models.ListImagesData]()
|
|
117
|
+
client.base.get(ctx, path, req, rsp)
|
|
118
|
+
return rsp.get_typed_data()
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def list_owner_images(ctx: Optional[dict], req: models.OwnerImagesReq) -> models.ListImagesData:
|
|
122
|
+
"""
|
|
123
|
+
GET /registry/v1alpha1/ListOwnerImages
|
|
124
|
+
Action: ListOwnerImages
|
|
125
|
+
|
|
126
|
+
Returns ListImagesData on success.
|
|
127
|
+
|
|
128
|
+
Raises YiCloudException on error.
|
|
129
|
+
"""
|
|
130
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListOwnerImages"
|
|
131
|
+
rsp = msgs.Rsp[models.ListImagesData]()
|
|
132
|
+
client.base.get(ctx, path, req, rsp)
|
|
133
|
+
return rsp.get_typed_data()
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def list_shared_images(ctx: Optional[dict], req: models.SharedImagesReq) -> models.ListImagesData:
|
|
137
|
+
"""
|
|
138
|
+
GET /registry/v1alpha1/ListSharedImages
|
|
139
|
+
Action: ListSharedImages
|
|
140
|
+
|
|
141
|
+
Returns ListImagesData on success.
|
|
142
|
+
|
|
143
|
+
Raises YiCloudException on error.
|
|
144
|
+
"""
|
|
145
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListSharedImages"
|
|
146
|
+
rsp = msgs.Rsp[models.ListImagesData]()
|
|
147
|
+
client.base.get(ctx, path, req, rsp)
|
|
148
|
+
return rsp.get_typed_data()
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def list_tenant_images(ctx: Optional[dict], req: models.ListTenantImagesReq) -> models.ListImagesData:
|
|
152
|
+
"""
|
|
153
|
+
GET /registry/v1alpha1/ListTenantImages
|
|
154
|
+
Action: ListTenantImages
|
|
155
|
+
|
|
156
|
+
Returns ListImagesData on success.
|
|
157
|
+
|
|
158
|
+
Raises YiCloudException on error.
|
|
159
|
+
"""
|
|
160
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListTenantImages"
|
|
161
|
+
rsp = msgs.Rsp[models.ListImagesData]()
|
|
162
|
+
client.base.get(ctx, path, req, rsp)
|
|
163
|
+
return rsp.get_typed_data()
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def list_cluster_images(ctx: Optional[dict], req: models.ListClusterImagesReq) -> models.ListImagesData:
|
|
167
|
+
"""
|
|
168
|
+
GET /registry/v1alpha1/ListClusterImages
|
|
169
|
+
Action: ListClusterImages
|
|
170
|
+
|
|
171
|
+
Returns ListImagesData on success.
|
|
172
|
+
|
|
173
|
+
Raises YiCloudException on error.
|
|
174
|
+
"""
|
|
175
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListClusterImages"
|
|
176
|
+
rsp = msgs.Rsp[models.ListImagesData]()
|
|
177
|
+
client.base.get(ctx, path, req, rsp)
|
|
178
|
+
return rsp.get_typed_data()
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def list_tenant_repositories(ctx: Optional[dict], req: models.ListTenantRepositoriesReq) -> models.ListRepositoriesData:
|
|
182
|
+
"""
|
|
183
|
+
GET /registry/v1alpha1/ListTenantRepositories
|
|
184
|
+
Action: ListTenantRepositories
|
|
185
|
+
|
|
186
|
+
Returns ListRepositoriesData on success.
|
|
187
|
+
|
|
188
|
+
Raises YiCloudException on error.
|
|
189
|
+
"""
|
|
190
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListTenantRepositories"
|
|
191
|
+
rsp = msgs.Rsp[models.ListRepositoriesData]()
|
|
192
|
+
client.base.get(ctx, path, req, rsp)
|
|
193
|
+
return rsp.get_typed_data()
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def list_cluster_repositories(ctx: Optional[dict], req: models.ListClusterRepositoriesReq) -> models.ListRepositoriesData:
|
|
197
|
+
"""
|
|
198
|
+
GET /registry/v1alpha1/ListClusterRepositories
|
|
199
|
+
Action: ListClusterRepositories
|
|
200
|
+
|
|
201
|
+
Returns ListRepositoriesData on success.
|
|
202
|
+
|
|
203
|
+
Raises YiCloudException on error.
|
|
204
|
+
"""
|
|
205
|
+
path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ListClusterRepositories"
|
|
206
|
+
rsp = msgs.Rsp[models.ListRepositoriesData]()
|
|
207
|
+
client.base.get(ctx, path, req, rsp)
|
|
208
|
+
return rsp.get_typed_data()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from yicloud.base import Client
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class RegistryClient:
|
|
5
|
+
"""Registry service client, matching Go SDK's services/registry/client.go."""
|
|
6
|
+
|
|
7
|
+
def __init__(self, base_client: Client = None):
|
|
8
|
+
self.base = base_client
|
|
9
|
+
self.product_code = "registry"
|
|
10
|
+
self.last_version = "v1alpha1"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Singleton matching Go SDK
|
|
14
|
+
client: RegistryClient = RegistryClient()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def use_client(cli: Client) -> None:
|
|
18
|
+
"""Set the base client for Registry service."""
|
|
19
|
+
client.base = cli
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import Optional, List
|
|
3
|
+
|
|
4
|
+
# Constants
|
|
5
|
+
MaxLimit = 100
|
|
6
|
+
|
|
7
|
+
# Models
|
|
8
|
+
@dataclass
|
|
9
|
+
class ImageResponse:
|
|
10
|
+
ImageName: str # json:"ImageName"
|
|
11
|
+
RepositoryId: str # json:"RepositoryId"
|
|
12
|
+
Digest: str # json:"Digest"
|
|
13
|
+
Tag: str # json:"Tag"
|
|
14
|
+
Size: int # json:"Size"
|
|
15
|
+
Architecture: str # json:"Architecture"
|
|
16
|
+
OS: str # json:"OS"
|
|
17
|
+
Namespace: Optional[str] = None # json:"Namespace,omitempty"
|
|
18
|
+
Project: Optional[str] = None # json:"Project,omitempty"
|
|
19
|
+
QuotaGroup: Optional[str] = None # json:"QuotaGroup,omitempty"
|
|
20
|
+
PushTime: Optional[str] = None # json:"PushTime,omitempty"
|
|
21
|
+
PullTime: Optional[str] = None # json:"PullTime,omitempty"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@dataclass
|
|
25
|
+
class LabelResponse:
|
|
26
|
+
LabelId: int # json:"LabelId"
|
|
27
|
+
Name: str # json:"Name"
|
|
28
|
+
Description: str # json:"Description"
|
|
29
|
+
Color: str # json:"Color"
|
|
30
|
+
Level: str # json:"-" (ignored in JSON)
|
|
31
|
+
Scope: str # json:"Scope"
|
|
32
|
+
ProjectId: int # json:"ProjectId"
|
|
33
|
+
CreationTime: str # json:"CreationTime"
|
|
34
|
+
UpdateTime: str # json:"UpdateTime"
|
|
35
|
+
Deleted: bool # json:"Deleted"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@dataclass
|
|
39
|
+
class ListImagesReq:
|
|
40
|
+
Namespace: str # query:"Namespace"
|
|
41
|
+
Repository: str # query:"Repository"
|
|
42
|
+
SortBy: str = "" # query:"SortBy"
|
|
43
|
+
Offset: int = 0 # query:"Offset"
|
|
44
|
+
Limit: int = 20 # query:"Limit"
|
|
45
|
+
Label: str = "" # query:"Label"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@dataclass
|
|
49
|
+
class ListTenantImagesReq:
|
|
50
|
+
Project: str = "" # query:"Project"
|
|
51
|
+
Label: str = "" # query:"Label"
|
|
52
|
+
Offset: int = 0 # query:"Offset"
|
|
53
|
+
Limit: int = 20 # query:"Limit" (max: 100)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
@dataclass
|
|
57
|
+
class ListClusterImagesReq:
|
|
58
|
+
Label: str = "" # query:"Label"
|
|
59
|
+
Offset: int = 0 # query:"Offset"
|
|
60
|
+
Limit: int = 20 # query:"Limit" (max: 100)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
@dataclass
|
|
64
|
+
class ListTenantRepositoriesReq:
|
|
65
|
+
Project: str = "" # query:"Project"
|
|
66
|
+
Offset: int = 0 # query:"Offset"
|
|
67
|
+
Limit: int = 20 # query:"Limit" (max: 100)
|
|
68
|
+
RepositoryName: str = "" # query:"RepositoryName"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@dataclass
|
|
72
|
+
class ListClusterRepositoriesReq:
|
|
73
|
+
Offset: int = 0 # query:"Offset"
|
|
74
|
+
Limit: int = 20 # query:"Limit"
|
|
75
|
+
RepositoryName: str = "" # query:"RepositoryName"
|
|
76
|
+
SortBy: str = "" # query:"SortBy"
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@dataclass
|
|
80
|
+
class ListImagesData:
|
|
81
|
+
Items: Optional[List[ImageResponse]] = None # json:"Items"
|
|
82
|
+
Total: int = 0 # json:"Total"
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
@dataclass
|
|
86
|
+
class DeleteImageReq:
|
|
87
|
+
Project: str # json:"Project"
|
|
88
|
+
RepoName: str # json:"RepoName"
|
|
89
|
+
Tag: str # json:"Tag"
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
@dataclass
|
|
93
|
+
class ListProjectRepositoriesReq:
|
|
94
|
+
Project: str # query:"Project"
|
|
95
|
+
Offset: int = 0 # query:"Offset"
|
|
96
|
+
Limit: int = 10 # query:"Limit" (max: 100)
|
|
97
|
+
RepositoryName: str = "" # query:"RepositoryName"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@dataclass
|
|
101
|
+
class ListOwnerRepositoriesReq:
|
|
102
|
+
Project: str # query:"Project"
|
|
103
|
+
Offset: int = 0 # query:"Offset"
|
|
104
|
+
Limit: int = 10 # query:"Limit" (max: 100)
|
|
105
|
+
RepositoryName: str = "" # query:"RepositoryName"
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
@dataclass
|
|
109
|
+
class ListSharedRepositoriesReq:
|
|
110
|
+
Project: str # query:"Project"
|
|
111
|
+
Offset: int = 0 # query:"Offset"
|
|
112
|
+
Limit: int = 10 # query:"Limit" (max: 100)
|
|
113
|
+
RepositoryName: str = "" # query:"RepositoryName"
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@dataclass
|
|
117
|
+
class RepositoryResponse:
|
|
118
|
+
RepositoryId: str # json:"RepositoryId"
|
|
119
|
+
RepositoryName: str # json:"RepositoryName"
|
|
120
|
+
Project: str # json:"Project"
|
|
121
|
+
Description: str # json:"Description"
|
|
122
|
+
PullCount: int # json:"PullCount"
|
|
123
|
+
StarCount: int # json:"StarCount"
|
|
124
|
+
TagsCount: int # json:"TagsCount"
|
|
125
|
+
Creator: str # json:"Creator"
|
|
126
|
+
Permission: str # json:"Permission"
|
|
127
|
+
PermissionDisplay: str # json:"PermissionDisplay"
|
|
128
|
+
CreationTime: str # json:"CreationTime"
|
|
129
|
+
CreatorId: Optional[str] = None # json:"CreatorId,omitempty"
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
@dataclass
|
|
133
|
+
class ListRepositoriesData:
|
|
134
|
+
Items: Optional[List[RepositoryResponse]] = None # json:"Items"
|
|
135
|
+
Total: int = 0 # json:"Total"
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
@dataclass
|
|
139
|
+
class CreateRepositoryPermission:
|
|
140
|
+
Permission: str # json:"Permission"
|
|
141
|
+
SubjectName: str # json:"SubjectName"
|
|
142
|
+
SubjectType: str # json:"SubjectType"
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
@dataclass
|
|
146
|
+
class CreateRepositoryReq:
|
|
147
|
+
Project: str = "" # json:"Project,omitempty"
|
|
148
|
+
RepoName: str = "" # json:"RepoName"
|
|
149
|
+
RepoType: str = "" # json:"RepoType"
|
|
150
|
+
Permissions: Optional[List[CreateRepositoryPermission]] = None # json:"Permissions,omitempty"
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
@dataclass
|
|
154
|
+
class DeleteRepositoryReq:
|
|
155
|
+
Project: str = "" # json:"Project,omitempty"
|
|
156
|
+
RepoName: str = "" # json:"RepoName"
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
@dataclass
|
|
160
|
+
class ProjectImagesReq:
|
|
161
|
+
Project: str # query:"Project"
|
|
162
|
+
Offset: int = 0 # query:"Offset"
|
|
163
|
+
Limit: int = 20 # query:"Limit"
|
|
164
|
+
RepositoryName: str = "" # query:"RepositoryName"
|
|
165
|
+
Label: str = "" # query:"Label"
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
@dataclass
|
|
169
|
+
class OwnerImagesReq:
|
|
170
|
+
Project: str # query:"Project"
|
|
171
|
+
Offset: int = 0 # query:"Offset"
|
|
172
|
+
Limit: int = 20 # query:"Limit"
|
|
173
|
+
RepositoryName: str = "" # query:"RepositoryName"
|
|
174
|
+
Label: str = "" # query:"Label"
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@dataclass
|
|
178
|
+
class SharedImagesReq:
|
|
179
|
+
Project: str # query:"Project"
|
|
180
|
+
Offset: int = 0 # query:"Offset"
|
|
181
|
+
Limit: int = 20 # query:"Limit"
|
|
182
|
+
RepositoryName: str = "" # query:"RepositoryName"
|
|
183
|
+
Label: str = "" # query:"Label"
|