ovfparse 0.9.2.2 → 0.9.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/ovfparse/vmpackage.rb +20 -0
  2. metadata +4 -4
@@ -203,6 +203,26 @@ class VmPackage
203
203
  return osNode.nil? ? '' : osNode['id']
204
204
  end
205
205
 
206
+ def getVmOS_Username
207
+ osNode = getChildByName(virtualSystem, 'OperatingSystemSection')
208
+ if osNode == nil then
209
+ return ''
210
+ else
211
+ userNode = getChildByName(osNode, 'Username')
212
+ return userNode.nil? ? '' : userNode.content
213
+ end
214
+ end
215
+
216
+ def getVmOS_Password
217
+ osNode = getChildByName(virtualSystem, 'OperatingSystemSection')
218
+ if osNode == nil then
219
+ return ''
220
+ else
221
+ passNode = getChildByName(osNode, 'Password')
222
+ return passNode.nil? ? '' : passNode.content
223
+ end
224
+ end
225
+
206
226
  def getVmOS
207
227
  os = getVmOS_ID
208
228
  return os == '' ? '' : OS_ID_TABLE[os.to_i]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ovfparse
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 2
10
- - 2
11
- version: 0.9.2.2
10
+ - 3
11
+ version: 0.9.2.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Jim Barkley
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-03-19 00:00:00 -04:00
19
+ date: 2012-08-18 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency