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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/environs/tools/validation.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:
6
6
import (
7
7
        "fmt"
8
8
 
 
9
        "github.com/juju/version"
 
10
 
9
11
        "github.com/juju/juju/environs/simplestreams"
10
 
        "github.com/juju/juju/version"
 
12
        jujuversion "github.com/juju/juju/version"
11
13
)
12
14
 
13
15
// ToolsMetadataLookupParams is used to query metadata for matching tools.
28
30
                return nil, nil, fmt.Errorf("required parameter sources not specified")
29
31
        }
30
32
        if params.Version == "" && params.Major == 0 {
31
 
                params.Version = version.Current.String()
 
33
                params.Version = jujuversion.Current.String()
32
34
        }
33
35
        var toolsConstraint *ToolsConstraint
34
36
        if params.Version == "" {