Closes #3706: Increase available_power maximum value on PowerFeed

This commit is contained in:
Jeremy Stretch 2019-12-11 21:12:18 -05:00
parent 7bbd9be389
commit 5aa17bc42a
4 changed files with 26 additions and 7 deletions

View File

@ -232,6 +232,7 @@ PATCH) to maintain backward compatibility. This behavior will be discontinued be
scripts
* [#3655](https://github.com/digitalocean/netbox/issues/3655) - Add `description` field to organizational models
* [#3664](https://github.com/digitalocean/netbox/issues/3664) - Enable applying configuration contexts by tags
* [#3706](https://github.com/digitalocean/netbox/issues/3706) - Increase `available_power` maximum value on PowerFeed
* [#3731](https://github.com/digitalocean/netbox/issues/3731) - Change Graph.type to a ContentType foreign key field
## API Changes

View File

@ -1026,12 +1026,12 @@ class PowerPortTemplateCreateForm(ComponentForm):
maximum_draw = forms.IntegerField(
min_value=1,
required=False,
help_text="Maximum current draw (watts)"
help_text="Maximum power draw (watts)"
)
allocated_draw = forms.IntegerField(
min_value=1,
required=False,
help_text="Allocated current draw (watts)"
help_text="Allocated power draw (watts)"
)

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.8 on 2019-12-12 02:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dcim', '0087_role_descriptions'),
]
operations = [
migrations.AlterField(
model_name='powerfeed',
name='available_power',
field=models.PositiveIntegerField(default=0, editable=False),
),
]

View File

@ -1260,13 +1260,13 @@ class PowerPortTemplate(ComponentTemplateModel):
blank=True,
null=True,
validators=[MinValueValidator(1)],
help_text="Maximum current draw (watts)"
help_text="Maximum power draw (watts)"
)
allocated_draw = models.PositiveSmallIntegerField(
blank=True,
null=True,
validators=[MinValueValidator(1)],
help_text="Allocated current draw (watts)"
help_text="Allocated power draw (watts)"
)
objects = NaturalOrderingManager()
@ -2182,13 +2182,13 @@ class PowerPort(CableTermination, ComponentModel):
blank=True,
null=True,
validators=[MinValueValidator(1)],
help_text="Maximum current draw (watts)"
help_text="Maximum power draw (watts)"
)
allocated_draw = models.PositiveSmallIntegerField(
blank=True,
null=True,
validators=[MinValueValidator(1)],
help_text="Allocated current draw (watts)"
help_text="Allocated power draw (watts)"
)
_connected_poweroutlet = models.OneToOneField(
to='dcim.PowerOutlet',
@ -3316,7 +3316,7 @@ class PowerFeed(ChangeLoggedModel, CableTermination, CustomFieldModel):
default=80,
help_text="Maximum permissible draw (percentage)"
)
available_power = models.PositiveSmallIntegerField(
available_power = models.PositiveIntegerField(
default=0,
editable=False
)