knife-vrealize 1.2.0 → 1.3.0
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/CHANGELOG.md +3 -0
- data/README.md +9 -0
- data/knife-vrealize.gemspec +1 -1
- data/lib/chef/knife/cloud/vra_service.rb +2 -0
- data/lib/chef/knife/cloud/vra_service_helpers.rb +5 -4
- data/lib/chef/knife/cloud/vra_service_options.rb +6 -0
- data/lib/knife-vrealize/version.rb +1 -1
- data/spec/unit/cloud/vra_service_helpers_spec.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 578b154a3ccbf57ebe1e6ebc53ab5e0f787880fd
|
4
|
+
data.tar.gz: 387f75225a0c35f7e9da8c6fb8e89e0a966e2746
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95052a813c5ca77126f8d223bc6808993fd63843379a0356ecf03b7c5dd2d44abb7c33ac1246e8eb09d6d8883eeee50b300d404fc633b5d6076cf00c4bb98ca
|
7
|
+
data.tar.gz: 0c8f5c49e7537f9ed02aaa1e2671ac4baee6a1f0d52fa1bcf382346faaaf7a098ce2c88874913bd86435838357ed28aee9863590d00094dfa2ed0bf8f8d022d3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# knife-vrealize Change Log
|
2
2
|
|
3
|
+
## Release: v1.3.0
|
4
|
+
* [pr#8](https://github.com/chef-partners/knife-vrealize/pull/8) Allow configuration of pagination result set size to work around known vRA pagination bug.
|
5
|
+
|
3
6
|
## Release: v1.2.0
|
4
7
|
* [pr#6](https://github.com/chef-partners/knife-vrealize/pull/6) Fixing issue with --server-create-timeout not being honored
|
5
8
|
|
data/README.md
CHANGED
@@ -127,6 +127,15 @@ Current request status: IN_PROGRESS...
|
|
127
127
|
...
|
128
128
|
```
|
129
129
|
|
130
|
+
### Known Issue: Pagination
|
131
|
+
|
132
|
+
A bug in vRA v6 (as late as v6.2.1) causes resource/server lists to potentially return duplicate items and omit items in the returned data. This appears to be a bug in the pagination code in vRA and was initially discovered and discussed [in this GitHub issue](https://github.com/chef-partners/vmware-vra-gem/issues/10). `knife-vrealize` tries to work around this by setting a higher-than-normal page size of 200 items. However, if you have more items in your returned data than this, you can attempt to work around this further by using:
|
133
|
+
|
134
|
+
```
|
135
|
+
--page-size NUMBER_OF_ITEMS_PER_PAGE
|
136
|
+
```
|
137
|
+
|
138
|
+
|
130
139
|
## vRealize Orchestrator (vRO)
|
131
140
|
|
132
141
|
### Configuration
|
data/knife-vrealize.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.email = ['partnereng@chef.io']
|
12
12
|
spec.summary = 'Knife plugin to interact with VMware vRealize.'
|
13
13
|
spec.description = spec.summary
|
14
|
-
spec.homepage = 'https://
|
14
|
+
spec.homepage = 'https://github.com/chef-partners/knife-vrealize'
|
15
15
|
spec.license = 'Apache 2.0'
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -35,6 +35,7 @@ class Chef
|
|
35
35
|
@base_url = options[:base_url]
|
36
36
|
@tenant = options[:tenant]
|
37
37
|
@verify_ssl = options[:verify_ssl]
|
38
|
+
@page_size = options[:page_size]
|
38
39
|
end
|
39
40
|
|
40
41
|
def connection
|
@@ -43,6 +44,7 @@ class Chef
|
|
43
44
|
username: @username,
|
44
45
|
password: @password,
|
45
46
|
tenant: @tenant,
|
47
|
+
page_size: @page_size,
|
46
48
|
verify_ssl: @verify_ssl
|
47
49
|
)
|
48
50
|
end
|
@@ -25,10 +25,11 @@ class Chef
|
|
25
25
|
include Chef::Knife::Cloud::Helpers
|
26
26
|
|
27
27
|
def create_service_instance
|
28
|
-
Chef::Knife::Cloud::VraService.new(username:
|
29
|
-
password:
|
30
|
-
base_url:
|
31
|
-
tenant:
|
28
|
+
Chef::Knife::Cloud::VraService.new(username: locate_config_value(:vra_username),
|
29
|
+
password: locate_config_value(:vra_password),
|
30
|
+
base_url: locate_config_value(:vra_base_url),
|
31
|
+
tenant: locate_config_value(:vra_tenant),
|
32
|
+
page_size: locate_config_value(:vra_page_size),
|
32
33
|
verify_ssl: verify_ssl?)
|
33
34
|
end
|
34
35
|
|
@@ -41,6 +41,12 @@ class Chef
|
|
41
41
|
boolean: true,
|
42
42
|
default: false
|
43
43
|
|
44
|
+
option :vra_page_size,
|
45
|
+
long: '--page-size NUM_OF_ITEMS',
|
46
|
+
description: 'Maximum number of items to fetch from the vRA API when pagination is forced',
|
47
|
+
default: 200,
|
48
|
+
proc: proc { |page_size| page_size.to_i }
|
49
|
+
|
44
50
|
option :request_refresh_rate,
|
45
51
|
long: '--request-refresh-rate SECS',
|
46
52
|
description: 'Number of seconds to sleep between each check of the request status, defaults to 2',
|
@@ -39,6 +39,7 @@ describe 'Chef::Knife::Cloud::VraServiceHelpers' do
|
|
39
39
|
allow(subject).to receive(:locate_config_value).with(:vra_password).and_return('mypassword')
|
40
40
|
allow(subject).to receive(:locate_config_value).with(:vra_base_url).and_return('https://vra.corp.local')
|
41
41
|
allow(subject).to receive(:locate_config_value).with(:vra_tenant).and_return('mytenant')
|
42
|
+
allow(subject).to receive(:locate_config_value).with(:vra_page_size).and_return(50)
|
42
43
|
allow(subject).to receive(:locate_config_value).with(:vra_disable_ssl_verify).and_return(false)
|
43
44
|
|
44
45
|
expect(Chef::Knife::Cloud::VraService).to receive(:new)
|
@@ -46,6 +47,7 @@ describe 'Chef::Knife::Cloud::VraServiceHelpers' do
|
|
46
47
|
password: 'mypassword',
|
47
48
|
base_url: 'https://vra.corp.local',
|
48
49
|
tenant: 'mytenant',
|
50
|
+
page_size: 50,
|
49
51
|
verify_ssl: true)
|
50
52
|
|
51
53
|
subject.create_service_instance
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-vrealize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Partner Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -127,7 +127,7 @@ files:
|
|
127
127
|
- spec/unit/vra_server_list_spec.rb
|
128
128
|
- spec/unit/vra_server_show_spec.rb
|
129
129
|
- spec/unit/vro_workflow_execute_spec.rb
|
130
|
-
homepage: https://
|
130
|
+
homepage: https://github.com/chef-partners/knife-vrealize
|
131
131
|
licenses:
|
132
132
|
- Apache 2.0
|
133
133
|
metadata: {}
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.4.
|
150
|
+
rubygems_version: 2.4.8
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: Knife plugin to interact with VMware vRealize.
|