Commit graph

12 commits

Author SHA1 Message Date
PCoder
cb16114aba Do not break the VM list when a VM's OpenNebula template was deleted
The "my virtual machines" page showed "We could not load your VMs due to a
backend connection error" for any user owning a VM whose template had been
removed from OpenNebula. OpenNebulaManager.get_template() converted every
failure, including WrongIdError for a missing template, into
ConnectionRefusedError, and VirtualMachineSerializer.get_configuration()
let that propagate, so one VM with a stale template id took down the whole
list. The only log output was an empty ERROR line, because WrongIdError
has no message.

* Add opennebula_api.exceptions.TemplateNotFoundError and raise it from
  get_template() for a missing template; keep ConnectionRefusedError for
  genuine backend failures and log them with a traceback.
* Add OpenNebulaManager.get_template_names() and resolve_template_id() so
  the serializer fetches the template pool once per list instead of
  constructing an OpenNebulaManager and fetching the pool for every VM.
* get_configuration() now falls back to the template name embedded in the
  VM name ("<template>-<vm id>") when the template is missing or the pool
  cannot be fetched, and logs why.
* Replace str.lstrip('public-') with a real prefix strip (lstrip removes a
  character set, so "public-ubuntu" became "ntu") and also strip
  "ipv6only-".
* ProcessVMSelectionMixin shows "configuration is no longer available"
  instead of an unhandled error when ordering a retired template.
* VirtualMachinesPlanListView logs the exception behind the banner.
* Add mock-based unit tests for the fallback, the UPDATED_TEMPLATES
  mapping, the single pool fetch and the new exception.

The UPDATED_TEMPLATES setting keeps working as an operational override for
mapping retired template ids to their replacements.
2026-10-19 20:53:32 +05:30
Arvind Tiwari
a306f59327
Update mixins.py 2018-04-09 03:12:41 +05:30
Arvind Tiwari
5dd29bb09e
Update mixins.py 2018-04-09 03:02:50 +05:30
PCoder
399c91d636 Add HostingContextMixin that sets the REDIRECT_TO_CMS and
MULTISITE_CMS_FALLBACK urls
2018-04-07 12:51:49 +02:00
Levi
3f198bb4de Fixed djangohosting, railshosting and nodehosting page. Fixed payment erro 2017-05-21 22:01:26 -05:00
Levi
07dc04018f cleaned code 2017-05-13 00:31:29 -05:00
Modulos
130c00c8ee API Integration
Please review carefully.
2017-05-12 12:07:05 +02:00
Levi
ed806910e6 adding integration opennebula-hosting app 2017-05-03 23:19:32 -05:00
Levi
e90c5fece0 Created generic view for vm pricing widget, Added VM configuration info on VM detail view, Fixed template bugs. Fixed Blog urls bugs 2016-06-30 01:23:14 -05:00
Levi
82ca7da20a As an admin I can change the VM ip using admin panel ,Fixed notification view count label, Fixed hosting company name on payment view, Added configuration in VM hosting page, Admin can changes the VM configuration using admin panel 2016-06-07 00:29:22 -05:00
Levi
1c5fc6a437 Added redirect urls after signup/login 2016-04-30 13:55:55 -05:00
Levi
38801abed7 Added View to render payment page, Added Payment and summary forms, Added Payment.js library to request stripe token , Added jQuery validator for handling payment form errors 2016-04-22 08:36:38 -05:00