vmware_web_service 2.0.3 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VMwareWebService/MiqHostDatastoreSystem.rb +5 -1
- data/lib/VMwareWebService/MiqVim.rb +80 -56
- data/lib/VMwareWebService/MiqVimClientBase.rb +11 -10
- data/lib/VMwareWebService/MiqVimCluster.rb +6 -2
- data/lib/VMwareWebService/MiqVimDataStore.rb +9 -6
- data/lib/VMwareWebService/MiqVimDump.rb +1 -1
- data/lib/VMwareWebService/MiqVimEventHistoryCollector.rb +5 -1
- data/lib/VMwareWebService/MiqVimEventMonitor.rb +22 -20
- data/lib/VMwareWebService/MiqVimFolder.rb +15 -11
- data/lib/VMwareWebService/MiqVimHost.rb +15 -13
- data/lib/VMwareWebService/MiqVimInventory.rb +78 -79
- data/lib/VMwareWebService/MiqVimPerfHistory.rb +13 -10
- data/lib/VMwareWebService/MiqVimUpdate.rb +50 -50
- data/lib/VMwareWebService/MiqVimVdlMod.rb +7 -7
- data/lib/VMwareWebService/MiqVimVm.rb +102 -101
- data/lib/VMwareWebService/VimService.rb +5 -2
- data/lib/VMwareWebService/VixDiskLib/VixDiskLib.rb +15 -7
- data/lib/VMwareWebService/VixDiskLib/VixDiskLibServer.rb +15 -15
- data/lib/VMwareWebService/VixDiskLib/vdl_wrapper.rb +26 -27
- data/lib/VMwareWebService/exception.rb +0 -2
- data/lib/VMwareWebService/logging.rb +16 -0
- data/lib/VMwareWebService/version.rb +1 -1
- data/lib/vmware_web_service.rb +2 -0
- metadata +15 -48
- data/lib/VMwareWebService/DMiqVim.rb +0 -95
- data/lib/VMwareWebService/DMiqVimSync.rb +0 -45
- data/lib/VMwareWebService/MiqVimBroker.rb +0 -581
- data/lib/VMwareWebService/MiqVimBrokerMods.rb +0 -222
- data/lib/VMwareWebService/MiqVimCoreUpdater.rb +0 -269
- data/lib/VMwareWebService/miq_fault_tolerant_vim.rb +0 -246
@@ -1,4 +1,8 @@
|
|
1
|
+
require 'VMwareWebService/logging'
|
2
|
+
|
1
3
|
class MiqVimFolder
|
4
|
+
include VMwareWebService::Logging
|
5
|
+
|
2
6
|
attr_reader :name, :invObj
|
3
7
|
|
4
8
|
def initialize(invObj, fh)
|
@@ -36,10 +40,10 @@ class MiqVimFolder
|
|
36
40
|
hmor = (host.kind_of?(Hash) ? host['MOR'] : host) if host
|
37
41
|
pmor = (pool.kind_of?(Hash) ? pool['MOR'] : pool) if pool
|
38
42
|
|
39
|
-
|
43
|
+
logger.info "MiqVimFolder(#{@invObj.server}, #{@invObj.username}).registerVM: calling registerVM_Task"
|
40
44
|
taskMor = @invObj.registerVM_Task(@fMor, path, name, asTemplate.to_s, pmor, hmor)
|
41
|
-
|
42
|
-
|
45
|
+
logger.info "MiqVimFolder(#{@invObj.server}, #{@invObj.username}).registerVM: returned from registerVM_Task"
|
46
|
+
logger.debug "MiqVimFolder::registerVM: taskMor = #{taskMor}"
|
43
47
|
waitForTask(taskMor)
|
44
48
|
end
|
45
49
|
|
@@ -65,9 +69,9 @@ class MiqVimFolder
|
|
65
69
|
cs.vmFolder = ah[:vmFolder] unless ah[:vmFolder].nil?
|
66
70
|
end
|
67
71
|
|
68
|
-
|
72
|
+
logger.info "MiqVimCluster(#{@invObj.server}, #{@invObj.username}).addStandaloneHost: calling addStandaloneHost_Task"
|
69
73
|
taskMor = @invObj.addStandaloneHost_Task(@fMor, cspec, ah[:asConnected].to_s, ah[:license])
|
70
|
-
|
74
|
+
logger.info "MiqVimCluster(#{@invObj.server}, #{@invObj.username}).addStandaloneHost: returned from addStandaloneHost_Task"
|
71
75
|
return taskMor unless ah[:wait]
|
72
76
|
waitForTask(taskMor)
|
73
77
|
end # def addStandaloneHost
|
@@ -77,10 +81,10 @@ class MiqVimFolder
|
|
77
81
|
oMor = nil
|
78
82
|
oMor = (vCenterObject.kind_of?(Hash) ? vCenterObject['MOR'] : vCenterObject) if vCenterObject
|
79
83
|
|
80
|
-
|
84
|
+
logger.info "MiqVimFolder(#{@invObj.server}, #{@invObj.username}).moveIntoFolder: calling moveIntoFolder_Task"
|
81
85
|
taskMor = @invObj.moveIntoFolder_Task(@fMor, oMor)
|
82
|
-
|
83
|
-
|
86
|
+
logger.info "MiqVimFolder(#{@invObj.server}, #{@invObj.username}).moveIntoFolder: returned from moveIntoFolder_Task"
|
87
|
+
logger.debug "MiqVimFolder::moveIntoFolder: taskMor = #{taskMor}"
|
84
88
|
waitForTask(taskMor)
|
85
89
|
end
|
86
90
|
|
@@ -96,10 +100,10 @@ class MiqVimFolder
|
|
96
100
|
hMor = (host.kind_of?(Hash) ? host['MOR'] : host) if host
|
97
101
|
pMor = (pool.kind_of?(Hash) ? pool['MOR'] : pool) if pool
|
98
102
|
|
99
|
-
|
103
|
+
logger.info "MiqVimFolder(#{@invObj.server}, #{@invObj.username}).createVM calling createVM_Task"
|
100
104
|
taskMor = @invObj.createVM_Task(@fMor, configSpec, pMor, hMor)
|
101
|
-
|
102
|
-
|
105
|
+
logger.info "MiqVimFolder(#{@invObj.server}, #{@invObj.username}).createVM returned from createVM_Task"
|
106
|
+
logger.debug "MiqVimFolder::createVM: taskMor = #{taskMor}"
|
103
107
|
waitForTask(taskMor)
|
104
108
|
end
|
105
109
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'sync'
|
2
2
|
|
3
|
-
require 'enumerator'
|
4
3
|
require "ostruct"
|
5
4
|
|
6
5
|
require 'more_core_extensions/core_ext/hash'
|
6
|
+
require 'VMwareWebService/logging'
|
7
7
|
require 'VMwareWebService/MiqHostDatastoreSystem'
|
8
8
|
require 'VMwareWebService/MiqHostStorageSystem'
|
9
9
|
require 'VMwareWebService/MiqHostFirewallSystem'
|
@@ -14,6 +14,8 @@ require 'VMwareWebService/MiqHostAdvancedOptionManager'
|
|
14
14
|
require 'VMwareWebService/MiqHostSnmpSystem'
|
15
15
|
|
16
16
|
class MiqVimHost
|
17
|
+
include VMwareWebService::Logging
|
18
|
+
|
17
19
|
attr_reader :name, :invObj
|
18
20
|
|
19
21
|
def initialize(invObj, hh)
|
@@ -108,49 +110,49 @@ class MiqVimHost
|
|
108
110
|
end
|
109
111
|
|
110
112
|
def enterMaintenanceMode(timeout = 0, evacuatePoweredOffVms = false, wait = true)
|
111
|
-
|
113
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).enterMaintenanceMode: calling enterMaintenanceMode_Task"
|
112
114
|
taskMor = @invObj.enterMaintenanceMode_Task(@hMor, timeout, evacuatePoweredOffVms)
|
113
|
-
|
115
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).enterMaintenanceMode: returned from enterMaintenanceMode_Task"
|
114
116
|
return taskMor unless wait
|
115
117
|
waitForTask(taskMor)
|
116
118
|
end
|
117
119
|
|
118
120
|
def exitMaintenanceMode(timeout = 0, wait = true)
|
119
|
-
|
121
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).exitMaintenanceMode: calling exitMaintenanceMode_Task"
|
120
122
|
taskMor = @invObj.exitMaintenanceMode_Task(@hMor, timeout)
|
121
|
-
|
123
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).exitMaintenanceMode: returned from exitMaintenanceMode_Task"
|
122
124
|
return taskMor unless wait
|
123
125
|
waitForTask(taskMor)
|
124
126
|
end
|
125
127
|
|
126
128
|
def powerDownHostToStandBy(timeout = 0, evacuatePoweredOffVms = false, wait = true)
|
127
|
-
|
129
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).powerDownHostToStandBy: calling powerDownHostToStandBy_Task"
|
128
130
|
taskMor = @invObj.powerDownHostToStandBy_Task(@hMor, timeout, evacuatePoweredOffVms)
|
129
|
-
|
131
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).powerDownHostToStandBy: returned from powerDownHostToStandBy_Task"
|
130
132
|
return taskMor unless wait
|
131
133
|
waitForTask(taskMor)
|
132
134
|
end
|
133
135
|
|
134
136
|
def powerUpHostFromStandBy(timeout = 0, wait = true)
|
135
|
-
|
137
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).powerUpHostFromStandBy: calling powerUpHostFromStandBy_Task"
|
136
138
|
taskMor = @invObj.powerUpHostFromStandBy_Task(@hMor, timeout)
|
137
|
-
|
139
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).powerUpHostFromStandBy: returned from powerUpHostFromStandBy_Task"
|
138
140
|
return taskMor unless wait
|
139
141
|
waitForTask(taskMor)
|
140
142
|
end
|
141
143
|
|
142
144
|
def rebootHost(force = false, wait = true)
|
143
|
-
|
145
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).rebootHost: calling rebootHost_Task"
|
144
146
|
taskMor = @invObj.rebootHost_Task(@hMor, force)
|
145
|
-
|
147
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).rebootHost: returned from rebootHost_Task"
|
146
148
|
return taskMor unless wait
|
147
149
|
waitForTask(taskMor)
|
148
150
|
end
|
149
151
|
|
150
152
|
def shutdownHost(force = false, wait = true)
|
151
|
-
|
153
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).shutdownHost: calling shutdownHost_Task"
|
152
154
|
taskMor = @invObj.shutdownHost_Task(@hMor, force)
|
153
|
-
|
155
|
+
logger.info "MiqVimHost(#{@invObj.server}, #{@invObj.username}).shutdownHost: returned from shutdownHost_Task"
|
154
156
|
return taskMor unless wait
|
155
157
|
waitForTask(taskMor)
|
156
158
|
end
|