launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/provider/joyent/environ_instance.go (about)

     1  // Copyright 2013 Joyent Inc.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package joyent
     5  
     6  import (
     7  	"launchpad.net/juju-core/constraints"
     8  	"launchpad.net/juju-core/environs/cloudinit"
     9  	"launchpad.net/juju-core/instance"
    10  	"launchpad.net/juju-core/tools"
    11  )
    12  
    13  func (env *environ) StartInstance(
    14  	cons constraints.Value, possibleTools tools.List, machineConf *cloudinit.MachineConfig,
    15  ) (
    16  	instance.Instance, *instance.HardwareCharacteristics, error,
    17  ) {
    18  	// Please note that in order to fulfil the demands made of Instances and
    19  	// AllInstances, it is imperative that some environment feature be used to
    20  	// keep track of which instances were actually started by juju.
    21  	_ = env.getSnapshot()
    22  	return nil, nil, errNotImplemented
    23  }
    24  
    25  func (env *environ) AllInstances() ([]instance.Instance, error) {
    26  	// Please note that this must *not* return instances that have not been
    27  	// allocated as part of this environment -- if it does, juju will see they
    28  	// are not tracked in state, assume they're stale/rogue, and shut them down.
    29  	_ = env.getSnapshot()
    30  	return nil, errNotImplemented
    31  }
    32  
    33  func (env *environ) Instances(ids []instance.Id) ([]instance.Instance, error) {
    34  	// Please note that this must *not* return instances that have not been
    35  	// allocated as part of this environment -- if it does, juju will see they
    36  	// are not tracked in state, assume they're stale/rogue, and shut them down.
    37  	// This advice applies even if an instance id passed in corresponds to a
    38  	// real instance that's not part of the environment -- the Environ should
    39  	// treat that no differently to a request for one that does not exist.
    40  	_ = env.getSnapshot()
    41  	return nil, errNotImplemented
    42  }
    43  
    44  func (env *environ) StopInstances(instances []instance.Instance) error {
    45  	_ = env.getSnapshot()
    46  	return errNotImplemented
    47  }