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