Class: MiqHostServiceSystem

Inherits:
Object
  • Object
show all
Includes:
DRb::DRbUndumped, MiqBrokerVimConnectionCheck
Defined in:
lib/VMwareWebService/MiqVimBrokerMods.rb,
lib/VMwareWebService/MiqHostServiceSystem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MiqBrokerVimConnectionCheck

#connectionRemoved?

Constructor Details

#initialize(ssMor, invObj) ⇒ MiqHostServiceSystem

Returns a new instance of MiqHostServiceSystem.



4
5
6
7
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 4

def initialize(ssMor, invObj)
  @invObj = invObj
  @ssMor = ssMor
end

Instance Attribute Details

#invObjObject (readonly)

Returns the value of attribute invObj.



2
3
4
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 2

def invObj
  @invObj
end

Instance Method Details

#getServicesByFilter(filter) ⇒ Object



13
14
15
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 13

def getServicesByFilter(filter)
  @invObj.applyFilter(serviceInfo['service'], filter)
end

#refreshServicesObject



17
18
19
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 17

def refreshServices
  @invObj.refreshServices(@ssMor)
end

#restartService(skey) ⇒ Object



21
22
23
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 21

def restartService(skey)
  @invObj.restartService(@ssMor, skey)
end

#serviceInfoObject



9
10
11
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 9

def serviceInfo
  @invObj.getMoProp(@ssMor)['serviceInfo']
end

#startService(skey) ⇒ Object



25
26
27
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 25

def startService(skey)
  @invObj.startService(@ssMor, skey)
end

#stopService(skey) ⇒ Object



29
30
31
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 29

def stopService(skey)
  @invObj.stopService(@ssMor, skey)
end

#uninstallService(skey) ⇒ Object



33
34
35
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 33

def uninstallService(skey)
  @invObj.uninstallService(@ssMor, skey)
end

#updateServicePolicy(skey, policy) ⇒ Object



37
38
39
# File 'lib/VMwareWebService/MiqHostServiceSystem.rb', line 37

def updateServicePolicy(skey, policy)
  @invObj.updateServicePolicy(@ssMor, skey, policy)
end