lib/openstack/compute/server.rb
# Creates a new interface on this server.
#
#   >> server.interface_create
#   => array
Creates a new interface on this server.
Creates a new interface on this server .
def interface_create(options)
      data = JSON.generate(:interfaceAttachment => options)
      response = @compute.connection.csreq("POST",@svrmgmthost,"#{@svrmgmtpath}/servers/#{URI.encode(self.id.to_s)}/os-interface",@svrmgmtport,@svrmgmtscheme,{'content-type' => 'application/json'},data)
      OpenStack::Exception.raise_exception(response) unless response.code.match(/^20.$/)
      JSON::parse(response.body)["interfaceAttachment"]
    end
def interface_create ( options ) data = JSON . generate ( :interfaceAttachment => options ) response = @compute . connection . csreq ( "POST" , @svrmgmthost , "#{@svrmgmtpath}/servers/#{URI.encode(self.id.to_s)}/os-interface" , @svrmgmtport , @svrmgmtscheme , { 'content-type' => 'application/json' } , data ) OpenStack :: Exception . raise_exception ( response ) unless response . code . match ( / ^20.$ / ) JSON :: parse ( response . body ) [ "interfaceAttachment" ] end
Creates a new interface on this server.
Creates a new interface on this server .
options