# Path: netjsonconfig/backends/openwrt/schema.py



from ..schema import schema
from .base import OpenWrtConverter


class Led(OpenWrtConverter):
    netjson_key = 'led'
    intermediate_key = 'system'
    _uci_types = ['led']
    _schema = schema['properties']['led']['items']

    def to_intermediate_loop(self, block, result, index=None):
        block.update(
            {
                '.type': 'led',
                '.name': block.pop('id', None) or self.__get_auto_name(block),

# Path: netjsonconfig/backends/openwrt/schema.py



# Path: netjsonconfig/backends/openwrt/converters/led.py
from ..schema import schema
from .base import OpenWrtConverter



class Led(OpenWrtConverter):
    netjson_key = 'led'
    intermediate_key = 'system'
    _uci_types = ['led']
    _schema = schema['properties']['led']['items']

    def to_intermediate_loop(self, block, result, index=None):
        block.update(
            {
                '.type': 'led',
                '.name': block.pop('id', None) or self.__get_auto_name(block),

            }