Sha256: 1c0cda984c1e75cee7a9f16b648243a3bee07f7145acaf97a0f912608d09e7a8

Contents?: true

Size: 621 Bytes

Versions: 3

Compression:

Stored size: 621 Bytes

Contents

class Cambium < Oxidized::Model
  cfg_cb = lambda do
    c_page = @m.click @m_page.link_with(text: "Configuration")
    u_page = @m.click c_page.link_with(text: "Unit Settings")
    cfg    = @m.click u_page.link_with(text: /\.cfg$/)
    cfg.body
  end

  cmd cfg_cb do |cfg|
    cfg.gsub! /"cfgUtcTimestamp":.*?,\n/, ''
    cfg
  end

  cfg :http do
    @main_page = "/main.cgi"
    define_singleton_method :login do
      @m_page = @m_page.form_with(action: "login.cgi") do |form|
        form.CanopyUsername = @node.auth[:username]
        form.CanopyPassword = @node.auth[:password]
      end.submit
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
oxidized-0.29.0 lib/oxidized/model/cambium.rb
oxidized-0.28.0 lib/oxidized/model/cambium.rb
oxidized-0.27.0 lib/oxidized/model/cambium.rb