From 8a7cdf9684cf260c6b79f9e2bfb18b190d208ad8 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert <bgilbert@redhat.com> Date: Sat, 3 Nov 2018 08:09:15 -0400 Subject: [PATCH] cmd/kola: drop mkimage subcommand It'll now be handled automatically. --- cmd/kola/qemu-image.go | 57 ------------------------------------------ 1 file changed, 57 deletions(-) delete mode 100644 cmd/kola/qemu-image.go diff --git a/cmd/kola/qemu-image.go b/cmd/kola/qemu-image.go deleted file mode 100644 index 4c31de660..000000000 --- a/cmd/kola/qemu-image.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2017 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "fmt" - "os" - - "github.com/spf13/cobra" - - "github.com/coreos/mantle/platform/machine/qemu" -) - -var cmdMkImage = &cobra.Command{ - Use: "mkimage <input> <output>", - Run: runMkImage, - PreRun: preRun, - Short: "Specialize image for running kola qemu tests (requires root)", - Long: ` -Copy a Container Linux image.bin and add optional (but helpful) bits for -running kola tests. - -This must run as root! -`} - -func init() { - root.AddCommand(cmdMkImage) -} - -func runMkImage(cmd *cobra.Command, args []string) { - if len(args) < 2 { - fmt.Fprintf(os.Stderr, "Input and output image required\n") - os.Exit(2) - } - if len(args) > 2 { - fmt.Fprintf(os.Stderr, "Too many arguments\n") - os.Exit(2) - } - - err := qemu.MakeDiskTemplate(args[0], args[1]) - if err != nil { - fmt.Fprintf(os.Stderr, "%s\n", err) - os.Exit(1) - } -}