vm_shepherd 1.11.0 → 1.11.1
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.
- checksums.yaml +4 -4
- data/lib/vm_shepherd.rb +3 -3
- data/lib/vm_shepherd/aws_manager.rb +29 -26
- data/lib/vm_shepherd/openstack_manager.rb +30 -30
- data/lib/vm_shepherd/retry_helper.rb +2 -2
- data/lib/vm_shepherd/shepherd.rb +43 -43
- data/lib/vm_shepherd/vcloud/deployer.rb +3 -3
- data/lib/vm_shepherd/vcloud/destroyer.rb +1 -1
- data/lib/vm_shepherd/vcloud/vapp_config.rb +40 -40
- data/lib/vm_shepherd/vcloud_manager.rb +5 -5
- data/lib/vm_shepherd/version.rb +1 -1
- data/lib/vm_shepherd/vsphere_manager.rb +34 -34
- data/spec/vm_shepherd/aws_manager_spec.rb +74 -57
- data/spec/vm_shepherd/data_object_spec.rb +2 -2
- data/spec/vm_shepherd/openstack_manager_spec.rb +43 -43
- data/spec/vm_shepherd/shepherd_spec.rb +120 -120
- data/spec/vm_shepherd/vcloud/deployer_spec.rb +4 -4
- data/spec/vm_shepherd/vcloud/vapp_config_spec.rb +4 -4
- data/spec/vm_shepherd/vcloud_manager_spec.rb +43 -43
- data/spec/vm_shepherd/vsphere_manager_spec.rb +5 -5
- data/vm_shepherd.gemspec +11 -11
- metadata +3 -3
@@ -9,12 +9,12 @@ module VmShepherd
|
|
9
9
|
describe '.deploy_and_power_on_vapp' do
|
10
10
|
let(:vapp_config) do
|
11
11
|
VappConfig.new(
|
12
|
-
name:
|
13
|
-
ip:
|
12
|
+
name: 'NAME',
|
13
|
+
ip: 'IP',
|
14
14
|
gateway: 'GATEWAY',
|
15
15
|
netmask: 'NETMASK',
|
16
|
-
dns:
|
17
|
-
ntp:
|
16
|
+
dns: 'DNS',
|
17
|
+
ntp: 'NTP',
|
18
18
|
catalog: 'CATALOG',
|
19
19
|
network: 'NETWORK',
|
20
20
|
)
|
@@ -6,12 +6,12 @@ module VmShepherd
|
|
6
6
|
RSpec.describe(VappConfig) do
|
7
7
|
subject(:vapp_config) do
|
8
8
|
VappConfig.new(
|
9
|
-
name:
|
10
|
-
ip:
|
9
|
+
name: 'NAME',
|
10
|
+
ip: 'IP',
|
11
11
|
gateway: 'GATEWAY',
|
12
12
|
netmask: 'NETMASK',
|
13
|
-
dns:
|
14
|
-
ntp:
|
13
|
+
dns: 'DNS',
|
14
|
+
ntp: 'NTP',
|
15
15
|
catalog: 'CATALOG',
|
16
16
|
network: 'NETWORK',
|
17
17
|
)
|
@@ -8,10 +8,10 @@ module VmShepherd
|
|
8
8
|
RSpec.describe VcloudManager do
|
9
9
|
let(:login_info) do
|
10
10
|
{
|
11
|
-
url:
|
11
|
+
url: 'FAKE_URL',
|
12
12
|
organization: 'FAKE_ORGANIZATION',
|
13
|
-
user:
|
14
|
-
password:
|
13
|
+
user: 'FAKE_USER',
|
14
|
+
password: 'FAKE_PASSWORD',
|
15
15
|
}
|
16
16
|
end
|
17
17
|
let(:vdc_name) { 'FAKE_VDC_NAME' }
|
@@ -23,11 +23,11 @@ module VmShepherd
|
|
23
23
|
describe '#deploy' do
|
24
24
|
let(:vapp_config) do
|
25
25
|
Vcloud::VappConfig.new(
|
26
|
-
ip:
|
27
|
-
name:
|
26
|
+
ip: 'FAKE_IP',
|
27
|
+
name: 'FAKE_NAME',
|
28
28
|
gateway: 'FAKE_GATEWAY',
|
29
|
-
dns:
|
30
|
-
ntp:
|
29
|
+
dns: 'FAKE_DNS',
|
30
|
+
ntp: 'FAKE_NTP',
|
31
31
|
netmask: 'FAKE_NETMASK',
|
32
32
|
catalog: 'FAKE_VAPP_CATALOG',
|
33
33
|
network: 'FAKE_NETWORK',
|
@@ -73,58 +73,58 @@ module VmShepherd
|
|
73
73
|
let(:expected_properties) do
|
74
74
|
[
|
75
75
|
{
|
76
|
-
'type'
|
77
|
-
'key'
|
78
|
-
'value'
|
79
|
-
'password'
|
76
|
+
'type' => 'string',
|
77
|
+
'key' => 'gateway',
|
78
|
+
'value' => vapp_config.gateway,
|
79
|
+
'password' => 'false',
|
80
80
|
'userConfigurable' => 'true',
|
81
|
-
'Label'
|
82
|
-
'Description'
|
81
|
+
'Label' => 'Default Gateway',
|
82
|
+
'Description' => 'The default gateway address for the VM network. Leave blank if DHCP is desired.'
|
83
83
|
},
|
84
84
|
{
|
85
|
-
'type'
|
86
|
-
'key'
|
87
|
-
'value'
|
88
|
-
'password'
|
85
|
+
'type' => 'string',
|
86
|
+
'key' => 'DNS',
|
87
|
+
'value' => vapp_config.dns,
|
88
|
+
'password' => 'false',
|
89
89
|
'userConfigurable' => 'true',
|
90
|
-
'Label'
|
91
|
-
'Description'
|
90
|
+
'Label' => 'DNS',
|
91
|
+
'Description' => 'The domain name servers for the VM (comma separated). Leave blank if DHCP is desired.',
|
92
92
|
},
|
93
93
|
{
|
94
|
-
'type'
|
95
|
-
'key'
|
96
|
-
'value'
|
97
|
-
'password'
|
94
|
+
'type' => 'string',
|
95
|
+
'key' => 'ntp_servers',
|
96
|
+
'value' => vapp_config.ntp,
|
97
|
+
'password' => 'false',
|
98
98
|
'userConfigurable' => 'true',
|
99
|
-
'Label'
|
100
|
-
'Description'
|
99
|
+
'Label' => 'NTP Servers',
|
100
|
+
'Description' => 'Comma-delimited list of NTP servers'
|
101
101
|
},
|
102
102
|
{
|
103
|
-
'type'
|
104
|
-
'key'
|
105
|
-
'value'
|
106
|
-
'password'
|
103
|
+
'type' => 'string',
|
104
|
+
'key' => 'admin_password',
|
105
|
+
'value' => 'tempest',
|
106
|
+
'password' => 'true',
|
107
107
|
'userConfigurable' => 'true',
|
108
|
-
'Label'
|
109
|
-
'Description'
|
108
|
+
'Label' => 'Admin Password',
|
109
|
+
'Description' => 'This password is used to SSH into the VM. The username is "tempest".',
|
110
110
|
},
|
111
111
|
{
|
112
|
-
'type'
|
113
|
-
'key'
|
114
|
-
'value'
|
115
|
-
'password'
|
112
|
+
'type' => 'string',
|
113
|
+
'key' => 'ip0',
|
114
|
+
'value' => vapp_config.ip,
|
115
|
+
'password' => 'false',
|
116
116
|
'userConfigurable' => 'true',
|
117
|
-
'Label'
|
118
|
-
'Description'
|
117
|
+
'Label' => 'IP Address',
|
118
|
+
'Description' => 'The IP address for the VM. Leave blank if DHCP is desired.',
|
119
119
|
},
|
120
120
|
{
|
121
|
-
'type'
|
122
|
-
'key'
|
123
|
-
'value'
|
124
|
-
'password'
|
121
|
+
'type' => 'string',
|
122
|
+
'key' => 'netmask0',
|
123
|
+
'value' => vapp_config.netmask,
|
124
|
+
'password' => 'false',
|
125
125
|
'userConfigurable' => 'true',
|
126
|
-
'Label'
|
127
|
-
'Description'
|
126
|
+
'Label' => 'Netmask',
|
127
|
+
'Description' => 'The netmask for the VM network. Leave blank if DHCP is desired.'
|
128
128
|
}
|
129
129
|
]
|
130
130
|
end
|
@@ -19,10 +19,10 @@ module VmShepherd
|
|
19
19
|
end
|
20
20
|
|
21
21
|
describe 'clean_environment' do
|
22
|
-
let(:connection) { instance_double(RbVmomi::VIM, serviceContent: service_content, searchIndex: search_index)}
|
23
|
-
let(:service_content) { instance_double(RbVmomi::VIM::ServiceContent, searchIndex: search_index)}
|
22
|
+
let(:connection) { instance_double(RbVmomi::VIM, serviceContent: service_content, searchIndex: search_index) }
|
23
|
+
let(:service_content) { instance_double(RbVmomi::VIM::ServiceContent, searchIndex: search_index) }
|
24
24
|
let(:search_index) { instance_double(RbVmomi::VIM::SearchIndex) }
|
25
|
-
let(:folder) {instance_double(RbVmomi::VIM::Folder) }
|
25
|
+
let(:folder) { instance_double(RbVmomi::VIM::Folder) }
|
26
26
|
let(:datacenter) { instance_double(RbVmomi::VIM::Datacenter, name: datacenter_name) }
|
27
27
|
let(:filemanager) { instance_double(RbVmomi::VIM::FileManager) }
|
28
28
|
let(:delete_datastore_file_task) { instance_double(RbVmomi::VIM::Task) }
|
@@ -51,8 +51,8 @@ module VmShepherd
|
|
51
51
|
|
52
52
|
describe 'destroy' do
|
53
53
|
let(:search_index) { instance_double(RbVmomi::VIM::SearchIndex) }
|
54
|
-
let(:service_content) { instance_double(RbVmomi::VIM::ServiceContent, searchIndex: search_index)}
|
55
|
-
let(:connection) { instance_double(RbVmomi::VIM, serviceContent: service_content)}
|
54
|
+
let(:service_content) { instance_double(RbVmomi::VIM::ServiceContent, searchIndex: search_index) }
|
55
|
+
let(:connection) { instance_double(RbVmomi::VIM, serviceContent: service_content) }
|
56
56
|
let(:ip_address) { '127.0.0.1' }
|
57
57
|
|
58
58
|
before do
|
data/vm_shepherd.gemspec
CHANGED
@@ -4,18 +4,18 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'vm_shepherd/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.authors
|
10
|
-
spec.email
|
11
|
-
spec.summary
|
12
|
-
spec.description
|
13
|
-
spec.homepage
|
7
|
+
spec.name = 'vm_shepherd'
|
8
|
+
spec.version = VmShepherd::VERSION
|
9
|
+
spec.authors = ['Ops Manager Team']
|
10
|
+
spec.email = ['cf-tempest-eng@pivotal.io']
|
11
|
+
spec.summary = %q{A tool for booting and tearing down Ops Manager VMs on various Infrastructures.}
|
12
|
+
spec.description = %q{A tool for booting and tearing down Ops Manager VMs on various Infrastructures.}
|
13
|
+
spec.homepage = ''
|
14
14
|
|
15
|
-
spec.files
|
16
|
-
spec.executables
|
17
|
-
spec.test_files
|
18
|
-
spec.require_paths
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
19
|
|
20
20
|
spec.add_dependency 'aws-sdk-v1'
|
21
21
|
spec.add_dependency 'fog'
|
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: 1.11.
|
4
|
+
version: 1.11.1
|
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: 2015-07-
|
11
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-v1
|
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
217
|
version: '0'
|
218
218
|
requirements: []
|
219
219
|
rubyforge_project:
|
220
|
-
rubygems_version: 2.4.
|
220
|
+
rubygems_version: 2.4.8
|
221
221
|
signing_key:
|
222
222
|
specification_version: 4
|
223
223
|
summary: A tool for booting and tearing down Ops Manager VMs on various Infrastructures.
|