Skip to content

Conversation

@serdarozerr
Copy link
Contributor

@serdarozerr serdarozerr commented Dec 16, 2025

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 main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@serdarozerr serdarozerr changed the title Feature/storage cli Storage CLI Client Dec 16, 2025
- 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
@serdarozerr serdarozerr marked this pull request as ready for review December 17, 2025 09:05

def cli_path
raise NotImplementedError
ENV['STORAGE_CLI_PATH'] || '/var/vcap/packages/storage-cli/bin/storage-cli'
Copy link
Contributor

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).

Copy link
Contributor

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.

@kathap kathap mentioned this pull request Dec 18, 2025
5 tasks
@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)
Copy link
Contributor

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants