Method: Fog::Compute::Ecloud::Server#create_rnat

Defined in:
lib/rackspace-fog/ecloud/models/compute/server.rb

#create_rnat(options) ⇒ Object



160
161
162
163
164
165
# File 'lib/rackspace-fog/ecloud/models/compute/server.rb', line 160

def create_rnat(options)
  options[:host_ip_href] ||= ips.first.href
  options[:uri] = "/cloudapi/ecloud/rnats/environments/#{environment_id}/action/createAssociation"
  data = connection.rnat_associations_create_device(options).body
  rnat = Fog::Compute::Ecloud::Associations.new(:connection => connection, :href => data[:href])[0]
end