Skip to content

Commit

Permalink
Fixes #21675 - OpenStack create host tab fails to load
Browse files Browse the repository at this point in the history
Currently the tab is not loading as there are a few methods that are not
being overridden properly by the FogExtension.

After fixing that and adding the metadata key the tab loads
  • Loading branch information
dLobatog authored and lzap committed Nov 21, 2017
1 parent e69b62c commit 3e94c50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/models/compute_resources/foreman/model/openstack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def volume_client
end

def vm_instance_defaults
super.merge(:key_name => key_pair.name)
super.merge(:key_name => key_pair.name, :metadata => {})
end

def assign_floating_ip(address, vm)
Expand Down
14 changes: 5 additions & 9 deletions app/models/concerns/fog_extensions/openstack/server.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
module FogExtensions
module Openstack
module Server
def self.prepended(base)
class << base
attr_reader :nics
attr_accessor :boot_from_volume, :size_gb, :scheduler_hint_filter
attr_writer :security_group, :network # floating IP
end
end
attr_reader :nics
attr_writer :security_group, :network # floating IP
attr_accessor :boot_from_volume, :size_gb, :scheduler_hint_filter

def to_s
name
Expand Down Expand Up @@ -48,11 +44,11 @@ def security_groups
end

def boot_from_volume
attr[:boot_from_volume]
attributes[:boot_from_volume]
end

def size_gb
attr[:size_gb]
attributes[:size_gb]
end

def network
Expand Down

0 comments on commit 3e94c50

Please sign in to comment.