1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
package config
// LocalRemote is the default local remote (over the LXD unix socket).
var LocalRemote = Remote{
Addr: "unix://",
Static: true,
Public: false,
}
// ImagesRemote is the main image server (over simplestreams).
var ImagesRemote = Remote{
Addr: "https://images.lxd.canonical.com",
Public: true,
Protocol: "simplestreams",
}
// UbuntuRemote is the Ubuntu image server (over simplestreams).
var UbuntuRemote = Remote{
Addr: "https://cloud-images.ubuntu.com/releases",
Static: true,
Public: true,
Protocol: "simplestreams",
}
// UbuntuDailyRemote is the Ubuntu daily image server (over simplestreams).
var UbuntuDailyRemote = Remote{
Addr: "https://cloud-images.ubuntu.com/daily",
Static: true,
Public: true,
Protocol: "simplestreams",
}
// UbuntuMinimalRemote is the Ubuntu minimal image server (over simplestreams).
var UbuntuMinimalRemote = Remote{
Addr: "https://cloud-images.ubuntu.com/minimal/releases/",
Static: true,
Public: true,
Protocol: "simplestreams",
}
// UbuntuMinimalDailyRemote is the Ubuntu daily minimal image server (over simplestreams).
var UbuntuMinimalDailyRemote = Remote{
Addr: "https://cloud-images.ubuntu.com/minimal/daily/",
Static: true,
Public: true,
Protocol: "simplestreams",
}
// StaticRemotes is the list of remotes which can't be removed.
var StaticRemotes = map[string]Remote{
"local": LocalRemote,
"images": ImagesRemote,
"ubuntu": UbuntuRemote,
"ubuntu-daily": UbuntuDailyRemote,
"ubuntu-minimal": UbuntuMinimalRemote,
"ubuntu-minimal-daily": UbuntuMinimalDailyRemote,
}
// DefaultRemotes is the list of default remotes.
var DefaultRemotes = map[string]Remote{
"local": LocalRemote,
"ubuntu": UbuntuRemote,
"ubuntu-daily": UbuntuDailyRemote,
"ubuntu-minimal": UbuntuMinimalRemote,
"ubuntu-minimal-daily": UbuntuMinimalDailyRemote,
}
// DefaultConfig returns the default configuration.
func DefaultConfig() *Config {
// Duplicate remotes from DefaultRemotes.
defaultRoutes := make(map[string]Remote, len(DefaultRemotes))
for k, v := range DefaultRemotes {
defaultRoutes[k] = v
}
return &Config{
Remotes: defaultRoutes,
Aliases: make(map[string]string),
DefaultRemote: "local",
}
}
|