Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(418)

Delta Between Two Patch Sets: environs/ec2/export_test.go

Issue 6696043: environs/jujutest: use AttemptStrategy
Left Patch Set: Created 12 years, 6 months ago
Right Patch Set: environs/jujutest: use AttemptStrategy Created 12 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « environs/ec2/ec2.go ('k') | environs/ec2/live_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 package ec2 1 package ec2
2 2
3 import ( 3 import (
4 "launchpad.net/goamz/ec2" 4 "launchpad.net/goamz/ec2"
5 "launchpad.net/goamz/s3" 5 "launchpad.net/goamz/s3"
6 "launchpad.net/juju-core/environs" 6 "launchpad.net/juju-core/environs"
7 "launchpad.net/juju-core/trivial" 7 "launchpad.net/juju-core/trivial"
8 "net/http" 8 "net/http"
9 ) 9 )
10 10
11 type BootstrapState struct { 11 type BootstrapState struct {
12 StateInstances []string 12 StateInstances []string
13 } 13 }
14 14
15 func LoadState(e environs.Environ) (*BootstrapState, error) { 15 func LoadState(e environs.Environ) (*BootstrapState, error) {
16 s, err := e.(*environ).loadState() 16 s, err := e.(*environ).loadState()
17 if err != nil { 17 if err != nil {
18 return nil, err 18 return nil, err
19 } 19 }
20 return &BootstrapState{s.StateInstances}, nil 20 return &BootstrapState{s.StateInstances}, nil
21 } 21 }
22 22
23 func GroupName(e environs.Environ) string { 23 func JujuGroupName(e environs.Environ) string {
24 » return e.(*environ).groupName() 24 » return e.(*environ).jujuGroupName()
25 } 25 }
26 26
27 func MachineGroupName(e environs.Environ, machineId int) string { 27 func MachineGroupName(e environs.Environ, machineId int) string {
28 return e.(*environ).machineGroupName(machineId) 28 return e.(*environ).machineGroupName(machineId)
29 } 29 }
30 30
31 func EnvironEC2(e environs.Environ) *ec2.EC2 { 31 func EnvironEC2(e environs.Environ) *ec2.EC2 {
32 return e.(*environ).ec2() 32 return e.(*environ).ec2()
33 } 33 }
34 34
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 // FabricateInstance creates a new fictitious instance 107 // FabricateInstance creates a new fictitious instance
108 // given an existing instance and a new id. 108 // given an existing instance and a new id.
109 func FabricateInstance(inst environs.Instance, newId string) environs.Instance { 109 func FabricateInstance(inst environs.Instance, newId string) environs.Instance {
110 oldi := inst.(*instance) 110 oldi := inst.(*instance)
111 newi := &instance{oldi.e, &ec2.Instance{}} 111 newi := &instance{oldi.e, &ec2.Instance{}}
112 *newi.Instance = *oldi.Instance 112 *newi.Instance = *oldi.Instance
113 newi.InstanceId = newId 113 newi.InstanceId = newId
114 return newi 114 return newi
115 } 115 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b