Add more information on deploying; fix format.
[ganeti_webmgr.git] / ganeti_web / migrations / 0012_delete_null_templatenames.py
blobda933776651f556996ccb4124c64fc3a38b707d0
1 # -*- coding: utf-8 -*-
2 import datetime
3 from south.db import db
4 from south.v2 import DataMigration
5 from django.db import models
8 class Migration(DataMigration):
10 def forwards(self, orm):
11 orm['ganeti_web.VirtualMachineTemplate'].objects.filter(template_name__isnull=True).delete()
13 def backwards(self, orm):
14 raise RuntimeError("This migration is irreversable")
16 models = {
17 'auth.group': {
18 'Meta': {'object_name': 'Group'},
19 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
20 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
21 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
23 'auth.permission': {
24 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
25 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
26 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
27 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
28 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
30 'auth.user': {
31 'Meta': {'object_name': 'User'},
32 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
33 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
34 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
35 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
36 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
37 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
38 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
39 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
40 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
41 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
42 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
43 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
44 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
46 'contenttypes.contenttype': {
47 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
48 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
49 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
50 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
51 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
53 'ganeti_web.cluster': {
54 'Meta': {'ordering': "['hostname', 'description']", 'object_name': 'Cluster'},
55 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
56 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
57 'disk': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
58 'hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
59 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
60 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
61 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
62 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'cluster_last_job'", 'null': 'True', 'to': "orm['ganeti_web.Job']"}),
63 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
64 'password': ('ganeti_web.fields.PatchedEncryptedCharField', [], {'max_length': '293', 'null': 'True', 'cipher': "'AES'", 'blank': 'True'}),
65 'port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '5080'}),
66 'ram': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
67 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
68 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
69 'username': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
70 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
72 'ganeti_web.cluster_perms': {
73 'Meta': {'object_name': 'Cluster_Perms'},
74 'admin': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
75 'create_vm': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
76 'export': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
77 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
78 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
79 'migrate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
80 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.Cluster']"}),
81 'replace_disks': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
82 'tags': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
83 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'Cluster_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
85 'ganeti_web.clusteruser': {
86 'Meta': {'object_name': 'ClusterUser'},
87 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
88 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
89 'real_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True'})
91 'ganeti_web.ganetierror': {
92 'Meta': {'ordering': "('-timestamp', 'code', 'msg')", 'object_name': 'GanetiError'},
93 'cleared': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
94 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
95 'code': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
96 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
97 'msg': ('django.db.models.fields.TextField', [], {}),
98 'obj_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
99 'obj_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ganeti_errors'", 'to': "orm['contenttypes.ContentType']"}),
100 'timestamp': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
102 'ganeti_web.job': {
103 'Meta': {'object_name': 'Job'},
104 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
105 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['ganeti_web.Cluster']"}),
106 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
107 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
108 'finished': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
109 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
110 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
111 'job_id': ('django.db.models.fields.IntegerField', [], {}),
112 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
113 'object_id': ('django.db.models.fields.IntegerField', [], {}),
114 'op': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
115 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
116 'status': ('django.db.models.fields.CharField', [], {'max_length': '10'})
118 'ganeti_web.node': {
119 'Meta': {'object_name': 'Node'},
120 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
121 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nodes'", 'to': "orm['ganeti_web.Cluster']"}),
122 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
123 'cpus': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
124 'disk_free': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
125 'disk_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
126 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}),
127 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
128 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
129 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
130 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
131 'offline': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
132 'ram_free': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
133 'ram_total': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
134 'role': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
135 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
137 'ganeti_web.organization': {
138 'Meta': {'object_name': 'Organization', '_ormbases': ['ganeti_web.ClusterUser']},
139 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
140 'group': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'organization'", 'unique': 'True', 'to': "orm['auth.Group']"})
142 'ganeti_web.profile': {
143 'Meta': {'object_name': 'Profile', '_ormbases': ['ganeti_web.ClusterUser']},
144 'clusteruser_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['ganeti_web.ClusterUser']", 'unique': 'True', 'primary_key': 'True'}),
145 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
147 'ganeti_web.quota': {
148 'Meta': {'object_name': 'Quota'},
149 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.Cluster']"}),
150 'disk': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
151 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
152 'ram': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'}),
153 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'quotas'", 'to': "orm['ganeti_web.ClusterUser']"}),
154 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '0', 'null': 'True'})
156 'ganeti_web.sshkey': {
157 'Meta': {'object_name': 'SSHKey'},
158 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
159 'key': ('django.db.models.fields.TextField', [], {}),
160 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'ssh_keys'", 'to': "orm['auth.User']"})
162 'ganeti_web.testmodel': {
163 'Meta': {'object_name': 'TestModel'},
164 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
165 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']"}),
166 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
167 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
168 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
169 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'})
171 'ganeti_web.virtualmachine': {
172 'Meta': {'ordering': "['hostname']", 'unique_together': "(('cluster', 'hostname'),)", 'object_name': 'VirtualMachine'},
173 'cached': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
174 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'default': '0', 'related_name': "'virtual_machines'", 'to': "orm['ganeti_web.Cluster']"}),
175 'cluster_hash': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
176 'disk_size': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
177 'hostname': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
178 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
179 'ignore_cache': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
180 'last_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Job']", 'null': 'True'}),
181 'mtime': ('ganeti_web.fields.PreciseDateTimeField', [], {'null': 'True', 'max_digits': '18', 'decimal_places': '6'}),
182 'operating_system': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
183 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'virtual_machines'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['ganeti_web.ClusterUser']"}),
184 'pending_delete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
185 'primary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'primary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
186 'ram': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
187 'secondary_node': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'secondary_vms'", 'null': 'True', 'to': "orm['ganeti_web.Node']"}),
188 'serialized_info': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
189 'status': ('django.db.models.fields.CharField', [], {'max_length': '14'}),
190 'template': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'instances'", 'null': 'True', 'to': "orm['ganeti_web.VirtualMachineTemplate']"}),
191 'virtual_cpus': ('django.db.models.fields.IntegerField', [], {'default': '-1'})
193 'ganeti_web.virtualmachine_perms': {
194 'Meta': {'object_name': 'VirtualMachine_Perms'},
195 'admin': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
196 'group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_gperms'", 'null': 'True', 'to': "orm['auth.Group']"}),
197 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
198 'modify': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
199 'obj': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'operms'", 'to': "orm['ganeti_web.VirtualMachine']"}),
200 'power': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
201 'remove': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
202 'tags': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
203 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'VirtualMachine_uperms'", 'null': 'True', 'to': "orm['auth.User']"})
205 'ganeti_web.virtualmachinetemplate': {
206 'Meta': {'unique_together': "(('cluster', 'template_name'),)", 'object_name': 'VirtualMachineTemplate'},
207 'boot_order': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
208 'cdrom2_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
209 'cdrom_image_path': ('django.db.models.fields.CharField', [], {'max_length': '512', 'null': 'True', 'blank': 'True'}),
210 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ganeti_web.Cluster']", 'null': 'True'}),
211 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
212 'disk_template': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
213 'disk_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
214 'disks': ('django_fields.fields.PickleField', [], {'null': 'True', 'blank': 'True'}),
215 'iallocator': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
216 'iallocator_hostname': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
217 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
218 'kernel_path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
219 'memory': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
220 'name_check': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
221 'nic_type': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
222 'nics': ('django_fields.fields.PickleField', [], {'null': 'True', 'blank': 'True'}),
223 'no_install': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
224 'os': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
225 'pnode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
226 'root_path': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
227 'serial_console': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
228 'snode': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
229 'start': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
230 'template_name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
231 'vcpus': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
235 complete_apps = ['ganeti_web']
236 symmetrical = True