~mpontillo/maas/add-logging-for-bug-1627362

« back to all changes in this revision

Viewing changes to src/maasserver/models/discovery.py

[r=blake-rouse][bug=1627039][author=mpontillo] Add is_external_dhcp boolean to discovery view.

 * Update SQL to select a boolean from the related VLAN to 
   determine if the discovered IP address is a DHCP server.
 * Update websocket tests to account for the new field.
 * Expose the DHCP server indicator in the dashboard HTML.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
    ForeignKey,
15
15
    IntegerField,
16
16
    Manager,
 
17
    NullBooleanField,
17
18
)
18
19
from django.db.models.query import QuerySet
19
20
from maasserver import DefaultViewMeta
221
222
    subnet_cidr = CIDRField(
222
223
        blank=True, unique=False, editable=False, null=True)
223
224
 
 
225
    is_external_dhcp = NullBooleanField(
 
226
        blank=True, unique=False, editable=False, null=True)
 
227
 
224
228
    objects = DiscoveryManager()
225
229
 
226
230
    @property