[ARVADOS] updated: 1.3.0-184-g61381f4be

Git user git at public.curoverse.com
Fri Jan 18 16:55:22 EST 2019


Summary of changes:
 lib/dispatchcloud/container/queue.go |  4 ++--
 lib/dispatchcloud/dispatcher.go      |  4 ++--
 lib/dispatchcloud/dispatcher_test.go |  8 ++++----
 lib/dispatchcloud/worker/pool.go     | 16 ++++++++--------
 4 files changed, 16 insertions(+), 16 deletions(-)

       via  61381f4be1dbba9c56df342093ee614f0d5a28df (commit)
      from  8052381fb4e7aceb52497e8378b596178cf5af7c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 61381f4be1dbba9c56df342093ee614f0d5a28df
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Fri Jan 18 16:54:59 2019 -0500

    14325: Use snake_case keys in management API responses.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/lib/dispatchcloud/container/queue.go b/lib/dispatchcloud/container/queue.go
index 7a41d47c3..464e31186 100644
--- a/lib/dispatchcloud/container/queue.go
+++ b/lib/dispatchcloud/container/queue.go
@@ -27,8 +27,8 @@ type APIClient interface {
 type QueueEnt struct {
 	// The container to run. Only the UUID, State, Priority, and
 	// RuntimeConstraints fields are populated.
-	Container    arvados.Container
-	InstanceType arvados.InstanceType
+	Container    arvados.Container    `json:"container"`
+	InstanceType arvados.InstanceType `json:"instance_type"`
 }
 
 // String implements fmt.Stringer by returning the queued container's
diff --git a/lib/dispatchcloud/dispatcher.go b/lib/dispatchcloud/dispatcher.go
index ae954a2db..e4a881aeb 100644
--- a/lib/dispatchcloud/dispatcher.go
+++ b/lib/dispatchcloud/dispatcher.go
@@ -176,7 +176,7 @@ func (disp *dispatcher) run() {
 // Management API: all active and queued containers.
 func (disp *dispatcher) apiContainers(w http.ResponseWriter, r *http.Request) {
 	var resp struct {
-		Items []container.QueueEnt
+		Items []container.QueueEnt `json:"items"`
 	}
 	qEntries, _ := disp.queue.Entries()
 	for _, ent := range qEntries {
@@ -188,7 +188,7 @@ func (disp *dispatcher) apiContainers(w http.ResponseWriter, r *http.Request) {
 // Management API: all active instances (cloud VMs).
 func (disp *dispatcher) apiInstances(w http.ResponseWriter, r *http.Request) {
 	var resp struct {
-		Items []worker.InstanceView
+		Items []worker.InstanceView `json:"items"`
 	}
 	resp.Items = disp.pool.Instances()
 	json.NewEncoder(w).Encode(resp)
diff --git a/lib/dispatchcloud/dispatcher_test.go b/lib/dispatchcloud/dispatcher_test.go
index 1f9457743..6532158c8 100644
--- a/lib/dispatchcloud/dispatcher_test.go
+++ b/lib/dispatchcloud/dispatcher_test.go
@@ -228,11 +228,11 @@ func (s *DispatcherSuite) TestInstancesAPI(c *check.C) {
 
 	type instance struct {
 		Instance             string
-		WorkerState          string
+		WorkerState          string `json:"worker_state"`
 		Price                float64
-		LastContainerUUID    string
-		ArvadosInstanceType  string
-		ProviderInstanceType string
+		LastContainerUUID    string `json:"last_container_uuid"`
+		ArvadosInstanceType  string `json:"arvados_instance_type"`
+		ProviderInstanceType string `json:"provider_instance_type"`
 	}
 	type instancesResponse struct {
 		Items []instance
diff --git a/lib/dispatchcloud/worker/pool.go b/lib/dispatchcloud/worker/pool.go
index f5dc01e27..f9566241d 100644
--- a/lib/dispatchcloud/worker/pool.go
+++ b/lib/dispatchcloud/worker/pool.go
@@ -25,14 +25,14 @@ const (
 
 // An InstanceView shows a worker's current state and recent activity.
 type InstanceView struct {
-	Instance             cloud.InstanceID
-	Price                float64
-	ArvadosInstanceType  string
-	ProviderInstanceType string
-	LastContainerUUID    string
-	LastBusy             time.Time
-	WorkerState          string
-	IdleBehavior         IdleBehavior
+	Instance             cloud.InstanceID `json:"instance"`
+	Price                float64          `json:"price"`
+	ArvadosInstanceType  string           `json:"arvados_instance_type"`
+	ProviderInstanceType string           `json:"provider_instance_type"`
+	LastContainerUUID    string           `json:"last_container_uuid"`
+	LastBusy             time.Time        `json:"last_busy"`
+	WorkerState          string           `json:"worker_state"`
+	IdleBehavior         IdleBehavior     `json:"idle_behavior"`
 }
 
 // An Executor executes shell commands on a remote host.

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list