Propagate json error object to the caller

When plugin errors out, it prints out a JSON object to stdout
describing the failure. This object needs to be propagated out
through the plugins and to the container runtime. This change
also adds Print method to both the result and error structs
for easy serialization to stdout.
This commit is contained in:
Eugene Yakubovich
2015-06-01 17:34:00 -07:00
parent 54dfc9ef5d
commit 33a575f49d
10 changed files with 79 additions and 37 deletions

View File

@ -145,7 +145,7 @@ func cmdAdd(args *skel.CmdArgs) error {
}
}
return plugin.PrintResult(result)
return result.Print()
}
func cmdDel(args *skel.CmdArgs) error {