LEFT | RIGHT |
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 Loading... |
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 Loading... |
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) |
LEFT | RIGHT |