esxmagicwand 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.rdoc +3 -1
  2. data/bin/deploy_vm +12 -1
  3. data/lib/esxmagicwand.rb +4 -3
  4. metadata +9 -9
data/README.rdoc CHANGED
@@ -26,6 +26,8 @@ EsxMagicWand deploy VMs on ESXi hypervisors and starts a PXE installation
26
26
  cpu=1
27
27
  memory=3000
28
28
  os_type=centos64Guest
29
+ network1=VM Network
30
+ network2=Vlan 100
29
31
 
30
32
  lease_name=centos6_test1
31
33
  ip=192.168.20.2
@@ -38,4 +40,4 @@ EsxMagicWand deploy VMs on ESXi hypervisors and starts a PXE installation
38
40
 
39
41
  * Undeploy
40
42
 
41
- $ undeploy_vm centos6_1.conf
43
+ $ undeploy_vm centos6_1.conf
data/bin/deploy_vm CHANGED
@@ -22,14 +22,25 @@ class BaseCommand < Clamp::Command
22
22
 
23
23
  #Prepare VM definition
24
24
  puts 'Prepare VM definition'
25
+
26
+ #Get nics
27
+ nics = []
28
+ c.params['vm'].keys.each do |key|
29
+ if key.include? 'network'
30
+ nics.push({:network => c.params['vm'][key]})
31
+ end
32
+ end
33
+
25
34
  vm = VMWizard::VirtualMachine.new(
26
35
  :name => c.params['vm']['name'],
27
36
  :disk_size => c.params['vm']['size'],
28
37
  :cpu => c.params['vm']['cpu'],
29
38
  :ram => c.params['vm']['memory'],
30
39
  :disk_type => c.params['vm']['disk_type'],
31
- :guest => c.params['vm']['os_type']
40
+ :guest => c.params['vm']['os_type'],
41
+ :nics => nics
32
42
  )
43
+
33
44
  datastore = c.params['esx-server']['datastore']
34
45
 
35
46
  #Deploy VM
data/lib/esxmagicwand.rb CHANGED
@@ -3,16 +3,16 @@ require File.join(File.dirname(__FILE__), 'dhcp.rb')
3
3
  module VMWizard
4
4
 
5
5
  class VirtualMachine
6
- attr_reader :name, :disk_size, :cpu, :ram, :disk_type, :guest, :mac
6
+ attr_reader :name, :disk_size, :cpu, :ram, :disk_type, :guest, :nics
7
7
 
8
8
  def initialize(specs)
9
9
  @name = specs[:name]
10
10
  @disk_size = specs[:disk_size]
11
11
  @cpu = specs[:cpu]
12
12
  @ram = specs[:ram]
13
- @mac = specs[:mac]
14
13
  @disk_type = specs[:disk_type]
15
14
  @guest = specs[:guest]
15
+ @nics = specs[:nics]
16
16
  end
17
17
  end
18
18
 
@@ -31,7 +31,8 @@ module VMWizard
31
31
  :disk_type => :thin,
32
32
  :disk_size => vm.disk_size,
33
33
  :memory => vm.ram,
34
- :guest_id => vm.guest
34
+ :guest_id => vm.guest,
35
+ :nics => vm.nics
35
36
  )
36
37
 
37
38
  return vm
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esxmagicwand
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - sgirones
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-29 00:00:00 Z
18
+ date: 2012-01-02 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement
@@ -97,12 +97,12 @@ dependencies:
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
- hash: 19
100
+ hash: 29
101
101
  segments:
102
102
  - 0
103
103
  - 2
104
- - 2
105
- version: 0.2.2
104
+ - 5
105
+ version: 0.2.5
106
106
  version_requirements: *id006
107
107
  name: esx
108
108
  prerelease: false
@@ -163,7 +163,7 @@ dependencies:
163
163
  name: parseconfig
164
164
  prerelease: false
165
165
  type: :runtime
166
- description: VM deploy on ESX using PXE as install method. Add dynamic leases to DHCP server through OMAPI
166
+ description: VM deployments on ESX using PXE as installation method. Add dynamic leases to DHCP server through OMAPI
167
167
  email: salvador.girones@abiquo.com
168
168
  executables:
169
169
  - deploy_vm
@@ -212,6 +212,6 @@ rubyforge_project:
212
212
  rubygems_version: 1.8.11
213
213
  signing_key:
214
214
  specification_version: 3
215
- summary: VM deploy on ESX using PXE
215
+ summary: VM deployments on ESX using PXE
216
216
  test_files: []
217
217