Module: Aix::Exec

Includes:
Beaker::CommandFactory
Included in:
Host
Defined in:
lib/beaker/host/aix/exec.rb

Instance Attribute Summary

Attributes included from Beaker::CommandFactory

#assertions

Instance Method Summary collapse

Methods included from Beaker::CommandFactory

#execute, #fail_test

Instance Method Details

#get_ipObject



8
9
10
# File 'lib/beaker/host/aix/exec.rb', line 8

def get_ip
  execute("ifconfig -a inet| awk '/broadcast/ {print $2}' | cut -d/ -f1 | head -1").strip
end

#rebootObject



4
5
6
# File 'lib/beaker/host/aix/exec.rb', line 4

def reboot
  exec(Beaker::Command.new("shutdown -Fr"), :expect_connection_failure => true)
end

#ssh_permit_user_environmentResult

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Sets the PermitUserEnvironent setting & restarts the SSH service

Returns:



25
26
27
28
# File 'lib/beaker/host/aix/exec.rb', line 25

def ssh_permit_user_environment
  exec(Beaker::Command.new("echo '\nPermitUserEnvironment yes' >> /etc/ssh/sshd_config"))
  ssh_service_restart
end

#ssh_service_restartResult

Restarts the SSH service

Returns:

  • (Result)

    result of starting ssh service



15
16
17
18
# File 'lib/beaker/host/aix/exec.rb', line 15

def ssh_service_restart
  exec(Beaker::Command.new("stopsrc -g ssh"))
  exec(Beaker::Command.new("startsrc -g ssh"))
end