vm_shepherd 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bda04a445240a1429183e7c51822cc950c901cd
4
- data.tar.gz: 38c5e5d7a8876bc3e2178cd65d1dfaaacb7c53e6
3
+ metadata.gz: 3c32036e3aca4e84839df2a57544f620b8c1d29a
4
+ data.tar.gz: 1247e3b6de98c44acf42bfb39f0f1c38bbe79d00
5
5
  SHA512:
6
- metadata.gz: 08ace1e2afab360a8267253f487e3624f0bd7aed49a69d9040638e0181ebbf86138587918fe08f29ca08c813413a4d0676b4051541b59475fcca37a0571ddb53
7
- data.tar.gz: d1be716a990bdfc2e76b3177d7b952e89f180fa3bd5bb025c074bb7e759ed9b4442e345b306d5630e7462cc5026e74bc12a5e92e6573f72812e27e3996ad0dcd
6
+ metadata.gz: 41484520464f955a1b95bd7766a34cc19789e817651ba6dcbd703c155692948db0351f397cfc6a63b417cd2468c4226e30eeef697d85cab8e62f5e92c9d5447c
7
+ data.tar.gz: ca9d0d8cd53359c809524de9d6528aeef537cc76431f8533a9ce4b4cd44a54f98da3ac8ce1a2e1e1ce2bc0dbc6fe88d76ca73212bcdeccdf2c044b2043f0282c
@@ -52,6 +52,8 @@ module VmShepherd
52
52
  netmask: vm_shepherd_config.dig('vm', 'netmask'),
53
53
  dns: vm_shepherd_config.dig('vm', 'dns'),
54
54
  ntp_servers: vm_shepherd_config.dig('vm', 'ntp_servers'),
55
+ cpus: vm_shepherd_config.dig('vm', 'cpus'),
56
+ ram_mb: vm_shepherd_config.dig('vm', 'ram_mb'),
55
57
  },
56
58
  {
57
59
  cluster: vm_shepherd_config.dig('vsphere', 'cluster'),
@@ -1,3 +1,3 @@
1
1
  module VmShepherd
2
- VERSION = '3.0.3'.freeze
2
+ VERSION = '3.0.4'.freeze
3
3
  end
@@ -114,7 +114,7 @@ module VmShepherd
114
114
  def boot_vm(ovf_file_path, vm_config, vsphere_config)
115
115
  datacenter.vmFolder.traverse(vsphere_config[:folder], RbVmomi::VIM::Folder, true)
116
116
  template = deploy_ovf_template(ovf_file_path, vsphere_config)
117
- vm = create_vm_from_template(template, vsphere_config)
117
+ vm = create_vm_from_template(template, vm_config, vsphere_config)
118
118
 
119
119
  reconfigure_vm(vm, vm_config)
120
120
  power_on_vm(vm)
@@ -202,7 +202,7 @@ module VmShepherd
202
202
  end || fail('ERROR finding host to upload OVF to')
203
203
  end
204
204
 
205
- def create_vm_from_template(template, vsphere_config)
205
+ def create_vm_from_template(template, vm_config, vsphere_config)
206
206
  logger.info("BEGIN clone_vm_task tempalte=#{template.name}")
207
207
  template.CloneVM_Task(
208
208
  folder: target_folder(vsphere_config),
@@ -215,7 +215,7 @@ module VmShepherd
215
215
  },
216
216
  powerOn: false,
217
217
  template: false,
218
- config: {numCPUs: 2, memoryMB: 2048},
218
+ config: {numCPUs: vm_config[:cpus] || 2, memoryMB: vm_config[:ram_mb] || 2048},
219
219
  }
220
220
  ).wait_for_completion.tap {
221
221
  logger.info("END clone_vm_task tempalte=#{template.name}")
@@ -18,6 +18,8 @@ vm_shepherd:
18
18
  netmask: OVA_NETMASK
19
19
  dns: OVA_DNS
20
20
  ntp_servers: OVA_NTP
21
+ cpus: OVA_CPUS
22
+ ram_mb: OVA_RAM_MB
21
23
  cleanup:
22
24
  datacenter: VSPHERE_OTHER_DATACENTER
23
25
  datastores:
@@ -45,6 +47,8 @@ vm_shepherd:
45
47
  netmask: OVA_NETMASK-2
46
48
  dns: OVA_DNS-2
47
49
  ntp_servers: OVA_NTP-2
50
+ cpus: OVA_CPUS
51
+ ram_mb: OVA_RAM_MB
48
52
  cleanup:
49
53
  datacenter: VSPHERE_OTHER_DATACENTER-2
50
54
  datastores:
data/spec/spec_helper.rb CHANGED
@@ -2,10 +2,6 @@ SPEC_ROOT = File.expand_path(__dir__)
2
2
 
3
3
  $LOAD_PATH << SPEC_ROOT
4
4
 
5
- require 'codeclimate-test-reporter'
6
-
7
- CodeClimate::TestReporter.start
8
-
9
5
  RSpec.configure do |config|
10
6
  config.expect_with :rspec do |expectations|
11
7
  expectations.include_chain_clauses_in_custom_matcher_descriptions = true
@@ -148,6 +148,8 @@ module VmShepherd
148
148
  netmask: first_config.dig('vm', 'netmask'),
149
149
  dns: first_config.dig('vm', 'dns'),
150
150
  ntp_servers: first_config.dig('vm', 'ntp_servers'),
151
+ cpus: first_config.dig('vm', 'cpus'),
152
+ ram_mb: first_config.dig('vm', 'ram_mb'),
151
153
  },
152
154
  {
153
155
  cluster: first_config.dig('vsphere', 'cluster'),
@@ -166,6 +168,8 @@ module VmShepherd
166
168
  netmask: last_config.dig('vm', 'netmask'),
167
169
  dns: last_config.dig('vm', 'dns'),
168
170
  ntp_servers: last_config.dig('vm', 'ntp_servers'),
171
+ cpus: last_config.dig('vm', 'cpus'),
172
+ ram_mb: last_config.dig('vm', 'ram_mb'),
169
173
  },
170
174
  {
171
175
  cluster: last_config.dig('vsphere', 'cluster'),
data/vm_shepherd.gemspec CHANGED
@@ -29,5 +29,4 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'rake'
30
30
  spec.add_development_dependency 'rspec'
31
31
  spec.add_development_dependency 'rubocop'
32
- spec.add_development_dependency 'codeclimate-test-reporter'
33
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vm_shepherd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ops Manager Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-09 00:00:00.000000000 Z
11
+ date: 2016-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-v1
@@ -136,20 +136,6 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: codeclimate-test-reporter
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
139
  description: A tool for booting and tearing down Ops Manager VMs on various Infrastructures.
154
140
  email:
155
141
  - cf-tempest-eng@pivotal.io