Skip to content

Commit

Permalink
Fix API for rdma.get_card_choices (#14955)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeagherix authored Nov 14, 2024
1 parent c251202 commit eeece4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/middlewared/middlewared/api/v25_04_0/rdma.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from middlewared.api.base import BaseModel, single_argument_result
from middlewared.api.base import BaseModel
from typing import Literal

__all__ = [
Expand All @@ -25,14 +25,18 @@ class RdmaCardConfigArgs(BaseModel):
pass


@single_argument_result
class RdmaCardConfigResult(BaseModel):
class RdmaCardConfig(BaseModel):
name: str
serial: str
product: str
part_number: str
links: list[RdmaLinkConfig]


class RdmaCardConfigResult(BaseModel):
result: list[RdmaCardConfig]


class RdmaCapableProtocolsArgs(BaseModel):
pass

Expand Down
2 changes: 1 addition & 1 deletion src/middlewared/middlewared/plugins/rdma/rdma.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_card_choices(self):
"""Return a list containing details about each RDMA card. Dual cards
will contain two RDMA links."""
self.logger.info('Fetching RDMA card choices')
links = self.middleware.call_sync('rdma.get_link_choices')
links = self.middleware.call_sync('rdma.get_link_choices', True)
grouper = {}
for link in links:
rdma = link["rdma"]
Expand Down

0 comments on commit eeece4a

Please sign in to comment.