2015-04-08 14:41:09 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2024-07-12 09:41:44 +00:00
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
2021-04-22 12:18:01 +00:00
|
|
|
import django.db.models.deletion
|
2015-04-08 14:41:09 +00:00
|
|
|
import orchestra.core.validators
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='VPS',
|
|
|
|
fields=[
|
2024-07-12 09:41:44 +00:00
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('hostname', models.CharField(max_length=256, unique=True, validators=[orchestra.core.validators.validate_hostname], verbose_name='hostname')),
|
|
|
|
('type', models.CharField(choices=[('openvz', 'OpenVZ container'), ('lxc', 'LXC container')], default='lxc', max_length=64, verbose_name='type')),
|
|
|
|
('template', models.CharField(choices=[('debian7', 'Debian 7 - Wheezy'), ('placeholder', 'LXC placeholder')], default='placeholder', help_text='Initial template.', max_length=64, verbose_name='template')),
|
|
|
|
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vpss', to=settings.AUTH_USER_MODEL, verbose_name='Account')),
|
|
|
|
('is_active', models.BooleanField(default=True, verbose_name='active')),
|
2015-04-08 14:41:09 +00:00
|
|
|
],
|
|
|
|
options={
|
2015-04-29 13:55:22 +00:00
|
|
|
'verbose_name': 'VPS',
|
2015-04-29 14:32:38 +00:00
|
|
|
'verbose_name_plural': 'VPSs',
|
2015-04-08 14:41:09 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|