Skip to content

Commit

Permalink
Merge pull request fog#2657 from travis-ci/master
Browse files Browse the repository at this point in the history
Allow for Blue Box blocks to be created with IPv6 addresses only
  • Loading branch information
tokengeek committed Feb 11, 2014
2 parents 270fc4c + 34e0318 commit 2820975
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fog/bluebox/models/compute/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Server < Fog::Compute::Server
attribute :state, :aliases => "status"
attribute :storage
attribute :template
attribute :ipv6_only

attr_accessor :hostname, :password, :lb_applications, :lb_services, :lb_backends

Expand Down Expand Up @@ -93,6 +94,7 @@ def save

options['username'] = username
options['hostname'] = hostname if @hostname
options['ipv6_only'] = ipv6_only if ipv6_only
data = service.create_block(flavor_id, image_id, location_id, options)
merge_attributes(data.body)
true
Expand Down
2 changes: 2 additions & 0 deletions lib/fog/bluebox/requests/compute/create_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def create_block(product_id, template_id, location_id, options = {})
'location' => location_id
}

query['ipv6_only'] = options.delete('ipv6_only') if options['ipv6_only']

request(
:expects => 200,
:method => 'POST',
Expand Down

0 comments on commit 2820975

Please sign in to comment.