~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/gomaasapi/interfaces.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
 
178
178
// Machine represents a physical machine.
179
179
type Machine interface {
 
180
        OwnerDataHolder
 
181
 
180
182
        SystemID() string
181
183
        Hostname() string
182
184
        FQDN() string
343
345
        // There are some other attributes for block devices, but we can
344
346
        // expose them on an as needed basis.
345
347
}
 
348
 
 
349
// OwnerDataHolder represents any MAAS object that can store key/value
 
350
// data.
 
351
type OwnerDataHolder interface {
 
352
        // OwnerData returns a copy of the key/value data stored for this
 
353
        // object.
 
354
        OwnerData() map[string]string
 
355
 
 
356
        // SetOwnerData updates the key/value data stored for this object
 
357
        // with the values passed in. Existing keys that aren't specified
 
358
        // in the map passed in will be left in place; to clear a key set
 
359
        // its value to "". All owner data is cleared when the object is
 
360
        // released.
 
361
        SetOwnerData(map[string]string) error
 
362
}