django-orchestra/orchestra/contrib/vps/migrations/0001_initial.py

33 lines
1.5 KiB
Python
Raw Permalink Normal View History

2015-04-08 14:41:09 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
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=[
('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
},
),
]