def api_execute(path, method, options = {})
      params = options[:params]
      case  method
      when :get
        req = build_http_request(Net::HTTP::Get, path, params)
      when :post
        req = build_http_request(Net::HTTP::Post, path, nil, params)
      when :put
        req = build_http_request(Net::HTTP::Put, path, nil, params)
      when :delete
        req = build_http_request(Net::HTTP::Delete, path, params)
      else
        fail "Unknown http action: #{method}"
      end
      http = Net::HTTP.new(host, port)
      http.read_timeout = options[:timeout] || read_timeout
      setup_https(http)
      req.basic_auth(user_name, password) if [user_name, password].all?
      Log.debug("Invoking: '#{req.class}' against '#{path}")
      res = http.request(req)
      Log.debug("Response code: #{res.code}")
      Log.debug("Response body: #{res.body}")
      process_http_request(res)
    end
def api_execute(path, method, options = {})
      params = options[:params]
      case  method
      when :get
        req = build_http_request(Net::HTTP::Get, path, params)
      when :post
        req = build_http_request(Net::HTTP::Post, path, nil, params)
      when :put
        req = build_http_request(Net::HTTP::Put, path, nil, params)
      when :delete
        req = build_http_request(Net::HTTP::Delete, path, params)
      else
        fail "Unknown http action: #{method}"
      end
      http = Net::HTTP.new(host, port)
      http.read_timeout = options[:timeout] || read_timeout
      setup_https(http)
      req.basic_auth(user_name, password) if [user_name, password].all?
      Log.debug("Invoking: '#{req.class}' against '#{path}")
      res = http.request(req)
      Log.debug("Response code: #{res.code}")
      Log.debug("Response body: #{res.body}")
      process_http_request(res)
    end
This method sends api request to etcd server.

 This method has following parameters as argument
 * path    - etcd server path (etcd server end point)
 * method  - the request method used
 * options  - any additional parameters used by request method (optional)
 rubocop:disable MethodLength, CyclomaticComplexity