7from jadi import component
8
9from aj.api.http import get, HttpPlugin
10# from aj.auth import authorize11from aj.api.endpoint import endpoint
12import aj
13import gevent
15 self.context = context
16
17 @get(r'/api/softraid/arrays')
18 # @authorize('softraid:show')19 @endpoint(api=True)
20 def handle_api_get_softraid(self, http_context):
21 """
5from jadi import component
6
7from aj.api.http import get, HttpPlugin
8# from aj.auth import authorize 9from aj.api.endpoint import endpoint
10from aj.plugins.softraid.softraid import RAIDManager
11
1from jadi import component
2
3# from aj.auth import PermissionProvider 4from aj.plugins.core.api.sidebar import SidebarItemProvider
5
6
118 """
119
120 ### Is it necessary to do something else ?
121 # if subprocess.call(['which', 'ifdown']) == 0:122 # subprocess.check_call(['ifdown', iface])
123 subprocess.check_call(['ip', 'link', 'set', iface, 'down'])
It is recommended to remove any commented code in your codebase.
for item in sequence:
# print(item)
do_something(item)
# def old_function():
# '''Older implementation that has been replaced'''
# data = get_data()
# api.post(data)
for item in sequence:
do_something(item)