Class: PbmService
- Inherits:
-
Object
- Object
- PbmService
- Defined in:
- lib/VMwareWebService/PbmService.rb
Instance Method Summary collapse
-
#initialize(vim) ⇒ PbmService
constructor
A new instance of PbmService.
- #queryAssociatedEntity(profileId) ⇒ Object
- #queryMatchingHub(profileId, hubsToSearch = nil) ⇒ Object
- #queryProfile ⇒ Object
- #retrieveContent(profileIds) ⇒ Object
Constructor Details
#initialize(vim) ⇒ PbmService
Returns a new instance of PbmService.
7 8 9 10 11 12 13 14 |
# File 'lib/VMwareWebService/PbmService.rb', line 7 def initialize(vim) # RbVmomi::PBM#connect expects a RbVmomi::VIM object, use a struct # to fake it out into using our vim Handsoap connection pbm_vim_conn = PbmVimConnection.new(vim.server.dup, vim..dup) @pbm = RbVmomi::PBM.connect(pbm_vim_conn, :insecure => true) @sic = @pbm.serviceContent end |
Instance Method Details
#queryAssociatedEntity(profileId) ⇒ Object
16 17 18 |
# File 'lib/VMwareWebService/PbmService.rb', line 16 def queryAssociatedEntity(profileId) @sic.profileManager.PbmQueryAssociatedEntity(:profile => profileId) end |
#queryMatchingHub(profileId, hubsToSearch = nil) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/VMwareWebService/PbmService.rb', line 20 def queryMatchingHub(profileId, hubsToSearch = nil) @sic.placementSolver.PbmQueryMatchingHub( :profile => profileId, :hubsToSearch => hubsToSearch ) end |
#queryProfile ⇒ Object
27 28 29 30 31 |
# File 'lib/VMwareWebService/PbmService.rb', line 27 def queryProfile @sic.profileManager.PbmQueryProfile( :resourceType => RbVmomi::PBM::PbmProfileResourceType(:resourceType => "STORAGE") ) end |
#retrieveContent(profileIds) ⇒ Object
33 34 35 |
# File 'lib/VMwareWebService/PbmService.rb', line 33 def retrieveContent(profileIds) @sic.profileManager.PbmRetrieveContent(:profileIds => profileIds) end |