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

Fixes #13259 - Add create_additional_volume_api method #3088

Closed

Conversation

plumcraft
Copy link

Similar to Feature #11577, when creating a new vm using Openstack with Hammer API, additional volumes won't be created. I have implemented and tested this feature in our development environment.

I put only volume attributes via hammer .

hammer :
--volume="capacity=14"
--volume="capacity=15"

@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 1795944 must be in the format fixes #redmine_number - brief description.

If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project.

More guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 1795944 must be in the format fixes #redmine_number - brief description.

If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project.

More guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 1795944 must be in the format fixes #redmine_number - brief description.

If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project.

More guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

@domcleal
Copy link
Contributor

It looks like you're adding new commits with the fixed message. If you can squash your commits into a single one, then push that then it should fix the issue - see http://mattsnider.com/amending-and-squashing-commits-in-git/.

@dLobatog
Copy link
Member

[test]

@domcleal
Copy link
Contributor

@dLobatog would you mind reviewing this? I'm afraid I don't know anything about the subject.

@plumcraft please note there are some rubocop style errors, run rubocop locally to see them, or look at http://ci.theforeman.org/job/test_develop_pr_rubocop/5672/checkstyleResult/.

@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 116cedc must be in the format fixes #redmine_number - brief description.

If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project.

More guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor


# Iterate into volumes attributes
args[:volumes_attributes].each do |key, value|
boot_index = key.to_i + 1
Copy link
Member

Choose a reason for hiding this comment

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

This sets a 'hidden contract' where the order of the volumes you specify determines the boot order. Can you make this use boot_index from the arguments? If it's not available, then fine, default to this. Leave a comment mentioning it, as we would have to add that to the documentation.

Copy link
Author

Choose a reason for hiding this comment

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

Will do, thanks

@dLobatog
Copy link
Member

@plumcraft Thanks! I left a couple of comments inline to use the arguments instead of defaulting always to something. Also notice this won't work with the v1 Openstack API.

This will only work through hammer, which is not great. Would you mind adding some UI for this? We have some examples for other Compute resources under app/views/compute_resource_vms , also you can ask here or in https://kiwiirc.com/client/irc.freenode.net/?#theforeman-dev if you get lost.

I had to test this with #3051 as currently Openstack provisioning is broken in develop. Also testing this one made me realize this bug http://projects.theforeman.org/issues/13356 , so thanks for that 😄

@dLobatog dLobatog changed the title refs #13259 Add create_additional_volume_api method Fixes #13259 - Add create_additional_volume_api method Jan 25, 2016
@plumcraft
Copy link
Author

@dLobatog : How did you notice this won't work with the v1 ?
Because of the args[:block_device_mapping_v2] block ? It's in boot_from_volume method also.

@dLobatog : I'm going to check how to do the UI part and will let you know.

Thanks

@theforeman-bot
Copy link
Member

Thank you for your contribution, @plumcraft! This PR has been inactive for 6 months, closing for now.
Feel free to reopen when you return to it. This is an automated process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants