Class: Specinfra::Command::Aix::Base::Inventory

Inherits:
Base::Inventory show all
Defined in:
lib/specinfra/command/aix/base/inventory.rb

Class Method Summary collapse

Methods inherited from Base::Inventory

get_group, get_user

Methods inherited from Base

create, escape

Class Method Details

.get_cpuObject



7
8
9
# File 'lib/specinfra/command/aix/base/inventory.rb', line 7

def get_cpu
  'false'
end

.get_domainObject



15
16
17
18
19
20
21
22
23
# File 'lib/specinfra/command/aix/base/inventory.rb', line 15

def get_domain
  # This is emulating the dnsdomainname command in Linux
  # Requires proper configuration of /etc/resolv.conf
  # and DNS.
  # The exit at the end is to only return one entry if
  # the host is running in dualstack mode (IPv4 and IPv6)
  'host -n `uname -n` | ' +
  'awk -v h=`uname -n` \'$1 ~ h { sub(h".", "", $1); print $1; exit }\''
end

.get_filesystemObject



34
35
36
# File 'lib/specinfra/command/aix/base/inventory.rb', line 34

def get_filesystem
  'df -kP'
end

.get_fqdnObject



25
26
27
28
29
30
31
32
# File 'lib/specinfra/command/aix/base/inventory.rb', line 25

def get_fqdn
  # This is emulating the hostname -f command in Linux
  # Requires proper configuration of /etc/resolv.conf
  # and DNS.
  # The exit at the end is to only return one entry if
  # the host is running in dualstack mode (IPv4 and IPv6)
  'host -n `uname -n` | awk -v h=`uname -n` \'$1 ~ h"." { print $1; exit }\''
end

.get_hostnameObject



11
12
13
# File 'lib/specinfra/command/aix/base/inventory.rb', line 11

def get_hostname
  'uname -n'
end

.get_memoryObject



3
4
5
# File 'lib/specinfra/command/aix/base/inventory.rb', line 3

def get_memory
  'false'
end