Skip to content

Commit

Permalink
fix previous PR compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gondor committed Jul 23, 2017
1 parent df56346 commit 2b5b28b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions marathon/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (c *MarathonClient) CreateApplicationFromString(filename string, appstr str
}

func (c *MarathonClient) ParseApplicationFromFile(filename string, opts *CreateOptions) (*Application, error) {
log.Infof("Creating Application from file: %s", filename)
log.Info("Creating Application from file: %s", filename)

file, err := os.Open(filename)
if err != nil {
Expand Down Expand Up @@ -113,7 +113,7 @@ func (c *MarathonClient) ParseApplicationFromString(r io.Reader, et encoding.Enc
}

func (c *MarathonClient) CreateApplication(app *Application, wait, force bool) (*Application, error) {
log.Infof("Creating Application '%s', wait: %v, force: %v", app.ID, wait, force)
log.Info("Creating Application '%s', wait: %v, force: %v", app.ID, wait, force)

result := new(Application)
resp := c.http.HttpPost(c.marathonUrl(API_APPS), app, result)
Expand Down Expand Up @@ -146,7 +146,7 @@ func (c *MarathonClient) CreateApplication(app *Application, wait, force bool) (
}

func (c *MarathonClient) UpdateApplication(app *Application, wait bool, force bool) (*Application, error) {
log.Infof("Update Application '%s', wait = %v", app.ID, wait)
log.Info("Update Application '%s', wait = %v", app.ID, wait)
result := new(DeploymentID)
id := utils.TrimRootPath(app.ID)
app.ID = ""
Expand Down Expand Up @@ -202,7 +202,7 @@ func (c *MarathonClient) ListApplicationsWithFilters(filter string) (*Applicatio
}

func (c *MarathonClient) GetApplication(id string) (*Application, error) {
log.Debugf("Enter: GetApplication: %s", id)
log.Debug("Enter: GetApplication: %s", id)
app := new(AppById)
resp := c.http.HttpGet(c.marathonUrl(API_APPS, id), app)
if resp.Error != nil {
Expand All @@ -224,7 +224,7 @@ func (c *MarathonClient) HasApplication(id string) (bool, error) {
}

func (c *MarathonClient) DestroyApplication(id string) (*DeploymentID, error) {
log.Infof("Deleting Application '%s'", id)
log.Info("Deleting Application '%s'", id)
deploymentId := new(DeploymentID)

resp := c.http.HttpDelete(c.marathonUrl(API_APPS, id), nil, deploymentId)
Expand All @@ -235,7 +235,7 @@ func (c *MarathonClient) DestroyApplication(id string) (*DeploymentID, error) {
}

func (c *MarathonClient) RestartApplication(id string, force bool) (*DeploymentID, error) {
log.Infof("Restarting Application '%s', force: %v", id, force)
log.Info("Restarting Application '%s', force: %v", id, force)

deploymentId := new(DeploymentID)

Expand All @@ -248,7 +248,7 @@ func (c *MarathonClient) RestartApplication(id string, force bool) (*DeploymentI
}

func (c *MarathonClient) PauseApplication(id string) (*DeploymentID, error) {
log.Infof("Suspending Application '%s'", id)
log.Info("Suspending Application '%s'", id)
deploymentId := new(DeploymentID)

uri := fmt.Sprintf("%s?scale=true&force=true", c.marathonUrl(API_APPS, id, "tasks"))
Expand All @@ -260,7 +260,7 @@ func (c *MarathonClient) PauseApplication(id string) (*DeploymentID, error) {
}

func (c *MarathonClient) ScaleApplication(id string, instances int) (*DeploymentID, error) {
log.Infof("Scale Application '%s' to %v instances", id, instances)
log.Info("Scale Application '%s' to %v instances", id, instances)

update := new(Application)
update.ID = id
Expand Down
4 changes: 2 additions & 2 deletions pkg/httpclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (h *HttpClient) CreateHttpRequest(method, urlStr string, body io.Reader) (*

func (h *HttpClient) invoke(r *Request) *Response {

log.Debugf("%s - %s, Body:\n%s", r.method.String(), r.url, r.data)
log.Debug("%s - %s, Body:\n%s", r.method.String(), r.url, r.data)

request, err := h.CreateHttpRequest(r.method.String(), r.url, strings.NewReader(r.data))

Expand All @@ -172,7 +172,7 @@ func (h *HttpClient) invoke(r *Request) *Response {
content = string(rc)
}

log.Debugf("Status: %v, RAW: %s", status, content)
log.Debug("Status: %v, RAW: %s", status, content)

if status >= 200 && status < 300 {
if r.result != nil {
Expand Down

0 comments on commit 2b5b28b

Please sign in to comment.