Skip to content

Commit

Permalink
Revert ShouldBeAssigned to compare model type with IAAS;
Browse files Browse the repository at this point in the history
  • Loading branch information
ycliuhw committed Oct 21, 2020
1 parent efcf814 commit ea0aafb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion state/allwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ func (u *backingUnit) updated(ctx *allWatcherContext) error {
info.CharmURL = u.CharmURL.String()
}

// Construct a unit for the purpose of retieving other fields as necessary.
// Construct a unit for the purpose of retrieving other fields as necessary.
modelType, err := ctx.modelType()
if err != nil {
return errors.Annotatef(err, "get model type for %q", ctx.modelUUID)
Expand Down
2 changes: 1 addition & 1 deletion state/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (u *Unit) ContainerInfo() (CloudContainer, error) {
// ShouldBeAssigned returns whether the unit should be assigned to a machine.
// IAAS models require units to be assigned.
func (u *Unit) ShouldBeAssigned() bool {
return u.modelType != ModelTypeCAAS
return u.modelType == ModelTypeIAAS
}

// Application returns the application.
Expand Down

0 comments on commit ea0aafb

Please sign in to comment.