Rename PortainerClient.GetStackFileContent() to StackFileInspect()

This commit is contained in:
Juan Carlos Mejías Rodríguez 2019-08-26 01:24:53 -04:00
parent 0b946ac0ec
commit 636757e289
2 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ type PortainerClient interface {
StackDelete(stackID portainer.StackID) error
// Get stack file content
GetStackFileContent(stackID portainer.StackID) (content string, err error)
StackFileInspect(stackID portainer.StackID) (content string, err error)
// Get endpoint Docker info
GetEndpointDockerInfo(endpointID portainer.EndpointID) (info map[string]interface{}, err error)
@ -283,7 +283,7 @@ func (n *portainerClientImp) StackDelete(stackID portainer.StackID) (err error)
return
}
func (n *portainerClientImp) GetStackFileContent(stackID portainer.StackID) (content string, err error) {
func (n *portainerClientImp) StackFileInspect(stackID portainer.StackID) (content string, err error) {
var respBody StackFileInspectResponse
err = n.doJSONWithToken(fmt.Sprintf("stacks/%v/file", stackID), http.MethodGet, http.Header{}, nil, &respBody)

View File

@ -87,7 +87,7 @@ var stackDeployCmd = &cobra.Command{
logrus.WithFields(logrus.Fields{
"stack": retrievedStack.Name,
}).Debug("Getting stack file content")
stackFileContent, stackFileContentRetrievalErr = portainerClient.GetStackFileContent(retrievedStack.ID)
stackFileContent, stackFileContentRetrievalErr = portainerClient.StackFileInspect(retrievedStack.ID)
common.CheckError(stackFileContentRetrievalErr)
}