Commit 73844bcc by Bach Dániel

circle: add new migrations

parent e9b63096
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import datetime from __future__ import unicode_literals
from south.db import db
from south.v2 import SchemaMigration from django.db import models, migrations
from django.db import models from django.conf import settings
class Migration(SchemaMigration): class Migration(migrations.Migration):
def forwards(self, orm): dependencies = [
# Adding model 'Level' ('auth', '0001_initial'),
db.create_table(u'acl_level', ( migrations.swappable_dependency(settings.AUTH_USER_MODEL),
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('contenttypes', '0001_initial'),
('name', self.gf('django.db.models.fields.CharField')(max_length=50)), ]
('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
('codename', self.gf('django.db.models.fields.CharField')(max_length=100)), operations = [
('weight', self.gf('django.db.models.fields.IntegerField')(null=True)), migrations.CreateModel(
)) name='Level',
db.send_create_signal(u'acl', ['Level']) fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
# Adding unique constraint on 'Level', fields ['content_type', 'codename'] ('name', models.CharField(max_length=50, verbose_name=b'name')),
db.create_unique(u'acl_level', ['content_type_id', 'codename']) ('codename', models.CharField(max_length=100, verbose_name=b'codename')),
('weight', models.IntegerField(null=True, verbose_name=b'weight')),
# Adding model 'ObjectLevel' ('content_type', models.ForeignKey(to='contenttypes.ContentType')),
db.create_table(u'acl_objectlevel', ( ],
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), options={
('level', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['acl.Level'])), },
('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])), bases=(models.Model,),
('object_id', self.gf('django.db.models.fields.CharField')(max_length=255)), ),
)) migrations.CreateModel(
db.send_create_signal(u'acl', ['ObjectLevel']) name='ObjectLevel',
fields=[
# Adding unique constraint on 'ObjectLevel', fields ['content_type', 'object_id', 'level'] ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
db.create_unique(u'acl_objectlevel', ['content_type_id', 'object_id', 'level_id']) ('object_id', models.IntegerField()),
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
# Adding M2M table for field users on 'ObjectLevel' ('groups', models.ManyToManyField(to='auth.Group')),
m2m_table_name = db.shorten_name(u'acl_objectlevel_users') ('level', models.ForeignKey(to='acl.Level')),
db.create_table(m2m_table_name, ( ('users', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ],
('objectlevel', models.ForeignKey(orm[u'acl.objectlevel'], null=False)), options={
('user', models.ForeignKey(orm[u'auth.user'], null=False)) },
)) bases=(models.Model,),
db.create_unique(m2m_table_name, ['objectlevel_id', 'user_id']) ),
migrations.AlterUniqueTogether(
# Adding M2M table for field groups on 'ObjectLevel' name='objectlevel',
m2m_table_name = db.shorten_name(u'acl_objectlevel_groups') unique_together=set([('content_type', 'object_id', 'level')]),
db.create_table(m2m_table_name, ( ),
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), migrations.AlterUniqueTogether(
('objectlevel', models.ForeignKey(orm[u'acl.objectlevel'], null=False)), name='level',
('group', models.ForeignKey(orm[u'auth.group'], null=False)) unique_together=set([('content_type', 'codename')]),
)) ),
db.create_unique(m2m_table_name, ['objectlevel_id', 'group_id']) ]
def backwards(self, orm):
# Removing unique constraint on 'ObjectLevel', fields ['content_type', 'object_id', 'level']
db.delete_unique(u'acl_objectlevel', ['content_type_id', 'object_id', 'level_id'])
# Removing unique constraint on 'Level', fields ['content_type', 'codename']
db.delete_unique(u'acl_level', ['content_type_id', 'codename'])
# Deleting model 'Level'
db.delete_table(u'acl_level')
# Deleting model 'ObjectLevel'
db.delete_table(u'acl_objectlevel')
# Removing M2M table for field users on 'ObjectLevel'
db.delete_table(db.shorten_name(u'acl_objectlevel_users'))
# Removing M2M table for field groups on 'ObjectLevel'
db.delete_table(db.shorten_name(u'acl_objectlevel_groups'))
models = {
u'acl.level': {
'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Level'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'weight': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
},
u'acl.objectlevel': {
'Meta': {'unique_together': "(('content_type', 'object_id', 'level'),)", 'object_name': 'ObjectLevel'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['acl.Level']"}),
'object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'})
},
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['acl']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Level'
db.create_table(u'acl_level', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
('codename', self.gf('django.db.models.fields.CharField')(max_length=100)),
('weight', self.gf('django.db.models.fields.IntegerField')(null=True)),
))
db.send_create_signal(u'acl', ['Level'])
# Adding unique constraint on 'Level', fields ['content_type', 'codename']
db.create_unique(u'acl_level', ['content_type_id', 'codename'])
# Adding model 'ObjectLevel'
db.create_table(u'acl_objectlevel', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('level', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['acl.Level'])),
('content_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['contenttypes.ContentType'])),
('object_id', self.gf('django.db.models.fields.CharField')(max_length=255)),
))
db.send_create_signal(u'acl', ['ObjectLevel'])
# Adding unique constraint on 'ObjectLevel', fields ['content_type', 'object_id', 'level']
db.create_unique(u'acl_objectlevel', ['content_type_id', 'object_id', 'level_id'])
# Adding M2M table for field users on 'ObjectLevel'
m2m_table_name = db.shorten_name(u'acl_objectlevel_users')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('objectlevel', models.ForeignKey(orm[u'acl.objectlevel'], null=False)),
('user', models.ForeignKey(orm[u'auth.user'], null=False))
))
db.create_unique(m2m_table_name, ['objectlevel_id', 'user_id'])
# Adding M2M table for field groups on 'ObjectLevel'
m2m_table_name = db.shorten_name(u'acl_objectlevel_groups')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('objectlevel', models.ForeignKey(orm[u'acl.objectlevel'], null=False)),
('group', models.ForeignKey(orm[u'auth.group'], null=False))
))
db.create_unique(m2m_table_name, ['objectlevel_id', 'group_id'])
def backwards(self, orm):
# Removing unique constraint on 'ObjectLevel', fields ['content_type', 'object_id', 'level']
db.delete_unique(u'acl_objectlevel', ['content_type_id', 'object_id', 'level_id'])
# Removing unique constraint on 'Level', fields ['content_type', 'codename']
db.delete_unique(u'acl_level', ['content_type_id', 'codename'])
# Deleting model 'Level'
db.delete_table(u'acl_level')
# Deleting model 'ObjectLevel'
db.delete_table(u'acl_objectlevel')
# Removing M2M table for field users on 'ObjectLevel'
db.delete_table(db.shorten_name(u'acl_objectlevel_users'))
# Removing M2M table for field groups on 'ObjectLevel'
db.delete_table(db.shorten_name(u'acl_objectlevel_groups'))
models = {
u'acl.level': {
'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Level'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'weight': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
},
u'acl.objectlevel': {
'Meta': {'unique_together': "(('content_type', 'object_id', 'level'),)", 'object_name': 'ObjectLevel'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['acl.Level']"}),
'object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'})
},
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
complete_apps = ['acl']
\ No newline at end of file
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import datetime from __future__ import unicode_literals
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from django.db import models, migrations
import dashboard.validators
import dashboard.models
import model_utils.fields
import sizefield.models
import jsonfield.fields
import django.utils.timezone
from django.conf import settings
class Migration(SchemaMigration):
def forwards(self, orm): class Migration(migrations.Migration):
# Adding model 'Favourite'
db.create_table(u'dashboard_favourite', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('instance', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['vm.Instance'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
))
db.send_create_signal(u'dashboard', ['Favourite'])
dependencies = [
('auth', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('vm', '__first__'),
]
def backwards(self, orm): operations = [
# Deleting model 'Favourite' migrations.CreateModel(
db.delete_table(u'dashboard_favourite') name='ConnectCommand',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
models = { ('access_method', models.CharField(help_text='Type of the remote access method.', max_length=10, verbose_name='access method', choices=[('nx', 'NX'), ('rdp', 'RDP'), ('ssh', 'SSH')])),
u'acl.level': { ('name', models.CharField(help_text='Name of your custom command.', max_length=b'128', verbose_name='name')),
'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Level'}, ('template', models.CharField(validators=[dashboard.validators.connect_command_template_validator], max_length=256, blank=True, help_text='Template for connection command string. Available parameters are: username, password, host, port.', null=True, verbose_name='command template')),
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), ('user', models.ForeignKey(related_name='command_set', to=settings.AUTH_USER_MODEL)),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), ],
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), options={
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}), },
'weight': ('django.db.models.fields.IntegerField', [], {'null': 'True'}) bases=(models.Model,),
}, ),
u'acl.objectlevel': { migrations.CreateModel(
'Meta': {'unique_together': "(('content_type', 'object_id', 'level'),)", 'object_name': 'ObjectLevel'}, name='Favourite',
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), fields=[
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('instance', models.ForeignKey(to='vm.Instance')),
'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['acl.Level']"}), ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
'object_id': ('django.db.models.fields.IntegerField', [], {}), ],
'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}) options={
}, },
u'auth.group': { bases=(models.Model,),
'Meta': {'object_name': 'Group'}, ),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), migrations.CreateModel(
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), name='FutureMember',
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) fields=[
}, ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
u'auth.permission': { ('org_id', models.CharField(help_text='Unique identifier of the person, e.g. a student number.', max_length=64)),
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, ('group', models.ForeignKey(to='auth.Group')),
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), ],
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), options={
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), },
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) bases=(models.Model,),
}, ),
u'auth.user': { migrations.CreateModel(
'Meta': {'object_name': 'User'}, name='GroupProfile',
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), fields=[
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), ('org_id', models.CharField(help_text='Unique identifier of the group at the organization.', max_length=64, unique=True, null=True, blank=True)),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), ('description', models.TextField(blank=True)),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('group', models.OneToOneField(to='auth.Group')),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), ],
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), options={
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'abstract': False,
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), },
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), bases=(models.Model,),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), ),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), migrations.CreateModel(
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) name='Notification',
}, fields=[
u'contenttypes.contenttype': { ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)),
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('status', model_utils.fields.StatusField(default=b'new', max_length=100, no_check_for_status=True, choices=[(b'new', 'new'), (b'delivered', 'delivered'), (b'read', 'read')])),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), ('subject_data', jsonfield.fields.JSONField(null=True)),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) ('message_data', jsonfield.fields.JSONField(null=True)),
}, ('valid_until', models.DateTimeField(default=None, null=True)),
u'dashboard.favourite': { ('to', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
'Meta': {'object_name': 'Favourite'}, ],
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), options={
'instance': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.Instance']"}), 'ordering': ['-created'],
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) },
}, bases=(models.Model,),
u'firewall.domain': { ),
'Meta': {'object_name': 'Domain'}, migrations.CreateModel(
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), name='Profile',
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), fields=[
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), ('preferred_language', models.CharField(default=b'en', max_length=32, verbose_name='preferred language', choices=[(b'en', 'English'), (b'hu', 'Hungarian')])),
'name': ('django.db.models.fields.CharField', [], {'max_length': '40'}), ('org_id', models.CharField(help_text='Unique identifier of the person, e.g. a student number.', max_length=64, unique=True, null=True, blank=True)),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), ('instance_limit', models.IntegerField(default=5)),
'ttl': ('django.db.models.fields.IntegerField', [], {'default': '600'}) ('use_gravatar', models.BooleanField(default=True, help_text='Whether to use email address as Gravatar profile image', verbose_name='Use Gravatar')),
}, ('email_notifications', models.BooleanField(default=True, help_text='Whether user wants to get digested email notifications.', verbose_name='Email notifications')),
u'firewall.group': { ('smb_password', models.CharField(default=dashboard.models.pwgen, help_text='Generated password for accessing store from virtual machines.', max_length=20, verbose_name='Samba password')),
'Meta': {'object_name': 'Group'}, ('disk_quota', sizefield.models.FileSizeField(default=2147483648, help_text='Disk quota in mebibytes.', verbose_name='disk quota')),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ],
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), options={
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'permissions': (('use_autocomplete', 'Can use autocomplete.'),),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), },
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}) bases=(models.Model,),
}, ),
u'firewall.host': { migrations.AlterUniqueTogether(
'Meta': {'object_name': 'Host'}, name='futuremember',
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), unique_together=set([('org_id', 'group')]),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), ),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ]
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['firewall.Group']", 'null': 'True', 'blank': 'True'}),
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ipv4': ('firewall.fields.IPAddressField', [], {'unique': 'True', 'max_length': '100'}),
'ipv6': ('firewall.fields.IPAddressField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'location': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'mac': ('firewall.fields.MACAddressField', [], {'unique': 'True', 'max_length': '17'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'pub_ipv4': ('firewall.fields.IPAddressField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'reverse': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'shared_ip': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Vlan']"})
},
u'firewall.vlan': {
'Meta': {'object_name': 'Vlan'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'dhcp_pool': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Domain']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'network4': ('firewall.fields.IPNetworkField', [], {'max_length': '100'}),
'network6': ('firewall.fields.IPNetworkField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'network_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'reverse_domain': ('django.db.models.fields.TextField', [], {'default': "'%(d)d.%(c)d.%(b)d.%(a)d.in-addr.arpa'"}),
'snat_ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True', 'blank': 'True'}),
'snat_to': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'}),
'vid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'})
},
u'storage.datastore': {
'Meta': {'ordering': "['name']", 'object_name': 'DataStore'},
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'})
},
u'storage.disk': {
'Meta': {'ordering': "['name']", 'object_name': 'Disk'},
'base': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'derivatives'", 'null': 'True', 'to': u"orm['storage.Disk']"}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'datastore': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['storage.DataStore']"}),
'destroyed': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'dev_num': ('django.db.models.fields.CharField', [], {'default': "'a'", 'max_length': '1'}),
'filename': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'ready': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'size': ('sizefield.models.FileSizeField', [], {}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '10'})
},
u'taggit.tag': {
'Meta': {'object_name': 'Tag'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
},
u'taggit.taggeditem': {
'Meta': {'object_name': 'TaggedItem'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'taggit_taggeditem_tagged_items'", 'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'taggit_taggeditem_items'", 'to': u"orm['taggit.Tag']"})
},
u'vm.instance': {
'Meta': {'ordering': "[u'pk']", 'object_name': 'Instance'},
'access_method': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'active_since': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'destroyed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'disks': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'instance_set'", 'symmetrical': 'False', 'to': u"orm['storage.Disk']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lease': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.Lease']"}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'instance_set'", 'null': 'True', 'to': u"orm['vm.Node']"}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'pw': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'req_traits': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['vm.Trait']", 'symmetrical': 'False', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "u'NOSTATE'", 'max_length': '20'}),
'template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'instance_set'", 'null': 'True', 'to': u"orm['vm.InstanceTemplate']"}),
'time_of_delete': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'time_of_suspend': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'vnc_port': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'unique': 'True', 'null': 'True', 'blank': 'True'})
},
u'vm.instancetemplate': {
'Meta': {'ordering': "[u'name']", 'object_name': 'InstanceTemplate'},
'access_method': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'disks': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'template_set'", 'symmetrical': 'False', 'to': u"orm['storage.Disk']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lease': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.Lease']"}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.InstanceTemplate']", 'null': 'True', 'blank': 'True'}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'req_traits': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['vm.Trait']", 'symmetrical': 'False', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "u'NEW'", 'max_length': '10'}),
'system': ('django.db.models.fields.TextField', [], {'blank': 'True'})
},
u'vm.lease': {
'Meta': {'ordering': "[u'name']", 'object_name': 'Lease'},
'delete_interval_seconds': ('django.db.models.fields.IntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'suspend_interval_seconds': ('django.db.models.fields.IntegerField', [], {})
},
u'vm.node': {
'Meta': {'object_name': 'Node'},
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Host']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
'overcommit': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'traits': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['vm.Trait']", 'symmetrical': 'False', 'blank': 'True'})
},
u'vm.trait': {
'Meta': {'object_name': 'Trait'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['dashboard']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Favourite'
db.create_table(u'dashboard_favourite', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('instance', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['vm.Instance'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
))
db.send_create_signal(u'dashboard', ['Favourite'])
def backwards(self, orm):
# Deleting model 'Favourite'
db.delete_table(u'dashboard_favourite')
models = {
u'acl.level': {
'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Level'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'weight': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
},
u'acl.objectlevel': {
'Meta': {'unique_together': "(('content_type', 'object_id', 'level'),)", 'object_name': 'ObjectLevel'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'level': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['acl.Level']"}),
'object_id': ('django.db.models.fields.IntegerField', [], {}),
'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'})
},
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'dashboard.favourite': {
'Meta': {'object_name': 'Favourite'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instance': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.Instance']"}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
},
u'firewall.domain': {
'Meta': {'object_name': 'Domain'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'ttl': ('django.db.models.fields.IntegerField', [], {'default': '600'})
},
u'firewall.group': {
'Meta': {'object_name': 'Group'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
u'firewall.host': {
'Meta': {'object_name': 'Host'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['firewall.Group']", 'null': 'True', 'blank': 'True'}),
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ipv4': ('firewall.fields.IPAddressField', [], {'unique': 'True', 'max_length': '100'}),
'ipv6': ('firewall.fields.IPAddressField', [], {'max_length': '100', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'location': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'mac': ('firewall.fields.MACAddressField', [], {'unique': 'True', 'max_length': '17'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'pub_ipv4': ('firewall.fields.IPAddressField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'reverse': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'shared_ip': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Vlan']"})
},
u'firewall.vlan': {
'Meta': {'object_name': 'Vlan'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'dhcp_pool': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Domain']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'network4': ('firewall.fields.IPNetworkField', [], {'max_length': '100'}),
'network6': ('firewall.fields.IPNetworkField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'network_type': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'reverse_domain': ('django.db.models.fields.TextField', [], {'default': "'%(d)d.%(c)d.%(b)d.%(a)d.in-addr.arpa'"}),
'snat_ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True', 'blank': 'True'}),
'snat_to': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'}),
'vid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'})
},
u'storage.datastore': {
'Meta': {'ordering': "['name']", 'object_name': 'DataStore'},
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'})
},
u'storage.disk': {
'Meta': {'ordering': "['name']", 'object_name': 'Disk'},
'base': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'derivatives'", 'null': 'True', 'to': u"orm['storage.Disk']"}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'datastore': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['storage.DataStore']"}),
'destroyed': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'dev_num': ('django.db.models.fields.CharField', [], {'default': "'a'", 'max_length': '1'}),
'filename': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'ready': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'size': ('sizefield.models.FileSizeField', [], {}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '10'})
},
u'taggit.tag': {
'Meta': {'object_name': 'Tag'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100'})
},
u'taggit.taggeditem': {
'Meta': {'object_name': 'TaggedItem'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'taggit_taggeditem_tagged_items'", 'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'taggit_taggeditem_items'", 'to': u"orm['taggit.Tag']"})
},
u'vm.instance': {
'Meta': {'ordering': "[u'pk']", 'object_name': 'Instance'},
'access_method': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'active_since': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'destroyed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'disks': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'instance_set'", 'symmetrical': 'False', 'to': u"orm['storage.Disk']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lease': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.Lease']"}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'instance_set'", 'null': 'True', 'to': u"orm['vm.Node']"}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'pw': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'req_traits': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['vm.Trait']", 'symmetrical': 'False', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "u'NOSTATE'", 'max_length': '20'}),
'template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'instance_set'", 'null': 'True', 'to': u"orm['vm.InstanceTemplate']"}),
'time_of_delete': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'time_of_suspend': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'vnc_port': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'unique': 'True', 'null': 'True', 'blank': 'True'})
},
u'vm.instancetemplate': {
'Meta': {'ordering': "[u'name']", 'object_name': 'InstanceTemplate'},
'access_method': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'disks': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'template_set'", 'symmetrical': 'False', 'to': u"orm['storage.Disk']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lease': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.Lease']"}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.InstanceTemplate']", 'null': 'True', 'blank': 'True'}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'req_traits': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['vm.Trait']", 'symmetrical': 'False', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "u'NEW'", 'max_length': '10'}),
'system': ('django.db.models.fields.TextField', [], {'blank': 'True'})
},
u'vm.lease': {
'Meta': {'ordering': "[u'name']", 'object_name': 'Lease'},
'delete_interval_seconds': ('django.db.models.fields.IntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'suspend_interval_seconds': ('django.db.models.fields.IntegerField', [], {})
},
u'vm.node': {
'Meta': {'object_name': 'Node'},
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Host']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
'overcommit': ('django.db.models.fields.FloatField', [], {'default': '1.0'}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'traits': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['vm.Trait']", 'symmetrical': 'False', 'blank': 'True'})
},
u'vm.trait': {
'Meta': {'object_name': 'Trait'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['dashboard']
\ No newline at end of file
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import datetime from __future__ import unicode_literals
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from django.db import models, migrations
import firewall.fields
from django.conf import settings
import common.models
import django.core.validators
class Migration(SchemaMigration):
def forwards(self, orm): class Migration(migrations.Migration):
# Adding model 'Rule'
db.create_table('firewall_rule', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('direction', self.gf('django.db.models.fields.BooleanField')(default=False)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
('vlan', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Vlan'])),
('extra', self.gf('django.db.models.fields.TextField')(blank=True)),
('action', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('firewall', ['Rule'])
# Adding model 'Vlan' dependencies = [
db.create_table('firewall_vlan', ( migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ]
('vid', self.gf('django.db.models.fields.IntegerField')(unique=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
('prefix4', self.gf('django.db.models.fields.IntegerField')(default=16)),
('prefix6', self.gf('django.db.models.fields.IntegerField')(default=80)),
('interface', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
('net4', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('net6', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('ipv4', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('ipv6', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
('comment', self.gf('django.db.models.fields.TextField')(blank=True)),
('domain', self.gf('django.db.models.fields.TextField')(blank=True)),
('dhcp_pool', self.gf('django.db.models.fields.TextField')(blank=True)),
))
db.send_create_signal('firewall', ['Vlan'])
# Adding M2M table for field en_dst on 'Vlan' operations = [
db.create_table('firewall_vlan_en_dst', ( migrations.CreateModel(
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), name='BlacklistItem',
('from_vlan', models.ForeignKey(orm['firewall.vlan'], null=False)), fields=[
('to_vlan', models.ForeignKey(orm['firewall.vlan'], null=False)) ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
)) ('ipv4', models.GenericIPAddressField(unique=True, protocol=b'ipv4')),
db.create_unique('firewall_vlan_en_dst', ['from_vlan_id', 'to_vlan_id']) ('reason', models.TextField(verbose_name='reason', blank=True)),
('snort_message', models.TextField(verbose_name='short message', blank=True)),
# Adding model 'Group' ('type', models.CharField(default=b'tempban', max_length=10, verbose_name='type', choices=[(b'permban', b'permanent ban'), (b'tempban', b'temporary ban'), (b'whitelist', b'whitelist'), (b'tempwhite', b'tempwhite')])),
db.create_table('firewall_group', ( ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created_at')),
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified_at')),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), ],
)) options={
db.send_create_signal('firewall', ['Group']) 'verbose_name': 'blacklist item',
'verbose_name_plural': 'blacklist',
# Adding M2M table for field rules on 'Group' },
db.create_table('firewall_group_rules', ( bases=(models.Model,),
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ),
('group', models.ForeignKey(orm['firewall.group'], null=False)), migrations.CreateModel(
('rule', models.ForeignKey(orm['firewall.rule'], null=False)) name='Domain',
)) fields=[
db.create_unique('firewall_group_rules', ['group_id', 'rule_id']) ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(max_length=40, verbose_name='name', validators=[firewall.fields.val_domain])),
# Adding model 'Host' ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created_at')),
db.create_table('firewall_host', ( ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified_at')),
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('ttl', models.IntegerField(default=600, verbose_name='ttl')),
('hostname', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), ('description', models.TextField(verbose_name='description', blank=True)),
('mac', self.gf('firewall.models.MACAddressField')(unique=True, max_length=17)), ('owner', models.ForeignKey(verbose_name='owner', to=settings.AUTH_USER_MODEL)),
('ipv4', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)), ],
('pub_ipv4', self.gf('django.db.models.fields.GenericIPAddressField')(max_length=39, unique=True, null=True, blank=True)), options={
('ipv6', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)), },
('description', self.gf('django.db.models.fields.TextField')(blank=True)), bases=(models.Model,),
('comment', self.gf('django.db.models.fields.TextField')(blank=True)), ),
('location', self.gf('django.db.models.fields.TextField')(blank=True)), migrations.CreateModel(
('vlan', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Vlan'])), name='EthernetDevice',
('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), fields=[
)) ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
db.send_create_signal('firewall', ['Host']) ('name', models.CharField(help_text='The name of network interface the gateway should serve this network on. For example eth2.', unique=True, max_length=20, verbose_name='interface')),
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created_at')),
# Adding M2M table for field groups on 'Host' ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified_at')),
db.create_table('firewall_host_groups', ( ],
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), options={
('host', models.ForeignKey(orm['firewall.host'], null=False)), },
('group', models.ForeignKey(orm['firewall.group'], null=False)) bases=(models.Model,),
)) ),
db.create_unique('firewall_host_groups', ['host_id', 'group_id']) migrations.CreateModel(
name='Firewall',
# Adding M2M table for field rules on 'Host' fields=[
db.create_table('firewall_host_rules', ( ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ('name', models.CharField(unique=True, max_length=20, verbose_name='name')),
('host', models.ForeignKey(orm['firewall.host'], null=False)), ],
('rule', models.ForeignKey(orm['firewall.rule'], null=False)) options={
)) },
db.create_unique('firewall_host_rules', ['host_id', 'rule_id']) bases=(models.Model,),
),
# Adding model 'Firewall' migrations.CreateModel(
db.create_table('firewall_firewall', ( name='Group',
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), fields=[
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
)) ('name', models.CharField(help_text='The name of the group.', unique=True, max_length=20, verbose_name='name')),
db.send_create_signal('firewall', ['Firewall']) ('description', models.TextField(help_text='Description of the group.', verbose_name='description', blank=True)),
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
# Adding M2M table for field rules on 'Firewall' ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified at')),
db.create_table('firewall_firewall_rules', ( ('owner', models.ForeignKey(verbose_name='owner', blank=True, to=settings.AUTH_USER_MODEL, null=True)),
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ],
('firewall', models.ForeignKey(orm['firewall.firewall'], null=False)), options={
('rule', models.ForeignKey(orm['firewall.rule'], null=False)) },
)) bases=(models.Model,),
db.create_unique('firewall_firewall_rules', ['firewall_id', 'rule_id']) ),
migrations.CreateModel(
name='Host',
def backwards(self, orm): fields=[
# Deleting model 'Rule' ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
db.delete_table('firewall_rule') ('hostname', models.CharField(help_text='The alphanumeric hostname of the host, the first part of the FQDN.', max_length=40, verbose_name='hostname', validators=[firewall.fields.val_alfanum])),
('normalized_hostname', common.models.HumanSortField(default=b'', max_length=80, monitor=b'hostname', blank=True)),
# Deleting model 'Vlan' ('reverse', models.CharField(validators=[firewall.fields.val_domain], max_length=40, blank=True, help_text='The fully qualified reverse hostname of the host, if different than hostname.domain.', null=True, verbose_name='reverse')),
db.delete_table('firewall_vlan') ('mac', firewall.fields.MACAddressField(help_text='The MAC (Ethernet) address of the network interface. For example: 99:AA:BB:CC:DD:EE.', unique=True, max_length=17, verbose_name='MAC address')),
('ipv4', firewall.fields.IPAddressField(help_text='The real IPv4 address of the host, for example 10.5.1.34.', unique=True, max_length=100, verbose_name='IPv4 address')),
# Removing M2M table for field en_dst on 'Vlan' ('external_ipv4', firewall.fields.IPAddressField(help_text='The public IPv4 address of the host on the wide area network, if different.', max_length=100, null=True, verbose_name='WAN IPv4 address', blank=True)),
db.delete_table('firewall_vlan_en_dst') ('ipv6', firewall.fields.IPAddressField(null=True, max_length=100, blank=True, help_text='The global IPv6 address of the host, for example 2001:db:88:200::10.', unique=True, verbose_name='IPv6 address')),
('shared_ip', models.BooleanField(default=False, help_text='If the given WAN IPv4 address is used by multiple hosts.', verbose_name='shared IP')),
# Deleting model 'Group' ('description', models.TextField(help_text='What is this host for, what kind of machine is it.', verbose_name='description', blank=True)),
db.delete_table('firewall_group') ('comment', models.TextField(verbose_name='Notes', blank=True)),
('location', models.TextField(help_text='The physical location of the machine.', verbose_name='location', blank=True)),
# Removing M2M table for field rules on 'Group' ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
db.delete_table('firewall_group_rules') ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified at')),
('groups', models.ManyToManyField(help_text='Host groups the machine is part of.', to='firewall.Group', null=True, verbose_name='groups', blank=True)),
# Deleting model 'Host' ('owner', models.ForeignKey(verbose_name='owner', to=settings.AUTH_USER_MODEL, help_text='The person responsible for this host.')),
db.delete_table('firewall_host') ],
options={
# Removing M2M table for field groups on 'Host' 'ordering': ('normalized_hostname', 'vlan'),
db.delete_table('firewall_host_groups') },
bases=(models.Model,),
# Removing M2M table for field rules on 'Host' ),
db.delete_table('firewall_host_rules') migrations.CreateModel(
name='Record',
# Deleting model 'Firewall' fields=[
db.delete_table('firewall_firewall') ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(blank=True, max_length=40, null=True, verbose_name='name', validators=[firewall.fields.val_domain_wildcard])),
# Removing M2M table for field rules on 'Firewall' ('type', models.CharField(max_length=6, verbose_name='type', choices=[(b'A', b'A'), (b'CNAME', b'CNAME'), (b'AAAA', b'AAAA'), (b'MX', b'MX'), (b'NS', b'NS'), (b'PTR', b'PTR'), (b'TXT', b'TXT')])),
db.delete_table('firewall_firewall_rules') ('address', models.CharField(max_length=400, verbose_name='address')),
('ttl', models.IntegerField(default=600, verbose_name='ttl')),
('description', models.TextField(verbose_name='description', blank=True)),
models = { ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created_at')),
'auth.group': { ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified_at')),
'Meta': {'object_name': 'Group'}, ('domain', models.ForeignKey(verbose_name='domain', to='firewall.Domain')),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('host', models.ForeignKey(verbose_name='host', blank=True, to='firewall.Host', null=True)),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), ('owner', models.ForeignKey(verbose_name='owner', to=settings.AUTH_USER_MODEL)),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) ],
}, options={
'auth.permission': { 'ordering': ('domain', 'name'),
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, },
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), bases=(models.Model,),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), ),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), migrations.CreateModel(
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) name='Rule',
}, fields=[
'auth.user': { ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'Meta': {'object_name': 'User'}, ('direction', models.CharField(help_text='If the rule matches egress or ingress packets.', max_length=3, verbose_name='direction', choices=[(b'out', 'out'), (b'in', 'in')])),
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), ('description', models.TextField(help_text='Why is the rule needed, or how does it work.', verbose_name='description', blank=True)),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), ('dport', models.IntegerField(blank=True, help_text='Destination port number of packets that match.', null=True, verbose_name='dest. port', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)])),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), ('sport', models.IntegerField(blank=True, help_text='Source port number of packets that match.', null=True, verbose_name='source port', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)])),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), ('weight', models.IntegerField(default=30000, help_text='Rule weight', verbose_name='weight', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)])),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('proto', models.CharField(choices=[(b'tcp', b'tcp'), (b'udp', b'udp'), (b'icmp', b'icmp')], max_length=10, blank=True, help_text='Protocol of packets that match.', null=True, verbose_name='protocol')),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), ('extra', models.TextField(help_text='Additional arguments passed literally to the iptables-rule.', verbose_name='extra arguments', blank=True)),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), ('action', models.CharField(default=b'drop', help_text='Accept, drop or ignore the matching packets.', max_length=10, verbose_name='action', choices=[(b'accept', 'accept'), (b'drop', 'drop'), (b'ignore', 'ignore')])),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), ('nat', models.BooleanField(default=False, help_text='If network address translation should be done.', verbose_name='NAT')),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), ('nat_external_port', models.IntegerField(blank=True, help_text='Rewrite destination port number to this if NAT is needed.', null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)])),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), ('nat_external_ipv4', firewall.fields.IPAddressField(max_length=100, null=True, verbose_name='external IPv4 address', blank=True)),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified at')),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) ('firewall', models.ForeignKey(related_name='rules', blank=True, to='firewall.Firewall', help_text='Firewall the rule applies to (if type is firewall).', null=True, verbose_name='firewall')),
}, ],
'contenttypes.contenttype': { options={
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 'ordering': ('direction', 'proto', 'sport', 'dport', 'nat_external_port', 'host'),
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'verbose_name': 'rule',
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'verbose_name_plural': 'rules',
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), },
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) bases=(models.Model,),
}, ),
'firewall.firewall': { migrations.CreateModel(
'Meta': {'object_name': 'Firewall'}, name='SwitchPort',
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), fields=[
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'}) ('description', models.TextField(verbose_name='description', blank=True)),
}, ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created_at')),
'firewall.group': { ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified_at')),
'Meta': {'object_name': 'Group'}, ],
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), options={
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), },
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'}) bases=(models.Model,),
}, ),
'firewall.host': { migrations.CreateModel(
'Meta': {'object_name': 'Host'}, name='Vlan',
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), fields=[
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Group']", 'null': 'True', 'blank': 'True'}), ('vid', models.IntegerField(help_text='The vlan ID of the subnet.', unique=True, verbose_name='VID', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(4095)])),
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), ('name', models.CharField(help_text='The short name of the subnet.', unique=True, max_length=20, verbose_name='Name', validators=[firewall.fields.val_alfanum])),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('network4', firewall.fields.IPNetworkField(help_text='The IPv4 address and the prefix length of the gateway. Recommended value is the last valid address of the subnet, for example 10.4.255.254/16 for 10.4.0.0/16.', max_length=100, verbose_name='IPv4 address/prefix')),
'ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}), ('host_ipv6_prefixlen', models.IntegerField(default=112, help_text='The prefix length of the subnet assigned to a host. For example /112 = 65536 addresses/host.', verbose_name='IPv6 prefixlen/host', validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(128)])),
'ipv6': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}), ('network6', firewall.fields.IPNetworkField(help_text='The IPv6 address and the prefix length of the gateway.', max_length=100, null=True, verbose_name='IPv6 address/prefix', blank=True)),
'location': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ('snat_ip', models.GenericIPAddressField(protocol=b'ipv4', blank=True, help_text='Common IPv4 address used for address translation of connections to the networks selected below (typically to the internet).', null=True, verbose_name='NAT IP address')),
'mac': ('firewall.models.MACAddressField', [], {'unique': 'True', 'max_length': '17'}), ('network_type', models.CharField(default=b'portforward', max_length=20, verbose_name='network type', choices=[(b'public', 'public'), (b'portforward', 'portforward')])),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), ('managed', models.BooleanField(default=True, verbose_name='managed')),
'pub_ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'unique': 'True', 'null': 'True', 'blank': 'True'}), ('description', models.TextField(help_text='Description of the goals and elements of the vlan network.', verbose_name='description', blank=True)),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'}), ('comment', models.TextField(help_text='Notes, comments about the network', verbose_name='comment', blank=True)),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Vlan']"}) ('reverse_domain', models.TextField(default=b'%(d)d.%(c)d.%(b)d.%(a)d.in-addr.arpa', help_text='Template of the IPv4 reverse domain name that should be generated for each host. The template should contain four tokens: "%(a)d", "%(b)d", "%(c)d", and "%(d)d", representing the four bytes of the address, respectively, in decimal notation. For example, the template for the standard reverse address is: "%(d)d.%(c)d.%(b)d.%(a)d.in-addr.arpa".', verbose_name='reverse domain', validators=[firewall.fields.val_reverse_domain])),
}, ('ipv6_template', models.TextField(default=b'2001:738:2001:4031:%(b)d:%(c)d:%(d)d:0', verbose_name='ipv6 template', validators=[firewall.fields.val_ipv6_template])),
'firewall.rule': { ('dhcp_pool', models.TextField(help_text='The address range of the DHCP pool: empty for no DHCP service, "manual" for no DHCP pool, or the first and last address of the range separated by a space.', verbose_name='DHCP pool', blank=True)),
'Meta': {'object_name': 'Rule'}, ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
'action': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified at')),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ('domain', models.ForeignKey(verbose_name='domain name', to='firewall.Domain', help_text='Domain name of the members of this network.')),
'direction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), ('owner', models.ForeignKey(verbose_name='owner', blank=True, to=settings.AUTH_USER_MODEL, null=True)),
'extra': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ('snat_to', models.ManyToManyField(help_text='Connections to these networks should be network address translated, i.e. their source address is rewritten to the value of NAT IP address.', to='firewall.Vlan', null=True, verbose_name='NAT to', blank=True)),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ],
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Vlan']"}) options={
}, 'abstract': False,
'firewall.vlan': { },
'Meta': {'object_name': 'Vlan'}, bases=(models.Model,),
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), migrations.CreateModel(
'dhcp_pool': ('django.db.models.fields.TextField', [], {'blank': 'True'}), name='VlanGroup',
'domain': ('django.db.models.fields.TextField', [], {'blank': 'True'}), fields=[
'en_dst': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('name', models.CharField(help_text='The name of the group.', unique=True, max_length=20, verbose_name='name')),
'interface': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), ('description', models.TextField(help_text='Description of the group.', verbose_name='description', blank=True)),
'ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}), ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
'ipv6': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}), ('modified_at', models.DateTimeField(auto_now=True, verbose_name='modified at')),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), ('owner', models.ForeignKey(verbose_name='owner', blank=True, to=settings.AUTH_USER_MODEL, null=True)),
'net4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}), ('vlans', models.ManyToManyField(help_text='The vlans which are members of the group.', to='firewall.Vlan', null=True, verbose_name='vlans', blank=True)),
'net6': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}), ],
'prefix4': ('django.db.models.fields.IntegerField', [], {'default': '16'}), options={
'prefix6': ('django.db.models.fields.IntegerField', [], {'default': '80'}), },
'vid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}) bases=(models.Model,),
} ),
} migrations.AddField(
model_name='switchport',
complete_apps = ['firewall'] name='tagged_vlans',
\ No newline at end of file field=models.ForeignKey(related_name='tagged_ports', verbose_name='tagged vlans', blank=True, to='firewall.VlanGroup', null=True),
preserve_default=True,
),
migrations.AddField(
model_name='switchport',
name='untagged_vlan',
field=models.ForeignKey(related_name='untagged_ports', verbose_name='untagged vlan', to='firewall.Vlan'),
preserve_default=True,
),
migrations.AddField(
model_name='rule',
name='foreign_network',
field=models.ForeignKey(related_name='ForeignRules', verbose_name='foreign network', to='firewall.VlanGroup', help_text='The group of vlans the matching packet goes to (direction out) or from (in).'),
preserve_default=True,
),
migrations.AddField(
model_name='rule',
name='host',
field=models.ForeignKey(related_name='rules', blank=True, to='firewall.Host', help_text='Host the rule applies to (if type is host).', null=True, verbose_name='host'),
preserve_default=True,
),
migrations.AddField(
model_name='rule',
name='hostgroup',
field=models.ForeignKey(related_name='rules', blank=True, to='firewall.Group', help_text='Group of hosts the rule applies to (if type is host).', null=True, verbose_name='host group'),
preserve_default=True,
),
migrations.AddField(
model_name='rule',
name='owner',
field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='The user responsible for this rule.', null=True, verbose_name='owner'),
preserve_default=True,
),
migrations.AddField(
model_name='rule',
name='vlan',
field=models.ForeignKey(related_name='rules', blank=True, to='firewall.Vlan', help_text='Vlan the rule applies to (if type is vlan).', null=True, verbose_name='vlan'),
preserve_default=True,
),
migrations.AddField(
model_name='rule',
name='vlangroup',
field=models.ForeignKey(related_name='rules', blank=True, to='firewall.VlanGroup', help_text='Group of vlans the rule applies to (if type is vlan).', null=True, verbose_name='vlan group'),
preserve_default=True,
),
migrations.AddField(
model_name='host',
name='vlan',
field=models.ForeignKey(verbose_name='vlan', to='firewall.Vlan', help_text='Vlan network that the host is part of.'),
preserve_default=True,
),
migrations.AlterUniqueTogether(
name='host',
unique_together=set([('hostname', 'vlan')]),
),
migrations.AddField(
model_name='ethernetdevice',
name='switch_port',
field=models.ForeignKey(related_name='ethernet_devices', verbose_name='switch port', to='firewall.SwitchPort'),
preserve_default=True,
),
migrations.AddField(
model_name='blacklistitem',
name='host',
field=models.ForeignKey(verbose_name='host', blank=True, to='firewall.Host', null=True),
preserve_default=True,
),
]
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Rule'
db.create_table('firewall_rule', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('direction', self.gf('django.db.models.fields.BooleanField')(default=False)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
('vlan', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Vlan'])),
('extra', self.gf('django.db.models.fields.TextField')(blank=True)),
('action', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('firewall', ['Rule'])
# Adding model 'Vlan'
db.create_table('firewall_vlan', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('vid', self.gf('django.db.models.fields.IntegerField')(unique=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
('prefix4', self.gf('django.db.models.fields.IntegerField')(default=16)),
('prefix6', self.gf('django.db.models.fields.IntegerField')(default=80)),
('interface', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
('net4', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('net6', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('ipv4', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('ipv6', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
('comment', self.gf('django.db.models.fields.TextField')(blank=True)),
('domain', self.gf('django.db.models.fields.TextField')(blank=True)),
('dhcp_pool', self.gf('django.db.models.fields.TextField')(blank=True)),
))
db.send_create_signal('firewall', ['Vlan'])
# Adding M2M table for field en_dst on 'Vlan'
db.create_table('firewall_vlan_en_dst', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('from_vlan', models.ForeignKey(orm['firewall.vlan'], null=False)),
('to_vlan', models.ForeignKey(orm['firewall.vlan'], null=False))
))
db.create_unique('firewall_vlan_en_dst', ['from_vlan_id', 'to_vlan_id'])
# Adding model 'Group'
db.create_table('firewall_group', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
))
db.send_create_signal('firewall', ['Group'])
# Adding M2M table for field rules on 'Group'
db.create_table('firewall_group_rules', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('group', models.ForeignKey(orm['firewall.group'], null=False)),
('rule', models.ForeignKey(orm['firewall.rule'], null=False))
))
db.create_unique('firewall_group_rules', ['group_id', 'rule_id'])
# Adding model 'Host'
db.create_table('firewall_host', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('hostname', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
('mac', self.gf('firewall.models.MACAddressField')(unique=True, max_length=17)),
('ipv4', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('pub_ipv4', self.gf('django.db.models.fields.GenericIPAddressField')(max_length=39, unique=True, null=True, blank=True)),
('ipv6', self.gf('django.db.models.fields.GenericIPAddressField')(unique=True, max_length=39)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
('comment', self.gf('django.db.models.fields.TextField')(blank=True)),
('location', self.gf('django.db.models.fields.TextField')(blank=True)),
('vlan', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Vlan'])),
('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
))
db.send_create_signal('firewall', ['Host'])
# Adding M2M table for field groups on 'Host'
db.create_table('firewall_host_groups', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('host', models.ForeignKey(orm['firewall.host'], null=False)),
('group', models.ForeignKey(orm['firewall.group'], null=False))
))
db.create_unique('firewall_host_groups', ['host_id', 'group_id'])
# Adding M2M table for field rules on 'Host'
db.create_table('firewall_host_rules', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('host', models.ForeignKey(orm['firewall.host'], null=False)),
('rule', models.ForeignKey(orm['firewall.rule'], null=False))
))
db.create_unique('firewall_host_rules', ['host_id', 'rule_id'])
# Adding model 'Firewall'
db.create_table('firewall_firewall', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=20)),
))
db.send_create_signal('firewall', ['Firewall'])
# Adding M2M table for field rules on 'Firewall'
db.create_table('firewall_firewall_rules', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('firewall', models.ForeignKey(orm['firewall.firewall'], null=False)),
('rule', models.ForeignKey(orm['firewall.rule'], null=False))
))
db.create_unique('firewall_firewall_rules', ['firewall_id', 'rule_id'])
def backwards(self, orm):
# Deleting model 'Rule'
db.delete_table('firewall_rule')
# Deleting model 'Vlan'
db.delete_table('firewall_vlan')
# Removing M2M table for field en_dst on 'Vlan'
db.delete_table('firewall_vlan_en_dst')
# Deleting model 'Group'
db.delete_table('firewall_group')
# Removing M2M table for field rules on 'Group'
db.delete_table('firewall_group_rules')
# Deleting model 'Host'
db.delete_table('firewall_host')
# Removing M2M table for field groups on 'Host'
db.delete_table('firewall_host_groups')
# Removing M2M table for field rules on 'Host'
db.delete_table('firewall_host_rules')
# Deleting model 'Firewall'
db.delete_table('firewall_firewall')
# Removing M2M table for field rules on 'Firewall'
db.delete_table('firewall_firewall_rules')
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'firewall.firewall': {
'Meta': {'object_name': 'Firewall'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'})
},
'firewall.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'})
},
'firewall.host': {
'Meta': {'object_name': 'Host'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Group']", 'null': 'True', 'blank': 'True'}),
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'ipv6': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'location': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'mac': ('firewall.models.MACAddressField', [], {'unique': 'True', 'max_length': '17'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
'pub_ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'rules': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Rule']", 'null': 'True', 'blank': 'True'}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Vlan']"})
},
'firewall.rule': {
'Meta': {'object_name': 'Rule'},
'action': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'direction': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'extra': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['firewall.Vlan']"})
},
'firewall.vlan': {
'Meta': {'object_name': 'Vlan'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'dhcp_pool': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'domain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'en_dst': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'interface': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'ipv6': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'net4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'net6': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'prefix4': ('django.db.models.fields.IntegerField', [], {'default': '16'}),
'prefix6': ('django.db.models.fields.IntegerField', [], {'default': '80'}),
'vid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'})
}
}
complete_apps = ['firewall']
\ No newline at end of file
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import datetime from __future__ import unicode_literals
from south.db import db
from south.v2 import SchemaMigration from django.db import models, migrations
from django.db import models import django.utils.timezone
import model_utils.fields
import sizefield.models
class Migration(SchemaMigration):
def forwards(self, orm): class Migration(migrations.Migration):
# Adding model 'Disk'
db.create_table('storage_disk', ( dependencies = [
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ]
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)),
('path', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200)), operations = [
('format', self.gf('django.db.models.fields.CharField')(max_length=10)), migrations.CreateModel(
('size', self.gf('django.db.models.fields.IntegerField')()), name='DataStore',
('type', self.gf('django.db.models.fields.CharField')(max_length=10)), fields=[
('base', self.gf('django.db.models.fields.related.ForeignKey')(related_name='snapshots', to=orm['storage.Disk'])), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('original_parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['storage.Disk'])), ('name', models.CharField(unique=True, max_length=100, verbose_name='name')),
)) ('path', models.CharField(unique=True, max_length=200, verbose_name='path')),
db.send_create_signal('storage', ['Disk']) ('hostname', models.CharField(unique=True, max_length=40, verbose_name='hostname')),
],
options={
def backwards(self, orm): 'ordering': ['name'],
# Deleting model 'Disk' 'verbose_name': 'datastore',
db.delete_table('storage_disk') 'verbose_name_plural': 'datastores',
},
bases=(models.Model,),
models = { ),
'storage.disk': { migrations.CreateModel(
'Meta': {'ordering': "['name']", 'object_name': 'Disk'}, name='Disk',
'base': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'snapshots'", 'to': "orm['storage.Disk']"}), fields=[
'format': ('django.db.models.fields.CharField', [], {'max_length': '10'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)),
'original_parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['storage.Disk']"}), ('name', models.CharField(max_length=100, verbose_name='name', blank=True)),
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}), ('filename', models.CharField(unique=True, max_length=256, verbose_name='filename')),
'size': ('django.db.models.fields.IntegerField', [], {}), ('type', models.CharField(max_length=10, choices=[('qcow2-norm', 'qcow2 normal'), ('qcow2-snap', 'qcow2 snapshot'), ('iso', 'iso'), ('raw-ro', 'raw read-only'), ('raw-rw', 'raw')])),
'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}) ('size', sizefield.models.FileSizeField(default=None, null=True)),
} ('dev_num', models.CharField(default='a', max_length=1, verbose_name='device number')),
} ('destroyed', models.DateTimeField(default=None, null=True, blank=True)),
('is_ready', models.BooleanField(default=False)),
complete_apps = ['storage'] ('base', models.ForeignKey(related_name='derivatives', blank=True, to='storage.Disk', null=True)),
\ No newline at end of file ('datastore', models.ForeignKey(verbose_name='datastore', to='storage.DataStore', help_text='The datastore that holds the disk.')),
],
options={
'ordering': ['name'],
'verbose_name': 'disk',
'verbose_name_plural': 'disks',
'permissions': (('create_empty_disk', 'Can create an empty disk.'), ('download_disk', 'Can download a disk.'), ('resize_disk', 'Can resize a disk.')),
},
bases=(models.Model,),
),
]
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Disk'
db.create_table('storage_disk', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)),
('path', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200)),
('format', self.gf('django.db.models.fields.CharField')(max_length=10)),
('size', self.gf('django.db.models.fields.IntegerField')()),
('type', self.gf('django.db.models.fields.CharField')(max_length=10)),
('base', self.gf('django.db.models.fields.related.ForeignKey')(related_name='snapshots', to=orm['storage.Disk'])),
('original_parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['storage.Disk'])),
))
db.send_create_signal('storage', ['Disk'])
def backwards(self, orm):
# Deleting model 'Disk'
db.delete_table('storage_disk')
models = {
'storage.disk': {
'Meta': {'ordering': "['name']", 'object_name': 'Disk'},
'base': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'snapshots'", 'to': "orm['storage.Disk']"}),
'format': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'original_parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['storage.Disk']"}),
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
'size': ('django.db.models.fields.IntegerField', [], {}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '10'})
}
}
complete_apps = ['storage']
\ No newline at end of file
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import datetime from __future__ import unicode_literals
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from django.db import models, migrations
import taggit.managers
import model_utils.fields
import jsonfield.fields
import common.operations
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
import common.models
import django.core.validators
class Migration(SchemaMigration):
def forwards(self, orm): class Migration(migrations.Migration):
# Adding model 'NamedBaseResourceConfig'
db.create_table(u'vm_namedbaseresourceconfig', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('num_cores', self.gf('django.db.models.fields.IntegerField')()),
('ram_size', self.gf('django.db.models.fields.IntegerField')()),
('max_ram_size', self.gf('django.db.models.fields.IntegerField')()),
('arch', self.gf('django.db.models.fields.CharField')(max_length=10)),
('priority', self.gf('django.db.models.fields.IntegerField')()),
('boot_menu', self.gf('django.db.models.fields.BooleanField')(default=False)),
('raw_data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=50)),
))
db.send_create_signal(u'vm', ['NamedBaseResourceConfig'])
# Adding model 'Node' dependencies = [
db.create_table(u'vm_node', ( ('taggit', '0002_auto_20141028_1416'),
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('storage', '0001_initial'),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), ('firewall', '0001_initial'),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=50)), ]
('num_cores', self.gf('django.db.models.fields.IntegerField')()),
('ram_size', self.gf('django.db.models.fields.IntegerField')()),
('priority', self.gf('django.db.models.fields.IntegerField')()),
('host', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Host'])),
('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal(u'vm', ['Node'])
# Adding model 'NodeActivity' operations = [
db.create_table(u'vm_nodeactivity', ( migrations.CreateModel(
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), name='Instance',
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), fields=[
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('activity_code', self.gf('django.db.models.fields.CharField')(max_length=100)), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)),
('task_uuid', self.gf('django.db.models.fields.CharField')(max_length=50, unique=True, null=True, blank=True)), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)),
('node', self.gf('django.db.models.fields.related.ForeignKey')(related_name='activity_log', to=orm['vm.Node'])), ('status', model_utils.fields.StatusField(default='NOSTATE', max_length=100, verbose_name='status', no_check_for_status=True, choices=[('NOSTATE', 'no state'), ('RUNNING', 'running'), ('STOPPED', 'stopped'), ('SUSPENDED', 'suspended'), ('ERROR', 'error'), ('PENDING', 'pending'), ('DESTROYED', 'destroyed')])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), ('status_changed', model_utils.fields.MonitorField(default=django.utils.timezone.now, verbose_name='status changed', monitor='status')),
('started', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), ('num_cores', models.IntegerField(help_text='Number of virtual CPU cores available to the virtual machine.', verbose_name='number of cores', validators=[django.core.validators.MinValueValidator(0)])),
('finished', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), ('ram_size', models.IntegerField(help_text='Mebibytes of memory.', verbose_name='RAM size', validators=[django.core.validators.MinValueValidator(0)])),
('result', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), ('max_ram_size', models.IntegerField(help_text='Upper memory size limit for balloning.', verbose_name='maximal RAM size', validators=[django.core.validators.MinValueValidator(0)])),
('status', self.gf('django.db.models.fields.CharField')(default='PENDING', max_length=50)), ('arch', models.CharField(max_length=10, verbose_name='architecture', choices=[('x86_64', 'x86-64 (64 bit)'), ('i686', 'x86 (32 bit)')])),
)) ('priority', models.IntegerField(help_text='CPU priority.', verbose_name='priority', validators=[django.core.validators.MinValueValidator(0)])),
db.send_create_signal(u'vm', ['NodeActivity']) ('access_method', models.CharField(help_text='Primary remote access method.', max_length=10, verbose_name='access method', choices=[('nx', 'NX'), ('rdp', 'RDP'), ('ssh', 'SSH')])),
('boot_menu', models.BooleanField(default=False, help_text='Show boot device selection menu on boot.', verbose_name='boot menu')),
# Adding model 'Lease' ('raw_data', models.TextField(help_text='Additional libvirt domain parameters in XML format.', verbose_name='raw_data', blank=True)),
db.create_table(u'vm_lease', ( ('system', models.TextField(help_text='Name of operating system in format like "Ubuntu 12.04 LTS Desktop amd64".', verbose_name='operating system')),
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('has_agent', models.BooleanField(default=True, help_text='If the machine has agent installed, and the manager should wait for its start.', verbose_name='has agent')),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), ('name', models.CharField(help_text='Human readable name of instance.', max_length=100, verbose_name='name', blank=True)),
('suspend_interval_seconds', self.gf('django.db.models.fields.IntegerField')()), ('description', models.TextField(verbose_name='description', blank=True)),
('delete_interval_seconds', self.gf('django.db.models.fields.IntegerField')()), ('pw', models.CharField(help_text='Original password of the instance.', max_length=20, verbose_name='password')),
)) ('time_of_suspend', models.DateTimeField(default=None, help_text='Proposed time of automatic suspension.', null=True, verbose_name='time of suspend', blank=True)),
db.send_create_signal(u'vm', ['Lease']) ('time_of_delete', models.DateTimeField(default=None, help_text='Proposed time of automatic deletion.', null=True, verbose_name='time of delete', blank=True)),
('vnc_port', models.IntegerField(null=True, default=None, blank=True, help_text='TCP port where VNC console listens.', unique=True, verbose_name='vnc_port')),
# Adding model 'InstanceTemplate' ('is_base', models.BooleanField(default=False)),
db.create_table(u'vm_instancetemplate', ( ('destroyed_at', models.DateTimeField(help_text="The virtual machine's time of destruction.", null=True, blank=True)),
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('disks', models.ManyToManyField(help_text='Set of mounted disks.', related_name='instance_set', verbose_name='disks', to='storage.Disk')),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), ],
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), options={
('num_cores', self.gf('django.db.models.fields.IntegerField')()), 'ordering': ('pk',),
('ram_size', self.gf('django.db.models.fields.IntegerField')()), 'db_table': 'vm_instance',
('max_ram_size', self.gf('django.db.models.fields.IntegerField')()), 'verbose_name': 'instance',
('arch', self.gf('django.db.models.fields.CharField')(max_length=10)), 'verbose_name_plural': 'instances',
('priority', self.gf('django.db.models.fields.IntegerField')()), 'permissions': (('access_console', 'Can access the graphical console of a VM.'), ('change_resources', 'Can change resources of a running VM.'), ('set_resources', 'Can change resources of a new VM.'), ('create_vm', 'Can create a new VM.'), ('redeploy', 'Can redeploy a VM.'), ('config_ports', 'Can configure port forwards.'), ('recover', 'Can recover a destroyed VM.'), ('emergency_change_state', 'Can change VM state to NOSTATE.')),
('boot_menu', self.gf('django.db.models.fields.BooleanField')(default=False)), },
('raw_data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), bases=(common.operations.OperatedMixin, models.Model),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)), ),
('description', self.gf('django.db.models.fields.TextField')(blank=True)), migrations.CreateModel(
('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['vm.InstanceTemplate'], null=True, blank=True)), name='InstanceActivity',
('system', self.gf('django.db.models.fields.TextField')(blank=True)), fields=[
('access_method', self.gf('django.db.models.fields.CharField')(max_length=10)), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('state', self.gf('django.db.models.fields.CharField')(default='NEW', max_length=10)), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)),
('lease', self.gf('django.db.models.fields.related.ForeignKey')(related_name='template_set', to=orm['vm.Lease'])), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)),
)) ('activity_code', models.CharField(max_length=100, verbose_name='activity code')),
db.send_create_signal(u'vm', ['InstanceTemplate']) ('readable_name_data', jsonfield.fields.JSONField(help_text='Human readable name of activity.', null=True, verbose_name='human readable name', blank=True)),
('task_uuid', models.CharField(null=True, max_length=50, blank=True, help_text='Celery task unique identifier.', unique=True, verbose_name='task_uuid')),
# Adding M2M table for field disks on 'InstanceTemplate' ('started', models.DateTimeField(help_text='Time of activity initiation.', null=True, verbose_name='started at', blank=True)),
m2m_table_name = db.shorten_name(u'vm_instancetemplate_disks') ('finished', models.DateTimeField(help_text='Time of activity finalization.', null=True, verbose_name='finished at', blank=True)),
db.create_table(m2m_table_name, ( ('succeeded', models.NullBooleanField(help_text='True, if the activity has finished successfully.')),
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ('result_data', jsonfield.fields.JSONField(help_text='Human readable result of activity.', null=True, verbose_name='result', blank=True)),
('instancetemplate', models.ForeignKey(orm[u'vm.instancetemplate'], null=False)), ('resultant_state', models.CharField(max_length=20, null=True, blank=True)),
('disk', models.ForeignKey(orm[u'storage.disk'], null=False)) ('interruptible', models.BooleanField(default=False, help_text='Other activities can interrupt this one.')),
)) ('instance', models.ForeignKey(related_name='activity_log', verbose_name='instance', to='vm.Instance', help_text='Instance this activity works on.')),
db.create_unique(m2m_table_name, ['instancetemplate_id', 'disk_id']) ('parent', models.ForeignKey(related_name='children', blank=True, to='vm.InstanceActivity', null=True)),
('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='The person who started this activity.', null=True, verbose_name='user')),
# Adding model 'InterfaceTemplate' ],
db.create_table(u'vm_interfacetemplate', ( options={
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), 'ordering': ['-finished', '-started', 'instance', '-id'],
('vlan', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Vlan'])), 'db_table': 'vm_instanceactivity',
('managed', self.gf('django.db.models.fields.BooleanField')(default=True)), },
('template', self.gf('django.db.models.fields.related.ForeignKey')(related_name='interface_set', to=orm['vm.InstanceTemplate'])), bases=(models.Model,),
)) ),
db.send_create_signal(u'vm', ['InterfaceTemplate']) migrations.CreateModel(
name='InstanceTemplate',
# Adding model 'Instance' fields=[
db.create_table(u'vm_instance', ( ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), ('num_cores', models.IntegerField(help_text='Number of virtual CPU cores available to the virtual machine.', verbose_name='number of cores', validators=[django.core.validators.MinValueValidator(0)])),
('num_cores', self.gf('django.db.models.fields.IntegerField')()), ('ram_size', models.IntegerField(help_text='Mebibytes of memory.', verbose_name='RAM size', validators=[django.core.validators.MinValueValidator(0)])),
('ram_size', self.gf('django.db.models.fields.IntegerField')()), ('max_ram_size', models.IntegerField(help_text='Upper memory size limit for balloning.', verbose_name='maximal RAM size', validators=[django.core.validators.MinValueValidator(0)])),
('max_ram_size', self.gf('django.db.models.fields.IntegerField')()), ('arch', models.CharField(max_length=10, verbose_name='architecture', choices=[('x86_64', 'x86-64 (64 bit)'), ('i686', 'x86 (32 bit)')])),
('arch', self.gf('django.db.models.fields.CharField')(max_length=10)), ('priority', models.IntegerField(help_text='CPU priority.', verbose_name='priority', validators=[django.core.validators.MinValueValidator(0)])),
('priority', self.gf('django.db.models.fields.IntegerField')()), ('access_method', models.CharField(help_text='Primary remote access method.', max_length=10, verbose_name='access method', choices=[('nx', 'NX'), ('rdp', 'RDP'), ('ssh', 'SSH')])),
('boot_menu', self.gf('django.db.models.fields.BooleanField')(default=False)), ('boot_menu', models.BooleanField(default=False, help_text='Show boot device selection menu on boot.', verbose_name='boot menu')),
('raw_data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), ('raw_data', models.TextField(help_text='Additional libvirt domain parameters in XML format.', verbose_name='raw_data', blank=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)), ('system', models.TextField(help_text='Name of operating system in format like "Ubuntu 12.04 LTS Desktop amd64".', verbose_name='operating system')),
('description', self.gf('django.db.models.fields.TextField')(blank=True)), ('has_agent', models.BooleanField(default=True, help_text='If the machine has agent installed, and the manager should wait for its start.', verbose_name='has agent')),
('template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='instance_set', null=True, to=orm['vm.InstanceTemplate'])), ('name', models.CharField(help_text='Human readable name of template.', max_length=100, verbose_name='name')),
('pw', self.gf('django.db.models.fields.CharField')(max_length=20)), ('description', models.TextField(verbose_name='description', blank=True)),
('time_of_suspend', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)), ('disks', models.ManyToManyField(help_text='Disks which are to be mounted.', related_name='template_set', verbose_name='disks', to='storage.Disk')),
('time_of_delete', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)), ],
('active_since', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), options={
('node', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='instance_set', null=True, to=orm['vm.Node'])), 'ordering': ('name',),
('state', self.gf('django.db.models.fields.CharField')(default='NOSTATE', max_length=20)), 'db_table': 'vm_instancetemplate',
('lease', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['vm.Lease'])), 'verbose_name': 'template',
('access_method', self.gf('django.db.models.fields.CharField')(max_length=10)), 'verbose_name_plural': 'templates',
('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), 'permissions': (('create_template', 'Can create an instance template.'), ('create_base_template', 'Can create an instance template (base).'), ('change_template_resources', 'Can change resources of a template.')),
)) },
db.send_create_signal(u'vm', ['Instance']) bases=(models.Model,),
),
# Adding M2M table for field disks on 'Instance' migrations.CreateModel(
m2m_table_name = db.shorten_name(u'vm_instance_disks') name='Interface',
db.create_table(m2m_table_name, ( fields=[
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('instance', models.ForeignKey(orm[u'vm.instance'], null=False)), ('host', models.ForeignKey(verbose_name='host', blank=True, to='firewall.Host', null=True)),
('disk', models.ForeignKey(orm[u'storage.disk'], null=False)) ('instance', models.ForeignKey(related_name='interface_set', verbose_name='instance', to='vm.Instance')),
)) ('vlan', models.ForeignKey(related_name='vm_interface', verbose_name='vlan', to='firewall.Vlan')),
db.create_unique(m2m_table_name, ['instance_id', 'disk_id']) ],
options={
# Adding model 'InstanceActivity' 'ordering': ('-vlan__managed',),
db.create_table(u'vm_instanceactivity', ( 'db_table': 'vm_interface',
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), },
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)), bases=(models.Model,),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)), ),
('activity_code', self.gf('django.db.models.fields.CharField')(max_length=100)), migrations.CreateModel(
('task_uuid', self.gf('django.db.models.fields.CharField')(max_length=50, unique=True, null=True, blank=True)), name='InterfaceTemplate',
('instance', self.gf('django.db.models.fields.related.ForeignKey')(related_name='activity_log', to=orm['vm.Instance'])), fields=[
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('started', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), ('managed', models.BooleanField(default=True, help_text='If a firewall host (i.e. IP address association) should be generated.', verbose_name='managed')),
('finished', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), ('template', models.ForeignKey(related_name='interface_set', verbose_name='template', to='vm.InstanceTemplate', help_text='Template the interface template belongs to.')),
('result', self.gf('django.db.models.fields.TextField')(null=True, blank=True)), ('vlan', models.ForeignKey(verbose_name='vlan', to='firewall.Vlan', help_text='Network the interface belongs to.')),
('state', self.gf('django.db.models.fields.CharField')(default='PENDING', max_length=50)), ],
)) options={
db.send_create_signal(u'vm', ['InstanceActivity']) 'db_table': 'vm_interfacetemplate',
'verbose_name': 'interface template',
# Adding model 'Interface' 'verbose_name_plural': 'interface templates',
db.create_table(u'vm_interface', ( 'permissions': (),
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), },
('vlan', self.gf('django.db.models.fields.related.ForeignKey')(related_name='vm_interface', to=orm['firewall.Vlan'])), bases=(models.Model,),
('host', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Host'], null=True, blank=True)), ),
('instance', self.gf('django.db.models.fields.related.ForeignKey')(related_name='interface_set', to=orm['vm.Instance'])), migrations.CreateModel(
)) name='Lease',
db.send_create_signal(u'vm', ['Interface']) fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.CharField(unique=True, max_length=100, verbose_name='name')),
def backwards(self, orm): ('suspend_interval_seconds', models.IntegerField(help_text='Number of seconds after the an instance is suspended.', null=True, verbose_name='suspend interval', blank=True)),
# Deleting model 'NamedBaseResourceConfig' ('delete_interval_seconds', models.IntegerField(help_text='Number of seconds after the an instance is deleted.', null=True, verbose_name='delete interval', blank=True)),
db.delete_table(u'vm_namedbaseresourceconfig') ],
options={
# Deleting model 'Node' 'ordering': ['name'],
db.delete_table(u'vm_node') 'db_table': 'vm_lease',
'permissions': (('create_leases', 'Can create new leases.'),),
# Deleting model 'NodeActivity' },
db.delete_table(u'vm_nodeactivity') bases=(models.Model,),
),
# Deleting model 'Lease' migrations.CreateModel(
db.delete_table(u'vm_lease') name='NamedBaseResourceConfig',
fields=[
# Deleting model 'InstanceTemplate' ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
db.delete_table(u'vm_instancetemplate') ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)),
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)),
# Removing M2M table for field disks on 'InstanceTemplate' ('num_cores', models.IntegerField(help_text='Number of virtual CPU cores available to the virtual machine.', verbose_name='number of cores', validators=[django.core.validators.MinValueValidator(0)])),
db.delete_table(db.shorten_name(u'vm_instancetemplate_disks')) ('ram_size', models.IntegerField(help_text='Mebibytes of memory.', verbose_name='RAM size', validators=[django.core.validators.MinValueValidator(0)])),
('max_ram_size', models.IntegerField(help_text='Upper memory size limit for balloning.', verbose_name='maximal RAM size', validators=[django.core.validators.MinValueValidator(0)])),
# Deleting model 'InterfaceTemplate' ('arch', models.CharField(max_length=10, verbose_name='architecture', choices=[('x86_64', 'x86-64 (64 bit)'), ('i686', 'x86 (32 bit)')])),
db.delete_table(u'vm_interfacetemplate') ('priority', models.IntegerField(help_text='CPU priority.', verbose_name='priority', validators=[django.core.validators.MinValueValidator(0)])),
('name', models.CharField(help_text='Name of base resource configuration.', unique=True, max_length=50, verbose_name='name')),
# Deleting model 'Instance' ],
db.delete_table(u'vm_instance') options={
'db_table': 'vm_namedbaseresourceconfig',
# Removing M2M table for field disks on 'Instance' },
db.delete_table(db.shorten_name(u'vm_instance_disks')) bases=(models.Model,),
),
# Deleting model 'InstanceActivity' migrations.CreateModel(
db.delete_table(u'vm_instanceactivity') name='Node',
fields=[
# Deleting model 'Interface' ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
db.delete_table(u'vm_interface') ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)),
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)),
('name', models.CharField(help_text='Human readable name of node.', unique=True, max_length=50, verbose_name='name')),
models = { ('normalized_name', common.models.HumanSortField(default=b'', max_length=100, monitor='name', blank=True)),
u'auth.group': { ('priority', models.IntegerField(help_text='Node usage priority.', verbose_name='priority')),
'Meta': {'object_name': 'Group'}, ('enabled', models.BooleanField(default=False, help_text='Indicates whether the node can be used for hosting.', verbose_name='enabled')),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('schedule_enabled', models.BooleanField(default=False, help_text='Indicates whether a vm can be automatically scheduled to this node.', verbose_name='schedule enabled')),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), ('overcommit', models.FloatField(default=1.0, help_text='The ratio of total memory with to without overcommit.', verbose_name='overcommit ratio')),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) ('host', models.ForeignKey(verbose_name='host', to='firewall.Host', help_text='Host in firewall.')),
}, ('tags', taggit.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', blank=True, help_text='A comma-separated list of tags.', verbose_name='tags')),
u'auth.permission': { ],
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, options={
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'ordering': ('-enabled', 'normalized_name'),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), 'db_table': 'vm_node',
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'permissions': (('view_statistics', 'Can view Node box and statistics.'),),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) },
}, bases=(common.operations.OperatedMixin, models.Model),
u'auth.user': { ),
'Meta': {'object_name': 'User'}, migrations.CreateModel(
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), name='NodeActivity',
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), fields=[
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, verbose_name='created', editable=False)),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, verbose_name='modified', editable=False)),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), ('activity_code', models.CharField(max_length=100, verbose_name='activity code')),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), ('readable_name_data', jsonfield.fields.JSONField(help_text='Human readable name of activity.', null=True, verbose_name='human readable name', blank=True)),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), ('task_uuid', models.CharField(null=True, max_length=50, blank=True, help_text='Celery task unique identifier.', unique=True, verbose_name='task_uuid')),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), ('started', models.DateTimeField(help_text='Time of activity initiation.', null=True, verbose_name='started at', blank=True)),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), ('finished', models.DateTimeField(help_text='Time of activity finalization.', null=True, verbose_name='finished at', blank=True)),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), ('succeeded', models.NullBooleanField(help_text='True, if the activity has finished successfully.')),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), ('result_data', jsonfield.fields.JSONField(help_text='Human readable result of activity.', null=True, verbose_name='result', blank=True)),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) ('node', models.ForeignKey(related_name='activity_log', verbose_name='node', to='vm.Node', help_text='Node this activity works on.')),
}, ('parent', models.ForeignKey(related_name='children', blank=True, to='vm.NodeActivity', null=True)),
u'contenttypes.contenttype': { ('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, help_text='The person who started this activity.', null=True, verbose_name='user')),
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, ],
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), options={
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'db_table': 'vm_nodeactivity',
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), },
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) bases=(models.Model,),
}, ),
u'firewall.domain': { migrations.CreateModel(
'Meta': {'object_name': 'Domain'}, name='Trait',
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), fields=[
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ('name', models.CharField(max_length=50, verbose_name='name')),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), ],
'name': ('django.db.models.fields.CharField', [], {'max_length': '40'}), options={
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'db_table': 'vm_trait',
'ttl': ('django.db.models.fields.IntegerField', [], {'default': '600'}) },
}, bases=(models.Model,),
u'firewall.group': { ),
'Meta': {'object_name': 'Group'}, migrations.AddField(
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), model_name='node',
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), name='traits',
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), field=models.ManyToManyField(help_text='Declared traits.', to='vm.Trait', verbose_name='traits', blank=True),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), preserve_default=True,
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), ),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}) migrations.AddField(
}, model_name='instancetemplate',
u'firewall.host': { name='lease',
'Meta': {'object_name': 'Host'}, field=models.ForeignKey(verbose_name='Lease', to='vm.Lease', help_text='Preferred expiration periods.'),
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), preserve_default=True,
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), ),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), migrations.AddField(
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['firewall.Group']", 'null': 'True', 'blank': 'True'}), model_name='instancetemplate',
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}), name='owner',
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
'ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}), preserve_default=True,
'ipv6': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'unique': 'True', 'null': 'True', 'blank': 'True'}), ),
'location': ('django.db.models.fields.TextField', [], {'blank': 'True'}), migrations.AddField(
'mac': ('firewall.fields.MACAddressField', [], {'unique': 'True', 'max_length': '17'}), model_name='instancetemplate',
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), name='parent',
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='vm.InstanceTemplate', help_text='Template which this one is derived of.', null=True, verbose_name='parent template'),
'pub_ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True', 'blank': 'True'}), preserve_default=True,
'reverse': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}), ),
'shared_ip': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), migrations.AddField(
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Vlan']"}) model_name='instancetemplate',
}, name='req_traits',
u'firewall.vlan': { field=models.ManyToManyField(help_text='A set of traits required for a node to declare to be suitable for hosting the VM.', to='vm.Trait', verbose_name='required traits', blank=True),
'Meta': {'object_name': 'Vlan'}, preserve_default=True,
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}), ),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), migrations.AddField(
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), model_name='instancetemplate',
'dhcp_pool': ('django.db.models.fields.TextField', [], {'blank': 'True'}), name='tags',
'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Domain']"}), field=taggit.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', blank=True, help_text='A comma-separated list of tags.', verbose_name='tags'),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), preserve_default=True,
'interface': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), ),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), migrations.AddField(
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}), model_name='instance',
'network4': ('firewall.fields.IPNetworkField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), name='lease',
'network6': ('firewall.fields.IPNetworkField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), field=models.ForeignKey(verbose_name='Lease', to='vm.Lease', help_text='Preferred expiration periods.'),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}), preserve_default=True,
'reverse_domain': ('django.db.models.fields.TextField', [], {'default': "'%(d)d.%(c)d.%(b)d.%(a)d.in-addr.arpa'"}), ),
'snat_ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True', 'blank': 'True'}), migrations.AddField(
'snat_to': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'}), model_name='instance',
'vid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'}) name='node',
}, field=models.ForeignKey(related_name='instance_set', blank=True, to='vm.Node', help_text='Current hypervisor of this instance.', null=True, verbose_name='host node'),
u'storage.datastore': { preserve_default=True,
'Meta': {'ordering': "['name']", 'object_name': 'DataStore'}, ),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), migrations.AddField(
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), model_name='instance',
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}) name='owner',
}, field=models.ForeignKey(to=settings.AUTH_USER_MODEL),
u'storage.disk': { preserve_default=True,
'Meta': {'ordering': "['name']", 'object_name': 'Disk'}, ),
'base': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'derivatives'", 'null': 'True', 'to': u"orm['storage.Disk']"}), migrations.AddField(
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), model_name='instance',
'datastore': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['storage.DataStore']"}), name='req_traits',
'dev_num': ('django.db.models.fields.CharField', [], {'max_length': '1'}), field=models.ManyToManyField(help_text='A set of traits required for a node to declare to be suitable for hosting the VM.', to='vm.Trait', verbose_name='required traits', blank=True),
'format': ('django.db.models.fields.CharField', [], {'max_length': '10'}), preserve_default=True,
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), ),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}), migrations.AddField(
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), model_name='instance',
'ready': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), name='tags',
'size': ('django.db.models.fields.IntegerField', [], {}), field=taggit.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', blank=True, help_text='A comma-separated list of tags.', verbose_name='tags'),
'type': ('django.db.models.fields.CharField', [], {'max_length': '10'}) preserve_default=True,
}, ),
u'vm.instance': { migrations.AddField(
'Meta': {'ordering': "['pk']", 'object_name': 'Instance'}, model_name='instance',
'access_method': ('django.db.models.fields.CharField', [], {'max_length': '10'}), name='template',
'active_since': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), field=models.ForeignKey(related_name='instance_set', on_delete=django.db.models.deletion.SET_NULL, blank=True, to='vm.InstanceTemplate', help_text='Template the instance derives from.', null=True, verbose_name='template'),
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}), preserve_default=True,
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), ),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}), ]
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'disks': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'instance_set'", 'symmetrical': 'False', 'to': u"orm['storage.Disk']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lease': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.Lease']"}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'instance_set'", 'null': 'True', 'to': u"orm['vm.Node']"}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'pw': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'NOSTATE'", 'max_length': '20'}),
'template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'instance_set'", 'null': 'True', 'to': u"orm['vm.InstanceTemplate']"}),
'time_of_delete': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'time_of_suspend': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'})
},
u'vm.instanceactivity': {
'Meta': {'object_name': 'InstanceActivity'},
'activity_code': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'activity_log'", 'to': u"orm['vm.Instance']"}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'started': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'PENDING'", 'max_length': '50'}),
'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
u'vm.instancetemplate': {
'Meta': {'ordering': "['name']", 'object_name': 'InstanceTemplate'},
'access_method': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'disks': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'template_set'", 'symmetrical': 'False', 'to': u"orm['storage.Disk']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lease': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'template_set'", 'to': u"orm['vm.Lease']"}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.InstanceTemplate']", 'null': 'True', 'blank': 'True'}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'NEW'", 'max_length': '10'}),
'system': ('django.db.models.fields.TextField', [], {'blank': 'True'})
},
u'vm.interface': {
'Meta': {'object_name': 'Interface'},
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Host']", 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'interface_set'", 'to': u"orm['vm.Instance']"}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vm_interface'", 'to': u"orm['firewall.Vlan']"})
},
u'vm.interfacetemplate': {
'Meta': {'object_name': 'InterfaceTemplate'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'managed': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'interface_set'", 'to': u"orm['vm.InstanceTemplate']"}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Vlan']"})
},
u'vm.lease': {
'Meta': {'ordering': "['name']", 'object_name': 'Lease'},
'delete_interval_seconds': ('django.db.models.fields.IntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'suspend_interval_seconds': ('django.db.models.fields.IntegerField', [], {})
},
u'vm.namedbaseresourceconfig': {
'Meta': {'object_name': 'NamedBaseResourceConfig'},
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
},
u'vm.node': {
'Meta': {'object_name': 'Node'},
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Host']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'ram_size': ('django.db.models.fields.IntegerField', [], {})
},
u'vm.nodeactivity': {
'Meta': {'object_name': 'NodeActivity'},
'activity_code': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'activity_log'", 'to': u"orm['vm.Node']"}),
'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'started': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'status': ('django.db.models.fields.CharField', [], {'default': "'PENDING'", 'max_length': '50'}),
'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['vm']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'NamedBaseResourceConfig'
db.create_table(u'vm_namedbaseresourceconfig', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('num_cores', self.gf('django.db.models.fields.IntegerField')()),
('ram_size', self.gf('django.db.models.fields.IntegerField')()),
('max_ram_size', self.gf('django.db.models.fields.IntegerField')()),
('arch', self.gf('django.db.models.fields.CharField')(max_length=10)),
('priority', self.gf('django.db.models.fields.IntegerField')()),
('boot_menu', self.gf('django.db.models.fields.BooleanField')(default=False)),
('raw_data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=50)),
))
db.send_create_signal(u'vm', ['NamedBaseResourceConfig'])
# Adding model 'Node'
db.create_table(u'vm_node', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=50)),
('num_cores', self.gf('django.db.models.fields.IntegerField')()),
('ram_size', self.gf('django.db.models.fields.IntegerField')()),
('priority', self.gf('django.db.models.fields.IntegerField')()),
('host', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Host'])),
('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal(u'vm', ['Node'])
# Adding model 'NodeActivity'
db.create_table(u'vm_nodeactivity', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('activity_code', self.gf('django.db.models.fields.CharField')(max_length=100)),
('task_uuid', self.gf('django.db.models.fields.CharField')(max_length=50, unique=True, null=True, blank=True)),
('node', self.gf('django.db.models.fields.related.ForeignKey')(related_name='activity_log', to=orm['vm.Node'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
('started', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('finished', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('result', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('status', self.gf('django.db.models.fields.CharField')(default='PENDING', max_length=50)),
))
db.send_create_signal(u'vm', ['NodeActivity'])
# Adding model 'Lease'
db.create_table(u'vm_lease', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)),
('suspend_interval_seconds', self.gf('django.db.models.fields.IntegerField')()),
('delete_interval_seconds', self.gf('django.db.models.fields.IntegerField')()),
))
db.send_create_signal(u'vm', ['Lease'])
# Adding model 'InstanceTemplate'
db.create_table(u'vm_instancetemplate', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('num_cores', self.gf('django.db.models.fields.IntegerField')()),
('ram_size', self.gf('django.db.models.fields.IntegerField')()),
('max_ram_size', self.gf('django.db.models.fields.IntegerField')()),
('arch', self.gf('django.db.models.fields.CharField')(max_length=10)),
('priority', self.gf('django.db.models.fields.IntegerField')()),
('boot_menu', self.gf('django.db.models.fields.BooleanField')(default=False)),
('raw_data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=100)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['vm.InstanceTemplate'], null=True, blank=True)),
('system', self.gf('django.db.models.fields.TextField')(blank=True)),
('access_method', self.gf('django.db.models.fields.CharField')(max_length=10)),
('state', self.gf('django.db.models.fields.CharField')(default='NEW', max_length=10)),
('lease', self.gf('django.db.models.fields.related.ForeignKey')(related_name='template_set', to=orm['vm.Lease'])),
))
db.send_create_signal(u'vm', ['InstanceTemplate'])
# Adding M2M table for field disks on 'InstanceTemplate'
m2m_table_name = db.shorten_name(u'vm_instancetemplate_disks')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('instancetemplate', models.ForeignKey(orm[u'vm.instancetemplate'], null=False)),
('disk', models.ForeignKey(orm[u'storage.disk'], null=False))
))
db.create_unique(m2m_table_name, ['instancetemplate_id', 'disk_id'])
# Adding model 'InterfaceTemplate'
db.create_table(u'vm_interfacetemplate', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('vlan', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Vlan'])),
('managed', self.gf('django.db.models.fields.BooleanField')(default=True)),
('template', self.gf('django.db.models.fields.related.ForeignKey')(related_name='interface_set', to=orm['vm.InstanceTemplate'])),
))
db.send_create_signal(u'vm', ['InterfaceTemplate'])
# Adding model 'Instance'
db.create_table(u'vm_instance', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('num_cores', self.gf('django.db.models.fields.IntegerField')()),
('ram_size', self.gf('django.db.models.fields.IntegerField')()),
('max_ram_size', self.gf('django.db.models.fields.IntegerField')()),
('arch', self.gf('django.db.models.fields.CharField')(max_length=10)),
('priority', self.gf('django.db.models.fields.IntegerField')()),
('boot_menu', self.gf('django.db.models.fields.BooleanField')(default=False)),
('raw_data', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
('template', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='instance_set', null=True, to=orm['vm.InstanceTemplate'])),
('pw', self.gf('django.db.models.fields.CharField')(max_length=20)),
('time_of_suspend', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)),
('time_of_delete', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True, blank=True)),
('active_since', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('node', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='instance_set', null=True, to=orm['vm.Node'])),
('state', self.gf('django.db.models.fields.CharField')(default='NOSTATE', max_length=20)),
('lease', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['vm.Lease'])),
('access_method', self.gf('django.db.models.fields.CharField')(max_length=10)),
('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
))
db.send_create_signal(u'vm', ['Instance'])
# Adding M2M table for field disks on 'Instance'
m2m_table_name = db.shorten_name(u'vm_instance_disks')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('instance', models.ForeignKey(orm[u'vm.instance'], null=False)),
('disk', models.ForeignKey(orm[u'storage.disk'], null=False))
))
db.create_unique(m2m_table_name, ['instance_id', 'disk_id'])
# Adding model 'InstanceActivity'
db.create_table(u'vm_instanceactivity', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('activity_code', self.gf('django.db.models.fields.CharField')(max_length=100)),
('task_uuid', self.gf('django.db.models.fields.CharField')(max_length=50, unique=True, null=True, blank=True)),
('instance', self.gf('django.db.models.fields.related.ForeignKey')(related_name='activity_log', to=orm['vm.Instance'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
('started', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('finished', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
('result', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('state', self.gf('django.db.models.fields.CharField')(default='PENDING', max_length=50)),
))
db.send_create_signal(u'vm', ['InstanceActivity'])
# Adding model 'Interface'
db.create_table(u'vm_interface', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('vlan', self.gf('django.db.models.fields.related.ForeignKey')(related_name='vm_interface', to=orm['firewall.Vlan'])),
('host', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['firewall.Host'], null=True, blank=True)),
('instance', self.gf('django.db.models.fields.related.ForeignKey')(related_name='interface_set', to=orm['vm.Instance'])),
))
db.send_create_signal(u'vm', ['Interface'])
def backwards(self, orm):
# Deleting model 'NamedBaseResourceConfig'
db.delete_table(u'vm_namedbaseresourceconfig')
# Deleting model 'Node'
db.delete_table(u'vm_node')
# Deleting model 'NodeActivity'
db.delete_table(u'vm_nodeactivity')
# Deleting model 'Lease'
db.delete_table(u'vm_lease')
# Deleting model 'InstanceTemplate'
db.delete_table(u'vm_instancetemplate')
# Removing M2M table for field disks on 'InstanceTemplate'
db.delete_table(db.shorten_name(u'vm_instancetemplate_disks'))
# Deleting model 'InterfaceTemplate'
db.delete_table(u'vm_interfacetemplate')
# Deleting model 'Instance'
db.delete_table(u'vm_instance')
# Removing M2M table for field disks on 'Instance'
db.delete_table(db.shorten_name(u'vm_instance_disks'))
# Deleting model 'InstanceActivity'
db.delete_table(u'vm_instanceactivity')
# Deleting model 'Interface'
db.delete_table(u'vm_interface')
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'firewall.domain': {
'Meta': {'object_name': 'Domain'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'ttl': ('django.db.models.fields.IntegerField', [], {'default': '600'})
},
u'firewall.group': {
'Meta': {'object_name': 'Group'},
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
u'firewall.host': {
'Meta': {'object_name': 'Host'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['firewall.Group']", 'null': 'True', 'blank': 'True'}),
'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
'ipv6': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'location': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'mac': ('firewall.fields.MACAddressField', [], {'unique': 'True', 'max_length': '17'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'pub_ipv4': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True', 'blank': 'True'}),
'reverse': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'shared_ip': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Vlan']"})
},
u'firewall.vlan': {
'Meta': {'object_name': 'Vlan'},
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'dhcp_pool': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Domain']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'interface': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '20'}),
'network4': ('firewall.fields.IPNetworkField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'network6': ('firewall.fields.IPNetworkField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'reverse_domain': ('django.db.models.fields.TextField', [], {'default': "'%(d)d.%(c)d.%(b)d.%(a)d.in-addr.arpa'"}),
'snat_ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39', 'null': 'True', 'blank': 'True'}),
'snat_to': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['firewall.Vlan']", 'null': 'True', 'blank': 'True'}),
'vid': ('django.db.models.fields.IntegerField', [], {'unique': 'True'})
},
u'storage.datastore': {
'Meta': {'ordering': "['name']", 'object_name': 'DataStore'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'})
},
u'storage.disk': {
'Meta': {'ordering': "['name']", 'object_name': 'Disk'},
'base': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'derivatives'", 'null': 'True', 'to': u"orm['storage.Disk']"}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'datastore': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['storage.DataStore']"}),
'dev_num': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
'format': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'ready': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'size': ('django.db.models.fields.IntegerField', [], {}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '10'})
},
u'vm.instance': {
'Meta': {'ordering': "['pk']", 'object_name': 'Instance'},
'access_method': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'active_since': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'disks': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'instance_set'", 'symmetrical': 'False', 'to': u"orm['storage.Disk']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lease': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.Lease']"}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'node': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'instance_set'", 'null': 'True', 'to': u"orm['vm.Node']"}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'pw': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'NOSTATE'", 'max_length': '20'}),
'template': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'instance_set'", 'null': 'True', 'to': u"orm['vm.InstanceTemplate']"}),
'time_of_delete': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
'time_of_suspend': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'blank': 'True'})
},
u'vm.instanceactivity': {
'Meta': {'object_name': 'InstanceActivity'},
'activity_code': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'activity_log'", 'to': u"orm['vm.Instance']"}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'started': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'PENDING'", 'max_length': '50'}),
'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
},
u'vm.instancetemplate': {
'Meta': {'ordering': "['name']", 'object_name': 'InstanceTemplate'},
'access_method': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'disks': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'template_set'", 'symmetrical': 'False', 'to': u"orm['storage.Disk']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lease': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'template_set'", 'to': u"orm['vm.Lease']"}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['vm.InstanceTemplate']", 'null': 'True', 'blank': 'True'}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'NEW'", 'max_length': '10'}),
'system': ('django.db.models.fields.TextField', [], {'blank': 'True'})
},
u'vm.interface': {
'Meta': {'object_name': 'Interface'},
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Host']", 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instance': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'interface_set'", 'to': u"orm['vm.Instance']"}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vm_interface'", 'to': u"orm['firewall.Vlan']"})
},
u'vm.interfacetemplate': {
'Meta': {'object_name': 'InterfaceTemplate'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'managed': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'interface_set'", 'to': u"orm['vm.InstanceTemplate']"}),
'vlan': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Vlan']"})
},
u'vm.lease': {
'Meta': {'ordering': "['name']", 'object_name': 'Lease'},
'delete_interval_seconds': ('django.db.models.fields.IntegerField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}),
'suspend_interval_seconds': ('django.db.models.fields.IntegerField', [], {})
},
u'vm.namedbaseresourceconfig': {
'Meta': {'object_name': 'NamedBaseResourceConfig'},
'arch': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
'boot_menu': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_ram_size': ('django.db.models.fields.IntegerField', [], {}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'ram_size': ('django.db.models.fields.IntegerField', [], {}),
'raw_data': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
},
u'vm.node': {
'Meta': {'object_name': 'Node'},
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'host': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['firewall.Host']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
'num_cores': ('django.db.models.fields.IntegerField', [], {}),
'priority': ('django.db.models.fields.IntegerField', [], {}),
'ram_size': ('django.db.models.fields.IntegerField', [], {})
},
u'vm.nodeactivity': {
'Meta': {'object_name': 'NodeActivity'},
'activity_code': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'activity_log'", 'to': u"orm['vm.Node']"}),
'result': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'started': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'status': ('django.db.models.fields.CharField', [], {'default': "'PENDING'", 'max_length': '50'}),
'task_uuid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['vm']
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment