Skip to content

Commit

Permalink
Merge pull request juju#17546 from SimonRichardson/remove-charm-deplo…
Browse files Browse the repository at this point in the history
…yment-type

juju#17546

There was some left over renaming references of deployment type in the charm package. This removes them from that package. The caas package also has some additional deployment type information which will be required to be removed, but that can be in another patchset.

<!-- Why this change is needed and what it does. -->

## Checklist

<!-- If an item is not applicable, use `~strikethrough~`. -->

- [x] Code style: imports ordered, good names, simple structure, etc
- [x] Comments saying why design decisions were made
- [x] Go unit tests, with comments saying what you're testing

## QA steps

Most of the code was already removed when bringing in the charm
package, this is the last part.

This is the removal of dead code. The tests should pass.

## Links

**Jira card:** [JUJU-6011](https://warthogs.atlassian.net/browse/JUJU-6011)



[JUJU-6011]: https://warthogs.atlassian.net/browse/JUJU-6011?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
jujubot committed Jun 19, 2024
2 parents ff7a6e4 + 1cb5b4f commit 7723703
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
36 changes: 0 additions & 36 deletions internal/charm/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,42 +148,6 @@ type Device struct {
CountMax int64 `bson:"countmax"`
}

// DeploymentType defines a deployment type.
type DeploymentType string

const (
DeploymentStateless DeploymentType = "stateless"
DeploymentStateful DeploymentType = "stateful"
DeploymentDaemon DeploymentType = "daemon"
)

// DeploymentMode defines a deployment mode.
type DeploymentMode string

const (
ModeOperator DeploymentMode = "operator"
ModeWorkload DeploymentMode = "workload"
)

// ServiceType defines a service type.
type ServiceType string

const (
ServiceCluster ServiceType = "cluster"
ServiceLoadBalancer ServiceType = "loadbalancer"
ServiceExternal ServiceType = "external"
ServiceOmit ServiceType = "omit"
)

// Deployment represents a charm's deployment requirements in the charm
// metadata.yaml file.
type Deployment struct {
DeploymentType DeploymentType `bson:"type"`
DeploymentMode DeploymentMode `bson:"mode"`
ServiceType ServiceType `bson:"service"`
MinVersion string `bson:"min-version"`
}

// Relation represents a single relation defined in the charm
// metadata.yaml file.
type Relation struct {
Expand Down
8 changes: 0 additions & 8 deletions rpc/params/charms.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,6 @@ type CharmPlan struct {
Required bool `json:"required"`
}

// CharmDeployment mirrors charm.Deployment.
type CharmDeployment struct {
DeploymentType string `json:"type"`
DeploymentMode string `json:"mode"`
ServiceType string `json:"service"`
MinVersion string `json:"min-version"`
}

// CharmManifest mirrors charm.Manifest
type CharmManifest struct {
Bases []CharmBase `json:"bases,omitempty"`
Expand Down

0 comments on commit 7723703

Please sign in to comment.