Update LXD images server path
@@ -21,7 +21,7 @@ var (
groups = []string{"group:stable", "group:edge", "group:dev"}
)
-func NewManager(ctx gocontext.Context, selector *APISelector, imagesBaseURL *url.URL) (*Manager, error) {
+func NewManager(ctx gocontext.Context, selector *APISelector, imagesServerURL *url.URL) (*Manager, error) {
logger := context.LoggerFromContext(ctx).WithField("self", "image_manager")
client, err := lxd.ConnectLXDUnix("", nil)
@@ -33,7 +33,7 @@ func NewManager(ctx gocontext.Context, selector *APISelector, imagesBaseURL *url
client: client,
selector: selector,
logger: logger,
- imagesBaseURL: imagesBaseURL,
+ imagesServerURL: imagesServerURL,
}, nil
}
@@ -41,7 +41,7 @@ type Manager struct {
client lxd.ContainerServer
selector *APISelector
logger *logrus.Entry
- imagesBaseURL *url.URL
+ imagesServerURL *url.URL
}
func (m *Manager) Load(imageName string) error {
@@ -202,7 +202,7 @@ func (m *Manager) importImage(imageName, imgURL string) error {
}
func (m *Manager) imageUrl(name string) string {
- u := *m.imagesBaseURL
- u.Path = fmt.Sprintf("/images/%s", name)
+ u := *m.imagesServerURL
+ u.Path = fmt.Sprintf("/images/travis/%s", name)
return u.String()
}
