Sha256: 6957550483eaa404073274ca1f34f53cced41e5eae49a7ab2904369b71ea6343
Contents?: true
Size: 591 Bytes
Versions: 3
Compression:
Stored size: 591 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} inSession || #{@@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
3 entries across 3 versions & 1 rubygems