From 2d482e237c184a1afdcb7bd6b2aec36f9a40b387 Mon Sep 17 00:00:00 2001 From: 20C Date: Thu, 2 May 2024 09:40:12 +0000 Subject: [PATCH] Support 202404 Enhancement to Ownership Information Field peeringdb/peeringdb#1115 Add help text to "Traffic Levels" peeringdb/peeringdb#840 missing migrations peeringdb/django-peeringdb#100 --- CHANGELOG.md | 6 ++ CHANGELOG.yaml | 8 +- src/django_peeringdb/const.py | 8 +- .../0031_add_info_traffic_help_text.py | 43 +++++++++ .../0032_alter_property_help_text.py | 28 ++++++ ...ty_property_alter_ixlan_rs_asn_and_more.py | 96 +++++++++++++++++++ src/django_peeringdb/models/abstract.py | 9 +- 7 files changed, 193 insertions(+), 5 deletions(-) create mode 100644 src/django_peeringdb/migrations/0031_add_info_traffic_help_text.py create mode 100644 src/django_peeringdb/migrations/0032_alter_property_help_text.py create mode 100644 src/django_peeringdb/migrations/0033_alter_facility_property_alter_ixlan_rs_asn_and_more.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 072f0e5..1be4b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,13 @@ ## Unreleased +### Added +- help text for info_traffic +### Fixed +- missing migrations ### Changed +- Facility.property label for Lessee changed to "Leased or Rented" +- Facility.property help text clarified - social media service `twitter` renamed to `x` diff --git a/CHANGELOG.yaml b/CHANGELOG.yaml index 3c1c9fc..0694c14 100644 --- a/CHANGELOG.yaml +++ b/CHANGELOG.yaml @@ -1,7 +1,11 @@ Unreleased: - added: [] - fixed: [] + added: + - help text for info_traffic + fixed: + - missing migrations changed: + - Facility.property label for Lessee changed to "Leased or Rented" + - Facility.property help text clarified - social media service `twitter` renamed to `x` deprecated: [] removed: [] diff --git a/src/django_peeringdb/const.py b/src/django_peeringdb/const.py index d716c0c..a96388d 100644 --- a/src/django_peeringdb/const.py +++ b/src/django_peeringdb/const.py @@ -135,6 +135,8 @@ "or dashes between the groups of digits" ) +INFO_TRAFFIC_HELP_TEXT = _("Total, self-classified traffic in/out to this network.") + WEBSITE_OVERRIDE_HELP_TEXT = _( "If this field is set, it will be displayed on this record. " "If not, we will display the website from the organization " @@ -168,7 +170,11 @@ ("Recurring Fees", _("Recurring Fees")), ) -PROPERTY = (("", _("Not Disclosed")), ("Owner", _("Owner")), ("Lessee", _("Lessee"))) +PROPERTY = ( + ("", _("Not Disclosed")), + ("Owner", _("Owner")), + ("Lessee", _("Leased or Rented")), +) AVAILABLE_VOLTAGE = ( ("48 VDC", _("48 VDC")), diff --git a/src/django_peeringdb/migrations/0031_add_info_traffic_help_text.py b/src/django_peeringdb/migrations/0031_add_info_traffic_help_text.py new file mode 100644 index 0000000..7f681db --- /dev/null +++ b/src/django_peeringdb/migrations/0031_add_info_traffic_help_text.py @@ -0,0 +1,43 @@ +# Generated by Django 4.2.11 on 2024-04-16 04:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("django_peeringdb", "0030_bfd_support"), + ] + + operations = [ + migrations.AlterField( + model_name="network", + name="info_traffic", + field=models.CharField( + blank=True, + choices=[ + ("", "Not Disclosed"), + ("0-20Mbps", "0-20Mbps"), + ("20-100Mbps", "20-100Mbps"), + ("100-1000Mbps", "100-1000Mbps"), + ("1-5Gbps", "1-5Gbps"), + ("5-10Gbps", "5-10Gbps"), + ("10-20Gbps", "10-20Gbps"), + ("20-50Gbps", "20-50Gbps"), + ("50-100Gbps", "50-100Gbps"), + ("100-200Gbps", "100-200Gbps"), + ("200-300Gbps", "200-300Gbps"), + ("300-500Gbps", "300-500Gbps"), + ("500-1000Gbps", "500-1000Gbps"), + ("1-5Tbps", "1-5Tbps"), + ("5-10Tbps", "5-10Tbps"), + ("10-20Tbps", "10-20Tbps"), + ("20-50Tbps", "20-50Tbps"), + ("50-100Tbps", "50-100Tbps"), + ("100+Tbps", "100+Tbps"), + ], + help_text="Total, self-classified traffic in/out to this network.", + max_length=39, + verbose_name="Traffic Levels", + ), + ), + ] diff --git a/src/django_peeringdb/migrations/0032_alter_property_help_text.py b/src/django_peeringdb/migrations/0032_alter_property_help_text.py new file mode 100644 index 0000000..2d62eac --- /dev/null +++ b/src/django_peeringdb/migrations/0032_alter_property_help_text.py @@ -0,0 +1,28 @@ +# Generated by Django 4.2.11 on 2024-04-26 10:28 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("django_peeringdb", "0031_add_info_traffic_help_text"), + ] + + operations = [ + migrations.AlterField( + model_name="facility", + name="property", + field=models.CharField( + blank=True, + choices=[ + ("", "Not Disclosed"), + ("Owner", "Owner"), + ("Lessee", "Leased or Rented"), + ], + help_text="Leasing renting is an agreement with a property owner for use of the property.", + max_length=27, + null=True, + verbose_name="Property", + ), + ) + ] diff --git a/src/django_peeringdb/migrations/0033_alter_facility_property_alter_ixlan_rs_asn_and_more.py b/src/django_peeringdb/migrations/0033_alter_facility_property_alter_ixlan_rs_asn_and_more.py new file mode 100644 index 0000000..80e2083 --- /dev/null +++ b/src/django_peeringdb/migrations/0033_alter_facility_property_alter_ixlan_rs_asn_and_more.py @@ -0,0 +1,96 @@ +# Generated by Django 4.2.11 on 2024-05-02 09:46 + +import django.core.validators +import django_inet.models +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("django_peeringdb", "0032_alter_property_help_text"), + ] + + operations = [ + migrations.AlterField( + model_name="facility", + name="property", + field=models.CharField( + blank=True, + choices=[ + ("", "Not Disclosed"), + ("Owner", "Owner"), + ("Lessee", "Leased or Rented"), + ], + help_text="Leasing or renting is an agreement with a property owner for use of the property.", + max_length=27, + null=True, + verbose_name="Property", + ), + ), + migrations.AlterField( + model_name="ixlan", + name="rs_asn", + field=django_inet.models.ASNField( + blank=True, + default=0, + null=True, + validators=[ + django.core.validators.MinValueValidator(0), + django.core.validators.MinValueValidator(0), + ], + verbose_name="Route Server ASN", + ), + ), + migrations.AlterField( + model_name="network", + name="asn", + field=django_inet.models.ASNField( + unique=True, + validators=[ + django.core.validators.MinValueValidator(0), + django.core.validators.MinValueValidator(0), + ], + verbose_name="ASN", + ), + ), + migrations.AlterField( + model_name="network", + name="policy_general", + field=models.CharField( + blank=True, + choices=[ + ("Open", "Open"), + ("Selective", "Selective"), + ("Restrictive", "Restrictive"), + ("No", "No"), + ], + help_text="Peering with the routeserver and BFD support is shown with an icon", + max_length=72, + verbose_name="General Policy", + ), + ), + migrations.AlterField( + model_name="networkfacility", + name="local_asn", + field=django_inet.models.ASNField( + blank=True, + null=True, + validators=[ + django.core.validators.MinValueValidator(0), + django.core.validators.MinValueValidator(0), + ], + verbose_name="Local ASN", + ), + ), + migrations.AlterField( + model_name="networkixlan", + name="asn", + field=django_inet.models.ASNField( + validators=[ + django.core.validators.MinValueValidator(0), + django.core.validators.MinValueValidator(0), + ], + verbose_name="ASN", + ), + ), + ] diff --git a/src/django_peeringdb/models/abstract.py b/src/django_peeringdb/models/abstract.py index ae4d957..e5d7d05 100644 --- a/src/django_peeringdb/models/abstract.py +++ b/src/django_peeringdb/models/abstract.py @@ -110,7 +110,7 @@ class FacilityBase(HandleRefModel, AddressModel): blank=True, choices=const.PROPERTY, help_text=_( - "A property owner is the individual or entity that has title to the property. A lessee is a user of a property who has a lease, an agreement, with the owner of the property." + "Leasing or renting is an agreement with a property owner for use of the property." ), ) @@ -211,8 +211,13 @@ class NetworkBase(HandleRefModel): notes_private = models.TextField(_("Private notes"), blank=True) info_traffic = models.CharField( - _("Traffic Levels"), max_length=39, blank=True, choices=const.TRAFFIC + _("Traffic Levels"), + max_length=39, + blank=True, + choices=const.TRAFFIC, + help_text=const.INFO_TRAFFIC_HELP_TEXT, ) + info_ratio = models.CharField( _("Traffic Ratios"), max_length=45,