Skip to content

Commit

Permalink
bug: Correct wrong specification for 'Create a new replication rule' #…
Browse files Browse the repository at this point in the history
…6515

This commit replaces the wrong specification for dids for 'Create a new
replication rule', it was previously specified as a list of strings. It is now
specified as a list of dictionaries containing two properties scope and name.
  • Loading branch information
GooseNight authored and bari12 committed Apr 17, 2024
1 parent 71d75d5 commit 92dbade
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/rucio/client/ruleclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from collections.abc import Sequence
from json import dumps, loads
from typing import Any, Optional, Union
from urllib.parse import quote_plus
Expand All @@ -30,7 +31,7 @@ class RuleClient(BaseClient):

def add_replication_rule(
self,
dids: list[str],
dids: Sequence[dict[str, str]],
copies: int,
rse_expression: str,
priority: int = 3,
Expand Down
9 changes: 8 additions & 1 deletion lib/rucio/web/rest/flaskapi/v1/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,14 @@ def post(self):
description: The list of data identifiers.
type: array
items:
type: string
type: object
properties:
scope:
description: The scope of the data identifier
type: string
name:
description: The name of the data identifier
type: string
account:
description: The account of the issuer.
type: string
Expand Down

0 comments on commit 92dbade

Please sign in to comment.