Skip to content
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

feat: add volume group API endpoint interaction #94

Merged
merged 4 commits into from
Nov 11, 2024

Conversation

summerwind
Copy link
Contributor

This PR adds the support of following MAAS API endpoint.

  • DELETE /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/: Delete volume group
  • GET /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/: Read a volume group
  • PUT /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/: Update a volume group
  • POST /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/op-create_logical_volume: Create a logical volume
  • POST /MAAS/api/2.0/nodes/{system_id}/volume-group/{id}/op-delete_logical_volume: Delete a logical volume
  • GET /MAAS/api/2.0/nodes/{system_id}/volume-groups/: List all volume groups
  • POST /MAAS/api/2.0/nodes/{system_id}/volume-groups/: Create a volume group

I think this change would resolve #86.

Copy link

github-actions bot commented Aug 3, 2024

Everyone contributing to this PR have now signed the CLA. Thanks!

@summerwind
Copy link
Contributor Author

I'm trying to fill out to the CLA form, but not sure what to enter the field 'Please add the Canonical Project Manager or contact'.

@skatsaounis
Copy link
Collaborator

Hi @summerwind,

Thank you for the contribution. You can put N/A for that box or my name and proceed. Please let me know when this is done or if you face any other issue.

@summerwind
Copy link
Contributor Author

@skatsaounis Thank you for following up!
I have signed the CLA form.

@summerwind
Copy link
Contributor Author

Is there anything else I should do?

@skatsaounis
Copy link
Collaborator

Hi @summerwind. Thank you for signing the CLA. As you observed already, I re-triggered the actions and now everything looks green. Please give us some time to review your PR and if any change is needed we will come back to you. Thank you for your patience 🙂

Copy link
Collaborator

@skatsaounis skatsaounis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @summerwind . I would like to apologize for the big delay in the review and also to thank you once again for your contribution. Overall the PR looks good but I was able to spot 1-2 things that need to change. I am happy to merge when they are addressed 🙂

SystemID string `json:"system_id,omitempty"`
HumanUsedSize string `json:"human_used_size,omitempty"`
Name string `json:"name,omitempty"`
LogicalVolumes []LogicalVolume `json:"logical_volumes,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using BlockDevice? or even better create a VirtualBlockDevice which is missing from our entities and is an extension of a BlockDevice? link-1 link-2 link-3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it is correct to use the BlockDevice type as is or to add VirtualBlockDevice. However using BlockDevice seems simpler and better at the moment, so I fixed it in 9464fad.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be more appropriate to define it as VirtualBlockDevice? I will make corrections if necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be ideal, yes. The only reason I proposed the BlockDevice was to not overwhelm you. You could give it a try and I would propose any missing piece afterwards.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added VirtualBlockDevice as an extension to BlockDevice in 374a4df. Could you please confirm that this is what you intended?

@summerwind
Copy link
Contributor Author

@skatsaounis Thanks for the review!
I've fixed the code according to your feedback.

Copy link

github-actions bot commented Oct 31, 2024

Everyone contributing to this PR have now signed the CLA. Thanks!

@summerwind
Copy link
Contributor Author

CLA Check seems to have failed due to certificate expiration.
https://github.com/canonical/gomaasclient/actions/runs/11621308073/job/32364801159?pr=94

Checking the following users on GitHub:
Check in the signed list service
Error occurred while checking user: certificate has expired

Copy link
Collaborator

@skatsaounis skatsaounis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1 Thank you for your contribution and the patience @summerwind

@skatsaounis skatsaounis merged commit d1b27f3 into canonical:master Nov 11, 2024
4 checks passed
@summerwind
Copy link
Contributor Author

Thank you for the review!

@summerwind summerwind deleted the add-volume-group branch November 12, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Add LVM Interfaces
2 participants