Skip to content

Commit 3e9281a

Browse files
authored
Fix admin token create (#72)
* Admin TokenCreate message was wrong * Add missing
1 parent 785d01f commit 3e9281a

File tree

11 files changed

+95
-67
lines changed

11 files changed

+95
-67
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: crate-ci/typos@master
2626

2727
- name: Set up Go
28-
uses: actions/setup-go@v5
28+
uses: actions/setup-go@v6
2929
with:
3030
go-version-file: 'go.mod'
3131
cache: false
@@ -43,7 +43,7 @@ jobs:
4343
uses: actions/checkout@v5
4444

4545
- name: Set up Python 3.13
46-
uses: actions/setup-python@v5
46+
uses: actions/setup-python@v6
4747
with:
4848
python-version: "3.13"
4949

doc/index.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13254,10 +13254,10 @@ <h3 id="metalstack.admin.v2.TokenServiceCreateRequest">TokenServiceCreateRequest
1325413254
</tr>
1325513255

1325613256
<tr>
13257-
<td>token</td>
13258-
<td><a href="#metalstack.api.v2.Token">metalstack.api.v2.Token</a></td>
13257+
<td>token_create_request</td>
13258+
<td><a href="#metalstack.api.v2.TokenServiceCreateRequest">metalstack.api.v2.TokenServiceCreateRequest</a></td>
1325913259
<td></td>
13260-
<td><p>Token which was should be created </p></td>
13260+
<td><p>TokenCreateRequest which should be created </p></td>
1326113261
</tr>
1326213262

1326313263
</tbody>
@@ -13791,6 +13791,13 @@ <h3 id="metalstack.api.v2.MethodServiceTokenScopedListResponse">MethodServiceTok
1379113791
<td><p>AdminRole defines the admin role of the token owner </p></td>
1379213792
</tr>
1379313793

13794+
<tr>
13795+
<td>infra_role</td>
13796+
<td><a href="#metalstack.api.v2.InfraRole">InfraRole</a></td>
13797+
<td>optional</td>
13798+
<td><p>InfraRole defines the infrastructure role of the token owner </p></td>
13799+
</tr>
13800+
1379413801
</tbody>
1379513802
</table>
1379613803

go/metalstack/admin/v2/token.pb.go

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/metalstack/api/v2/method.pb.go

Lines changed: 35 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MAKEFLAGS += --no-print-directory
2-
BUF_VERSION := 1.58.0
2+
BUF_VERSION := 1.60.0
33

44
_buf:
55
docker run --rm \

proto/metalstack/admin/v2/token.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ message TokenServiceCreateRequest {
5757
min_len: 2
5858
max_len: 512
5959
}];
60-
// Token which was should be created
61-
metalstack.api.v2.Token token = 2;
60+
// TokenCreateRequest which should be created
61+
metalstack.api.v2.TokenServiceCreateRequest token_create_request = 2;
6262
}
6363

6464
// TokenServiceCreateResponse is the response payload of a token create request

proto/metalstack/api/v2/method.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ message MethodServiceTokenScopedListResponse {
4141
map<string, TenantRole> tenant_roles = 4;
4242
// AdminRole defines the admin role of the token owner
4343
optional AdminRole admin_role = 5 [(buf.validate.field).enum.defined_only = true];
44+
// InfraRole defines the infrastructure role of the token owner
45+
optional InfraRole infra_role = 6 [(buf.validate.field).enum.defined_only = true];
4446
}

python/metalstack/admin/v2/token_pb2.py

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/metalstack/admin/v2/token_pb2.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ class TokenServiceRevokeResponse(_message.Message):
3434
def __init__(self) -> None: ...
3535

3636
class TokenServiceCreateRequest(_message.Message):
37-
__slots__ = ("user", "token")
37+
__slots__ = ("user", "token_create_request")
3838
USER_FIELD_NUMBER: _ClassVar[int]
39-
TOKEN_FIELD_NUMBER: _ClassVar[int]
39+
TOKEN_CREATE_REQUEST_FIELD_NUMBER: _ClassVar[int]
4040
user: str
41-
token: _token_pb2.Token
42-
def __init__(self, user: _Optional[str] = ..., token: _Optional[_Union[_token_pb2.Token, _Mapping]] = ...) -> None: ...
41+
token_create_request: _token_pb2.TokenServiceCreateRequest
42+
def __init__(self, user: _Optional[str] = ..., token_create_request: _Optional[_Union[_token_pb2.TokenServiceCreateRequest, _Mapping]] = ...) -> None: ...
4343

4444
class TokenServiceCreateResponse(_message.Message):
4545
__slots__ = ("token", "secret")

0 commit comments

Comments
 (0)