From 5b96d96a7a660c1f066b14f870b9c905985f6da7 Mon Sep 17 00:00:00 2001 From: Marco Mariani Date: Wed, 25 Oct 2017 13:51:08 +0200 Subject: [PATCH] output image_id, server_id in stdout to ease automation Signed-off-by: Marco Mariani --- src/cmd/linuxkit/push_openstack.go | 1 + src/cmd/linuxkit/run_openstack.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmd/linuxkit/push_openstack.go b/src/cmd/linuxkit/push_openstack.go index 65d941816..671604ae6 100644 --- a/src/cmd/linuxkit/push_openstack.go +++ b/src/cmd/linuxkit/push_openstack.go @@ -121,5 +121,6 @@ func createOpenStackImage(filePath string, imageName string, provider *gopherclo log.Fatalf("Error uploading image, status is %s", validImage.Status) } else { log.Infof("Image uploaded successfully!") + fmt.Println(image.ID) } } diff --git a/src/cmd/linuxkit/run_openstack.go b/src/cmd/linuxkit/run_openstack.go index 096b77c6d..7fe63209d 100644 --- a/src/cmd/linuxkit/run_openstack.go +++ b/src/cmd/linuxkit/run_openstack.go @@ -108,6 +108,7 @@ func runOpenStack(args []string) { } servers.WaitForStatus(client, server.ID, "ACTIVE", 600) - fmt.Printf("Server created, UUID is %s", server.ID) + log.Info("Server created, UUID is %s", server.ID) + fmt.Println(server.ID) }