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

Delta Between Two Patch Sets: provider/manual/environ.go

Issue 97400043: Change StopInstances to take []instance.Id
Left Patch Set: Created 9 years, 10 months ago
Right Patch Set: Change StopInstances to take []instance.Id Created 9 years, 10 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 | « provider/maas/util_test.go ('k') | provider/openstack/local_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 // Copyright 2013 Canonical Ltd. 1 // Copyright 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package manual 4 package manual
5 5
6 import ( 6 import (
7 "bytes" 7 "bytes"
8 "errors" 8 "errors"
9 "fmt" 9 "fmt"
10 "net" 10 "net"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 var _ envtools.SupportsCustomSources = (*manualEnviron)(nil) 64 var _ envtools.SupportsCustomSources = (*manualEnviron)(nil)
65 65
66 var errNoStartInstance = errors.New("manual provider cannot start instances") 66 var errNoStartInstance = errors.New("manual provider cannot start instances")
67 var errNoStopInstance = errors.New("manual provider cannot stop instances") 67 var errNoStopInstance = errors.New("manual provider cannot stop instances")
68 68
69 func (*manualEnviron) StartInstance(args environs.StartInstanceParams) (instance .Instance, *instance.HardwareCharacteristics, []network.Info, error) { 69 func (*manualEnviron) StartInstance(args environs.StartInstanceParams) (instance .Instance, *instance.HardwareCharacteristics, []network.Info, error) {
70 return nil, nil, nil, errNoStartInstance 70 return nil, nil, nil, errNoStartInstance
71 } 71 }
72 72
73 func (*manualEnviron) StopInstances([]instance.Id) error { 73 func (*manualEnviron) StopInstances(...instance.Id) error {
74 return errNoStopInstance 74 return errNoStopInstance
75 } 75 }
76 76
77 func (e *manualEnviron) AllInstances() ([]instance.Instance, error) { 77 func (e *manualEnviron) AllInstances() ([]instance.Instance, error) {
78 return e.Instances([]instance.Id{manual.BootstrapInstanceId}) 78 return e.Instances([]instance.Id{manual.BootstrapInstanceId})
79 } 79 }
80 80
81 func (e *manualEnviron) envConfig() (cfg *environConfig) { 81 func (e *manualEnviron) envConfig() (cfg *environConfig) {
82 e.cfgmutex.Lock() 82 e.cfgmutex.Lock()
83 cfg = e.cfg 83 cfg = e.cfg
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 } 342 }
343 } 343 }
344 return hostnames 344 return hostnames
345 } 345 }
346 346
347 func (e *manualEnviron) StorageAuthKey() string { 347 func (e *manualEnviron) StorageAuthKey() string {
348 return e.envConfig().storageAuthKey() 348 return e.envConfig().storageAuthKey()
349 } 349 }
350 350
351 var _ localstorage.LocalTLSStorageConfig = (*manualEnviron)(nil) 351 var _ localstorage.LocalTLSStorageConfig = (*manualEnviron)(nil)
LEFTRIGHT

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