~fgimenez/snappy/integration-tests-verbosity-flag

« back to all changes in this revision

Viewing changes to snappy/systemimage_native.go

  • Committer: Snappy Tarmac
  • Author(s): John R. Lenton
  • Date: 2015-10-05 19:12:55 UTC
  • mfrom: (724.1.9 enter-stage-left)
  • Revision ID: snappy_tarmac-20151005191255-7lfisxuosvr9g6vy
Use staging CPI if SNAPPY_USE_STAGING_CPI environment variable is set; use staging system-image if SNAPPY_USE_STAGING_SYSIMG environment variable is set. by chipaca approved by mvo,chipaca

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        "launchpad.net/snappy/progress"
39
39
)
40
40
 
41
 
var systemImageServer = "https://system-image.ubuntu.com/"
 
41
var systemImageServer string
42
42
 
43
43
type updateStatus struct {
44
44
        targetVersion        string
68
68
        Images []channelImage     `json:"images"`
69
69
}
70
70
 
 
71
func sysImgURL() string {
 
72
        if os.Getenv("SNAPPY_USE_STAGING_SYSIMG") != "" {
 
73
                return "https://system-image.staging.ubuntu.com/"
 
74
        }
 
75
        return "https://system-image.ubuntu.com/"
 
76
}
 
77
 
 
78
func init() {
 
79
        systemImageServer = sysImgURL()
 
80
}
 
81
 
71
82
func systemImageClientCheckForUpdates(configFile string) (us updateStatus, err error) {
72
83
        cfg := goconfigparser.New()
73
84
        if err := cfg.ReadFile(configFile); err != nil {