Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 202404 #102

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`


Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.yaml
Original file line number Diff line number Diff line change
@@ -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: []
Expand Down
8 changes: 7 additions & 1 deletion src/django_peeringdb/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down Expand Up @@ -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")),
Expand Down
43 changes: 43 additions & 0 deletions src/django_peeringdb/migrations/0031_add_info_traffic_help_text.py
Original file line number Diff line number Diff line change
@@ -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",
),
),
]
28 changes: 28 additions & 0 deletions src/django_peeringdb/migrations/0032_alter_property_help_text.py
Original file line number Diff line number Diff line change
@@ -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",
),
)
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# 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),
],
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),
],
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),
],
verbose_name="Local ASN",
),
),
migrations.AlterField(
model_name="networkixlan",
name="asn",
field=django_inet.models.ASNField(
validators=[
django.core.validators.MinValueValidator(0),
],
verbose_name="ASN",
),
),
]
9 changes: 7 additions & 2 deletions src/django_peeringdb/models/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
),
)

Expand Down Expand Up @@ -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,
Expand Down
Loading