~ubuntu-branches/ubuntu/saucy/juju-core/saucy

« back to all changes in this revision

Viewing changes to src/launchpad.net/juju-core/agent/tools/tools.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 16:02:16 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130820160216-5yu1llasa2e2youn
Tags: 1.13.1-0ubuntu1
* New upstream release.
  - Build and install juju metadata plugin.
  - d/NEWS: Add some guidance on upgrading environments from 1.11.x
    to 1.13.x.
* d/NEWS: Add details about lack of upgrade path from juju < 1.11
  and how to interact with older juju environments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2013 Canonical Ltd.
 
2
// Licensed under the AGPLv3, see LICENCE file for details.
 
3
 
 
4
package tools
 
5
 
 
6
import (
 
7
        "io"
 
8
 
 
9
        "launchpad.net/loggo"
 
10
 
 
11
        "launchpad.net/juju-core/version"
 
12
)
 
13
 
 
14
var logger = loggo.GetLogger("juju.agent.tools")
 
15
 
 
16
type Tools struct {
 
17
        Version version.Binary
 
18
        URL     string
 
19
}
 
20
 
 
21
// ToolsManager keeps track of a pool of tools
 
22
type ToolsManager interface {
 
23
 
 
24
        // ReadTools looks in the current storage to see what tools are
 
25
        // available that match the given Binary version.
 
26
        ReadTools(version version.Binary) (*Tools, error)
 
27
 
 
28
        // UnpackTools reads the compressed tarball from the io.Reader and
 
29
        // extracts the tools to be used. tools is used to indicate what exact
 
30
        // version are in the contents of the tarball
 
31
        UnpackTools(tools *Tools, r io.Reader) error
 
32
}