src/main/ruby/org/o3project/odenos/component/driver/of_driver/request_helpers.rb
# POST Port and update topology mapping
# @return [Port] updated Port on Success
# @raise [NotFoundError, RequestError]
POST Port and update topology mapping
POST Port and update topology mapping
def postPort(port, nw_if)
            check_param(port, nw_if)
            response = nw_if.post_port(port)
            status = response.status_code
            case status
            when Response::OK
              port = Port.new(response.body)
              return port
            when Response::NOT_FOUND
              fail NotFoundError.new(response), "#{status} Not Found: port:#{port.inspect}"
            else
              fail ResponseError.new(response), "#{status} Request Failed."
            end
          end
def postPort ( port , nw_if ) check_param ( port , nw_if ) response = nw_if . post_port ( port ) status = response . status_code case status when Response :: OK port = Port . new ( response . body ) return port when Response :: NOT_FOUND fail NotFoundError . new ( response ) , "#{status} Not Found: port:#{port.inspect}" else fail ResponseError . new ( response ) , "#{status} Request Failed." end end
POST Port and update topology mapping
POST Port and update topology mapping
# parent node not found
updated Port on Success
updated Port on Success
Port
None
port
<not_specific>
nw_if
<not_specific>