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