-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#16975 from wallyworld/storage-pool-domain
juju#16975 This PR adds the domain and service packages for managing storage pools. The main use cases to support are CRUD from the CLI (including querying based on a names and types filter), as well as getting a pool by name for use in the provisioning and deploy facades. The service needs a registry representing the valid storage provisioners for the current model - this is passed in when the service is constructed. ## QA steps just unit tests at this stage ## Links **Jira card:** JUJU-5579
- Loading branch information
Showing
17 changed files
with
1,606 additions
and
33 deletions.
There are no files selected for viewing
34 changes: 25 additions & 9 deletions
34
apiserver/facades/controller/migrationtarget/servicefactory_mock_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2024 Canonical Ltd. | ||
// Licensed under the AGPLv3, see LICENCE file for details. | ||
|
||
package errors | ||
|
||
import ( | ||
"github.com/juju/errors" | ||
) | ||
|
||
const ( | ||
// MissingPoolTypeError is used when a provider type is empty. | ||
MissingPoolTypeError = errors.ConstError("pool provider type is empty") | ||
// MissingPoolNameError is used when a name is empty. | ||
MissingPoolNameError = errors.ConstError("pool name is empty") | ||
|
||
InvalidPoolNameError = errors.ConstError("pool name is not valid") | ||
|
||
PoolNotFoundError = errors.ConstError("storage pool is not found") | ||
|
||
PoolAlreadyExists = errors.ConstError("storage pool already exists") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright 2024 Canonical Ltd. | ||
// Licensed under the AGPLv3, see LICENCE file for details. | ||
|
||
package storage | ||
|
||
import ( | ||
"testing" | ||
|
||
gc "gopkg.in/check.v1" | ||
) | ||
|
||
func TestPackage(t *testing.T) { | ||
gc.TestingT(t) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2024 Canonical Ltd. | ||
// Licensed under the AGPLv3, see LICENCE file for details. | ||
|
||
package service | ||
|
||
import ( | ||
"testing" | ||
|
||
gc "gopkg.in/check.v1" | ||
) | ||
|
||
//go:generate go run go.uber.org/mock/mockgen -package service -destination state_mock_test.go github.com/juju/juju/domain/storage/service State | ||
func TestPackage(t *testing.T) { | ||
gc.TestingT(t) | ||
} |
Oops, something went wrong.