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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/apiserver/undertaker/undertaker.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:
86
86
 
87
87
// RemoveModel removes any records of this model from Juju.
88
88
func (u *UndertakerAPI) RemoveModel() error {
89
 
        err := u.st.RemoveAllModelDocs()
90
 
        if err != nil {
91
 
                // TODO(waigani) Return a human friendly error for now. The proper fix
92
 
                // is to run a buildTxn within state.RemoveAllModelDocs, so we
93
 
                // can return better errors than "transaction aborted".
94
 
                return errors.New("an error occurred, unable to remove model")
95
 
        }
96
 
        return nil
 
89
        return u.st.RemoveAllModelDocs()
97
90
}
98
91
 
99
92
func (u *UndertakerAPI) environResourceWatcher() params.NotifyWatchResult {