vmware-vra 2.1.3 → 2.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c17a3b7656e82f51ab5fa1b7a6edb767be2d7123
4
- data.tar.gz: 508bf5aa0b5d67fb200573875746923f7319b217
3
+ metadata.gz: 29d0f8225730f7665b5671e437ef655358a6de82
4
+ data.tar.gz: 40d82c32de2a8f8b4678cb2b40a78cdbd6a0b53e
5
5
  SHA512:
6
- metadata.gz: 02b53f914de13e310fda78f0f3995475b272dfbc43b105a5c79bddb80638eea4723b885ebca76ee1e99b3c63a8c47dd18744162bf1e7b6ae94678acadf488847
7
- data.tar.gz: 4d8665af8d99659326d9a39f927f021ad5599ad5acf324d247834ec700344bdf86062cd48860f473bd136b8c7ff1bd417727c48b688fb44989b2bc508856f93b
6
+ metadata.gz: a2dec9201f3115b16a8e3f678a3daf50b9f9b1000993263960f589c229f21950543fd44b07991dd1b7e1716c4245c0e885eebd3d48aa6dacb880475d44fa69b8
7
+ data.tar.gz: db317d1661507c16d7e72ceb2402794d8c84d94913a0a5fc13db5e26d8cf12ad1d9a620b7541564817bb6c6d9c6cf47f2611e56b7acda356df47628ea7695ce8
@@ -0,0 +1,23 @@
1
+ ### Versions:
2
+ <!--- Version of the software where you are encountering the issue --->
3
+ <!-- You should probably update in this is not newest release.--->
4
+ * Version of vmware-vra-gem:
5
+ * Version of chef:
6
+ * Version of ruby:
7
+
8
+ ### Platform Details
9
+ <!--- What version of vRA are you running? What version of ESXi are you using too?--->
10
+ * Version of vRA:
11
+ * Version of ESXi:
12
+
13
+ ### Scenario:
14
+ <!--- What you are trying to achieve and you can't?--->
15
+
16
+ ### Steps to Reproduce:
17
+ <!--- If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this gem or any resources it includes?--->
18
+
19
+ ### Expected Result:
20
+ <!--- What are you expecting to happen as the consequence of above reproduction steps?--->
21
+
22
+ ### Actual Result:
23
+ <!--- What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.--->
@@ -0,0 +1,14 @@
1
+ ### Description
2
+
3
+ <!--- Describe what this change achieves--->
4
+
5
+ ### Issues Resolved
6
+
7
+ <!--- List any existing issues this PR resolves--->
8
+
9
+ ### Check List
10
+
11
+ - [ ] All tests pass.
12
+ - [ ] All style checks pass.
13
+ - [ ] Functionality includes testing.
14
+ - [ ] Functionality has been documented in the README if applicable
@@ -1,7 +1,21 @@
1
1
  # Change Log
2
2
 
3
- ## [v2.1.3](https://github.com/chef-partners/vmware-vra-gem/tree/v2.1.3)
3
+ ## [2.2.0](https://github.com/chef-partners/vmware-vra-gem/tree/2.2.0) (2017-06-08)
4
+ [Full Changelog](https://github.com/chef-partners/vmware-vra-gem/compare/v2.1.3...2.2.0)
4
5
 
6
+ **Closed issues:**
7
+
8
+ - usage of openssl raises error [\#45](https://github.com/chef-partners/vmware-vra-gem/issues/45)
9
+ - why is chefstyle a runtime dependency? [\#44](https://github.com/chef-partners/vmware-vra-gem/issues/44)
10
+ - Error when using set\_parameter and support for extra\_parameters [\#38](https://github.com/chef-partners/vmware-vra-gem/issues/38)
11
+
12
+ **Merged pull requests:**
13
+
14
+ - Fixes issue with chefstyle and unnecessary runtime dependency [\#48](https://github.com/chef-partners/vmware-vra-gem/pull/48) ([logicminds](https://github.com/logicminds))
15
+ - adds ability to specify additional params to catalog request [\#47](https://github.com/chef-partners/vmware-vra-gem/pull/47) ([logicminds](https://github.com/logicminds))
16
+ - Fixes \#45 - usage of openssl raises error [\#46](https://github.com/chef-partners/vmware-vra-gem/pull/46) ([logicminds](https://github.com/logicminds))
17
+
18
+ ## [v2.1.3](https://github.com/chef-partners/vmware-vra-gem/tree/v2.1.3) (2017-03-28)
5
19
  [Full Changelog](https://github.com/chef-partners/vmware-vra-gem/compare/v2.1.2...v2.1.3)
6
20
 
7
21
  **Merged pull requests:**
@@ -187,4 +201,4 @@
187
201
 
188
202
 
189
203
 
190
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
204
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/README.md CHANGED
@@ -96,6 +96,52 @@ If your catalog blueprint item requires additional parameters to successfully su
96
96
  catalog_request.set_parameter('my_parameter', 'string', 'my value')
97
97
  ```
98
98
 
99
+ ### Creating a request from a yaml or json payload
100
+ Should you want to create a request ahead of time you can create the parameters up front by
101
+ reading from a file or a hard coded payload you use every time. This is not required by any means but allows
102
+ for some extra flexibility when using this request object directly. The only difference is that you can pass
103
+ in the request parameters instead of having to set them after you create the object.
104
+
105
+ Given a sample request object like the following you will want to read the yaml into an ruby object:
106
+
107
+ ```yaml
108
+ requestData:
109
+ entries:
110
+ key: provider-provisioningGroupId
111
+ value:
112
+ type: string
113
+ value: 93992-3929392-32323828-832882394
114
+ key: provider-datacenter
115
+ type: string
116
+ value: datacenter1
117
+ key: provider-domain
118
+ type: string
119
+ value: chef.com
120
+
121
+ ```
122
+
123
+ And now use that data to create the Vra::RequestParameters to feed into the catalog request.
124
+
125
+ ```ruby
126
+ # read in the request data
127
+ yaml_data = YAML,load(data)
128
+ # create a parameters array
129
+ parameters = yaml_data['requestData']['entries'].map {|item| [item['key'], item['value'].values].flatten }
130
+ # We put the values in a array so we can easily explode the parameters using the splat operator later
131
+ request_parans = Vra::RequestParameters.new
132
+ # loop through each parameter and setting each parameter
133
+ parameters.each {|p| request_params.set(*p) # splat
134
+ request_options = {
135
+ cpus: 1,
136
+ memory: 1024,
137
+ requested_for: 'me@me.com',
138
+ lease_days: 2,
139
+ additional_params: request_parans
140
+ }
141
+ # create the request
142
+ catalog_request = vra.catalog.request(blueprint, request_options)
143
+ ```
144
+
99
145
  Now, submit your request! The client will return a new "Request" object you can use to query for status.
100
146
 
101
147
  ```
data/Rakefile CHANGED
@@ -9,4 +9,15 @@ RuboCop::RakeTask.new do |task|
9
9
  task.options << "--display-cop-names"
10
10
  end
11
11
 
12
+ begin
13
+ require "github_changelog_generator/task"
14
+
15
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
16
+ config.future_release = Vra::VERSION
17
+ config.issues = true
18
+ end
19
+ rescue LoadError
20
+ puts "github_changelog_generator is not available. gem install github_changelog_generator to generate changelogs"
21
+ end
22
+
12
23
  task default: [ :spec, :rubocop ]
@@ -32,7 +32,7 @@ module Vra
32
32
  @lease_days = opts[:lease_days]
33
33
  @notes = opts[:notes]
34
34
  @subtenant_id = opts[:subtenant_id]
35
- @additional_params = Vra::RequestParameters.new
35
+ @additional_params = opts[:additional_params] || Vra::RequestParameters.new
36
36
 
37
37
  @catalog_item = Vra::CatalogItem.new(client, id: catalog_id)
38
38
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require "net/http"
3
+ require "openssl"
3
4
 
4
5
  module Vra
5
6
  module Http
@@ -18,5 +18,5 @@
18
18
  #
19
19
 
20
20
  module Vra
21
- VERSION = "2.1.3"
21
+ VERSION = "2.2.0".freeze
22
22
  end
@@ -19,14 +19,15 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "chefstyle"
23
22
  spec.add_dependency "ffi-yajl", "~> 2.2"
24
23
  spec.add_dependency "passwordmasker", "~> 1.2"
25
24
 
26
25
  spec.add_development_dependency "bundler", "~> 1.7"
26
+ spec.add_development_dependency "chefstyle"
27
+ spec.add_development_dependency "github_changelog_generator"
28
+ spec.add_development_dependency "pry", "~> 0.10"
27
29
  spec.add_development_dependency "rake", "~> 10.0"
28
30
  spec.add_development_dependency "rspec", "~> 3.0"
29
31
  spec.add_development_dependency "webmock", "~> 1.21"
30
- spec.add_development_dependency "pry", "~> 0.10"
31
- spec.add_development_dependency "github_changelog_generator"
32
+
32
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmware-vra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Leff
@@ -9,22 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-28 00:00:00.000000000 Z
12
+ date: 2017-06-08 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: chefstyle
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- version: '0'
28
14
  - !ruby/object:Gem::Dependency
29
15
  name: ffi-yajl
30
16
  requirement: !ruby/object:Gem::Requirement
@@ -68,75 +54,89 @@ dependencies:
68
54
  - !ruby/object:Gem::Version
69
55
  version: '1.7'
70
56
  - !ruby/object:Gem::Dependency
71
- name: rake
57
+ name: chefstyle
72
58
  requirement: !ruby/object:Gem::Requirement
73
59
  requirements:
74
- - - "~>"
60
+ - - ">="
75
61
  - !ruby/object:Gem::Version
76
- version: '10.0'
62
+ version: '0'
77
63
  type: :development
78
64
  prerelease: false
79
65
  version_requirements: !ruby/object:Gem::Requirement
80
66
  requirements:
81
- - - "~>"
67
+ - - ">="
82
68
  - !ruby/object:Gem::Version
83
- version: '10.0'
69
+ version: '0'
84
70
  - !ruby/object:Gem::Dependency
85
- name: rspec
71
+ name: github_changelog_generator
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: pry
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '3.0'
90
+ version: '0.10'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '3.0'
97
+ version: '0.10'
98
98
  - !ruby/object:Gem::Dependency
99
- name: webmock
99
+ name: rake
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '1.21'
104
+ version: '10.0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '1.21'
111
+ version: '10.0'
112
112
  - !ruby/object:Gem::Dependency
113
- name: pry
113
+ name: rspec
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: '0.10'
118
+ version: '3.0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: '0.10'
125
+ version: '3.0'
126
126
  - !ruby/object:Gem::Dependency
127
- name: github_changelog_generator
127
+ name: webmock
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ">="
130
+ - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: '0'
132
+ version: '1.21'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ">="
137
+ - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '0'
139
+ version: '1.21'
140
140
  description: Client gem for interacting with VMware vRealize Automation.
141
141
  email:
142
142
  - jj@chef.io
@@ -144,6 +144,8 @@ executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
+ - ".github/ISSUE_TEMPLATE.md"
148
+ - ".github/PULL_REQUEST_TEMPLATE.md"
147
149
  - ".gitignore"
148
150
  - ".rubocop.yml"
149
151
  - ".travis.yml"