-
Notifications
You must be signed in to change notification settings - Fork 367
Storage CLI Client #4706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Storage CLI Client #4706
Conversation
- factory init removed since no need different provider classes anymore - all logic moved into init method
- It is implemented as storage exists to generalize to bucket, container or storage for different iaas providers
6270055 to
ad119dd
Compare
lib/cloud_controller/blobstore/storage_cli/storage_cli_client.rb
Outdated
Show resolved
Hide resolved
|
|
||
| def cli_path | ||
| raise NotImplementedError | ||
| ENV['STORAGE_CLI_PATH'] || '/var/vcap/packages/storage-cli/bin/storage-cli' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better raise an exception if the environment variable is not configured (so that we detect this and do not rely on a hard-coded default).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far we have not used STORAGE_CLI_PATH (formerly AZURE_STORAGE_CLI_PATH) environment variable in capi-release. This was just intended in case we ever have a special environment/release where the path might be different.
| @min_size = min_size || 0 | ||
| @max_size = max_size | ||
| @storage_type = PROVIDER_TO_STORAGE_CLI_STORAGETYPE[@provider] | ||
| logger.info('initialized with:', resource_type: @resource_type, provider: @provider, path: @config_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should move this log info or remove it, it appears too often (>20 times for 1 cf push)?
Context
This PR prepares the codebase for replacing the Fog library. Azure support through Fog will be removed in the future, so we need to start migrating away from it step by step.
Solution
A Go-based storage-cli client is being developed in this repository: https://github.com/cloudfoundry/storage-cli/
The project is still under development, and missing features are being added gradually. This client will provide all blobstore operations that ccng currently uses. In this PR, the existing storage_cli_client class is refactored to work with the storage-cli binary. This allows us to move away from Fog while keeping the current functionality unchanged.
Previous works that have done for this epic
Associated Link
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests