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

Update to use azure-armrest version 0.0.6 #5073

Merged
merged 1 commit into from
Oct 23, 2015

Conversation

bzwei
Copy link
Contributor

@bzwei bzwei commented Oct 23, 2015

Update Azure refresh logic due to the changes in armrest gem

Add links between cloud networks and stacks.

@@ -21,7 +21,7 @@ def self.make_create_options(template, options)
create_options[:parameters] = create_options[:parameters].map { |k, v| [k, {'value' => v}] }.to_h
end

return resource_group, create_options
return resource_group, 'properties' => create_options
Copy link
Contributor Author

Choose a reason for hiding this comment

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

armrest gem no longer automatically insert properties key if missing.

@bzwei
Copy link
Contributor Author

bzwei commented Oct 23, 2015

@bronaghs @djberg96 can you review?
I am going to fix style of refresh_parser.rb line 218 together with any feedbacks you may have.

@@ -235,27 +249,29 @@ def add_instance_disk(disks, size, name, location)
super(disks, size, name, location, "azure")
end

def populate_hardware_hash_with_networks(hardware_networks_array, instance)
nics = instance.fetch_path('properties', 'networkProfile', 'networkInterfaces')
def populate_hardware_hash_with_networks(networks_array, instance)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rewrote the whole implementation. The armrest gem no longer queries network ip addresses and inserts to the vm object. Make explicit calls here to get them.

@djberg96
Copy link
Contributor

Looks good to me Bill. I think the rubocop issues are the only thing you'll need to deal with.

@bronaghs
Copy link

LGTM

Update Azure refresh logic due to the changes in armrest gem
@miq-bot
Copy link
Member

miq-bot commented Oct 23, 2015

<github_pr_commenter_batch />Some comments on commit bzwei@93bb6a2

@miq-bot
Copy link
Member

miq-bot commented Oct 23, 2015

Checked commit bzwei@93bb6a2 with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0
7 files checked, 13 offenses detected

app/models/manageiq/providers/azure/cloud_manager/refresh_parser.rb

  • 🔶 - Line 308, Col 11 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.
  • 🔶 - Line 311, Col 11 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.
  • 🔶 - Line 316, Col 11 - Style/AlignHash - Align the elements of a hash literal if they span more than one line.
  • 🔹 - Line 252, Col 7 - Metrics/AbcSize - Assignment Branch Condition size for populate_hardware_hash_with_networks is too high. [31.37/15]

spec/models/manageiq/providers/azure/cloud_manager/orchestration_stack_spec.rb

spec/models/manageiq/providers/azure/cloud_manager/refresher_spec.rb

spec/models/manageiq/providers/azure/cloud_manager_spec.rb

chessbyte added a commit that referenced this pull request Oct 23, 2015
Update to use azure-armrest version 0.0.6
@chessbyte chessbyte merged commit 7df7cb8 into ManageIQ:master Oct 23, 2015
@chessbyte chessbyte added this to the Sprint 31 Ending Oct 26, 2015 milestone Oct 23, 2015
@bzwei bzwei deleted the switch_new_armrest branch October 23, 2015 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants