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 # Deleting field 'Job.processed'
12 db
.delete_column('ganeti_web_job', 'processed')
14 # Deleting field 'Job.cleared'
15 db
.delete_column('ganeti_web_job', 'cleared')
18 # Changing field 'VirtualMachine.owner'
19 db
.alter_column('ganeti_web_virtualmachine', 'owner_id', self
.gf('django.db.models.fields.related.ForeignKey')(null
=True, on_delete
=models
.SET_NULL
, to
=orm
['ganeti_web.ClusterUser']))
21 # Changing field 'Cluster.password'
22 db
.alter_column('ganeti_web_cluster', 'password', self
.gf('ganeti_web.fields.PatchedEncryptedCharField')(max_length
=293, null
=True, cipher
='AES'))
24 def backwards(self
, orm
):
25 # Adding field 'Job.processed'
26 db
.add_column('ganeti_web_job', 'processed',
27 self
.gf('django.db.models.fields.BooleanField')(default
=False),
30 # Adding field 'Job.cleared'
31 db
.add_column('ganeti_web_job', 'cleared',
32 self
.gf('django.db.models.fields.BooleanField')(default
=False),
36 # Changing field 'VirtualMachine.owner'
37 db
.alter_column('ganeti_web_virtualmachine', 'owner_id', self
.gf('django.db.models.fields.related.ForeignKey')(null
=True, to
=orm
['ganeti_web.ClusterUser']))
39 # Changing field 'Cluster.password'
40 db
.alter_column('ganeti_web_cluster', 'password', self
.gf('django_fields.fields.EncryptedCharField')(max_length
=293, null
=True, cipher
='AES'))
44 'Meta': {'object_name': 'Group'},
45 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
46 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
47 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
50 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
51 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
52 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
53 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
54 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
57 'Meta': {'object_name': 'User'},
58 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
59 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
60 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
61 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
62 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
63 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
64 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
65 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
66 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
67 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
68 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
69 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
70 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
72 'contenttypes.contenttype': {
73 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
74 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
75 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
76 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
77 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
79 'ganeti_web.cluster': {
80 'Meta': {'ordering': "['hostname', 'description']", 'object_name': 'Cluster'},
81 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
82 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
83 'disk': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
84 'hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
85 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
86 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
87 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
88 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cluster_last_job'", 'null': 'True', 'to': "orm['ganeti_web.Job']"}),
89 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
90 'password': ('ganeti_web.fields.PatchedEncryptedCharField', [], {'max_length': '293', 'null': 'True', 'cipher': "'AES'", 'blank': 'True'}),
91 'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}),
92 'ram': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
93 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
94 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
95 'username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
96 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
98 'ganeti_web.cluster_perms': {
99 'Meta': {'object_name': 'Cluster_Perms'},
100 'admin': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
101 'create_vm': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
102 'export': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
103 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
104 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
105 'migrate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
106 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.Cluster']"}),
107 'replace_disks': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
108 'tags': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
109 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
111 'ganeti_web.clusteruser': {
112 'Meta': {'object_name': 'ClusterUser'},
113 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
114 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
115 'real_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True'})
117 'ganeti_web.ganetierror': {
118 'Meta': {'ordering': "('-timestamp', 'code', 'msg')", 'object_name': 'GanetiError'},
119 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
120 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
121 'code': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
122 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
123 'msg': ('django.db.models.fields.TextField', [], {}),
124 'obj_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
125 'obj_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ganeti_errors'", 'to': "orm['contenttypes.ContentType']"}),
126 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
129 'Meta': {'object_name': 'Job'},
130 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
131 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['ganeti_web.Cluster']"}),
132 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
133 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
134 'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
135 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
136 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
137 'job_id': ('django.db.models.fields.IntegerField', [], {}),
138 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
139 'object_id': ('django.db.models.fields.IntegerField', [], {}),
140 'op': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
141 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
142 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'})
145 'Meta': {'object_name': 'Node'},
146 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
147 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['ganeti_web.Cluster']"}),
148 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
149 'cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
150 'disk_free': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
151 'disk_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
152 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
153 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
154 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
155 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
156 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
157 'offline': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
158 'ram_free': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
159 'ram_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
160 'role': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
161 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
163 'ganeti_web.organization': {
164 'Meta': {'object_name': 'Organization', '_ormbases': ['ganeti_web.ClusterUser']},
165 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
166 'group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'organization'", 'unique': 'True', 'to': "orm['auth.Group']"})
168 'ganeti_web.profile': {
169 'Meta': {'object_name': 'Profile', '_ormbases': ['ganeti_web.ClusterUser']},
170 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
171 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
173 'ganeti_web.quota': {
174 'Meta': {'object_name': 'Quota'},
175 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.Cluster']"}),
176 'disk': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
177 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
178 'ram': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
179 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.ClusterUser']"}),
180 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'})
182 'ganeti_web.sshkey': {
183 'Meta': {'object_name': 'SSHKey'},
184 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
185 'key': ('django.db.models.fields.TextField', [], {}),
186 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ssh_keys'", 'to': "orm['auth.User']"})
188 'ganeti_web.testmodel': {
189 'Meta': {'object_name': 'TestModel'},
190 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
191 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
192 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
193 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
194 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
195 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
197 'ganeti_web.virtualmachine': {
198 'Meta': {'ordering': "['hostname']", 'unique_together': "(('cluster', 'hostname'),)", 'object_name': 'VirtualMachine'},
199 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
200 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'default': '0', 'related_name': "'virtual_machines'", 'to': "orm['ganeti_web.Cluster']"}),
201 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
202 'disk_size': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
203 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
204 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
205 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
206 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
207 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
208 'operating_system': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
209 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'virtual_machines'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ganeti_web.ClusterUser']"}),
210 'pending_delete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
211 'primary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'primary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
212 'ram': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
213 'secondary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'secondary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
214 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
215 'status': ('django.db.models.fields.CharField', [], {'max_length': '14'}),
216 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['ganeti_web.VirtualMachineTemplate']"}),
217 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '-1'})
219 'ganeti_web.virtualmachine_perms': {
220 'Meta': {'object_name': 'VirtualMachine_Perms'},
221 'admin': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
222 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
223 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
224 'modify': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
225 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.VirtualMachine']"}),
226 'power': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
227 'remove': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
228 'tags': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
229 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
231 'ganeti_web.virtualmachinetemplate': {
232 'Meta': {'unique_together': "(('cluster', 'template_name'),)", 'object_name': 'VirtualMachineTemplate'},
233 'boot_order': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
234 'cdrom2_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
235 'cdrom_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
236 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']", 'null': 'True'}),
237 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
238 'disk_template': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
239 'disk_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
240 'disks': ('django_fields.fields.PickleField', [], {'null': 'True', 'blank': 'True'}),
241 'iallocator': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
242 'iallocator_hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
243 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
244 'kernel_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
245 'memory': ('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 'vcpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
261 complete_apps
= ['ganeti_web']