This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git


The following commit(s) were added to refs/heads/master by this push:
     new b5dd3a6  network: Fix glint error
b5dd3a6 is described below

commit b5dd3a6ab0fb3b44bbf997f03b8340c98877ace8
Author: Rohit Yadav <[email protected]>
AuthorDate: Sun Jun 24 00:42:24 2018 +0530

    network: Fix glint error
    
    Rename to jobID
---
 cmd/network.go | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/cmd/network.go b/cmd/network.go
index 2def7f6..f31eda7 100644
--- a/cmd/network.go
+++ b/cmd/network.go
@@ -117,14 +117,14 @@ func getResponseData(data map[string]interface{}) 
map[string]interface{} {
        return nil
 }
 
-func pollAsyncJob(r *Request, jobId string) (map[string]interface{}, error) {
+func pollAsyncJob(r *Request, jobID string) (map[string]interface{}, error) {
        for timeout := float64(r.Config.Core.Timeout); timeout > 0.0; {
                startTime := time.Now()
                s := spinner.New(cursor, 200*time.Millisecond)
                s.Color("blue", "bold")
                s.Suffix = " polling for async API job result"
                s.Start()
-               queryResult, queryError := NewAPIRequest(r, 
"queryAsyncJobResult", []string{"jobid=" + jobId}, false)
+               queryResult, queryError := NewAPIRequest(r, 
"queryAsyncJobResult", []string{"jobid=" + jobID}, false)
                diff := time.Duration(1*time.Second).Nanoseconds() - 
time.Now().Sub(startTime).Nanoseconds()
                if diff > 0 {
                        time.Sleep(time.Duration(diff) * time.Nanosecond)
@@ -143,7 +143,7 @@ func pollAsyncJob(r *Request, jobId string) 
(map[string]interface{}, error) {
 
                }
                if jobStatus == 2 {
-                       return queryResult, errors.New("async API failed for 
job " + jobId)
+                       return queryResult, errors.New("async API failed for 
job " + jobID)
                }
        }
        return nil, errors.New("async API job query timed out")
@@ -209,8 +209,8 @@ func NewAPIRequest(r *Request, api string, args []string, 
isAsync bool) (map[str
 
        if isAsync && r.Config.Core.AsyncBlock {
                if jobResponse := getResponseData(data); jobResponse != nil && 
jobResponse["jobid"] != nil {
-                       jobId := jobResponse["jobid"].(string)
-                       return pollAsyncJob(r, jobId)
+                       jobID := jobResponse["jobid"].(string)
+                       return pollAsyncJob(r, jobID)
                }
        }
 

Reply via email to