Skip to content

Commit 4fa4ce6

Browse files
committed
Renamed environment to model (part 2).
1 parent 0ccbac4 commit 4fa4ce6

File tree

343 files changed

+1291
-1310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+1291
-1310
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Many tests use a standalone instance of mongod as part of their setup. The
314314
Some tests (particularly those under ./store/...) assume a MongoDB instance
315315
that supports Javascript for map-reduce functions. These functions are not
316316
supported by juju-mongodb and the associated tests will fail unless disabled
317-
with an environment variable:
317+
with an model variable:
318318

319319
```shell
320320
$ JUJU_NOTEST_MONGOJS=1 go test github.com/juju/juju/...

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ juju is devops distilled.
55

66
Juju enables you to use [Charms](http://juju.ubuntu.com/charms) to deploy your application architectures to EC2, OpenStack,
77
Azure, HP your data center and even your own Ubuntu based laptop.
8-
Moving between environments is simple giving you the flexibility to switch hosts
8+
Moving between models is simple giving you the flexibility to switch hosts
99
whenever you want — for free.
1010

1111
For more information, see the [docs](https://jujucharms.com/docs/stable/getting-started).
@@ -110,7 +110,7 @@ commands. You can verify this using
110110

111111
which juju
112112

113-
You should be able to bootstrap a local environment now with the following
113+
You should be able to bootstrap a local model now with the following
114114
(Note: the use of sudo for bootstrap here is only required for the local
115115
provider because it uses LXC, which requires root privileges)
116116

@@ -127,7 +127,7 @@ are extracted and uploaded to a known location. This consumes a release version
127127
number, and implies that no tools are available for the next, development, version
128128
of juju. Therefore, when using the development version of juju you will need to
129129
pass an additional flag, `--upload-tools` to instruct the `juju` client to build
130-
a set of tools from source and upload them to the environment as part of the
130+
a set of tools from source and upload them to the model as part of the
131131
bootstrap process.
132132

133133
juju bootstrap -m your-model --upload-tools {--debug}

agent/agent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ func NewAgentConfig(configParams AgentConfigParams) (ConfigSetterWriter, error)
404404
return nil, errors.Trace(requiredError("password"))
405405
}
406406
if uuid := configParams.Environment.Id(); uuid == "" {
407-
return nil, errors.Trace(requiredError("environment"))
407+
return nil, errors.Trace(requiredError("model"))
408408
} else if !names.IsValidEnvironment(uuid) {
409-
return nil, errors.Errorf("%q is not a valid environment uuid", uuid)
409+
return nil, errors.Errorf("%q is not a valid model uuid", uuid)
410410
}
411411
if len(configParams.CACert) == 0 {
412412
return nil, errors.Trace(requiredError("CA certificate"))

agent/agent_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ var agentConfigTests = []struct {
5959
},
6060
checkErr: "password not found in configuration",
6161
}, {
62-
about: "missing environment tag",
62+
about: "missing model tag",
6363
params: agent.AgentConfigParams{
6464
Paths: agent.Paths{DataDir: "/data/dir"},
6565
Tag: names.NewMachineTag("1"),
6666
UpgradedToVersion: version.Current,
6767
Password: "sekrit",
6868
},
69-
checkErr: "environment not found in configuration",
69+
checkErr: "model not found in configuration",
7070
}, {
71-
about: "invalid environment tag",
71+
about: "invalid model tag",
7272
params: agent.AgentConfigParams{
7373
Paths: agent.Paths{DataDir: "/data/dir"},
7474
Tag: names.NewMachineTag("1"),
7575
UpgradedToVersion: version.Current,
7676
Password: "sekrit",
7777
Environment: names.NewEnvironTag("uuid"),
7878
},
79-
checkErr: `"uuid" is not a valid environment uuid`,
79+
checkErr: `"uuid" is not a valid model uuid`,
8080
}, {
8181
about: "missing CA cert",
8282
params: agent.AgentConfigParams{

agent/bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func InitializeState(adminUser names.UserTag, c ConfigSetter, envCfg *config.Con
106106
if !isLocalEnv(envCfg) {
107107
machineCfg.Addresses = network.FilterLXCAddresses(machineCfg.Addresses)
108108
} else {
109-
logger.Debugf("local environment - not filtering addresses from %v", machineCfg.Addresses)
109+
logger.Debugf("local model - not filtering addresses from %v", machineCfg.Addresses)
110110
}
111111

112112
if err = initAPIHostPorts(c, st, machineCfg.Addresses, servingInfo.APIPort); err != nil {

api/apiclient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ func (st *state) connectStream(path string, attrs url.Values) (base.Stream, erro
333333
// that the server has returned a valid environment tag.
334334
envTag, err := st.EnvironTag()
335335
if err != nil {
336-
return nil, errors.Annotate(err, "cannot get environment tag, perhaps connected to system not environment")
336+
return nil, errors.Annotate(err, "cannot get model tag, perhaps connected to system not model")
337337
}
338338
path = apiPath(envTag, path)
339339
}
@@ -436,7 +436,7 @@ func apiPath(envTag names.EnvironTag, path string) string {
436436
panic(fmt.Sprintf("apiPath called with non-slash-prefixed path %q", path))
437437
}
438438
if envTag.Id() == "" {
439-
panic("apiPath called with empty environment tag")
439+
panic("apiPath called with empty model tag")
440440
}
441441
if envUUID := envTag.Id(); envUUID != "" {
442442
return "/environment/" + envUUID + path

api/apiclient_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (s *apiclientSuite) TestOpenHonorsEnvironTag(c *gc.C) {
127127
// We start by ensuring we have an invalid tag, and Open should fail.
128128
info.EnvironTag = names.NewEnvironTag("bad-tag")
129129
_, err := api.Open(info, api.DialOpts{})
130-
c.Check(err, gc.ErrorMatches, `unknown environment: "bad-tag"`)
130+
c.Check(err, gc.ErrorMatches, `unknown model: "bad-tag"`)
131131
c.Check(params.ErrCode(err), gc.Equals, params.CodeNotFound)
132132

133133
// Now set it to the right tag, and we should succeed.

api/backups/upload_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ func (s *uploadSuite) TestFailedRequest(c *gc.C) {
6161
meta.Environment = ""
6262

6363
id, err := s.client.Upload(archive, meta)
64-
c.Assert(err, gc.ErrorMatches, `PUT https://.*/environment/.*/backups: while storing backup archive: missing Environment`)
64+
c.Assert(err, gc.ErrorMatches, `PUT https://.*/environment/.*/backups: while storing backup archive: missing Model`)
6565
c.Assert(id, gc.Equals, "")
6666
}

api/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ func (c *Client) ShareEnvironment(users ...names.UserTag) error {
377377

378378
for i, r := range result.Results {
379379
if r.Error != nil && r.Error.Code == params.CodeAlreadyExists {
380-
logger.Warningf("environment is already shared with %s", users[i].Canonical())
380+
logger.Warningf("model is already shared with %s", users[i].Canonical())
381381
result.Results[i].Error = nil
382382
}
383383
}
@@ -422,7 +422,7 @@ func (c *Client) UnshareEnvironment(users ...names.UserTag) error {
422422

423423
for i, r := range result.Results {
424424
if r.Error != nil && r.Error.Code == params.CodeNotFound {
425-
logger.Warningf("environment was not previously shared with user %s", users[i].Canonical())
425+
logger.Warningf("model was not previously shared with user %s", users[i].Canonical())
426426
result.Results[i].Error = nil
427427
}
428428
}

api/client_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ func (s *clientSuite) TestShareEnvironmentExistingUser(c *gc.C) {
259259

260260
err := client.ShareEnvironment(user.UserTag())
261261
c.Assert(err, jc.ErrorIsNil)
262-
logMsg := fmt.Sprintf("WARNING juju.api environment is already shared with %s", user.UserName())
262+
logMsg := fmt.Sprintf("WARNING juju.api model is already shared with %s", user.UserName())
263263
c.Assert(c.GetTestLog(), jc.Contains, logMsg)
264264
}
265265

@@ -377,7 +377,7 @@ func (s *clientSuite) TestUnshareEnvironmentMissingUser(c *gc.C) {
377377

378378
err := client.UnshareEnvironment(user)
379379
c.Assert(err, jc.ErrorIsNil)
380-
logMsg := fmt.Sprintf("WARNING juju.api environment was not previously shared with user %s", user.Canonical())
380+
logMsg := fmt.Sprintf("WARNING juju.api model was not previously shared with user %s", user.Canonical())
381381
c.Assert(c.GetTestLog(), jc.Contains, logMsg)
382382
}
383383

@@ -519,7 +519,7 @@ func (s *clientSuite) TestOpenUsesEnvironUUIDPaths(c *gc.C) {
519519
// Passing in a bad environment UUID should fail with a known error
520520
info.EnvironTag = names.NewEnvironTag("dead-beef-123456")
521521
apistate, err = api.Open(info, api.DialOpts{})
522-
c.Check(err, gc.ErrorMatches, `unknown environment: "dead-beef-123456"`)
522+
c.Check(err, gc.ErrorMatches, `unknown model: "dead-beef-123456"`)
523523
c.Check(err, jc.Satisfies, params.IsCodeNotFound)
524524
c.Assert(apistate, gc.IsNil)
525525
}

api/controller/controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (s *controllerSuite) TestDestroyController(c *gc.C) {
7878

7979
sysManager := s.OpenAPI(c)
8080
err := sysManager.DestroyController(false)
81-
c.Assert(err, gc.ErrorMatches, "controller environment cannot be destroyed before all other environments are destroyed")
81+
c.Assert(err, gc.ErrorMatches, "controller model cannot be destroyed before all other models are destroyed")
8282
}
8383

8484
func (s *controllerSuite) TestListBlockedEnvironments(c *gc.C) {

api/highavailability/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Client struct {
2626
func NewClient(caller base.APICallCloser) *Client {
2727
environTag, err := caller.EnvironTag()
2828
if err != nil {
29-
logger.Errorf("ignoring invalid environment tag: %v", err)
29+
logger.Errorf("ignoring invalid model tag: %v", err)
3030
}
3131
frontend, backend := base.NewClientFacade(caller, "HighAvailability")
3232
return &Client{ClientFacade: frontend, facade: backend, environTag: environTag}

api/provisioner/provisioner_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func (s *provisionerSuite) TestEnsureDeadAndRemove(c *gc.C) {
212212
apiMachine, err = s.provisioner.Machine(s.machine.Tag().(names.MachineTag))
213213
c.Assert(err, jc.ErrorIsNil)
214214
err = apiMachine.EnsureDead()
215-
c.Assert(err, gc.ErrorMatches, "machine 0 is required by the environment")
215+
c.Assert(err, gc.ErrorMatches, "machine 0 is required by the model")
216216
}
217217

218218
func (s *provisionerSuite) TestRefreshAndLife(c *gc.C) {

api/service/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (c *Client) SetMetricCredentials(service string, credentials []byte) error
4949
func (c *Client) EnvironmentUUID() string {
5050
tag, err := c.RawAPICaller().EnvironTag()
5151
if err != nil {
52-
logger.Warningf("environ tag not an environ: %v", err)
52+
logger.Warningf("model tag not an model: %v", err)
5353
return ""
5454
}
5555
return tag.Id()

api/uniter/charm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (s *charmSuite) TestURL(c *gc.C) {
5050
func (s *charmSuite) TestArchiveURLs(c *gc.C) {
5151
apiInfo := s.APIInfo(c)
5252
url, err := url.Parse(fmt.Sprintf(
53-
"https://0.1.2.3:1234/environment/%s/charms?file=%s&url=%s",
53+
"https://0.1.2.3:1234/model/%s/charms?file=%s&url=%s",
5454
apiInfo.EnvironTag.Id(),
5555
url.QueryEscape("*"),
5656
url.QueryEscape(s.apiCharm.URL().String()),

api/usermanager/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (s *usermanagerSuite) TestEnableUserBadName(c *gc.C) {
104104

105105
func (s *usermanagerSuite) TestCantRemoveAdminUser(c *gc.C) {
106106
err := s.usermanager.DisableUser(s.AdminUserTag(c).Name())
107-
c.Assert(err, gc.ErrorMatches, "failed to disable user: cannot disable state server environment owner")
107+
c.Assert(err, gc.ErrorMatches, "failed to disable user: cannot disable state server model owner")
108108
}
109109

110110
func (s *usermanagerSuite) TestUserInfo(c *gc.C) {

apiserver/addresser/addresser.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ func NewAddresserAPI(
5353
func (api *AddresserAPI) getNetworkingEnviron() (environs.NetworkingEnviron, bool, error) {
5454
config, err := api.st.EnvironConfig()
5555
if err != nil {
56-
return nil, false, errors.Annotate(err, "getting environment config")
56+
return nil, false, errors.Annotate(err, "getting model config")
5757
}
5858
env, err := environs.New(config)
5959
if err != nil {
60-
return nil, false, errors.Annotate(err, "validating environment config")
60+
return nil, false, errors.Annotate(err, "validating model config")
6161
}
6262
netEnv, ok := environs.SupportsNetworking(env)
6363
if !ok {

apiserver/addresser/addresser_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (s *AddresserSuite) TestCanDeallocateAddressesConfigGetFailure(c *gc.C) {
9595
s.st.stub.SetErrors(errors.New("ouch"))
9696

9797
result := s.api.CanDeallocateAddresses()
98-
c.Assert(result.Error, gc.ErrorMatches, "getting environment config: ouch")
98+
c.Assert(result.Error, gc.ErrorMatches, "getting model config: ouch")
9999
c.Assert(result.Result, jc.IsFalse)
100100
}
101101

@@ -104,7 +104,7 @@ func (s *AddresserSuite) TestCanDeallocateAddressesEnvironmentNewFailure(c *gc.C
104104
s.st.setConfig(c, config)
105105

106106
result := s.api.CanDeallocateAddresses()
107-
c.Assert(result.Error, gc.ErrorMatches, `validating environment config: no registered provider for "nonex"`)
107+
c.Assert(result.Error, gc.ErrorMatches, `validating model config: no registered provider for "nonex"`)
108108
c.Assert(result.Result, jc.IsFalse)
109109
}
110110

@@ -198,7 +198,7 @@ func (s *AddresserSuite) TestCleanupIPAddressesConfigGetFailure(c *gc.C) {
198198
// First action is getting the environment configuration,
199199
// so the injected error is returned here.
200200
apiErr := s.api.CleanupIPAddresses()
201-
c.Assert(apiErr.Error, gc.ErrorMatches, "getting environment config: ouch")
201+
c.Assert(apiErr.Error, gc.ErrorMatches, "getting model config: ouch")
202202

203203
// Still has two dead addresses.
204204
dead, err = s.st.DeadIPAddresses()
@@ -216,7 +216,7 @@ func (s *AddresserSuite) TestCleanupIPAddressesEnvironmentNewFailure(c *gc.C) {
216216

217217
// Validation of configuration fails due to illegal provider.
218218
apiErr := s.api.CleanupIPAddresses()
219-
c.Assert(apiErr.Error, gc.ErrorMatches, `validating environment config: no registered provider for "nonex"`)
219+
c.Assert(apiErr.Error, gc.ErrorMatches, `validating model config: no registered provider for "nonex"`)
220220

221221
// Still has two dead addresses.
222222
dead, err = s.st.DeadIPAddresses()

apiserver/admin_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ func (s *loginSuite) TestNonExistentEnvironment(c *gc.C) {
814814

815815
adminUser := s.AdminUserTag(c)
816816
err = st.Login(adminUser, "dummy-secret", "")
817-
expectedError := fmt.Sprintf("unknown environment: %q", uuid)
817+
expectedError := fmt.Sprintf("unknown model: %q", uuid)
818818
c.Assert(err, gc.ErrorMatches, expectedError)
819819
}
820820

@@ -829,7 +829,7 @@ func (s *loginSuite) TestInvalidEnvironment(c *gc.C) {
829829

830830
adminUser := s.AdminUserTag(c)
831831
err = st.Login(adminUser, "dummy-secret", "")
832-
c.Assert(err, gc.ErrorMatches, `unknown environment: "rubbish"`)
832+
c.Assert(err, gc.ErrorMatches, `unknown model: "rubbish"`)
833833
}
834834

835835
func (s *loginSuite) TestOtherEnvironment(c *gc.C) {

apiserver/adminv2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (s *loginV2Suite) TestClientLoginToServer(c *gc.C) {
5353

5454
client := apiState.Client()
5555
_, err = client.GetEnvironmentConstraints()
56-
c.Assert(err, gc.ErrorMatches, `logged in to server, no environment, "Client" not supported`)
56+
c.Assert(err, gc.ErrorMatches, `logged in to server, no model, "Client" not supported`)
5757
}
5858

5959
func (s *loginV2Suite) TestClientLoginToServerNoAccessToStateServerEnv(c *gc.C) {

apiserver/authcontext.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var errMacaroonAuthNotConfigured = errors.New("macaroon authentication is not co
9393
func newMacaroonAuth(st *state.State) (*authentication.MacaroonAuthenticator, error) {
9494
envCfg, err := st.EnvironConfig()
9595
if err != nil {
96-
return nil, errors.Annotate(err, "cannot get environment config")
96+
return nil, errors.Annotate(err, "cannot get model config")
9797
}
9898
idURL := envCfg.IdentityURL()
9999
if idURL == "" {
@@ -111,7 +111,7 @@ func newMacaroonAuth(st *state.State) (*authentication.MacaroonAuthenticator, er
111111
}
112112
svc, err := bakery.NewService(
113113
bakery.NewServiceParams{
114-
Location: "juju environment " + st.EnvironUUID(),
114+
Location: "juju model " + st.EnvironUUID(),
115115
Locator: bakery.PublicKeyLocatorMap{
116116
idURL: idPK,
117117
},

apiserver/backups/backups.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func NewAPI(st *state.State, resources *common.Resources, authorizer common.Auth
3838

3939
// For now, backup operations are only permitted on the controller environment.
4040
if !st.IsStateServer() {
41-
return nil, errors.New("backups are not supported for hosted environments")
41+
return nil, errors.New("backups are not supported for hosted models")
4242
}
4343

4444
// Get the backup paths.

apiserver/backups/backups_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ func (s *backupsSuite) TestNewAPIHostedEnvironmentFails(c *gc.C) {
8383
otherState := factory.NewFactory(s.State).MakeEnvironment(c, nil)
8484
defer otherState.Close()
8585
_, err := backupsAPI.NewAPI(otherState, s.resources, s.authorizer)
86-
c.Check(err, gc.ErrorMatches, "backups are not supported for hosted environments")
86+
c.Check(err, gc.ErrorMatches, "backups are not supported for hosted models")
8787
}

apiserver/charms.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ func (h *charmsHandler) downloadCharm(st *state.State, curl *charm.URL, charmArc
448448
reader, _, err := storage.Get(ch.StoragePath())
449449
if err != nil {
450450
defer cleanupFile(tempCharmArchive)
451-
return errors.Annotate(err, "cannot get charm from environment storage")
451+
return errors.Annotate(err, "cannot get charm from model storage")
452452
}
453453
defer reader.Close()
454454

apiserver/charms_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func (s *charmsSuite) TestUploadRejectsWrongEnvUUIDPath(c *gc.C) {
268268
url := s.charmsURL(c, "series=quantal")
269269
url.Path = "/environment/dead-beef-123456/charms"
270270
resp := s.authRequest(c, httpRequestParams{method: "POST", url: url.String()})
271-
s.assertErrorResponse(c, resp, http.StatusNotFound, `unknown environment: "dead-beef-123456"`)
271+
s.assertErrorResponse(c, resp, http.StatusNotFound, `unknown model: "dead-beef-123456"`)
272272
}
273273

274274
func (s *charmsSuite) TestUploadRepackagesNestedArchives(c *gc.C) {
@@ -449,7 +449,7 @@ func (s *charmsSuite) TestGetRejectsWrongEnvUUIDPath(c *gc.C) {
449449
url := s.charmsURL(c, "url=local:quantal/dummy-1&file=revision")
450450
url.Path = "/environment/dead-beef-123456/charms"
451451
resp := s.authRequest(c, httpRequestParams{method: "GET", url: url.String()})
452-
s.assertErrorResponse(c, resp, http.StatusNotFound, `unknown environment: "dead-beef-123456"`)
452+
s.assertErrorResponse(c, resp, http.StatusNotFound, `unknown model: "dead-beef-123456"`)
453453
}
454454

455455
func (s *charmsSuite) TestGetReturnsManifest(c *gc.C) {

apiserver/client/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ func (c *Client) addOneMachine(p params.AddMachineParams) (*state.Machine, error
539539
// For 1.21 we should support both UUID and name, and with 1.22
540540
// just support UUID
541541
if p.Placement.Scope != env.Name() && p.Placement.Scope != env.UUID() {
542-
return nil, fmt.Errorf("invalid environment name %q", p.Placement.Scope)
542+
return nil, fmt.Errorf("invalid model name %q", p.Placement.Scope)
543543
}
544544
placementDirective = p.Placement.Directive
545545
}
@@ -667,21 +667,21 @@ func (c *Client) ShareEnvironment(args params.ModifyEnvironUsers) (result params
667667
userTagString := arg.UserTag
668668
user, err := names.ParseUserTag(userTagString)
669669
if err != nil {
670-
result.Results[i].Error = common.ServerError(errors.Annotate(err, "could not share environment"))
670+
result.Results[i].Error = common.ServerError(errors.Annotate(err, "could not share model"))
671671
continue
672672
}
673673
switch arg.Action {
674674
case params.AddEnvUser:
675675
_, err := c.api.stateAccessor.AddEnvironmentUser(
676676
state.EnvUserSpec{User: user, CreatedBy: createdBy})
677677
if err != nil {
678-
err = errors.Annotate(err, "could not share environment")
678+
err = errors.Annotate(err, "could not share model")
679679
result.Results[i].Error = common.ServerError(err)
680680
}
681681
case params.RemoveEnvUser:
682682
err := c.api.stateAccessor.RemoveEnvironmentUser(user)
683683
if err != nil {
684-
err = errors.Annotate(err, "could not unshare environment")
684+
err = errors.Annotate(err, "could not unshare model")
685685
result.Results[i].Error = common.ServerError(err)
686686
}
687687
default:

0 commit comments

Comments
 (0)