OLD | NEW |
1 package params | 1 package params |
2 | 2 |
3 import ( | 3 import ( |
4 "bytes" | 4 "bytes" |
5 "encoding/json" | 5 "encoding/json" |
6 "fmt" | 6 "fmt" |
7 "launchpad.net/juju-core/charm" | 7 "launchpad.net/juju-core/charm" |
8 "launchpad.net/juju-core/constraints" | 8 "launchpad.net/juju-core/constraints" |
9 ) | 9 ) |
10 | 10 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 type EntityId struct { | 306 type EntityId struct { |
307 Kind string | 307 Kind string |
308 Id interface{} | 308 Id interface{} |
309 } | 309 } |
310 | 310 |
311 // MachineInfo holds the information about a Machine | 311 // MachineInfo holds the information about a Machine |
312 // that is watched by StateWatcher. | 312 // that is watched by StateWatcher. |
313 type MachineInfo struct { | 313 type MachineInfo struct { |
314 Id string `bson:"_id"` | 314 Id string `bson:"_id"` |
315 InstanceId string | 315 InstanceId string |
| 316 Status MachineStatus |
| 317 StatusInfo string |
316 } | 318 } |
317 | 319 |
318 func (i *MachineInfo) EntityId() EntityId { | 320 func (i *MachineInfo) EntityId() EntityId { |
319 return EntityId{ | 321 return EntityId{ |
320 Kind: "machine", | 322 Kind: "machine", |
321 Id: i.Id, | 323 Id: i.Id, |
322 } | 324 } |
323 } | 325 } |
324 | 326 |
325 type ServiceInfo struct { | 327 type ServiceInfo struct { |
(...skipping 12 matching lines...) Expand all Loading... |
338 type UnitInfo struct { | 340 type UnitInfo struct { |
339 Name string `bson:"_id"` | 341 Name string `bson:"_id"` |
340 Service string | 342 Service string |
341 Series string | 343 Series string |
342 CharmURL string | 344 CharmURL string |
343 PublicAddress string | 345 PublicAddress string |
344 PrivateAddress string | 346 PrivateAddress string |
345 MachineId string | 347 MachineId string |
346 Resolved ResolvedMode | 348 Resolved ResolvedMode |
347 Ports []Port | 349 Ports []Port |
| 350 Status UnitStatus |
| 351 StatusInfo string |
348 } | 352 } |
349 | 353 |
350 func (i *UnitInfo) EntityId() EntityId { | 354 func (i *UnitInfo) EntityId() EntityId { |
351 return EntityId{ | 355 return EntityId{ |
352 Kind: "unit", | 356 Kind: "unit", |
353 Id: i.Name, | 357 Id: i.Name, |
354 } | 358 } |
355 } | 359 } |
356 | 360 |
357 type Endpoint struct { | 361 type Endpoint struct { |
(...skipping 17 matching lines...) Expand all Loading... |
375 Tag string | 379 Tag string |
376 Annotations map[string]string | 380 Annotations map[string]string |
377 } | 381 } |
378 | 382 |
379 func (i *AnnotationInfo) EntityId() EntityId { | 383 func (i *AnnotationInfo) EntityId() EntityId { |
380 return EntityId{ | 384 return EntityId{ |
381 Kind: "annotation", | 385 Kind: "annotation", |
382 Id: i.Tag, | 386 Id: i.Tag, |
383 } | 387 } |
384 } | 388 } |
OLD | NEW |