models: Remove "cleared" and "processed" fields from Jobs.
[ganeti_webmgr.git] / ganeti_web / migrations / 0002_version_0_7_convert_old_tables.py
blob04e7419442f01a20c7d78c6ad2181129106566a8
1 # encoding: utf-8
2 import datetime
3 from south.db import db
4 from south.v2 import DataMigration
5 from django.db import models
6 from ganeti_web.migrations import db_table_exists
8 class Migration(DataMigration):
10 def convert(self, orm, model, fields):
11 if db_table_exists('ganeti_%s' % model):
12 Old = orm['ganeti.%s' % model]
13 New = orm['ganeti_web.%s' % model]
14 for old in Old.objects.all():
15 new = New()
16 for field in fields:
17 val = old.__dict__[field]
18 new.__dict__[field] = val
19 new.save()
21 def forwards(self, orm):
23 fields = ['id','description','disk','hash','hostname','ignore_cache',\
24 'last_job_id','mtime','password', 'port','ram',\
25 'serialized_info','slug','username','virtual_cpus']
26 self.convert(orm, 'cluster', fields)
28 fields = ['id','name','real_type_id']
29 self.convert(orm, 'clusteruser', fields)
31 fields = ['id','cleared','cluster_id','code','msg','obj_id','obj_type_id','timestamp']
32 self.convert(orm, 'ganetierror', fields)
34 fields = ['id','cleared','cluster_id','cluster_hash','content_type_id',
35 'finished','ignore_cache','job_id','mtime','object_id',
36 'serialized_info','status']
37 self.convert(orm, 'job', fields)
39 fields = ['id','cached','cluster_id','cluster_hash','disk_total',
40 'hostname','ignore_cache','last_job_id','mtime','offline',
41 'ram_total','role','serialized_info']
42 self.convert(orm, 'node', fields)
44 fields = ['id','group_id']
45 self.convert(orm, 'organization', fields)
47 fields = ['id','user_id']
48 self.convert(orm, 'profile', fields)
50 fields = ['id','cluster_id','disk','ram','user_id','virtual_cpus']
51 self.convert(orm, 'quota', fields)
53 fields = ['id','key','user_id']
54 self.convert(orm, 'sshkey', fields)
56 fields = ['id','boot_order','cdrom_image_path','cluster_id','disk_size',
57 'disk_template','disk_type','iallocator',
58 'iallocator_hostname','kernel_path','memory','name_check',
59 'nic_link','nic_mode', 'nic_type','os','pnode','root_path',
60 'serial_console','snode','start','template_name','vcpus']
61 self.convert(orm, 'virtualmachinetemplate', fields)
63 fields = ['id','cached','cluster_id','cluster_hash','disk_size','hostname',
64 'ignore_cache','last_job_id','mtime','operating_system','owner_id',
65 'pending_delete','primary_node_id','ram','secondary_node_id',
66 'serialized_info','status','template_id','virtual_cpus']
67 self.convert(orm, 'virtualmachine', fields)
69 def backwards(self, orm):
70 """ This migration cannot be reversed """
71 pass
73 models = {
74 'auth.group': {
75 'Meta': {'object_name': 'Group'},
76 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
77 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
78 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
80 'auth.permission': {
81 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
82 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
83 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
84 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
85 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
87 'auth.user': {
88 'Meta': {'object_name': 'User'},
89 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
90 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
91 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
92 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
93 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
94 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
95 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
96 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
97 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
98 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
99 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
100 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
101 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
103 'contenttypes.contenttype': {
104 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
105 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
106 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
107 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
108 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
110 'ganeti_web.cluster': {
111 'Meta': {'object_name': 'Cluster'},
112 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
113 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
114 'disk': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
115 'hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
116 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
117 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
118 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
119 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cluster_last_job'", 'null': 'True', 'to': "orm['ganeti_web.Job']"}),
120 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
121 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
122 'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}),
123 'ram': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
124 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
125 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
126 'username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
127 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
129 'ganeti_web.cluster_perms': {
130 'Meta': {'object_name': 'Cluster_Perms'},
131 'admin': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
132 'create_vm': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
133 'export': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
134 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
135 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
136 'migrate': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
137 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.Cluster']"}),
138 'replace_disks': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
139 'tags': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
140 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
142 'ganeti_web.clusteruser': {
143 'Meta': {'object_name': 'ClusterUser'},
144 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
145 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
146 'real_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True'})
148 'ganeti_web.ganetierror': {
149 'Meta': {'object_name': 'GanetiError'},
150 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
151 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
152 'code': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
153 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
154 'msg': ('django.db.models.fields.TextField', [], {}),
155 'obj_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
156 'obj_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ganeti_errors'", 'to': "orm['contenttypes.ContentType']"}),
157 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
159 'ganeti_web.job': {
160 'Meta': {'object_name': 'Job'},
161 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
162 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
163 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['ganeti_web.Cluster']"}),
164 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
165 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
166 'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
167 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
168 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
169 'job_id': ('django.db.models.fields.IntegerField', [], {}),
170 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
171 'object_id': ('django.db.models.fields.IntegerField', [], {}),
172 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
173 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'})
175 'ganeti_web.node': {
176 'Meta': {'object_name': 'Node'},
177 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
178 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['ganeti_web.Cluster']"}),
179 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
180 'disk_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
181 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
182 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
183 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
184 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
185 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
186 'offline': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
187 'ram_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
188 'role': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
189 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
191 'ganeti_web.organization': {
192 'Meta': {'object_name': 'Organization', '_ormbases': ['ganeti_web.ClusterUser']},
193 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
194 'group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'organization'", 'unique': 'True', 'to': "orm['auth.Group']"})
196 'ganeti_web.profile': {
197 'Meta': {'object_name': 'Profile', '_ormbases': ['ganeti_web.ClusterUser']},
198 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
199 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
201 'ganeti_web.quota': {
202 'Meta': {'object_name': 'Quota'},
203 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.Cluster']"}),
204 'disk': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
205 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
206 'ram': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
207 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.ClusterUser']"}),
208 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'})
210 'ganeti_web.sshkey': {
211 'Meta': {'object_name': 'SSHKey'},
212 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
213 'key': ('django.db.models.fields.TextField', [], {}),
214 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ssh_keys'", 'to': "orm['auth.User']"})
216 'ganeti_web.testmodel': {
217 'Meta': {'object_name': 'TestModel'},
218 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
219 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
220 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
221 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
222 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
223 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
225 'ganeti_web.virtualmachine': {
226 'Meta': {'unique_together': "(('cluster', 'hostname'),)", 'object_name': 'VirtualMachine'},
227 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
228 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'default': '0', 'related_name': "'virtual_machines'", 'to': "orm['ganeti_web.Cluster']"}),
229 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
230 'disk_size': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
231 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
232 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
233 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
234 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
235 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
236 'operating_system': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
237 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'virtual_machines'", 'null': 'True', 'to': "orm['ganeti_web.ClusterUser']"}),
238 'pending_delete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
239 'primary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'primary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
240 'ram': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
241 'secondary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'secondary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
242 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
243 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
244 'template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.VirtualMachineTemplate']", 'null': 'True'}),
245 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '-1'})
247 'ganeti_web.virtualmachine_perms': {
248 'Meta': {'object_name': 'VirtualMachine_Perms'},
249 'admin': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
250 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
251 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
252 'modify': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
253 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.VirtualMachine']"}),
254 'power': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
255 'remove': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
256 'tags': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
257 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
259 'ganeti_web.virtualmachinetemplate': {
260 'Meta': {'object_name': 'VirtualMachineTemplate'},
261 'boot_order': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
262 'cdrom_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
263 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']", 'null': 'True'}),
264 'disk_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
265 'disk_template': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
266 'disk_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
267 'iallocator': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
268 'iallocator_hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
269 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
270 'kernel_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
271 'memory': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
272 'name_check': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
273 'nic_link': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
274 'nic_mode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
275 'nic_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
276 'os': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
277 'pnode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
278 'root_path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
279 'serial_console': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
280 'snode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
281 'start': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
282 'template_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
283 'vcpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
285 'ganeti.cluster': {
286 'Meta': {'object_name': 'Cluster'},
287 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
288 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
289 'disk': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
290 'hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
291 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
292 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
293 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
294 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cluster_last_job'", 'null': 'True', 'to': "orm['ganeti.Job']"}),
295 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
296 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
297 'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}),
298 'ram': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
299 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
300 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
301 'username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
302 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
304 'ganeti.clusteruser': {
305 'Meta': {'object_name': 'ClusterUser'},
306 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
307 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
308 'real_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True'})
310 'ganeti.ganetierror': {
311 'Meta': {'object_name': 'GanetiError'},
312 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
313 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Cluster']"}),
314 'code': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
315 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
316 'msg': ('django.db.models.fields.TextField', [], {}),
317 'obj_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
318 'obj_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ganeti_errors'", 'to': "orm['contenttypes.ContentType']"}),
319 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
321 'ganeti.job': {
322 'Meta': {'object_name': 'Job'},
323 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
324 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
325 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['ganeti.Cluster']"}),
326 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
327 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
328 'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
329 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
330 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
331 'job_id': ('django.db.models.fields.IntegerField', [], {}),
332 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
333 'object_id': ('django.db.models.fields.IntegerField', [], {}),
334 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
335 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'})
337 'ganeti.node': {
338 'Meta': {'object_name': 'Node'},
339 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
340 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['ganeti.Cluster']"}),
341 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
342 'disk_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
343 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
344 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
345 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
346 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Job']", 'null': 'True'}),
347 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
348 'offline': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
349 'ram_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
350 'role': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
351 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
353 'ganeti.organization': {
354 'Meta': {'object_name': 'Organization', '_ormbases': ['ganeti.ClusterUser']},
355 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
356 'group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'organization'", 'unique': 'True', 'to': "orm['auth.Group']"})
358 'ganeti.profile': {
359 'Meta': {'object_name': 'Profile', '_ormbases': ['ganeti.ClusterUser']},
360 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
361 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
363 'ganeti.quota': {
364 'Meta': {'object_name': 'Quota'},
365 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti.Cluster']"}),
366 'disk': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
367 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
368 'ram': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
369 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti.ClusterUser']"}),
370 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'})
372 'ganeti.sshkey': {
373 'Meta': {'object_name': 'SSHKey'},
374 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
375 'key': ('django.db.models.fields.TextField', [], {}),
376 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
378 'ganeti.testmodel': {
379 'Meta': {'object_name': 'TestModel'},
380 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
381 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Cluster']"}),
382 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
383 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
384 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
385 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
387 'ganeti.virtualmachine': {
388 'Meta': {'unique_together': "(('cluster', 'hostname'),)", 'object_name': 'VirtualMachine'},
389 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
390 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'default': '0', 'related_name': "'virtual_machines'", 'to': "orm['ganeti.Cluster']"}),
391 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
392 'disk_size': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
393 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
394 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
395 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
396 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Job']", 'null': 'True'}),
397 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
398 'operating_system': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
399 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'virtual_machines'", 'null': 'True', 'to': "orm['ganeti.ClusterUser']"}),
400 'pending_delete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
401 'primary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'primary_vms'", 'null': 'True', 'to': "orm['ganeti.Node']"}),
402 'ram': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
403 'secondary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'secondary_vms'", 'null': 'True', 'to': "orm['ganeti.Node']"}),
404 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
405 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
406 'template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.VirtualMachineTemplate']", 'null': 'True'}),
407 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '-1'})
409 'ganeti.virtualmachinetemplate': {
410 'Meta': {'object_name': 'VirtualMachineTemplate'},
411 'boot_order': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
412 'cdrom_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
413 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Cluster']", 'null': 'True'}),
414 'disk_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
415 'disk_template': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
416 'disk_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
417 'iallocator': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
418 'iallocator_hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
419 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
420 'kernel_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
421 'memory': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
422 'name_check': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
423 'nic_link': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
424 'nic_mode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
425 'nic_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
426 'os': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
427 'pnode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
428 'root_path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
429 'serial_console': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
430 'snode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
431 'start': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
432 'template_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
433 'vcpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
437 complete_apps = ['ganeti_web']