~ubuntu-branches/ubuntu/quantal/maas/quantal

« back to all changes in this revision

Viewing changes to src/maasserver/migrations/0033_component_error.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez, Julian Edwards, Raphaël Badin, Jeroen Vermeulen, Andres Rodriguez, Robie Basak, Scott Moser, Diogo Matsubara
  • Date: 2012-10-08 13:10:23 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20121008131023-68glibh0pbqrgtfq
Tags: 0.1+bzr1223+dfsg-0ubuntu1
* New upstream release. (LP: #1062518)

[ Julian Edwards ]
* Split packaging of 'maas' into maas-{region,cluster}-controller
  - debian/control: Update accordingly.
  - debian/*.install: Move files accordingly
  - debian/*.{postinst,postrm,preinst}: Move files accordingly.
* Ensure isc-dhcp-server is disabled when installing maas-dhcp.
* Ensure maas-dns creates the maas user before trying to chown files.
* Make maas-cluster-controller autoconfigure itself when upgrading from the
  old maas package. (LP: #1059416)
* Add missing prerm file for maas-cluster-controller so that .pyc files
  are cleaned up. (LP: #1059973)

[ Raphaël Badin ]
* Install maas_local_celeryconfig.py in /etc/maas and symlink to
  /usr/share/maas.
* debian/maas.postinst: Create rabbitmq celery user/vhost.
* debian/maas.postinst: Update BROKER_URL in maas_local_celeryconfig.py.
* Use maas_local_celeryconfig_cluster.py as the local celery
  configuration file for the cluster worker.
* debian/maas-region-controller.maas-region-celery.upstart: Add region
  worker upstart script.
* Rename cluster worker upstart script into
  maas-cluster-controller.maas-clluster-celery.upstart.
* maas-cluster-controller.maas-celery.upstart: use "celeryconfig_cluster"
  as the Celery config module.
* debian/maas-common.install: Install celeryconfig_common.py.
* debian/maas-cluster-controller.install: Install celeryconfig_cluster.py.
* debian/maas-region-controller.install: Install celeryconfig.py.
* Split celery config into cluster and region configs.
* Add region celeryd upstart config.
* Define CELERY_CONFIG_MODULE in
  maas-cluster-controller.maas-cluster-celery.upstart

[ Jeroen Vermeulen ]
* Make maas_local_celery_config.py non-world readable.
* Make maas_local_celeryconfig_cluster.py non-world readable.
* Set root:maas ownership of local cluster config only *after*
  the maas user/group have been created

[ Andres Rodriguez ]
* debian/maas.postinst:
  - Always restart apache2.
  - Handle upgrades for new upstream release.
  - Handle upgrades for celery rabbitmq worker.
* Add binary package to install client tool.
  - debian/extras/maas-cli: Add binary.
  - debian/maas-cli.install: Add. Install maascli and apiclient.
  - debian/control: Add binary package.
* debian/control:
  - Depends on freeipmi-tools instead of ipmitool.
  - Conflicts/Replaces on maas for python-maas-client.
  - Depends on python-netifaces, python-lxml.
* Add python-maas-client binary package:
  - debian/python-maas-client.install: Add. Install 'apiclient' python module.
  - debian/control: Add package. python-django-maas and maas-cli now
    Depend on it.
* debian/rules: Install maas-dhcp-server upstart job.
* debian/maas.postrm: Remove celery worker rabbitmq user and host.
* debian/extras/99-maas-sudoers: Add for maas-dhcp-server upstart job
  instead of isc-dhcp-server (LP: #1055951)
* debian/maas-region-controller.postinst: Cleanup upgrade rules.
* debian/maas-cluster-controller.postinst: Fix 'local' usage.
* debian/maas-common.install: Install celeryconfig in appropriate location.
* debian/maas-cluster-controller.postrm: Add and delete maas user.
* debian/maas-dhcp.postinst: Stop isc-dhcp-server not isc_dhcp_server.
* debian/maas-region-controller.postinst:
  - Always update passwords on upgrade. No longer check versioning. (LP: #1060094).
  - Add MAAS server to allowed mirror in squid-deb-proxy
  - Source dbconfig conf file for maas-region-controller on upgrade because
    it writes a new config file and no longer preservers the previous password.
* debian/maas-cluster-controller.maas-cluster-celery.upstart: Remove set{uid/gid}.
* debian/maas-region-controller.install: Install maas-import-squashfs
* Handle removal of non existant files (LP: #1059556):
  - debian/maintscript: Added to handle removal of conffiles.
  - debian/control: Add Pre-depends and bump debhelper version.
* update po files for the templates.
* debian/extras/99-maas: Install in usr/share/maas/conf and symlink to the
  appropriate etc dir.
* debian/maas-cluster-controller.config: Source debconf at the beginning of the
  script. (LP: #1063857)
* debian/patches/99-temporary-fix-constraints.patch: Fix constraints maaping
  when deploying with juju. Temporary until it gets merged upstream

[ Robie Basak ]
* Add maas-cluster-controller dependency on uuid-runtime, needed for uuidgen
  by postinst.

[ Scott Moser ]
* debian/maas-dhcp.{install,apparmor,postrm} install apparmor profile into
  /etc/apparmor.d/dhcpd.d (LP: #1049177), and update apparmor profile for
  /usr/sbin/dhcpd on install/remove
* get the ip address for the dhcp server in config

[ Diogo Matsubara ]
* Add initial tests to be run by autotests:
  - debian/control: XS-Testsuite: autopkgtest
  - debian/tests/control: Add
  - debian/tests/maas-package-test: Add
  - tests/maas-integration.py: Add

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
import datetime
 
3
 
 
4
from django.db import models
 
5
from south.db import db
 
6
from south.v2 import SchemaMigration
 
7
 
 
8
 
 
9
class Migration(SchemaMigration):
 
10
 
 
11
    def forwards(self, orm):
 
12
        # Adding model 'ComponentError'
 
13
        db.create_table(u'maasserver_componenterror', (
 
14
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
 
15
            ('component', self.gf('django.db.models.fields.CharField')(unique=True, max_length=40)),
 
16
            ('error', self.gf('django.db.models.fields.CharField')(max_length=1000)),
 
17
        ))
 
18
        db.send_create_signal(u'maasserver', ['ComponentError'])
 
19
 
 
20
 
 
21
    def backwards(self, orm):
 
22
        # Deleting model 'ComponentError'
 
23
        db.delete_table(u'maasserver_componenterror')
 
24
 
 
25
 
 
26
    models = {
 
27
        'auth.group': {
 
28
            'Meta': {'object_name': 'Group'},
 
29
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
30
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
 
31
            'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
 
32
        },
 
33
        'auth.permission': {
 
34
            'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
 
35
            'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
 
36
            'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
 
37
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
38
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
 
39
        },
 
40
        'auth.user': {
 
41
            'Meta': {'object_name': 'User'},
 
42
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
 
43
            'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75', 'blank': 'True'}),
 
44
            'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
 
45
            'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
 
46
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
47
            'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
 
48
            'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
 
49
            'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
 
50
            'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
 
51
            'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
 
52
            'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
 
53
            'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
 
54
            'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
 
55
        },
 
56
        'contenttypes.contenttype': {
 
57
            'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
 
58
            'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
 
59
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
60
            'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
 
61
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
 
62
        },
 
63
        u'maasserver.bootimage': {
 
64
            'Meta': {'unique_together': "((u'architecture', u'subarchitecture', u'release', u'purpose'),)", 'object_name': 'BootImage'},
 
65
            'architecture': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
 
66
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
67
            'purpose': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
 
68
            'release': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
 
69
            'subarchitecture': ('django.db.models.fields.CharField', [], {'max_length': '255'})
 
70
        },
 
71
        u'maasserver.componenterror': {
 
72
            'Meta': {'object_name': 'ComponentError'},
 
73
            'component': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
 
74
            'error': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
 
75
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
 
76
        },
 
77
        u'maasserver.config': {
 
78
            'Meta': {'object_name': 'Config'},
 
79
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
80
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
 
81
            'value': ('maasserver.fields.JSONObjectField', [], {'null': 'True'})
 
82
        },
 
83
        u'maasserver.dhcplease': {
 
84
            'Meta': {'object_name': 'DHCPLease'},
 
85
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
86
            'ip': ('django.db.models.fields.IPAddressField', [], {'unique': 'True', 'max_length': '15'}),
 
87
            'mac': ('maasserver.fields.MACAddressField', [], {}),
 
88
            'nodegroup': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']"})
 
89
        },
 
90
        u'maasserver.filestorage': {
 
91
            'Meta': {'object_name': 'FileStorage'},
 
92
            'data': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
 
93
            'filename': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200'}),
 
94
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
 
95
        },
 
96
        u'maasserver.macaddress': {
 
97
            'Meta': {'object_name': 'MACAddress'},
 
98
            'created': ('django.db.models.fields.DateTimeField', [], {}),
 
99
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
100
            'mac_address': ('maasserver.fields.MACAddressField', [], {'unique': 'True'}),
 
101
            'node': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.Node']"}),
 
102
            'updated': ('django.db.models.fields.DateTimeField', [], {})
 
103
        },
 
104
        u'maasserver.node': {
 
105
            'Meta': {'object_name': 'Node'},
 
106
            'after_commissioning_action': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
 
107
            'architecture': ('django.db.models.fields.CharField', [], {'default': "u'i386/generic'", 'max_length': '31'}),
 
108
            'cpu_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
 
109
            'created': ('django.db.models.fields.DateTimeField', [], {}),
 
110
            'distro_series': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '10', 'null': 'True', 'blank': 'True'}),
 
111
            'error': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}),
 
112
            'hardware_details': ('maasserver.fields.XMLField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
 
113
            'hostname': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}),
 
114
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
115
            'memory': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
 
116
            'netboot': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
 
117
            'nodegroup': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']", 'null': 'True'}),
 
118
            'owner': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
 
119
            'power_parameters': ('maasserver.fields.JSONObjectField', [], {'default': "u''", 'blank': 'True'}),
 
120
            'power_type': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '10', 'blank': 'True'}),
 
121
            'status': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '10'}),
 
122
            'system_id': ('django.db.models.fields.CharField', [], {'default': "u'node-a2984710-098f-11e2-869a-002608dc6120'", 'unique': 'True', 'max_length': '41'}),
 
123
            'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['maasserver.Tag']", 'symmetrical': 'False'}),
 
124
            'token': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['piston.Token']", 'null': 'True'}),
 
125
            'updated': ('django.db.models.fields.DateTimeField', [], {})
 
126
        },
 
127
        u'maasserver.nodegroup': {
 
128
            'Meta': {'object_name': 'NodeGroup'},
 
129
            'api_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '18'}),
 
130
            'api_token': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['piston.Token']", 'unique': 'True'}),
 
131
            'created': ('django.db.models.fields.DateTimeField', [], {}),
 
132
            'dhcp_key': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}),
 
133
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
134
            'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
 
135
            'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
 
136
            'updated': ('django.db.models.fields.DateTimeField', [], {}),
 
137
            'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '36'})
 
138
        },
 
139
        u'maasserver.nodegroupinterface': {
 
140
            'Meta': {'unique_together': "((u'nodegroup', u'interface'),)", 'object_name': 'NodeGroupInterface'},
 
141
            'broadcast_ip': ('django.db.models.fields.GenericIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
 
142
            'created': ('django.db.models.fields.DateTimeField', [], {}),
 
143
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
144
            'interface': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}),
 
145
            'ip': ('django.db.models.fields.GenericIPAddressField', [], {'max_length': '39'}),
 
146
            'ip_range_high': ('django.db.models.fields.GenericIPAddressField', [], {'default': 'None', 'max_length': '39', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
 
147
            'ip_range_low': ('django.db.models.fields.GenericIPAddressField', [], {'default': 'None', 'max_length': '39', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
 
148
            'management': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
 
149
            'nodegroup': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']"}),
 
150
            'router_ip': ('django.db.models.fields.GenericIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
 
151
            'subnet_mask': ('django.db.models.fields.GenericIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
 
152
            'updated': ('django.db.models.fields.DateTimeField', [], {})
 
153
        },
 
154
        u'maasserver.sshkey': {
 
155
            'Meta': {'unique_together': "((u'user', u'key'),)", 'object_name': 'SSHKey'},
 
156
            'created': ('django.db.models.fields.DateTimeField', [], {}),
 
157
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
158
            'key': ('django.db.models.fields.TextField', [], {}),
 
159
            'updated': ('django.db.models.fields.DateTimeField', [], {}),
 
160
            'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
 
161
        },
 
162
        u'maasserver.tag': {
 
163
            'Meta': {'object_name': 'Tag'},
 
164
            'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
 
165
            'created': ('django.db.models.fields.DateTimeField', [], {}),
 
166
            'definition': ('django.db.models.fields.TextField', [], {}),
 
167
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
168
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'}),
 
169
            'updated': ('django.db.models.fields.DateTimeField', [], {})
 
170
        },
 
171
        u'maasserver.userprofile': {
 
172
            'Meta': {'object_name': 'UserProfile'},
 
173
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
174
            'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
 
175
        },
 
176
        'piston.consumer': {
 
177
            'Meta': {'object_name': 'Consumer'},
 
178
            'description': ('django.db.models.fields.TextField', [], {}),
 
179
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
180
            'key': ('django.db.models.fields.CharField', [], {'max_length': '18'}),
 
181
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
 
182
            'secret': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
 
183
            'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '16'}),
 
184
            'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'consumers'", 'null': 'True', 'to': "orm['auth.User']"})
 
185
        },
 
186
        'piston.token': {
 
187
            'Meta': {'object_name': 'Token'},
 
188
            'callback': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
 
189
            'callback_confirmed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
 
190
            'consumer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['piston.Consumer']"}),
 
191
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
 
192
            'is_approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
 
193
            'key': ('django.db.models.fields.CharField', [], {'max_length': '18'}),
 
194
            'secret': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
 
195
            'timestamp': ('django.db.models.fields.IntegerField', [], {'default': '1348852328L'}),
 
196
            'token_type': ('django.db.models.fields.IntegerField', [], {}),
 
197
            'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'tokens'", 'null': 'True', 'to': "orm['auth.User']"}),
 
198
            'verifier': ('django.db.models.fields.CharField', [], {'max_length': '10'})
 
199
        }
 
200
    }
 
201
 
 
202
    complete_apps = ['maasserver']
 
 
b'\\ No newline at end of file'