-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Add get attachments tool #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add get_attachmet_id that return attchement details - Tests are updated and passing
- Add get attachments tool - Tests are updated and passing
- Add get attachments tool - Tests are updated and passing
- Add get attachments tool - Tests are updated and passing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 구현하신 정도의 volume attachment 정보는 get_volume_details()나 get_servers() 수준에서 제공하는 정보로 커버가 되지 않나 생각이 듭니다.
attachment가 생각보다 넓은 범위의 정보를 제공하고 있는데 혹시 찾아보셨나요? 우연(?)하게도 OSSCA 활동하면서 테스트 코드 기여항목중에 하나가 volume attachment 기능이였어요.
간단하고 짧게 정리하자면 volume attachments는 인스턴스-볼륨 간 연결 정보 보다는 Manila, Ironic, Magnum 과 같이 볼륨 리소스를 사용하지만 볼륨 attach/detach에 직접 관여하지 않는 컴포넌트를 위한 관리 목적을 갖고 있습니다.
그리고 하방으로는 Cinder 백엔드인 NFS, SAN iSCSI, ceph에서 제공하는 볼륨을 관리하는 내용도 있습니다.
만약 '연결' 자체를 목록으로 보고 싶은거라면 괜찮은 것 같습니다.
다만 조회시 리소스 ID 로만 매핑을 반환하기 때문에 추후에 tools 최적화를 하면서 대외적으로 노출하는 정보 보다는 tools 내부에서 활용하는 기능으로 사용하면 좋을것 같다는 의견 남겨드립니다.
조사하면서 찾아본 정보인데 시간 나실때 한번 훑어보시면 좋을것 같아요. 정리 글은 여기 입니다.
|
@platanus-kr
말씀대로 단순히 연결 정보만 확인하고 싶다면 server tool 내에서 해결할 수 있을 것 같습니다. 현재로써는 다양한 백엔드에 대해 테스트하기 어려우므로 좋은 정보 감사합니다. |
|
@platanus-kr |
|
이전에 보류한다고 말씀 드렸는데, 다만 attachments 도구를 모두 제작한 이후부터 말씀주신대로 관련 Discussion은 닫겠습니다. |
jja6312
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코멘트를 달긴 했지만 생산성을 위해 Approve로 올립니다! 코멘트를 보시고 동의하시면 수정후 merge하셔도 좋을것같아요.
| Get the list of attachments. | ||
| :param volume_id: The ID of the volume. | ||
| :param instance: The ID of the instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 보기엔 거의 훌륭하게 작성해주셨는데요,
@platanus-kr 님 comment를 보고 생각해본 바로는
docstring에 instance에 대해 instance id 대신 공식문서의 표현을 차용하는것은어떨까요?("volume attachments like nova, glance, ironic etc." 라는 구절이 있으니.. 이러한 것들의 id다 정도로요.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
일부 백엔드의 경우에는 instance id가 필요해요.
말씀해주신대로 다양한 백엔드를 지원하려면 백엔드 종류에 해당되는 인자를 추가하는 것이 좋을 것 같아요.
현재로써는 다양한 환경에서 테스트를 못하다보니 해당 기능은 보류하게 되었어요.
관련해서 이슈를 작성하겠습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음..인자를 추가하신다는게 제가 잘 이해가 안가는데요!
instance 인자가 nova뿐만아니라 다양한 block volume의 소비 주체를 포괄하고있다고 저는 이해했는데,
그 말인 즉슨 다양한 백엔드를 커버하기 위해서는 다른 인자를 추가하지 않아도 현재 코드가 이미 완성형이고, 나중에 추가되는 툴마다 테스트만 추가하면 되지않나 하는 의견이었습니다!
@S0okJu 님 의견은 get_attachments가 지금 구현하지 않은 백엔드툴들을 포괄하는 기능 구현이므로 테스트를 충분히 할 수 없으니 보류하겠다는 말씀이신거죠?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@platanus-kr |
platanus-kr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
알겠습니다 👍
| for attachment in conn.block_storage.attachments(**filter): | ||
| attachments.append( | ||
| AttachmentSummary( | ||
| id=attachment.id, | ||
| instance=attachment.instance, | ||
| volume_id=attachment.volume_id, | ||
| status=attachment.status, | ||
| ) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반환 필드 중에 아래 3가지는 추가되면 좋을것 같습니다.
attach_modemountpointconnection_info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Overview
get_attachmentstoolKey Changes
get_attachmetstools that return attachment listRelated Issues
Additional context