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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/azure/instance.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:
15
15
        "github.com/juju/errors"
16
16
        "github.com/juju/juju/instance"
17
17
        jujunetwork "github.com/juju/juju/network"
 
18
        "github.com/juju/juju/status"
18
19
        "github.com/juju/names"
19
20
)
20
21
 
34
35
}
35
36
 
36
37
// Status is specified in the Instance interface.
37
 
func (inst *azureInstance) Status() string {
 
38
func (inst *azureInstance) Status() instance.InstanceStatus {
38
39
        // NOTE(axw) ideally we would use the power state, but that is only
39
40
        // available when using the "instance view". Instance view is only
40
41
        // delivered when explicitly requested, and you can only request it
41
42
        // when querying a single VM. This means the results of AllInstances
42
43
        // or Instances would have the instance view missing.
43
 
        return to.String(inst.Properties.ProvisioningState)
 
44
        return instance.InstanceStatus{
 
45
                Status:  status.StatusEmpty,
 
46
                Message: to.String(inst.Properties.ProvisioningState),
 
47
        }
 
48
 
44
49
}
45
50
 
46
51
// setInstanceAddresses queries Azure for the NICs and public IPs associated