Skip to content
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

Add Fog Support for Azure Stack #386

Merged
merged 4 commits into from
Jun 4, 2018

Conversation

bingosummer
Copy link


puts "Deleted container: #{container.destroy}"
puts "Deleted test container: #{test_container.destroy}"
rescue => ex

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/RescueStandardError: Avoid rescuing without specifying an error class.

########################################################################################################################

time = current_time
resource_group_name = azure_credentials['resource_group_name']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/UselessAssignment: Useless assignment to variable - resource_group_name.

unless @environment == ENVIRONMENT_AZURE_STACK
client_options[:storage_dns_suffix] = storage_endpoint_suffix(@environment)[1..-1]
else
client_options[:storage_dns_suffix] = @azure_storage_dns_suffix.nil? ? "local.azurestack.external" : @azure_storage_dns_suffix

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

:storage_access_key => @azure_storage_access_key,
:user_agent_prefix => telemetry
}
unless @environment == ENVIRONMENT_AZURE_STACK

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/ConditionalAssignment: Use the return of the conditional for variable assignment and comparison.
Style/UnlessElse: Do not use unless with else. Rewrite these with the positive case first.

client_options = {
:storage_account_name => @azure_storage_account_name,
:storage_access_key => @azure_storage_access_key,
:user_agent_prefix => telemetry

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/HashSyntax: Use the new Ruby 1.9 hash syntax.

azure_client.storage_blob_host = get_blob_endpoint(@azure_storage_account_name, true, @environment)
client_options = {
:storage_account_name => @azure_storage_account_name,
:storage_access_key => @azure_storage_access_key,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/HashSyntax: Use the new Ruby 1.9 hash syntax.

storage_access_key: @azure_storage_access_key)
azure_client.storage_blob_host = get_blob_endpoint(@azure_storage_account_name, true, @environment)
client_options = {
:storage_account_name => @azure_storage_account_name,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/HashSyntax: Use the new Ruby 1.9 hash syntax.

@bingosummer
Copy link
Author

@bilal-naeem-confiz Please help review. Thanks.

@WalterS
Copy link

WalterS commented May 29, 2018

This still references to fog-core 1.4.5, is this intentionally?

@bingosummer
Copy link
Author

bingosummer commented May 29, 2018

@WalterS Yes.
To resolve #367 and #359, there are two options: 1. upgrade mime-types itself; 2. upgrade fog-core to 2.0.0 so that mime-types can be removed.
We choose the first option, so there's no need to upgrade fog-core.

@bilal-naeem-confiz bilal-naeem-confiz merged commit baaf3f4 into fog:fog-arm-cf Jun 4, 2018
@WalterS
Copy link

WalterS commented Jul 19, 2018

The issue is still present. Any thoughts on how to remedy this?

Gem::ConflictError: Unable to activate fog-azure-rm-0.4.8, because mime-types-3.1 conflicts with mime-types (~> 1.25)

wichru pushed a commit to starfish-codes/archived-fog-azure-rm-v2 that referenced this pull request Mar 21, 2023
Add Fog Support for Azure Stack
wichru added a commit to starfish-codes/archived-fog-azure-rm-v1 that referenced this pull request Mar 21, 2023
* Add Fog Support for Azure Stack (fog#386)

Add Fog Support for Azure Stack

* add fog debug var

* improved syntax

* add blob operation timeout
make options array thread safe

* fix code style

* FIX build issues with some ruby versions

* UPDATE add new ruby versions

* FIX linting issue

* Update azure-storage to 1.1, unpin fog-core/fog-json, fix tests

Co-authored-by: Jenna Goldstrich <[email protected]>
Co-authored-by: Seth Boyles <[email protected]>

---------

Co-authored-by: Bin Xia <[email protected]>
Co-authored-by: Peter Sternberger <[email protected]>
Co-authored-by: Wesley Beary <[email protected]>
Co-authored-by: MSSedusch <[email protected]>
Co-authored-by: HappyTobi <[email protected]>
Co-authored-by: Jenna Goldstrich <[email protected]>
Co-authored-by: Seth Boyles <[email protected]>
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