Project

General

Profile

Task #7803

Task #7761: uncloud v2

Write a django command to migrate opennebula VMs to regular VMs

Added by Nico Schottelius over 1 year ago. Updated 8 months ago.

Status:
Seen
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/02/2020
Due date:
% Done:

0%

Estimated time:
PM Check date:

Description

  • Basically take all Opennebula VMs that are in the DB and migrate them to uncloud_vm.VM and related models
  • need to create diskproducts and co.
  • Also create network cards
  • Long term: also create orders for it, but not now

Important Notes

When converting to an uncloud VM, be sure to include a reference to the source type (ceph, file) and the name (one/one-21432 or /path/to/file)

History

#1

Updated by Nico Schottelius over 1 year ago

  • Description updated (diff)
#2

Updated by Ahmed Bilal over 1 year ago

  • Status changed from New to Seen
#3

Updated by Ahmed Bilal over 1 year ago

Basically take all Opennebula VMs that are in the DB and migrate them to uncloud_vm.VM and related models

You talking about `uncloud_vm.VMProduct` because there is no VM.

#4

Updated by Nico Schottelius over 1 year ago

Correct!

writes:

#5

Updated by Ahmed Bilal over 1 year ago

Another thing, nico is that VMProduct is based on Product which is related to Order. So, how should I populate the Order field?

class VMProduct(Product):
    vmhost = models.ForeignKey(
        VMHost, on_delete=models.CASCADE, editable=False, blank=True, null=True
    )

    cores = models.IntegerField()
    ram_in_gb = models.FloatField()

class Product(models.Model):
    uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
    owner = models.ForeignKey(get_user_model(),
                              on_delete=models.CASCADE,
                              editable=False)

    description = "" 

    status = models.CharField(max_length=256,
                              choices = (
                                  ('pending', 'Pending'),
                                  ('being_created', 'Being created'),
                                  ('active', 'Active'),
                                  ('deleted', 'Deleted')
                              ),
                              default='pending'
    )

    order = models.ForeignKey(Order,
                              on_delete=models.CASCADE,
                              editable=False)

    class Meta:
        abstract = True

Thanks

#6

Updated by Nico Schottelius over 1 year ago

Populate the order field with

recurring_period = "monthly"

and pricing set to what you find on
datacenterlight.ch/ipv6onlyhosting.com - depends on whether there is an
ipv4 address or not

writes:

#7

Updated by Ahmed Bilal 8 months ago

  • Assignee deleted (Ahmed Bilal)

Also available in: Atom PDF