Merge lp:~rvb/maas/backport-mig-0099-1.6 into lp:maas/1.6

Proposed by Raphaël Badin
Status: Merged
Approved by: Raphaël Badin
Approved revision: no longer in the source branch.
Merged at revision: 2546
Proposed branch: lp:~rvb/maas/backport-mig-0099-1.6
Merge into: lp:maas/1.6
Diff against target: 356 lines (+343/-0)
2 files modified
src/maasserver/migrations/0088_z_backport_trunk_0099.py (+341/-0)
src/maasserver/tests/test_migrations.py (+2/-0)
To merge this branch: bzr merge lp:~rvb/maas/backport-mig-0099-1.6
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+231474@code.launchpad.net

Commit message

"Backport" data migration 0099 from trunk as migration 0088_z_backport_trunk_0099.

Description of the change

We need this migration but we don't want to backport all the other migrations done before this one (but after what's in 1.6 right now). Since we want to be able to upgrade from 1.6 to what currently in trunk in the future, we need to have the same migrations in 1.6 and in trunk. The solution this branch implements is to add a duplicate 0088 migration (which is fine because it's a pure data migration) in 1.6 and the same migration in trunk. The migration in trunk is empty because the actual migration is effectively done in migration 0099.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (17.1 KiB)

The attempt to merge lp:~rvb/maas/backport-mig-0099-1.6 into lp:maas/1.6 failed. Below is the output from the failed tests.

Ign http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security Release.gpg
Hit http://security.ubuntu.com trusty-security Release
Ign http://nova.clouds.archive.ubuntu.com trusty InRelease
Ign http://nova.clouds.archive.ubuntu.com trusty-updates InRelease
Hit http://nova.clouds.archive.ubuntu.com trusty Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty-updates Release.gpg
Hit http://nova.clouds.archive.ubuntu.com trusty Release
Hit http://nova.clouds.archive.ubuntu.com trusty-updates Release
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Sources
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Sources
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com trusty-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 bind9 bind9utils build-essential bzr-builddeb curl daemontools debhelper dh-apport distro-info dnsutils firefox freeipmi-tools ipython isc-dhcp-common libjs-raphael libjs-yui3-full libjs-yui3-min libpq-dev make postgresql python-amqplib python-bzrlib python-celery python-convoy python-crochet python-cssselect python-curtin python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-formencode python-hivex python-httplib2 python-jinja2 python-jsonschema python-lockfile python-lxml python-netaddr python-netifaces python-oauth python-oops python-oops-amqp python-oops-datedir-repo python-oops-twisted python-oops-wsgi python-openssl python-paramiko python-pexpect python-pip python-pocket-lint python-psycopg2 python-pyinotify python-seamicroclient python-simplestreams python-sphinx python-tempita python-twisted python-txamqp python-txlongpoll python-txtftp python-virtualenv python-yaml rabbitmq-server sysli...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'src/maasserver/migrations/0088_z_backport_trunk_0099.py'
2--- src/maasserver/migrations/0088_z_backport_trunk_0099.py 1970-01-01 00:00:00 +0000
3+++ src/maasserver/migrations/0088_z_backport_trunk_0099.py 2014-08-20 00:41:51 +0000
4@@ -0,0 +1,341 @@
5+from django.db import models
6+from netaddr import IPNetwork
7+from south.db import db
8+# -*- coding: utf-8 -*-
9+from south.utils import datetime_utils as datetime
10+from south.v2 import SchemaMigration
11+
12+
13+def get_name_and_vlan_from_cluster_interface(cluster_interface):
14+ """Given a `NodeGroupInterface`, return a name suitable for a `Network`.
15+
16+ :return: a tuple of the new name and vlan tag. vlan tag may be None
17+ """
18+ name = cluster_interface.interface
19+ nodegroup_name = cluster_interface.nodegroup.name
20+ vlan_tag = None
21+ if '.' in name:
22+ _, vlan_tag = name.split('.', 1)
23+ name = name.replace('.', '-')
24+ name = name.replace(':', '-')
25+ network_name = "-".join((nodegroup_name, name))
26+ return network_name, vlan_tag
27+
28+
29+class Migration(SchemaMigration):
30+
31+ def forwards(self, orm):
32+ interfaces = orm['maasserver.NodeGroupInterface'].objects.all()
33+ for interface in interfaces:
34+ if not interface.subnet_mask:
35+ # Can be None or empty string, do nothing if so.
36+ continue
37+
38+ name, vlan_tag = get_name_and_vlan_from_cluster_interface(interface)
39+ ipnetwork = IPNetwork("%s/%s" % (interface.ip, interface.subnet_mask))
40+ network = orm['maasserver.Network'](
41+ name=name,
42+ ip=unicode(ipnetwork.network),
43+ netmask=unicode(ipnetwork.netmask),
44+ vlan_tag=vlan_tag,
45+ description=(
46+ "Auto created when creating interface %s on cluster "
47+ "%s" % (interface.interface, interface.nodegroup.name)),
48+ )
49+ try:
50+ network.save()
51+ except ValidationError as e:
52+ # It probably already exists, keep calm and carry on.
53+ continue
54+
55+ def backwards(self, orm):
56+ # No point going backwards and it's probably dangerous to delete
57+ # Networks. The forwards code is idempotent anyway.
58+ pass
59+
60+ models = {
61+ u'auth.group': {
62+ 'Meta': {'object_name': 'Group'},
63+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
64+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
65+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
66+ },
67+ u'auth.permission': {
68+ 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
69+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
70+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
71+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
72+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
73+ },
74+ u'auth.user': {
75+ 'Meta': {'object_name': 'User'},
76+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
77+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75', 'blank': 'True'}),
78+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
79+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
80+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
81+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
82+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
83+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
84+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
85+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
86+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
87+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
88+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
89+ },
90+ u'contenttypes.contenttype': {
91+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
92+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
93+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
94+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
95+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
96+ },
97+ u'maasserver.bootimage': {
98+ 'Meta': {'unique_together': "((u'nodegroup', u'osystem', u'architecture', u'subarchitecture', u'release', u'purpose', u'label'),)", 'object_name': 'BootImage'},
99+ 'architecture': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
100+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
101+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
102+ 'label': ('django.db.models.fields.CharField', [], {'default': "u'release'", 'max_length': '255'}),
103+ 'nodegroup': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']"}),
104+ 'osystem': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
105+ 'purpose': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
106+ 'release': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
107+ 'subarchitecture': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
108+ 'supported_subarches': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
109+ 'updated': ('django.db.models.fields.DateTimeField', [], {}),
110+ 'xinstall_path': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
111+ 'xinstall_type': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '30', 'null': 'True', 'blank': 'True'})
112+ },
113+ u'maasserver.bootsource': {
114+ 'Meta': {'object_name': 'BootSource'},
115+ 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']", 'null': 'True'}),
116+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
117+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
118+ 'keyring_data': ('maasserver.fields.EditableBinaryField', [], {'blank': 'True'}),
119+ 'keyring_filename': ('django.db.models.fields.FilePathField', [], {'max_length': '100', 'blank': 'True'}),
120+ 'updated': ('django.db.models.fields.DateTimeField', [], {}),
121+ 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'})
122+ },
123+ u'maasserver.bootsourceselection': {
124+ 'Meta': {'object_name': 'BootSourceSelection'},
125+ 'arches': ('djorm_pgarray.fields.ArrayField', [], {'default': 'None', 'dbtype': "u'text'", 'null': 'True', 'blank': 'True'}),
126+ 'boot_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.BootSource']"}),
127+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
128+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
129+ 'labels': ('djorm_pgarray.fields.ArrayField', [], {'default': 'None', 'dbtype': "u'text'", 'null': 'True', 'blank': 'True'}),
130+ 'release': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '20', 'blank': 'True'}),
131+ 'subarches': ('djorm_pgarray.fields.ArrayField', [], {'default': 'None', 'dbtype': "u'text'", 'null': 'True', 'blank': 'True'}),
132+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
133+ },
134+ u'maasserver.componenterror': {
135+ 'Meta': {'object_name': 'ComponentError'},
136+ 'component': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '40'}),
137+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
138+ 'error': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
139+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
140+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
141+ },
142+ u'maasserver.config': {
143+ 'Meta': {'object_name': 'Config'},
144+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
145+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
146+ 'value': ('maasserver.fields.JSONObjectField', [], {'null': 'True'})
147+ },
148+ u'maasserver.dhcplease': {
149+ 'Meta': {'object_name': 'DHCPLease'},
150+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
151+ 'ip': ('maasserver.fields.MAASIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
152+ 'mac': ('maasserver.fields.MACAddressField', [], {}),
153+ 'nodegroup': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']"})
154+ },
155+ u'maasserver.downloadprogress': {
156+ 'Meta': {'object_name': 'DownloadProgress'},
157+ 'bytes_downloaded': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
158+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
159+ 'error': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'blank': 'True'}),
160+ 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
161+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
162+ 'nodegroup': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']"}),
163+ 'size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
164+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
165+ },
166+ u'maasserver.filestorage': {
167+ 'Meta': {'unique_together': "((u'filename', u'owner'),)", 'object_name': 'FileStorage'},
168+ 'content': ('metadataserver.fields.BinaryField', [], {'blank': 'True'}),
169+ 'filename': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
170+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
171+ 'key': ('django.db.models.fields.CharField', [], {'default': "u'1ed17c44-0672-11e4-aedf-9c4e363b1c94'", 'unique': 'True', 'max_length': '36'}),
172+ 'owner': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
173+ },
174+ u'maasserver.licensekey': {
175+ 'Meta': {'unique_together': "((u'osystem', u'distro_series'),)", 'object_name': 'LicenseKey'},
176+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
177+ 'distro_series': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
178+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
179+ 'license_key': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
180+ 'osystem': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
181+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
182+ },
183+ u'maasserver.macaddress': {
184+ 'Meta': {'object_name': 'MACAddress'},
185+ 'cluster_interface': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['maasserver.NodeGroupInterface']", 'null': 'True', 'blank': 'True'}),
186+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
187+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
188+ 'ip_addresses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['maasserver.StaticIPAddress']", 'symmetrical': 'False', 'through': u"orm['maasserver.MACStaticIPAddressLink']", 'blank': 'True'}),
189+ 'mac_address': ('maasserver.fields.MACAddressField', [], {'unique': 'True'}),
190+ 'networks': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['maasserver.Network']", 'symmetrical': 'False', 'blank': 'True'}),
191+ 'node': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.Node']"}),
192+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
193+ },
194+ u'maasserver.macstaticipaddresslink': {
195+ 'Meta': {'unique_together': "((u'ip_address', u'mac_address'),)", 'object_name': 'MACStaticIPAddressLink'},
196+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
197+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
198+ 'ip_address': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.StaticIPAddress']", 'unique': 'True'}),
199+ 'mac_address': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.MACAddress']"}),
200+ 'nic_alias': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True', 'blank': 'True'}),
201+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
202+ },
203+ u'maasserver.network': {
204+ 'Meta': {'object_name': 'Network'},
205+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
206+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
207+ 'ip': ('maasserver.fields.MAASIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
208+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
209+ 'netmask': ('maasserver.fields.MAASIPAddressField', [], {'max_length': '39'}),
210+ 'vlan_tag': ('django.db.models.fields.PositiveSmallIntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'})
211+ },
212+ u'maasserver.node': {
213+ 'Meta': {'object_name': 'Node'},
214+ 'agent_name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'null': 'True', 'blank': 'True'}),
215+ 'architecture': ('django.db.models.fields.CharField', [], {'max_length': '31'}),
216+ 'cpu_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
217+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
218+ 'distro_series': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '20', 'blank': 'True'}),
219+ 'error': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}),
220+ 'hostname': ('django.db.models.fields.CharField', [], {'default': "u''", 'unique': 'True', 'max_length': '255', 'blank': 'True'}),
221+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
222+ 'license_key': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
223+ 'memory': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
224+ 'netboot': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
225+ 'nodegroup': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']", 'null': 'True'}),
226+ 'osystem': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '20', 'blank': 'True'}),
227+ 'owner': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
228+ 'power_parameters': ('maasserver.fields.JSONObjectField', [], {'default': "u''", 'blank': 'True'}),
229+ 'power_type': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '10', 'blank': 'True'}),
230+ 'routers': ('djorm_pgarray.fields.ArrayField', [], {'default': 'None', 'dbtype': "u'macaddr'", 'null': 'True', 'blank': 'True'}),
231+ 'status': ('django.db.models.fields.IntegerField', [], {'default': '0', 'max_length': '10'}),
232+ 'storage': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
233+ 'system_id': ('django.db.models.fields.CharField', [], {'default': "u'node-1ececdb4-0672-11e4-aedf-9c4e363b1c94'", 'unique': 'True', 'max_length': '41'}),
234+ 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['maasserver.Tag']", 'symmetrical': 'False'}),
235+ 'token': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['piston.Token']", 'null': 'True'}),
236+ 'updated': ('django.db.models.fields.DateTimeField', [], {}),
237+ 'zone': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.Zone']", 'on_delete': 'models.SET_DEFAULT'})
238+ },
239+ u'maasserver.nodegroup': {
240+ 'Meta': {'object_name': 'NodeGroup'},
241+ 'api_key': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '18'}),
242+ 'api_token': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['piston.Token']", 'unique': 'True'}),
243+ 'cluster_name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100', 'blank': 'True'}),
244+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
245+ 'dhcp_key': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}),
246+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
247+ 'maas_url': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}),
248+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
249+ 'status': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
250+ 'updated': ('django.db.models.fields.DateTimeField', [], {}),
251+ 'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '36'})
252+ },
253+ u'maasserver.nodegroupinterface': {
254+ 'Meta': {'unique_together': "((u'nodegroup', u'interface'),)", 'object_name': 'NodeGroupInterface'},
255+ 'broadcast_ip': ('maasserver.fields.MAASIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
256+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
257+ 'foreign_dhcp_ip': ('maasserver.fields.MAASIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
258+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
259+ 'interface': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}),
260+ 'ip': ('maasserver.fields.MAASIPAddressField', [], {'max_length': '39'}),
261+ 'ip_range_high': ('maasserver.fields.MAASIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
262+ 'ip_range_low': ('maasserver.fields.MAASIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
263+ 'management': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
264+ 'nodegroup': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['maasserver.NodeGroup']"}),
265+ 'router_ip': ('maasserver.fields.MAASIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
266+ 'static_ip_range_high': ('maasserver.fields.MAASIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
267+ 'static_ip_range_low': ('maasserver.fields.MAASIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
268+ 'subnet_mask': ('maasserver.fields.MAASIPAddressField', [], {'default': 'None', 'max_length': '39', 'null': 'True', 'blank': 'True'}),
269+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
270+ },
271+ u'maasserver.sshkey': {
272+ 'Meta': {'unique_together': "((u'user', u'key'),)", 'object_name': 'SSHKey'},
273+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
274+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
275+ 'key': ('django.db.models.fields.TextField', [], {}),
276+ 'updated': ('django.db.models.fields.DateTimeField', [], {}),
277+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
278+ },
279+ u'maasserver.sslkey': {
280+ 'Meta': {'unique_together': "((u'user', u'key'),)", 'object_name': 'SSLKey'},
281+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
282+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
283+ 'key': ('django.db.models.fields.TextField', [], {}),
284+ 'updated': ('django.db.models.fields.DateTimeField', [], {}),
285+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"})
286+ },
287+ u'maasserver.staticipaddress': {
288+ 'Meta': {'object_name': 'StaticIPAddress'},
289+ 'alloc_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
290+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
291+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
292+ 'ip': ('maasserver.fields.MAASIPAddressField', [], {'unique': 'True', 'max_length': '39'}),
293+ 'updated': ('django.db.models.fields.DateTimeField', [], {}),
294+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'})
295+ },
296+ u'maasserver.tag': {
297+ 'Meta': {'object_name': 'Tag'},
298+ 'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
299+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
300+ 'definition': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
301+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
302+ 'kernel_opts': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
303+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'}),
304+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
305+ },
306+ u'maasserver.userprofile': {
307+ 'Meta': {'object_name': 'UserProfile'},
308+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
309+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['auth.User']", 'unique': 'True'})
310+ },
311+ u'maasserver.zone': {
312+ 'Meta': {'ordering': "[u'name']", 'object_name': 'Zone'},
313+ 'created': ('django.db.models.fields.DateTimeField', [], {}),
314+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
315+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
316+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'}),
317+ 'updated': ('django.db.models.fields.DateTimeField', [], {})
318+ },
319+ u'piston.consumer': {
320+ 'Meta': {'object_name': 'Consumer'},
321+ 'description': ('django.db.models.fields.TextField', [], {}),
322+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
323+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '18'}),
324+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
325+ 'secret': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
326+ 'status': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '16'}),
327+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'consumers'", 'null': 'True', 'to': u"orm['auth.User']"})
328+ },
329+ u'piston.token': {
330+ 'Meta': {'object_name': 'Token'},
331+ 'callback': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
332+ 'callback_confirmed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
333+ 'consumer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['piston.Consumer']"}),
334+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
335+ 'is_approved': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
336+ 'key': ('django.db.models.fields.CharField', [], {'max_length': '18'}),
337+ 'secret': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
338+ 'timestamp': ('django.db.models.fields.IntegerField', [], {'default': '1404804793L'}),
339+ 'token_type': ('django.db.models.fields.IntegerField', [], {}),
340+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'tokens'", 'null': 'True', 'to': u"orm['auth.User']"}),
341+ 'verifier': ('django.db.models.fields.CharField', [], {'max_length': '10'})
342+ }
343+ }
344+
345+ complete_apps = ['maasserver']
346
347=== modified file 'src/maasserver/tests/test_migrations.py'
348--- src/maasserver/tests/test_migrations.py 2014-05-01 20:20:34 +0000
349+++ src/maasserver/tests/test_migrations.py 2014-08-20 00:41:51 +0000
350@@ -27,6 +27,8 @@
351 (2, '0002_macaddress_unique'),
352 (39, '0039_add_filestorage_content'),
353 (39, '0039_add_nodegroup_to_bootimage'),
354+ (88, '0088_ip_to_custom_field'),
355+ (88, '0088_z_backport_trunk_0099'),
356 ]
357
358

Subscribers

People subscribed via source and target branches

to all changes: