Skip to content

Commit 044c881

Browse files
S0okJuhalucinor
authored andcommitted
fix(block): Fix incorrect attachment_id(#71) (#72)
1 parent 0990e4b commit 044c881

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/openstack_mcp_server/tools/block_storage_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def get_volumes(self) -> list[Volume]:
3939
VolumeAttachment(
4040
server_id=attachment.get("server_id"),
4141
device=attachment.get("device"),
42-
attachment_id=attachment.get("id"),
42+
attachment_id=attachment.get("attachment_id"),
4343
),
4444
)
4545

@@ -80,7 +80,7 @@ def get_volume_details(self, volume_id: str) -> Volume:
8080
VolumeAttachment(
8181
server_id=attachment.get("server_id"),
8282
device=attachment.get("device"),
83-
attachment_id=attachment.get("id"),
83+
attachment_id=attachment.get("attachment_id"),
8484
),
8585
)
8686

tests/tools/test_block_storage_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,12 @@ def test_get_volume_details_with_attachments(
299299
{
300300
"server_id": "server-123",
301301
"device": "/dev/vdb",
302-
"id": "attach-1",
302+
"attachment_id": "attach-1",
303303
},
304304
{
305305
"server_id": "server-456",
306306
"device": "/dev/vdc",
307-
"id": "attach-2",
307+
"attachment_id": "attach-2",
308308
},
309309
]
310310

0 commit comments

Comments
 (0)