File: global_constants.go

package info (click to toggle)
golang-github-juju-utils 0.0~git20171220.f38c0b0-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,748 kB
  • sloc: makefile: 20
file content (48 lines) | stat: -rw-r--r-- 1,145 bytes parent folder | download | duplicates (2)
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
// Copyright 2015 Canonical Ltd.
// Copyright 2015 Cloudbase Solutions SRL
// Licensed under the LGPLv3, see LICENCE file for details.

package config

const (
	// PackageManagerLoopFunction is a bash function that executes its arguments
	// in a loop with a delay until either the command either returns
	// with an exit code other than 100.
	PackageManagerLoopFunction = `
function package_manager_loop {
    local rc=
    while true; do
        if ($*); then
                return 0
        else
                rc=$?
        fi
        if [ $rc -eq 100 ]; then
                sleep 10s
                continue
        fi
        return $rc
    done
}
`
)

var (
	seriesRequiringCloudTools = map[string]bool{
		// TODO (aznashwan, all): add any other OS's
		// which require cloud tools' series here.
		"precise": true,
	}

	// DefaultPackages is a list of the default packages Juju'd like to see
	// installed on all it's machines.
	DefaultPackages = []string{
		// TODO (everyone): populate this list with all required packages.
		// for example:
		"curl",
	}

	backportsBySeries = map[string][]string{
		"trusty": []string{"lxd"},
	}
)