Method: Fog::Compute::IBM::Real#create_address
- Defined in:
- lib/fog/ibm/requests/compute/create_address.rb
#create_address(location, offering_id, options = {}) ⇒ Object
Requests a new static IP address to be created
Parameters
-
location_id<~String> - id of location
-
offering_id<~String> - id for offering
-
vlan_id<~String> - id of vlan
Returns
-
response<~Excon::Response>:
-
body<~Hash>:
-
‘location’<~String>: location of new address
-
‘offeringId’<~String>: offering id of new address
-
‘id’<~String>: id
-
‘ip’<~String>: returns string of spaces (ip not yet allocated right after creation)
-
‘state’<~Integer>: status of address (0 when new)
-
-
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fog/ibm/requests/compute/create_address.rb', line 21 def create_address(location, offering_id, ={}) request( :method => 'POST', :expects => 200, :path => '/addresses', :body => { 'offeringID' => offering_id, 'location' => location, 'vlanID' => [:vlan_id] } ) end |