Method: Fog::Baremetal::OpenStack::Mock#create_port

Defined in:
lib/fog/baremetal/openstack/requests/create_port.rb

#create_port(_attributes) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/fog/baremetal/openstack/requests/create_port.rb', line 31

def create_port(_attributes)
  response = Excon::Response.new
  response.status = 200
  response.headers = {
    "X-Compute-Request-Id" => "req-fdc6f99e-55a2-4ab1-8904-0892753828cf",
    "Content-Type"         => "application/json",
    "Content-Length"       => "356",
    "Date"                 => Date.new
  }
  response.body = data[:ports].first
  response
end