Introduce a method to list targets in Policy contract #78

Closed
opened 2024-02-06 13:18:47 +00:00 by aarifullin · 2 comments
Member

The chain listing has become more unambiguous - check here. So, we cannot list all chains by ListByPrefix('n', "", "") - the invocation lists only root-namespace chains.

But one problem is still relevant: we cannot determine which targets are kept in contract - we may never clean them out if their names are "forgotten". One method ListTargets should be enough to fix everything

Also, this could be consistent with ControlAPI that manages local overrides, because we already have such method

The chain listing has become more unambiguous - check [here](https://git.frostfs.info/TrueCloudLab/frostfs-contract/issues/67). So, we cannot list _all_ chains by `ListByPrefix('n', "", "")` - the invocation lists only root-namespace chains. But one problem is still relevant: we cannot determine which targets are kept in contract - we may never clean them out if their names are "forgotten". One method `ListTargets` should be enough to fix everything Also, this could be consistent with ControlAPI that manages local overrides, because we already have such method
aarifullin added the
discussion
label 2024-02-06 13:18:47 +00:00
Owner

There is a workaround to list all available namespace chains: ask FrostFS ID contract about all available namespaces and make additional requests per namespace in policy contract. I appreciate any simplifications in this routine.

By the way, is ListTargets going to return both namespace and container targets? Can we distinguish them on a contract level or they are all the same?

There is a workaround to list all available namespace chains: ask FrostFS ID contract about all available namespaces and make additional requests per namespace in policy contract. I appreciate any simplifications in this routine. By the way, is `ListTargets` going to return both namespace and container targets? Can we distinguish them on a contract level or they are all the same?
aarifullin self-assigned this 2024-02-06 13:43:27 +00:00
Author
Member

There is a workaround to list all available namespace chains: ask FrostFS ID contract about all available namespaces and make additional requests per namespace in policy contract. I appreciate any simplifications in this routine.

By the way, is ListTargets going to return both namespace and container targets? Can we distinguish them on a contract level or they are all the same?

Yes, we will do distinguish them

> There is a workaround to list all available namespace chains: ask FrostFS ID contract about all available namespaces and make additional requests per namespace in policy contract. I appreciate any simplifications in this routine. > > By the way, is `ListTargets` going to return both namespace and container targets? Can we distinguish them on a contract level or they are all the same? Yes, we will do distinguish them
Sign in to join this conversation.
No milestone
No project
No assignees
2 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-contract#78
No description provided.