~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/utils/arch/arch.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright 2014 Canonical Ltd.
 
1
// Copyright 2014-2016 Canonical Ltd.
2
2
// Licensed under the AGPLv3, see LICENCE file for details.
3
3
 
4
4
package arch
16
16
        ARM     = "armhf"
17
17
        ARM64   = "arm64"
18
18
        PPC64EL = "ppc64el"
 
19
        S390X   = "s390x"
19
20
 
20
21
        // Older versions of Juju used "ppc64" instead of ppc64el
21
22
        LEGACY_PPC64 = "ppc64"
28
29
        ARM,
29
30
        ARM64,
30
31
        PPC64EL,
 
32
        S390X,
31
33
}
32
34
 
33
35
// Info records the information regarding each architecture recognised by Juju.
37
39
        ARM:     {32},
38
40
        ARM64:   {64},
39
41
        PPC64EL: {64},
 
42
        S390X:   {64},
40
43
}
41
44
 
42
45
// ArchInfo is a struct containing information about a supported architecture.
56
59
        {regexp.MustCompile("(arm$)|(armv.*)"), ARM},
57
60
        {regexp.MustCompile("aarch64"), ARM64},
58
61
        {regexp.MustCompile("ppc64|ppc64el|ppc64le"), PPC64EL},
 
62
        {regexp.MustCompile("s390x"), S390X},
59
63
}
60
64
 
61
65
// Override for testing.