Class: Invoracle::System

Inherits:
JsonDoc::Document
  • Object
show all
Defined in:
lib/invoracle/system.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dSchema = nil, bDefaultifyDoc = true, bIsStrict = true) ⇒ System

Returns a new instance of System.



6
7
8
9
10
11
# File 'lib/invoracle/system.rb', line 6

def initialize(dSchema=nil,bDefaultifyDoc=true,bIsStrict=true)
  @dSchema        = dSchema || self.getDefaultSchema()
  @bDefaultifyDoc = bDefaultifyDoc ? true : false
  @bIsStrict      = bIsStrict      ? true : false
  @dDocument      = self.getDefaultDocument()
end

Instance Attribute Details

#dSchemaObject

Returns the value of attribute dSchema.



5
6
7
# File 'lib/invoracle/system.rb', line 5

def dSchema
  @dSchema
end

Instance Method Details

#getDefaultSchemaObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/invoracle/system.rb', line 13

def getDefaultSchema()
  dSchema       =  {
    :type       => 'system',
    :properties => {
      :sCluUid             => { :default => '', :type => 'string', :description => 'Cluster UID' },

      :sSysUid             => { :default => '', :type => 'string', :description => 'System UID'  },
      :sSysFqdn            => { :default => '', :type => 'string', :description => 'FQDN' },
      :sSysIpAddress       => { :default => '', :type => 'string', :description => 'IP'   },

      :aSysRoles           => { :default => [], :type => 'array' , :description => 'Roles' },
      :dSysRoles           => { :default => {}, :type => 'object', :description => 'Roles' },
      :sSysRoles           => { :default => '', :type => 'string', :description => 'Roles' },

      :sDcUid              => { :default => '', :type => 'string', :description => 'DC'   },
      :sDcCageCode         => { :default => '', :type => 'string', :description => 'Cage' },
      :sDcRackCode         => { :default => '', :type => 'string', :description => 'Rack' },

      :sMfgName            => { :default => '', :type => 'string', :description => 'Mfg Name'    },
      :sMfgProductName     => { :default => '', :type => 'string', :description => 'Mfg Product' },

      :sBiosVersion        => { :default => '', :type => 'string', :description => 'Bios' },

      :sCpuModelName       => { :default => '', :type => 'string', :description => 'CPU Model' },
      :iCpuMhz             => { :default => -1, :type => 'number', :description => 'CPU MHz'   },
      :iCpuCount           => { :default => -1, :type => 'number', :description => 'CPU Count' },
      :iCpuCoresCount      => { :default => -1, :type => 'number', :description => 'CPU Cores' },
      :fCpuIdleAvg         => { :default => -1, :type => 'number', :description => 'CPU Idle'  },
      :fCpuIdleMinMin      => { :default => -1, :type => 'number', :description => 'CPU Idle Min Min'  },

      :iDiskUsedKb         => { :default => -1, :type => 'number', :description => 'Dsk KB Used'  },
      :fDiskUsedGb         => { :default => -1, :type => 'number', :description => 'Dsk GB Used'  },
      :fDiskAvailableGb    => { :default => -1, :type => 'number', :description => 'Dsk GB Avail' },
      :fDiskTotalGb        => { :default => -1, :type => 'number', :description => 'Dsk GB Total' },
      :fDiskUtilMaxMax     => { :default => -1, :type => 'number', :description => 'Dsk Util Max Max' },

      :iIpmHasIpm          => { :default => -1, :type => 'number', :description => 'IPM Present' },
      :sIpmType            => { :default => '', :type => 'string', :description => 'IPM Type'    },
      :sIpmVersion         => { :default => '', :type => 'string', :description => 'IPM Version' },
      :sIpmIpAddress       => { :default => '', :type => 'string', :description => 'IPM IP'      },
      :sIpmMacAddress      => { :default => '', :type => 'string', :description => 'IPM MAC'     },

      :sNetMacAddress      => { :default => '', :type => 'string', :description => 'MAC' },

      :sOsName             => { :default => '', :type => 'string', :description => 'OS' },
      :sOsVersion          => { :default => '', :type => 'string', :description => 'OS Version' },
      :sOsKernelRelease    => { :default => '', :type => 'string', :description => 'OS Kernel'  },

      :sRaidControllerName => { :default => '', :type => 'string', :description => 'RAID Controler'  },
      :iRaidDrivesNumAll   => { :default => -1, :type => 'number', :description => 'RAID Drives All' },
      :iRaidDrivesNumBad   => { :default => -1, :type => 'number', :description => 'RAID Drives Bad' },

      :sVirType            => { :default => '', :type => 'string', :description => 'VM Type' },
      :sVirHostFqdn        => { :default => '', :type => 'string', :description => 'VM Host FQDN' },
      :iVirHostFqdnDiff    => { :default => -1, :type => 'number', :description => 'VM Host FQDN Diff' },
      :iVirHostIsVmware    => { :default => -1, :type => 'number', :description => 'Is VMWare' },
      :iVirHostIsKvm       => { :default => -1, :type => 'number', :description => 'Is KVM'    },
      :iVirIsGuest         => { :default => -1, :type => 'number', :description => 'Is Guest'  },
      :iVirIsHost          => { :default => -1, :type => 'number', :description => 'Is Host'   },
      :sVirVmwareSwInfo    => { :default => '', :type => 'string', :description => 'VMware Info'  },

      :sXDellSvcTag        => { :default => '', :type => 'string', :description => 'Svc Tag'  },
      :sXSfIdAct           => { :default => '', :type => 'string', :description => 'SFID'     },
    }
  }
  return dSchema
end