1 # -*- coding: utf-8 -*-
3 from south
.db
import db
4 from south
.v2
import SchemaMigration
5 from django
.db
import models
8 class Migration(SchemaMigration
):
10 def forwards(self
, orm
):
11 # Adding field 'VirtualMachineTemplate.temporary'
12 db
.add_column('ganeti_web_virtualmachinetemplate', 'temporary',
13 self
.gf('django.db.models.fields.BooleanField')(default
=False),
16 # Adding field 'VirtualMachineTemplate.ip_check'
17 db
.add_column('ganeti_web_virtualmachinetemplate', 'ip_check',
18 self
.gf('django.db.models.fields.BooleanField')(default
=True),
21 # Adding field 'VirtualMachineTemplate.minmem'
22 db
.add_column('ganeti_web_virtualmachinetemplate', 'minmem',
23 self
.gf('django.db.models.fields.IntegerField')(null
=True, blank
=True),
27 def backwards(self
, orm
):
28 # Deleting field 'VirtualMachineTemplate.temporary'
29 db
.delete_column('ganeti_web_virtualmachinetemplate', 'temporary')
31 # Deleting field 'VirtualMachineTemplate.ip_check'
32 db
.delete_column('ganeti_web_virtualmachinetemplate', 'ip_check')
34 # Deleting field 'VirtualMachineTemplate.minmem'
35 db
.delete_column('ganeti_web_virtualmachinetemplate', 'minmem')
41 'Meta': {'object_name': 'Group'},
42 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
43 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
44 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
47 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
48 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
49 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
50 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
51 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
54 'Meta': {'object_name': 'User'},
55 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
56 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
57 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
58 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
59 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
60 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
61 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
62 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
63 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
64 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
65 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
66 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
67 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
69 'contenttypes.contenttype': {
70 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
71 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
72 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
73 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
74 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
76 'ganeti_web.cluster': {
77 'Meta': {'ordering': "['hostname', 'description']", 'object_name': 'Cluster'},
78 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
79 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
80 'disk': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
81 'hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
82 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
83 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
84 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
85 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cluster_last_job'", 'null': 'True', 'to': "orm['ganeti_web.Job']"}),
86 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
87 'password': ('ganeti_web.fields.PatchedEncryptedCharField', [], {'default': "''", 'max_length': '293', 'cipher': "'AES'", 'blank': 'True'}),
88 'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}),
89 'ram': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
90 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
91 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
92 'username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}),
93 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
95 'ganeti_web.cluster_perms': {
96 'Meta': {'object_name': 'Cluster_Perms'},
97 'admin': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
98 'create_vm': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
99 'export': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
100 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
101 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102 'migrate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
103 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.Cluster']"}),
104 'replace_disks': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
105 'tags': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
106 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
108 'ganeti_web.clusteruser': {
109 'Meta': {'object_name': 'ClusterUser'},
110 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
111 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
112 'real_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True'})
114 'ganeti_web.ganetierror': {
115 'Meta': {'ordering': "('-timestamp', 'code', 'msg')", 'object_name': 'GanetiError'},
116 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
117 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
118 'code': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
119 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
120 'msg': ('django.db.models.fields.TextField', [], {}),
121 'obj_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
122 'obj_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ganeti_errors'", 'to': "orm['contenttypes.ContentType']"}),
123 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
126 'Meta': {'object_name': 'Job'},
127 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
128 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['ganeti_web.Cluster']"}),
129 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
130 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
131 'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
132 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
133 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
134 'job_id': ('django.db.models.fields.IntegerField', [], {}),
135 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
136 'object_id': ('django.db.models.fields.IntegerField', [], {}),
137 'op': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
138 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
139 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'})
142 'Meta': {'object_name': 'Node'},
143 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
144 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['ganeti_web.Cluster']"}),
145 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
146 'cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
147 'disk_free': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
148 'disk_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
149 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
150 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
151 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
152 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
153 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
154 'offline': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
155 'ram_free': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
156 'ram_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
157 'role': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
158 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
160 'ganeti_web.organization': {
161 'Meta': {'object_name': 'Organization', '_ormbases': ['ganeti_web.ClusterUser']},
162 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
163 'group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'organization'", 'unique': 'True', 'to': "orm['auth.Group']"})
165 'ganeti_web.profile': {
166 'Meta': {'object_name': 'Profile', '_ormbases': ['ganeti_web.ClusterUser']},
167 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
168 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
170 'ganeti_web.quota': {
171 'Meta': {'object_name': 'Quota'},
172 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.Cluster']"}),
173 'disk': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
174 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
175 'ram': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
176 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.ClusterUser']"}),
177 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'})
179 'ganeti_web.sshkey': {
180 'Meta': {'object_name': 'SSHKey'},
181 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
182 'key': ('django.db.models.fields.TextField', [], {}),
183 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ssh_keys'", 'to': "orm['auth.User']"})
185 'ganeti_web.testmodel': {
186 'Meta': {'object_name': 'TestModel'},
187 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
188 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
189 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
190 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
191 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
192 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
194 'ganeti_web.virtualmachine': {
195 'Meta': {'ordering': "['hostname']", 'unique_together': "(('cluster', 'hostname'),)", 'object_name': 'VirtualMachine'},
196 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
197 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'default': '0', 'related_name': "'virtual_machines'", 'to': "orm['ganeti_web.Cluster']"}),
198 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
199 'disk_size': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
200 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
201 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
202 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
203 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
204 'minram': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
205 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
206 'operating_system': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
207 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'virtual_machines'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ganeti_web.ClusterUser']"}),
208 'pending_delete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
209 'primary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'primary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
210 'ram': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
211 'secondary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'secondary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
212 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
213 'status': ('django.db.models.fields.CharField', [], {'max_length': '14'}),
214 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['ganeti_web.VirtualMachineTemplate']"}),
215 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '-1'})
217 'ganeti_web.virtualmachine_perms': {
218 'Meta': {'object_name': 'VirtualMachine_Perms'},
219 'admin': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
220 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
221 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
222 'modify': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
223 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.VirtualMachine']"}),
224 'power': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
225 'remove': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
226 'tags': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
227 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
229 'ganeti_web.virtualmachinetemplate': {
230 'Meta': {'unique_together': "(('cluster', 'template_name'),)", 'object_name': 'VirtualMachineTemplate'},
231 'boot_order': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
232 'cdrom2_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
233 'cdrom_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
234 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']", 'null': 'True'}),
235 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
236 'disk_template': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
237 'disk_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
238 'disks': ('django_fields.fields.PickleField', [], {'null': 'True', 'blank': 'True'}),
239 'iallocator': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
240 'iallocator_hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
241 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
242 'ip_check': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
243 'kernel_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
244 'memory': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
245 'minmem': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
246 'name_check': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
247 'nic_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
248 'nics': ('django_fields.fields.PickleField', [], {'null': 'True', 'blank': 'True'}),
249 'no_install': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
250 'os': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
251 'pnode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
252 'root_path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
253 'serial_console': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
254 'snode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
255 'start': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
256 'template_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
257 'temporary': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
258 'vcpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
262 complete_apps
= ['ganeti_web']