Fix error when sorting Job list by object.
[ganeti_webmgr.git] / ganeti_web / migrations / 0004_version_0_7_convert_perms.py
blob6d0609004d73baa0ee26cceee2f64a29cac4c0c6
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 forwards(self, orm):
11 """
12 Convert permissions stored in old object permission tables (v1.3) to
13 new perm tables (v1.4)
15 see ticket # for more details
16 """
18 if db_table_exists('object_permissions_cluster_perms'):
19 # Convert cluster permissions
20 Cluster_Perms = orm['ganeti_web.cluster_perms']
21 Old_Perms = orm['object_permissions.cluster_perms']
22 for old_perm in Old_Perms.objects.all():
23 perm = Cluster_Perms()
24 perm.pk = old_perm.pk
25 perm.user = old_perm.user
26 perm.group = old_perm.group
27 perm.user = old_perm.user
28 perm.obj_id = old_perm.obj_id
29 perm.admin = old_perm.admin
30 perm.create_vm = old_perm.create_vm
31 perm.export = old_perm.export
32 perm.migrate = old_perm.migrate
33 perm.replace_disks = old_perm.replace_disks
34 perm.tags = old_perm.tags
35 perm.save()
37 # Convert VirtualMachine permissions
38 if db_table_exists('object_permissions_virtualmachine_perms'):
39 VirtualMachine_Perms = orm['ganeti_web.virtualmachine_perms']
40 Old_Perms = orm['object_permissions.virtualmachine_perms']
41 for old_perm in Old_Perms.objects.all():
42 perm = VirtualMachine_Perms()
43 perm.pk = old_perm.pk
44 perm.user = old_perm.user
45 perm.group = old_perm.group
46 perm.user = old_perm.user
47 perm.obj_id = old_perm.obj_id
48 perm.admin = old_perm.admin
49 perm.modify = old_perm.modify
50 perm.power = old_perm.power
51 perm.remove = old_perm.remove
52 perm.tags = old_perm.tags
53 perm.save()
56 def backwards(self, orm):
57 "Write your backwards methods here."
59 # Convert cluster permissions
60 if db_table_exists('object_permissions_cluster_perms'):
61 Cluster_Perms = orm['ganeti_web.cluster_perms']
62 Old_Perms = orm['object_permissions.cluster_perms']
63 for new_perm in Cluster_Perms.objects.all():
64 perm = Old_Perms()
65 perm.pk = new_perm.pk
66 perm.user = new_perm.user
67 perm.group = new_perm.group
68 perm.user = new_perm.user
69 perm.obj_id = new_perm.obj
70 perm.admin = new_perm.admin
71 perm.create_vm = new_perm.create_vm
72 perm.export = new_perm.export
73 perm.migrate = new_perm.migrate
74 perm.replace_disks = new_perm.replace_disks
75 perm.tags = new_perm.tags
76 perm.save()
78 # Convert VirtualMachine permissions
79 if db_table_exists('object_permissions_virtualmachine_perms'):
80 VirtualMachine_Perms = orm['ganeti_web.virtualmachine_perms']
81 Old_Perms = orm['object_permissions.virtualmachine_perms']
82 for new_perm in VirtualMachine_Perms.objects.all():
83 perm = Old_Perms()
84 perm.pk = new_perm.pk
85 perm.user = new_perm.user
86 perm.group = new_perm.group
87 perm.user = new_perm.user
88 perm.obj_id = new_perm.obj
89 perm.admin = new_perm.admin
90 perm.create_vm = new_perm.create_vm
91 perm.export = new_perm.export
92 perm.migrate = new_perm.migrate
93 perm.replace_disks = new_perm.replace_disks
94 perm.tags = new_perm.tags
95 perm.save()
98 models = {
99 'auth.group': {
100 'Meta': {'object_name': 'Group'},
101 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
103 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
105 'auth.permission': {
106 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
107 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
108 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
109 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
110 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
112 'auth.user': {
113 'Meta': {'object_name': 'User'},
114 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
115 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
116 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
117 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
118 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
119 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
120 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
121 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
122 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
123 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
124 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
125 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
126 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
128 'contenttypes.contenttype': {
129 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
130 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
131 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
132 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
133 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
135 'ganeti_web.cluster': {
136 'Meta': {'object_name': 'Cluster'},
137 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
138 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
139 'disk': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
140 'hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
141 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
142 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
143 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
144 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cluster_last_job'", 'null': 'True', 'to': "orm['ganeti_web.Job']"}),
145 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
146 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
147 'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}),
148 'ram': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
149 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
150 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
151 'username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
152 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
154 'ganeti_web.cluster_perms': {
155 'Meta': {'object_name': 'Cluster_Perms'},
156 'admin': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
157 'create_vm': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
158 'export': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
159 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
160 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
161 'migrate': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
162 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.Cluster']"}),
163 'replace_disks': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
164 'tags': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
165 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
167 'ganeti_web.clusteruser': {
168 'Meta': {'object_name': 'ClusterUser'},
169 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
170 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
171 'real_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True'})
173 'ganeti_web.ganetierror': {
174 'Meta': {'object_name': 'GanetiError'},
175 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
176 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
177 'code': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
178 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
179 'msg': ('django.db.models.fields.TextField', [], {}),
180 'obj_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
181 'obj_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ganeti_errors'", 'to': "orm['contenttypes.ContentType']"}),
182 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
184 'ganeti_web.job': {
185 'Meta': {'object_name': 'Job'},
186 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
187 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
188 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['ganeti_web.Cluster']"}),
189 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
190 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
191 'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
192 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
193 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
194 'job_id': ('django.db.models.fields.IntegerField', [], {}),
195 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
196 'object_id': ('django.db.models.fields.IntegerField', [], {}),
197 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
198 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'})
200 'ganeti_web.node': {
201 'Meta': {'object_name': 'Node'},
202 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
203 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['ganeti_web.Cluster']"}),
204 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
205 'disk_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
206 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
207 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
208 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
209 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
210 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
211 'offline': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
212 'ram_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
213 'role': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
214 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
216 'ganeti_web.organization': {
217 'Meta': {'object_name': 'Organization', '_ormbases': ['ganeti_web.ClusterUser']},
218 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
219 'group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'organization'", 'unique': 'True', 'to': "orm['auth.Group']"})
221 'ganeti_web.profile': {
222 'Meta': {'object_name': 'Profile', '_ormbases': ['ganeti_web.ClusterUser']},
223 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
224 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
226 'ganeti_web.quota': {
227 'Meta': {'object_name': 'Quota'},
228 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.Cluster']"}),
229 'disk': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
230 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
231 'ram': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
232 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.ClusterUser']"}),
233 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'})
235 'ganeti_web.sshkey': {
236 'Meta': {'object_name': 'SSHKey'},
237 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
238 'key': ('django.db.models.fields.TextField', [], {}),
239 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ssh_keys'", 'to': "orm['auth.User']"})
241 'ganeti_web.testmodel': {
242 'Meta': {'object_name': 'TestModel'},
243 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
244 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
245 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
246 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
247 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
248 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
250 'ganeti_web.virtualmachine': {
251 'Meta': {'unique_together': "(('cluster', 'hostname'),)", 'object_name': 'VirtualMachine'},
252 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
253 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'default': '0', 'related_name': "'virtual_machines'", 'to': "orm['ganeti_web.Cluster']"}),
254 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
255 'disk_size': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
256 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
257 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
258 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
259 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
260 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
261 'operating_system': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
262 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'virtual_machines'", 'null': 'True', 'to': "orm['ganeti_web.ClusterUser']"}),
263 'pending_delete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
264 'primary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'primary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
265 'ram': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
266 'secondary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'secondary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
267 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
268 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
269 'template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.VirtualMachineTemplate']", 'null': 'True'}),
270 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '-1'})
272 'ganeti_web.virtualmachine_perms': {
273 'Meta': {'object_name': 'VirtualMachine_Perms'},
274 'admin': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
275 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
276 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
277 'modify': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
278 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.VirtualMachine']"}),
279 'power': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
280 'remove': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
281 'tags': ('django.db.models.fields.IntegerField', [], {'default': 'False'}),
282 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
284 'ganeti_web.virtualmachinetemplate': {
285 'Meta': {'object_name': 'VirtualMachineTemplate'},
286 'boot_order': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
287 'cdrom_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
288 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']", 'null': 'True'}),
289 'disk_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
290 'disk_template': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
291 'disk_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
292 'iallocator': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
293 'iallocator_hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
294 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
295 'kernel_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
296 'memory': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
297 'name_check': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
298 'nic_link': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
299 'nic_mode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
300 'nic_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
301 'os': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
302 'pnode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
303 'root_path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
304 'serial_console': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
305 'snode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
306 'start': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
307 'template_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
308 'vcpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
310 'object_permissions.cluster_perms': {
311 'Meta': {'object_name': 'Cluster_Perms'},
312 'admin': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
313 'create_vm': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
314 'export': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
315 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
316 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
317 'migrate': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
318 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti.Cluster']"}),
319 'replace_disks': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
320 'tags': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
321 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
323 'object_permissions.virtualmachine_perms': {
324 'Meta': {'object_name': 'VirtualMachine_Perms'},
325 'admin': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
326 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
327 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
328 'modify': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
329 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti.VirtualMachine']"}),
330 'power': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
331 'remove': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
332 'tags': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
333 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
335 'ganeti.cluster': {
336 'Meta': {'object_name': 'Cluster'},
337 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
338 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
339 'disk': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
340 'hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
341 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
342 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
343 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
344 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cluster_last_job'", 'null': 'True', 'to': "orm['ganeti.Job']"}),
345 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
346 'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
347 'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}),
348 'ram': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
349 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
350 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
351 'username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
352 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
354 'ganeti.clusteruser': {
355 'Meta': {'object_name': 'ClusterUser'},
356 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
357 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
358 'real_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True'})
360 'ganeti.ganetierror': {
361 'Meta': {'object_name': 'GanetiError'},
362 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
363 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Cluster']"}),
364 'code': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
365 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
366 'msg': ('django.db.models.fields.TextField', [], {}),
367 'obj_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
368 'obj_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ganeti_errors'", 'to': "orm['contenttypes.ContentType']"}),
369 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
371 'ganeti.job': {
372 'Meta': {'object_name': 'Job'},
373 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
374 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
375 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['ganeti.Cluster']"}),
376 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
377 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
378 'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
379 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
380 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
381 'job_id': ('django.db.models.fields.IntegerField', [], {}),
382 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
383 'object_id': ('django.db.models.fields.IntegerField', [], {}),
384 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
385 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'})
387 'ganeti.node': {
388 'Meta': {'object_name': 'Node'},
389 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
390 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['ganeti.Cluster']"}),
391 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
392 'disk_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
393 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', '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 'offline': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
399 'ram_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
400 'role': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
401 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
403 'ganeti.organization': {
404 'Meta': {'object_name': 'Organization', '_ormbases': ['ganeti.ClusterUser']},
405 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
406 'group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'organization'", 'unique': 'True', 'to': "orm['auth.Group']"})
408 'ganeti.profile': {
409 'Meta': {'object_name': 'Profile', '_ormbases': ['ganeti.ClusterUser']},
410 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
411 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
413 'ganeti.quota': {
414 'Meta': {'object_name': 'Quota'},
415 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti.Cluster']"}),
416 'disk': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
417 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
418 'ram': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
419 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti.ClusterUser']"}),
420 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'})
422 'ganeti.sshkey': {
423 'Meta': {'object_name': 'SSHKey'},
424 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
425 'key': ('django.db.models.fields.TextField', [], {}),
426 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
428 'ganeti.testmodel': {
429 'Meta': {'object_name': 'TestModel'},
430 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
431 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Cluster']"}),
432 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
433 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
434 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
435 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
437 'ganeti.virtualmachine': {
438 'Meta': {'unique_together': "(('cluster', 'hostname'),)", 'object_name': 'VirtualMachine'},
439 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
440 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'default': '0', 'related_name': "'virtual_machines'", 'to': "orm['ganeti.Cluster']"}),
441 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
442 'disk_size': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
443 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
444 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
445 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
446 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Job']", 'null': 'True'}),
447 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
448 'operating_system': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
449 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'virtual_machines'", 'null': 'True', 'to': "orm['ganeti.ClusterUser']"}),
450 'pending_delete': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
451 'primary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'primary_vms'", 'null': 'True', 'to': "orm['ganeti.Node']"}),
452 'ram': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
453 'secondary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'secondary_vms'", 'null': 'True', 'to': "orm['ganeti.Node']"}),
454 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
455 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
456 'template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.VirtualMachineTemplate']", 'null': 'True'}),
457 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '-1'})
459 'ganeti.virtualmachinetemplate': {
460 'Meta': {'object_name': 'VirtualMachineTemplate'},
461 'boot_order': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
462 'cdrom_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
463 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti.Cluster']", 'null': 'True'}),
464 'disk_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
465 'disk_template': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
466 'disk_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
467 'iallocator': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
468 'iallocator_hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
469 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
470 'kernel_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
471 'memory': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
472 'name_check': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
473 'nic_link': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
474 'nic_mode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
475 'nic_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
476 'os': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
477 'pnode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
478 'root_path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
479 'serial_console': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
480 'snode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
481 'start': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
482 'template_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
483 'vcpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
488 complete_apps = ['ganeti_web']