Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Ova = cobra.Command{ Use: "ova", Short: "Upload an image to a vSphere server", Args: cobra.MinimumNArgs(0), Run: func(cmd *cobra.Command, args []string) { var err error image, _ := cmd.Flags().GetString("image") network, _ := cmd.Flags().GetString("network") name, _ := cmd.Flags().GetString("name") if name == "" { name = utils.GetBaseName(image) } ext := path.Ext(image) if ext != ".ova" { image, err = Create(name, image, make(map[string]string)) if err != nil { log.Fatalf("Failed to create OVA %s", err) } } if err := Import(name, image, network); err != nil { log.Fatalf("Failed to upload %s: %v", name, err) } }, } )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.