# Copyright (c) 2015 iXsystems, Inc.
# All rights reserved.
# This file is a part of TrueNAS
# and may not be copied and/or distributed
# without the express permission of iXsystems.

from django.conf.urls import url
from freenasUI.api import v1_api

from freenasUI.truenas.resources import PingResource
from .views import (
    enclosure_status, enclosure_label, enclosure_identify, enclosure_identify_clear
)

v1_api.register(PingResource())

urlpatterns = [
    url(
        r'^enclosure/status/$',
        enclosure_status,
        name="storage_enclosure_status"
    ),
    url(
        r'^enclosure/label/$',
        enclosure_label,
        name="storage_enclosure_label"
    ),
    url(
        r'^enclosure/identify/(?P<enc>\d+)/(?P<slot>\d+)/$',
        enclosure_identify,
        name="storage_enclosure_identify"
    ),
    url(
        r'^enclosure/identify_clear/(?P<enc>\d+)/(?P<slot>\d+)/$',
        enclosure_identify_clear,
        name="storage_enclosure_identify_clear"
    ),
]
