mwhudson@DEVAC01:~/gopath/src/github.com/juju/juju$ git diff
diff --git a/container/image.go b/container/image.go
index 92a3d5f..1830028 100644
--- a/container/image.go
+++ b/container/image.go
@@ -5,10 +5,7 @@ package container
import (
"fmt"
- "os"
- "os/exec"
"path"
- "strings"
"github.com/juju/errors"
@@ -67,25 +64,5 @@ func (ug *imageURLGetter) CACert() []byte {
// ImageDownloadURL determines the public URL which can be used to obtain an
// image blob with the specified parameters.
func ImageDownloadURL(kind instance.ContainerType, series, arch, cloudimgBaseUrl string) (string, error) {
- // TODO - we currently only need to support LXC images - kind is ignored.
- if kind != instance.LXC {
- return "", errors.Errorf("unsupported container type: %v", kind)
- }
-
- // Use the ubuntu-cloudimg-query command to get the url from which to fetch the image.
- // This will be somewhere on http://cloud-images.ubuntu.com.
- cmd := exec.Command("ubuntu-cloudimg-query", series, "released", arch, "--format", "%{url}")
- if cloudimgBaseUrl != "" {
- // If the base url isn't specified, we don't need to copy the current
- // environment, because this is the default behaviour of the exec package.
- cmd.Env = append(os.Environ(), fmt.Sprintf("UBUNTU_CLOUDIMG_QUERY_BASEURL=%s", cloudimgBaseUrl))
- }
- urlBytes, err := cmd.CombinedOutput()
- if err != nil {
- stderr := string(urlBytes)
- return "", errors.Annotatef(err, "cannot determine LXC image URL: %v", stderr)
- }
- logger.Debugf("%s image for %s (%s) is %s", kind, series, arch, urlBytes)
- imageURL := strings.Replace(string(urlBytes), ".tar.gz", "-root.tar.gz", -1)
- return imageURL, nil
+ return "http://localhost/xenial-lxc.tar.gz", nil
}