OLD | NEW |
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 params | 4 package params |
5 | 5 |
6 import ( | 6 import ( |
7 "bytes" | 7 "bytes" |
8 "encoding/json" | 8 "encoding/json" |
9 "fmt" | 9 "fmt" |
10 "launchpad.net/juju-core/charm" | 10 "launchpad.net/juju-core/charm" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 type ServiceDeploy struct { | 59 type ServiceDeploy struct { |
60 ServiceName string | 60 ServiceName string |
61 CharmUrl string | 61 CharmUrl string |
62 NumUnits int | 62 NumUnits int |
63 Config map[string]string | 63 Config map[string]string |
64 ConfigYAML string // Takes precedence over config if both are present
. | 64 ConfigYAML string // Takes precedence over config if both are present
. |
65 Constraints constraints.Value | 65 Constraints constraints.Value |
66 ToMachineSpec string | 66 ToMachineSpec string |
67 } | 67 } |
68 | 68 |
| 69 // ServiceUpdate holds the parameters for making the ServiceUpdate call. |
| 70 type ServiceUpdate struct { |
| 71 ServiceName string |
| 72 CharmUrl string |
| 73 ForceCharmUrl bool |
| 74 MinUnits *int |
| 75 SettingsStrings map[string]string |
| 76 SettingsYAML string // Takes precedence over SettingsStrings if both
are present. |
| 77 Constraints *constraints.Value |
| 78 } |
| 79 |
69 // ServiceSetCharm sets the charm for a given service. | 80 // ServiceSetCharm sets the charm for a given service. |
70 type ServiceSetCharm struct { | 81 type ServiceSetCharm struct { |
71 ServiceName string | 82 ServiceName string |
72 CharmUrl string | 83 CharmUrl string |
73 Force bool | 84 Force bool |
74 } | 85 } |
75 | 86 |
76 // ServiceExpose holds the parameters for making the ServiceExpose call. | 87 // ServiceExpose holds the parameters for making the ServiceExpose call. |
77 type ServiceExpose struct { | 88 type ServiceExpose struct { |
78 ServiceName string | 89 ServiceName string |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 Kind: "machine", | 331 Kind: "machine", |
321 Id: i.Id, | 332 Id: i.Id, |
322 } | 333 } |
323 } | 334 } |
324 | 335 |
325 type ServiceInfo struct { | 336 type ServiceInfo struct { |
326 Name string `bson:"_id"` | 337 Name string `bson:"_id"` |
327 Exposed bool | 338 Exposed bool |
328 CharmURL string | 339 CharmURL string |
329 Life Life | 340 Life Life |
| 341 MinUnits int |
330 Constraints constraints.Value | 342 Constraints constraints.Value |
331 Config map[string]interface{} | 343 Config map[string]interface{} |
332 } | 344 } |
333 | 345 |
334 func (i *ServiceInfo) EntityId() EntityId { | 346 func (i *ServiceInfo) EntityId() EntityId { |
335 return EntityId{ | 347 return EntityId{ |
336 Kind: "service", | 348 Kind: "service", |
337 Id: i.Name, | 349 Id: i.Name, |
338 } | 350 } |
339 } | 351 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 Tag string | 391 Tag string |
380 Annotations map[string]string | 392 Annotations map[string]string |
381 } | 393 } |
382 | 394 |
383 func (i *AnnotationInfo) EntityId() EntityId { | 395 func (i *AnnotationInfo) EntityId() EntityId { |
384 return EntityId{ | 396 return EntityId{ |
385 Kind: "annotation", | 397 Kind: "annotation", |
386 Id: i.Tag, | 398 Id: i.Tag, |
387 } | 399 } |
388 } | 400 } |
OLD | NEW |