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

fix(api): use 6.2+ scheduled action API #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

baby-gnu
Copy link
Contributor

  • berta.gemspec: require opennebula library between 6.2 and 6.4.

  • lib/berta/entities/expiration.rb (Berta::Entities::Expiration.from_xml):
    expiration can be relative to the start time of the virtual machine,
    always make it a full timestamp.

  • lib/berta/entities/expiration.rb (Berta::Entities::Expiration#template):
    create punctual schedule action with required END_TYPE.

  • lib/berta/virtual_machine_handler.rb (Berta::VirtualMachineHandler):
    instead of updating the VM template, use the sched_action_add and
    sched_action_delete API directly.
    Lookup scheduled action under TEMPLATE instead of old USER_TEMPLATE.

Fixes: #12

* berta.gemspec: require opennebula library between 6.2 and 6.4.

* lib/berta/entities/expiration.rb (Berta::Entities::Expiration.from_xml):
  expiration can be relative to the start time of the virtual machine,
  always make it a full timestamp.

* lib/berta/entities/expiration.rb (Berta::Entities::Expiration#template):
  create punctual schedule action with required `END_TYPE`.

* lib/berta/virtual_machine_handler.rb (Berta::VirtualMachineHandler):
  instead of updating the VM template, use the `sched_action_add` and
  `sched_action_delete` API directly.
  Lookup scheduled action under `TEMPLATE` instead of old `USER_TEMPLATE`.
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.

Expiration is never applied on OpenNebula 6.2 and newer
1 participant