lxc.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. o3 = s:option(Value, "min_space", translate("Free Space Threshold"),
  22. translate("Minimum required free space for LXC Container creation in KB"))
  23. o3.default = "100000"
  24. o3.datatype = "min(50000)"
  25. o3.rmempty = false
  26. o4 = s:option(Value, "min_temp", translate("Free Temp Threshold"),
  27. translate("Minimum required free temp space for LXC Container creation in KB"))
  28. o4.default = "100000"
  29. o4.datatype = "min(50000)"
  30. o4.rmempty = false
  31. return m