Skip to content

Commit

Permalink
Serve the virt-v2v output
Browse files Browse the repository at this point in the history
Until now we served the virt-v2v output from the conversion pod only
when the source is OVA, now it will always serve it as we use it also
for vSphere.

Signed-off-by: Liran Rotenberg <[email protected]>
  • Loading branch information
liranr23 authored and ahadas committed Jun 18, 2024
1 parent d107ae1 commit 90f1232
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions virt-v2v/cold/entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,21 @@ func main() {
os.Exit(1)
}

if source == OVA {
var err error
xmlFilePath, err = getXMLFile(DIR, "xml")
if err != nil {
fmt.Println("Error gettin XML file:", err)
os.Exit(1)
}
var err error
xmlFilePath, err = getXMLFile(DIR, "xml")
if err != nil {
fmt.Println("Error getting XML file:", err)
os.Exit(1)
}

http.HandleFunc("/ovf", ovfHandler)
http.HandleFunc("/shutdown", shutdownHandler)
server = &http.Server{Addr: ":8080"}
http.HandleFunc("/ovf", ovfHandler)
http.HandleFunc("/shutdown", shutdownHandler)
server = &http.Server{Addr: ":8080"}

fmt.Println("Starting server on :8080")
if err := server.ListenAndServe(); err != http.ErrServerClosed {
fmt.Printf("Error starting server: %v\n", err)
os.Exit(1)
}
fmt.Println("Starting server on :8080")
if err := server.ListenAndServe(); err != http.ErrServerClosed {
fmt.Printf("Error starting server: %v\n", err)
os.Exit(1)
}
}

Expand Down

0 comments on commit 90f1232

Please sign in to comment.