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