luci-lib-docker: add container export support 5128/head
authorYu Hua <hue715@gmail.com>
Tue, 15 Jun 2021 14:24:27 +0000 (22:24 +0800)
committerYu Hua <hue715@gmail.com>
Tue, 15 Jun 2021 14:29:24 +0000 (22:29 +0800)
commit from https://github.com/lisaac/luci-lib-docker

Signed-off-by: Yu Hua <hue715@gmail.com>
collections/luci-lib-docker/luasrc/docker.lua

index 642465370805bed8dca7a3add7c5c7c7d7a5fdc8..cd9bf132d16d1f5f2039c4fb6e6544cea09a8826 100644 (file)
@@ -307,7 +307,7 @@ local gen_api = function(_table, http_method, api_group, api_action)
        local _api_action
 
        if api_action == "get_archive" or api_action == "put_archive" then
-               api_action = "archive"
+               _api_action = "archive"
        elseif api_action == "df" then
                _api_action = "system/df"
        elseif api_action ~= "list" and api_action ~= "inspect" and api_action ~= "remove" then
@@ -411,7 +411,8 @@ gen_api(_docker, "POST", "exec", "resize")
 gen_api(_docker, "GET", "exec", "inspect")
 gen_api(_docker, "GET", "containers", "get_archive")
 gen_api(_docker, "PUT", "containers", "put_archive")
--- TODO: export,attch
+gen_api(_docker, "GET", "containers", "export")
+-- TODO: attch
 
 gen_api(_docker, "GET", "images", "list")
 gen_api(_docker, "POST", "images", "create")