Skip to content

Comments

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

Open
baby-gnu wants to merge 1 commit intothe-berta-project:masterfrom
eole:fix/use-post-6.2-sched-api
Open

fix(api): use 6.2+ scheduled action API#13
baby-gnu wants to merge 1 commit intothe-berta-project:masterfrom
eole:fix/use-post-6.2-sched-api

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