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

Unified Diff: juju/testing/conn.go

Issue 7396055: environs: change StartInstance
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « environs/openstack/provider.go ('k') | state/state.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: juju/testing/conn.go
=== modified file 'juju/testing/conn.go'
--- juju/testing/conn.go 2013-02-11 05:51:12 +0000
+++ juju/testing/conn.go 2013-02-22 18:01:45 +0000
@@ -40,28 +40,12 @@
oldHome string
}
-// InvalidStateInfo holds information about no state - it will always
-// give an error when connected to. The machine id gives the machine id
-// of the machine to be started.
-func InvalidStateInfo(machineId string) *state.Info {
- return &state.Info{
- Addrs: []string{"0.1.2.3:1234"},
- EntityName: state.MachineEntityName(machineId),
- Password: "unimportant",
- CACert: []byte(testing.CACert),
- }
-}
-
-// InvalidAPIInfo holds information about no state - it will always
-// give an error when connected to. The machine id gives the machine id
-// of the machine to be started.
-func InvalidAPIInfo(machineId string) *api.Info {
- return &api.Info{
- Addrs: []string{"0.1.2.3:1234"},
- EntityName: state.MachineEntityName(machineId),
- Password: "unimportant",
- CACert: []byte(testing.CACert),
- }
+func StartInstance(conn *juju.Conn, m *state.Machine) (environs.Instance, error) {
+ return conn.Environ.StartInstance(environs.StartInstanceParams{
+ Series: m.Series(),
+ MachineId: m.Id(),
+ AgentPassword: "whatever",
+ })
}
const AdminSecret = "dummy-secret"
« no previous file with comments | « environs/openstack/provider.go ('k') | state/state.go » ('j') | no next file with comments »

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