Sha256: 0ebb577938f48c5754ef0051e59c032f9f2551dc828b9110ffb15c9cfaaaa9e7

Contents?: true

Size: 569 Bytes

Versions: 2

Compression:

Stored size: 569 Bytes

Contents

module Serverspec
  module Type
    class VyosConfig < Base
      @@cli = "/bin/cli-shell-api"
      @@setup_session = "session_env=$(#{@@cli} getSessionEnv $PPID); eval ${session_env}; #{@@cli} setupSession;"
      def exists?
        res = @runner.run_command("#{@@setup_session} #{@@cli} exists #{@name}")
        res.exit_status == 0
      end
 
      def value
        @runner.run_command("#{@@setup_session} #{@@cli} returnValue #{@name}").stdout
      end
    end
    def vyos_config(name)
      VyosConfig.new(name)
    end
  end
end
 
include Serverspec::Type

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
serverspec-vyos-config-0.1.1 lib/serverspec_vyos_config/vyos_config.rb
serverspec-vyos-config-0.1.0 lib/serverspec_vyos_config/vyos_config.rb