Commit Graph

26 Commits

Author SHA1 Message Date
Dan McGee
06e1e857ab Allow mirror rsync IPs to be IPv4/IPv6 addresses or networks
This gives us a bunch more flexibility on this field, and now supports
all the options that the rsync config file supports.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-10 21:03:09 -05:00
Dan McGee
9917ee3482 Add location ID to mirror logs
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-06 20:49:38 -06:00
Dan McGee
1dbf311774 Add 'created' field to more mirror models
We have been better about doing this to most of our models, but the ones
here didn't have a created field. Add it where appropriate and set a
reasonably old default value.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-06 19:45:52 -06:00
Dan McGee
d158ce71e4 Add mirror check locations model
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-06 19:40:24 -06:00
Dan McGee
dd8e94f697 Lengthen the mirror rsync IP address field
Make it long enough to support a full-form IPv6 address with a subnet.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20 15:01:13 -06:00
Dan McGee
6f0ae6746b Drop country column from mirror table
We now always look for this information at the URL level, not the mirror
level. This simplifies quite a bit of code in and around the mirror
views.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14 01:05:54 -06:00
Dan McGee
5b8b6991b0 Add migration to move country data down to the URL level
Rather than have the weird indirection we need now to find the right
country for URLs, just always store it on the URL.

Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14 00:34:49 -06:00
Dan McGee
b7a03d89d1 Push more default values down into the database
This makes it easier to do manual manipulation/insertion/etc. at the
database level, as well as just making things act more sane from an
overall software stack perspective.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-07 23:22:18 -05:00
Dan McGee
06f1bb9961 mirrors: add an alternate_email column
We have a lot of these in the freeform text area in the mirror notes;
attempt to make this data usable as necessary if we want to do some sort
of mirror notification automation in the future.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 21:36:05 -05:00
Dan McGee
a570c2c7fa Change mirror log error text to unlimited length
Use TextField rather than a limited-length CharField; leave it up to the
code filling this field to determine an appropriate length.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-13 20:10:46 -05:00
Dan McGee
7f2ed459e9 Remove now-unused NullCharField
It would be straightforward if we just needed to remove the field class
definition, but we also need to update all migrations that referenced it
so we don't have problems starting and migrating from scratch.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26 11:53:49 -05:00
Dan McGee
640e0f5864 Finish django countries implementation
* Add a migration to drop the old countries field.
* Update all templates/views/utility methods to point at the new country
  field and dereference it as necessary.
* Add the flags images to a few views where it makes sense.
* Cleanup the download page layout quite a bit.
* Bump the mirror status JSON version to 3; add country_code attribute.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-25 01:51:58 -05:00
Dan McGee
20675141c3 Add django_countries country code fields and population migrations
This adds these columns and attempts to populate them with data from our
existing country column data.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-25 00:09:46 -05:00
Dan McGee
116751e4ba Rename mirror country fields to country_old in prep for normalization
We're going to move to using ISO 2 character codes via django countries,
so start by moving the old data out of the way first.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-25 00:00:36 -05:00
Dan McGee
c3a5f8a4e8 Fix ContentType related migrations
This should fix the issues reported in FS#23228 for the most part.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20 11:15:03 -05:00
Dan McGee
31f9d3fc0f Add migrations for on_delete attributes
I don't think these end up doing anything at the database level, but
since South insists on generating alter_column() calls for these
changes, do them once so they don't keep reappearing in auto-generated
future migrations.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-08 14:08:45 -05:00
Dan McGee
3a1101db1d Don't select FTP by default in mirrorlists
More generally, add a new 'default' column to the mirror protocol model
so we can determine what is selected and shown by default.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-13 12:36:37 -06:00
Dan McGee
2fd78dfa00 Allow mirror country field to be persisted to DB as NULL
You need a custom field type in Django to allow this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14 18:17:22 -05:00
Dan McGee
78a553e558 Add optional country override for individual mirror URLs
This allows a named top-level mirror to have geographically distributed
URLs, e.g. kernel.org and the geo-DNS setup.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-12 18:36:20 -05:00
Dan McGee
f793c413ad Make mirror name and URLs unique
So we don't create duplicates without knowing it in our database, like
we did earlier today.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-05 01:12:23 -05:00
PyroPeter
c057b079c7 Add has_ipv{4,6} to MirrorUrl
Dan: Add some more useful labels for use in the admin.

Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-13 18:25:54 -05:00
Dan McGee
3ebe31bdad Add is_download field to mirror protocols
This will replace all the usages of '!= rsync' and 'is ftp or http' we have
in the code with one check on a boolean flag.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-30 14:20:45 -05:00
Dan McGee
7def999b0a Fix migration dependencies exposed after moving models
When we moved some models from one app to another, we didn't do anything to
ensure the tables were created at all initially. Enforce this by adding the
minimal required dependencies- those migrations in the 'main' model that
last touched the involved models moving between apps.

Noticed-by: Angel Velasquez <angvp@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-29 15:16:39 -05:00
Dan McGee
0776b440b5 Add new MirrorLog model and associated migration
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-21 09:10:33 -05:00
Dan McGee
7dba848eaf Move mirror models out of main app
South actually makes this relatively painless if you get everything right,
so might as well start getting these out of the legacy main application to
eventually eliminate models being separate from their views.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-06 12:01:46 -05:00
Dan McGee
fae6667931 Put mirrors app under South control
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-06 11:44:22 -05:00