~maas-committers/maas/1.2

« back to all changes in this revision

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

[r=rvb][bug=1070765][author=rvb] Backport [r1316..r1318].

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from maasserver import DefaultMeta
26
26
from maasserver.fields import MACAddressField
27
27
from maasserver.models.cleansave import CleanSave
28
 
 
29
 
 
30
 
def strip_domain(hostname):
31
 
    """Return `hostname` with the domain part removed."""
32
 
    return hostname.split('.', 1)[0]
 
28
from maasserver.utils import strip_domain
33
29
 
34
30
 
35
31
class DHCPLeaseManager(Manager):