Sha256: 19f580f73cfa41c529e0217ffb4f51cfef303c981f702b0df5c70ca5b3e2a7ee
Contents?: true
Size: 961 Bytes
Versions: 18
Compression:
Stored size: 961 Bytes
Contents
#coding=utf-8 require "aio/core" class Aio::Module::Cmd::Cisco::ShowFailover < Aio::Module::Cmd::Cisco include Aio::Module def initialize super({ :cmd_full => "show failover", :cmd_short => "sh fail", :author => "Elin", :description => "This is Cisco ASA Command# show failover", :ranking => Ranking_1, :platform => FW, }) end def parse context = self.context.dup failover = {} useful[:failover] = failover context.readline_match_block(/Failover (?<status>.*)/) do |block| block.update(failover, :status) end if failover[:status] =~ /On/ context.readline_match_block(/Failover unit (?<standby>.*)/) do |block| block.update(failover, :standby) end context.readline_match_block(/Failover LAN Interface: failover (?<interface>[^\s]+) \((?<interface_status>[^\)]+)\)/) do |block| block.update(failover, :interface) block.update(failover, :interface_status) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems