Merge pull request #1065 from stangri/luci-app-vpnbypass
[project/luci.git] / applications / luci-app-lxc / luasrc / model / cbi / lxc.lua
1 --[[
2
3 LuCI LXC module
4
5 Copyright (C) 2014, Cisco Systems, Inc.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11         http://www.apache.org/licenses/LICENSE-2.0
12
13 Author: Petar Koretic <petar.koretic@sartura.hr>
14
15 ]]--
16
17 local fs = require "nixio.fs"
18
19 m = Map("lxc", translate("LXC Containers"))
20
21 if fs.access("/etc/config/lxc") then
22         m:section(SimpleSection).template = "lxc"
23
24         s = m:section(TypedSection, "lxc", translate("Options"))
25         s.anonymous = true
26         s.addremove = false
27
28         s:option(Value, "url", translate("Containers URL"))
29 end
30
31 return m