Class: Cisco::Platform

Inherits:
NodeUtil show all
Defined in:
lib/util/platform.rb

Overview

Platform - class for gathering platform hardware and software information

Class Method Summary collapse

Methods inherited from NodeUtil

client, #client, #get, #ios_xr?, #nexus?, node, #node, platform, #platform, supports?, #supports?

Class Method Details

.host_nameObject



34
35
36
# File 'lib/util/platform.rb', line 34

def self.host_name
  client.host_name
end

.image_versionObject

XR: 6.1.1.04I



21
22
23
# File 'lib/util/platform.rb', line 21

def self.image_version
  config_get('show_version', 'version')
end

.product_idObject



38
39
40
# File 'lib/util/platform.rb', line 38

def self.product_id
  client.product_id
end

.systemObject



42
43
44
# File 'lib/util/platform.rb', line 42

def self.system
  client.system
end

.system_imageObject

ex: ‘n3500-uk9.6.0.2.A3.0.40.bin’



26
27
28
# File 'lib/util/platform.rb', line 26

def self.system_image
  config_get('show_version', 'boot_image')
end

.system_timeObject



30
31
32
# File 'lib/util/platform.rb', line 30

def self.system_time
  client.system_time
end