lxc.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. LuCI LXC module
  3. Copyright (C) 2014, Cisco Systems, Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Author: Petar Koretic <petar.koretic@sartura.hr>
  9. ]]--
  10. m = Map("lxc", translate("LXC Containers"),
  11. translate("<b>Please note:</b> LXC Containers require features not available on OpenWrt images for devices with small flash.<br />")
  12. .. translate("Also you may want to install 'kmod-veth' for optional network support."))
  13. m:section(SimpleSection).template = "lxc"
  14. s = m:section(TypedSection, "lxc", translate("Options"))
  15. s.anonymous = true
  16. o1 = s:option(Value, "url", translate("Containers URL"))
  17. o1:value("images.linuxcontainers.org")
  18. o1:value("repo.turris.cz/lxc", "repo.turris.cz/lxc (SSL req.)")
  19. o1.default = "images.linuxcontainers.org"
  20. o1.rmempty = false
  21. o2 = s:option(Flag, "ssl_enabled", translate("Enable SSL"),
  22. translate("Enable optional SSL encryption support. This requires additional packages like 'wget', 'ca-certificates', 'gnupg' and 'gnupg-utils'."))
  23. o2.default = o2.disabled
  24. o2.rmempty = false
  25. o3 = s:option(Value, "min_space", translate("Free Space Threshold"),
  26. translate("Minimum required free space for LXC Container creation in KB"))
  27. o3.default = "100000"
  28. o3.datatype = "min(50000)"
  29. o3.rmempty = false
  30. o4 = s:option(Value, "min_temp", translate("Free Temp Threshold"),
  31. translate("Minimum required free temp space for LXC Container creation in KB"))
  32. o4.default = "100000"
  33. o4.datatype = "min(50000)"
  34. o4.rmempty = false
  35. return m