# Path: roscraco/helper/validator.py
# WEP_CONSTRAINTS_MAP = {
#     64: {'ascii': 5, 'hex': 10},
#     128: {'ascii': 13, 'hex': 26},
#     152: {'ascii': 16, 'hex': 32}
# }
# def is_valid_mac_address(mac):
# def is_valid_mac_address_normalized(mac):
# def is_valid_ip_address(ip):
# def _is_hex_string(string):
# def is_valid_wpa_psk_password(password):
# def is_valid_wep_password(password, bit_length):
# def is_wep_password_in_hex(password, bit_length):
# def is_valid_ssid(ssid):
# def is_ip_in_range(ip, ip_range_start, ip_range_end):
# 
# Path: roscraco/helper/converter.py
# def ip2long(ip_addr):
# def long2ip(ip):
# def normalize_mac(mac):
# 
# Path: roscraco/exception.py
# class RouterSettingsError(RouterError):
#     pass


from roscraco.helper import validator, converter
from roscraco.exception import RouterSettingsError
    @property
    def ip_start(self):
        return self._ip_start

    def set_ip_start(self, value):
        self._ip_start = value

    @property
    def ip_end(self):
        return self._ip_end

    def set_ip_end(self, value):
        self._ip_end = value

    @property
    def is_enabled(self):
        return self._is_enabled

    def set_enabled_status(self, value):
        self._is_enabled = bool(value)

    def validate(self):
        errors = {}

        if not validator.is_valid_ip_address(self._ip_start):
            errors['ip_start'] = 'Invalid start IP: %s' % self._ip_start

        if not validator.is_valid_ip_address(self._ip_end):
            errors['ip_end'] = 'Invalid end IP: %s' % self._ip_end


# Path: roscraco/helper/validator.py
# WEP_CONSTRAINTS_MAP = {
#     64: {'ascii': 5, 'hex': 10},
#     128: {'ascii': 13, 'hex': 26},
#     152: {'ascii': 16, 'hex': 32}
# }
# def is_valid_mac_address(mac):
# def is_valid_mac_address_normalized(mac):
# def is_valid_ip_address(ip):
# def _is_hex_string(string):
# def is_valid_wpa_psk_password(password):
# def is_valid_wep_password(password, bit_length):
# def is_wep_password_in_hex(password, bit_length):
# def is_valid_ssid(ssid):
# def is_ip_in_range(ip, ip_range_start, ip_range_end):
# 
# Path: roscraco/helper/converter.py
# def ip2long(ip_addr):
# def long2ip(ip):
# def normalize_mac(mac):
# 
# Path: roscraco/exception.py
# class RouterSettingsError(RouterError):
#     pass


# Path: roscraco/response/dhcp.py
from roscraco.helper import validator, converter
from roscraco.exception import RouterSettingsError

    @property
    def ip_start(self):
        return self._ip_start

    def set_ip_start(self, value):
        self._ip_start = value

    @property
    def ip_end(self):
        return self._ip_end

    def set_ip_end(self, value):
        self._ip_end = value

    @property
    def is_enabled(self):
        return self._is_enabled

    def set_enabled_status(self, value):
        self._is_enabled = bool(value)

    def validate(self):
        errors = {}

        if not validator.is_valid_ip_address(self._ip_start):
            errors['ip_start'] = 'Invalid start IP: %s' % self._ip_start

        if not validator.is_valid_ip_address(self._ip_end):
            errors['ip_end'] = 'Invalid end IP: %s' % self._ip_end


        if converter.ip2long(self._ip_start) > converter.ip2long(self._ip_end):