Introduce apemanager rpc interface #215

Merged
fyrchik merged 3 commits from aarifullin/frostfs-sdk-go:feat/apemanager into master 2024-05-14 13:06:56 +00:00
Collaborator
  • go.mod: Update frostfs-api-go/v2 package version
  • Introduce Chain, ChainTarget and TargetType.
  • Implement api-v2 converters for the introduced types. Add unit-tests.

client: Introduce apemanager rpc interface

  • Introduce APEManagerAddChain, APEManagerRemoveChain, APEManagerListChains.
  • Introduce reqeuest/response types for these handlers (Prm*, Res*).
  • Inroduce status type for apemanager APEManagerAccessDenied; add unit-tests.
* go.mod: Update frostfs-api-go/v2 package version * Introduce `Chain`, `ChainTarget` and `TargetType`. * Implement api-v2 converters for the introduced types. Add unit-tests. client: Introduce apemanager rpc interface * Introduce `APEManagerAddChain`, `APEManagerRemoveChain`, `APEManagerListChains`. * Introduce reqeuest/response types for these handlers (Prm*, Res*). * Inroduce status type for apemanager `APEManagerAccessDenied`; add unit-tests.
aarifullin added 1 commit 2024-04-25 19:14:06 +00:00
DCO / DCO (pull_request) Failing after 1m0s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m16s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m31s Details
Tests and linters / Lint (pull_request) Successful in 2m46s Details
7e44e49aa7
[#XX] client: apemanager
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
aarifullin force-pushed feat/apemanager from 7e44e49aa7 to d01e6fbbe4 2024-05-06 10:35:55 +00:00 Compare
aarifullin force-pushed feat/apemanager from d01e6fbbe4 to 0cc57a80eb 2024-05-06 11:37:02 +00:00 Compare
aarifullin force-pushed feat/apemanager from 0cc57a80eb to 5da49255eb 2024-05-06 12:25:07 +00:00 Compare
aarifullin force-pushed feat/apemanager from 5da49255eb to 93c8923d33 2024-05-06 12:33:35 +00:00 Compare
aarifullin force-pushed feat/apemanager from 93c8923d33 to 60a3fb7066 2024-05-06 13:12:21 +00:00 Compare
aarifullin force-pushed feat/apemanager from 60a3fb7066 to 7deda2f8c9 2024-05-06 13:39:53 +00:00 Compare
aarifullin changed title from WIP: [#XX] client: apemanager to Introduce apemanager rpc interface 2024-05-06 13:44:02 +00:00
aarifullin requested review from storage-core-committers 2024-05-06 13:50:47 +00:00
aarifullin requested review from dkirillov 2024-05-06 13:54:17 +00:00
aarifullin requested review from storage-core-developers 2024-05-06 13:54:20 +00:00
fyrchik reviewed 2024-05-07 13:16:26 +00:00
@ -0,0 +10,4 @@
type Chain struct {
// Raw is the encoded chain representation.
Raw *[]byte

[]byte is already a pointer type, what is the reason for double indirection?

`[]byte` is already a pointer type, what is the reason for double indirection?
Poster
Collaborator

Nevermind :). Fixed. I just wanted to make a validator and check if Raw was set but actually if Raw is not set then it is left nil without this pointer anyway.

Nevermind :). Fixed. I just wanted to make a validator and check if `Raw` was set but actually if `Raw` is not set then it is left `nil` without this pointer anyway.
fyrchik marked this conversation as resolved
aarifullin force-pushed feat/apemanager from 7deda2f8c9 to 2698bb9f12 2024-05-08 08:20:43 +00:00 Compare
aarifullin force-pushed feat/apemanager from 2698bb9f12 to 1852e8991e 2024-05-08 09:19:05 +00:00 Compare
fyrchik reviewed 2024-05-08 09:32:11 +00:00
@ -0,0 +37,4 @@
apemanager.WriteAccessDeniedDesc(&x.v2, reason)
}
func (x APEManagerAccessDenied) Reason() string {

Please, let's write doc-comments for public methods.

Please, let's write doc-comments for public methods.
Poster
Collaborator

Alright. I've added comments. Please check them out

Alright. I've added comments. Please check them out
dstepanov-yadro approved these changes 2024-05-08 13:14:55 +00:00
aarifullin force-pushed feat/apemanager from 1852e8991e to b59a96328e 2024-05-08 13:42:03 +00:00 Compare
fyrchik approved these changes 2024-05-13 07:54:40 +00:00
aarifullin force-pushed feat/apemanager from b59a96328e to d7956ee197 2024-05-13 12:55:53 +00:00 Compare
aarifullin force-pushed feat/apemanager from d7956ee197 to bfe8d7a25b 2024-05-13 13:08:59 +00:00 Compare
aarifullin requested review from dstepanov-yadro 2024-05-13 13:10:16 +00:00
aarifullin requested review from fyrchik 2024-05-13 13:10:18 +00:00
Poster
Collaborator

FYI: I had put changes to Error() method and I have rolled them back. So, there are no changes after these two approvals

FYI: I had put changes to `Error()` method and I have rolled them back. So, there are no changes after these two approvals
acid-ant reviewed 2024-05-14 06:44:09 +00:00
@ -0,0 +60,4 @@
filledFieldCount++
}
if filledFieldCount != 1 {
Collaborator

You are calling this method each time when build requests, why not to make this check simpler just with c.Raw != nil?

You are calling this method each time when build requests, why not to make this check simpler just with `c.Raw != nil`?
Poster
Collaborator

Removed CheckValidity out :) (see comment below)

Removed `CheckValidity` out :) (see comment below)
fyrchik reviewed 2024-05-14 07:45:30 +00:00
@ -0,0 +53,4 @@
// CheckValidity checks if Chain is correctly formed from the point of
// its kind: it should not be empty and only one kind is allowed.
func (c *Chain) CheckValidity() error {

What is the purpose of this method? We have oneof already on the API boundary.

What is the purpose of this method? We have oneof already on the API boundary.
Poster
Collaborator

You're right, I didn't think about that. Removed CheckValidity out

You're right, I didn't think about that. Removed `CheckValidity` out
fyrchik marked this conversation as resolved
aarifullin force-pushed feat/apemanager from bfe8d7a25b to b2ad1f3b3e 2024-05-14 08:00:14 +00:00 Compare
fyrchik approved these changes 2024-05-14 10:04:08 +00:00
dstepanov-yadro approved these changes 2024-05-14 13:02:04 +00:00
fyrchik merged commit b2ad1f3b3e into master 2024-05-14 13:06:56 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#215
There is no content yet.