Juju provider for CloudSigma - environinstance (for review)

This pull request is part of juju provider for CloudSigma contaning the following files:
- provider/cloudsigma/environinstance.go
- provider/cloudsigma/environinstance_test.go

Provider for CloudSigma (https://www.cloudsigma.com) uses CloudSigma API v2.0 (https://cloudsigma-docs.readthedocs.org/en/2.10/).

Minimal client for communicating with the CloudSigma Web API from Go program was implemented as separate library https://www.github.com/Altoros/gosigma. This library is published under AGPLv3 license.

Did you see my comment about that being an odd layering? It doesn't seem
like gosigma should be aware of Juju identifiers.

John
=:->
On Jul 15, 2014 10:05 AM, "vsedelnik" <notifications@github.com> wrote:

> In provider/cloudsigma/environinstance.go:
>
> > +	}
> > +
> > +	logger.Tracef("hardware: %v", hwch)
> > +
> > +	return inst, hwch, nil, nil
> > +}
> > +
> > +// AllInstances returns all instances currently known to the broker.
> > +func (env environ) AllInstances() ([]instance.Instance, error) {
> > +	// Please note that this must *not* return instances that have not been
> > +	// allocated as part of this environment -- if it does, juju will see they
> > +	// are not tracked in state, assume they're stale/rogue, and shut them down.
> > +
> > +	logger.Tracef("environ.AllInstances...")
> > +
> > +	servers, err := env.client.instances()
>
> Actually we do support several environments inside single account and
> indeed we use tags to do filtering. We assign tag juju-environment= to all
> instances that belong to that environment. Actual filtering happens here -
> https://github.com/Altoros/juju-cloudsigma/blob/cloudsigma_provider_client/provider/cloudsigma/client.go#L100-L124
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Altoros/juju-cloudsigma/pull/3/files#r14918581>.
>