knife-vrealize 3.0.0 → 6.0.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 +5 -5
- data/{LICENSE.txt → LICENSE} +0 -0
- data/lib/chef/knife/cloud/vra_service.rb +28 -28
- data/lib/chef/knife/cloud/vra_service_helpers.rb +15 -15
- data/lib/chef/knife/cloud/vra_service_options.rb +16 -16
- data/lib/chef/knife/vra_catalog_list.rb +25 -20
- data/lib/chef/knife/vra_server_create.rb +52 -49
- data/lib/chef/knife/vra_server_delete.rb +13 -10
- data/lib/chef/knife/vra_server_list.rb +19 -16
- data/lib/chef/knife/vra_server_show.rb +14 -11
- data/lib/chef/knife/vro_workflow_execute.rb +34 -35
- data/lib/knife-vrealize/version.rb +2 -2
- metadata +19 -113
- data/.github/ISSUE_TEMPLATE.md +0 -23
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -14
- data/.gitignore +0 -17
- data/.rubocop.yml +0 -19
- data/.travis.yml +0 -27
- data/CHANGELOG.md +0 -118
- data/Gemfile +0 -4
- data/Jenkinsfile +0 -28
- data/README.md +0 -217
- data/Rakefile +0 -21
- data/knife-vrealize.gemspec +0 -34
- data/spec/spec_helper.rb +0 -18
- data/spec/unit/cloud/vra_service_helpers_spec.rb +0 -153
- data/spec/unit/cloud/vra_service_spec.rb +0 -251
- data/spec/unit/vra_catalog_list_spec.rb +0 -44
- data/spec/unit/vra_server_create_spec.rb +0 -171
- data/spec/unit/vra_server_delete_spec.rb +0 -64
- data/spec/unit/vra_server_list_spec.rb +0 -51
- data/spec/unit/vra_server_show_spec.rb +0 -44
- data/spec/unit/vro_workflow_execute_spec.rb +0 -366
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 26774900025bacb20c92669ec354fa5eecf896a05e5dc0360639bc3c58b58998
|
4
|
+
data.tar.gz: c374fd4befb4616243716ddd664a509f13c33d9a1254d1c0af3985103604c7dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29be7394fb628f6ff10f98e63b3d4a01ec3ab7bcdc8d23c35140dc754481051be09bd9668ce2f73ee169d9f380197c8114bf611e90e9e6fcb142ff0cbfaf2a94
|
7
|
+
data.tar.gz: 48870906b9cc159ff4c95faac60f3a4a1e8657b9b1f82003e0441534eb1b2fda359fba59869b0502b6e67cbf3631e1674f51e3fa3be635dd25bd1a70a7a454ef
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
#
|
4
4
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
5
|
-
# Copyright:: Copyright (c)
|
5
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
6
6
|
# License:: Apache License, Version 2.0
|
7
7
|
#
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -18,19 +18,19 @@
|
|
18
18
|
# limitations under the License.
|
19
19
|
#
|
20
20
|
|
21
|
-
require
|
22
|
-
require
|
23
|
-
require
|
24
|
-
|
25
|
-
require
|
21
|
+
require "chef/knife/cloud/exceptions"
|
22
|
+
require "chef/knife/cloud/service"
|
23
|
+
require "chef/knife/cloud/helpers"
|
24
|
+
require_relative "vra_service_helpers"
|
25
|
+
require "vra"
|
26
26
|
|
27
27
|
class Chef
|
28
28
|
class Knife
|
29
29
|
class Cloud
|
30
30
|
class VraService < Service
|
31
31
|
include VraServiceHelpers
|
32
|
-
def initialize(options={})
|
33
|
-
super(options)
|
32
|
+
def initialize(options = {})
|
33
|
+
super(config: options)
|
34
34
|
|
35
35
|
@username = options[:username]
|
36
36
|
@password = options[:password]
|
@@ -51,7 +51,7 @@ class Chef
|
|
51
51
|
)
|
52
52
|
end
|
53
53
|
|
54
|
-
def create_server(options={})
|
54
|
+
def create_server(options = {})
|
55
55
|
submitted_request = catalog_request(options).submit
|
56
56
|
ui.msg("Catalog request #{submitted_request.id} submitted.")
|
57
57
|
wait_for_request(submitted_request, options[:wait_time].to_i, options[:refresh_rate])
|
@@ -61,8 +61,8 @@ class Chef
|
|
61
61
|
raise CloudExceptions::ServerCreateError, submitted_request.completion_details if submitted_request.failed?
|
62
62
|
|
63
63
|
servers = submitted_request.resources.select(&:vm?)
|
64
|
-
raise CloudExceptions::ServerCreateError,
|
65
|
-
raise CloudExceptions::ServerCreateError,
|
64
|
+
raise CloudExceptions::ServerCreateError, "The vRA request created more than one server, but we were only expecting 1" if servers.length > 1
|
65
|
+
raise CloudExceptions::ServerCreateError, "The vRA request did not create any servers" if servers.length == 0
|
66
66
|
|
67
67
|
servers.first
|
68
68
|
end
|
@@ -70,19 +70,19 @@ class Chef
|
|
70
70
|
def delete_server(instance_id)
|
71
71
|
server = get_server(instance_id)
|
72
72
|
server_summary(server)
|
73
|
-
ui.msg(
|
73
|
+
ui.msg("")
|
74
74
|
|
75
|
-
if server.status ==
|
75
|
+
if server.status == "DELETED"
|
76
76
|
ui.warn("Server is already deleted.\n")
|
77
77
|
return
|
78
78
|
end
|
79
79
|
|
80
|
-
ui.confirm(
|
80
|
+
ui.confirm("Do you really want to delete this server")
|
81
81
|
|
82
82
|
destroy_request = server.destroy
|
83
83
|
ui.msg("Destroy request #{destroy_request.id} submitted.")
|
84
84
|
wait_for_request(destroy_request)
|
85
|
-
ui.msg(
|
85
|
+
ui.msg("Destroy request complete.")
|
86
86
|
request_summary(destroy_request)
|
87
87
|
end
|
88
88
|
|
@@ -102,22 +102,22 @@ class Chef
|
|
102
102
|
connection.resources.by_id(instance_id)
|
103
103
|
end
|
104
104
|
|
105
|
-
def server_summary(server, _columns_with_info=nil)
|
106
|
-
msg_pair(
|
107
|
-
msg_pair(
|
108
|
-
msg_pair(
|
109
|
-
msg_pair(
|
110
|
-
msg_pair(
|
111
|
-
msg_pair(
|
112
|
-
msg_pair(
|
105
|
+
def server_summary(server, _columns_with_info = nil)
|
106
|
+
msg_pair("Server ID", server.id)
|
107
|
+
msg_pair("Server Name", server.name)
|
108
|
+
msg_pair("IP Addresses", server.ip_addresses.nil? ? "none" : server.ip_addresses.join(", "))
|
109
|
+
msg_pair("Status", server.status)
|
110
|
+
msg_pair("Catalog Name", server.catalog_name)
|
111
|
+
msg_pair("Owner IDs", server.owner_ids.empty? ? "none" : server.owner_ids.join(", "))
|
112
|
+
msg_pair("Owner Names", server.owner_names.empty? ? "none" : server.owner_names.join(", "))
|
113
113
|
end
|
114
114
|
|
115
115
|
def request_summary(request)
|
116
|
-
ui.msg(
|
117
|
-
msg_pair(
|
118
|
-
msg_pair(
|
119
|
-
msg_pair(
|
120
|
-
ui.msg(
|
116
|
+
ui.msg("")
|
117
|
+
msg_pair("Request Status", request.status)
|
118
|
+
msg_pair("Completion State", request.completion_state)
|
119
|
+
msg_pair("Completion Details", request.completion_details)
|
120
|
+
ui.msg("")
|
121
121
|
end
|
122
122
|
|
123
123
|
def catalog_request(options)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
#
|
4
4
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
5
|
-
# Copyright:: Copyright (c)
|
5
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
6
6
|
# License:: Apache License, Version 2.0
|
7
7
|
#
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -18,7 +18,7 @@
|
|
18
18
|
# limitations under the License.
|
19
19
|
#
|
20
20
|
|
21
|
-
require
|
21
|
+
require "chef/knife/cloud/helpers"
|
22
22
|
|
23
23
|
class Chef
|
24
24
|
class Knife
|
@@ -27,22 +27,22 @@ class Chef
|
|
27
27
|
include Chef::Knife::Cloud::Helpers
|
28
28
|
|
29
29
|
def create_service_instance
|
30
|
-
Chef::Knife::Cloud::VraService.new(username:
|
31
|
-
password:
|
32
|
-
base_url:
|
33
|
-
tenant:
|
34
|
-
page_size:
|
30
|
+
Chef::Knife::Cloud::VraService.new(username: config[:vra_username],
|
31
|
+
password: config[:vra_password],
|
32
|
+
base_url: config[:vra_base_url],
|
33
|
+
tenant: config[:vra_tenant],
|
34
|
+
page_size: config[:vra_page_size],
|
35
35
|
verify_ssl: verify_ssl?)
|
36
36
|
end
|
37
37
|
|
38
38
|
def verify_ssl?
|
39
|
-
!
|
39
|
+
!config[:vra_disable_ssl_verify]
|
40
40
|
end
|
41
41
|
|
42
|
-
def wait_for_request(request, wait_time=600, refresh_rate=2)
|
43
|
-
print
|
42
|
+
def wait_for_request(request, wait_time = 600, refresh_rate = 2)
|
43
|
+
print "Waiting for request to complete."
|
44
44
|
|
45
|
-
last_status =
|
45
|
+
last_status = ""
|
46
46
|
|
47
47
|
begin
|
48
48
|
Timeout.timeout(wait_time) do
|
@@ -55,7 +55,7 @@ class Chef
|
|
55
55
|
end
|
56
56
|
|
57
57
|
if last_status == request.status
|
58
|
-
print
|
58
|
+
print "."
|
59
59
|
else
|
60
60
|
last_status = request.status
|
61
61
|
print "\n"
|
@@ -66,7 +66,7 @@ class Chef
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
rescue Timeout::Error
|
69
|
-
ui.msg(
|
69
|
+
ui.msg("")
|
70
70
|
ui.error("Request did not complete in #{wait_time} seconds. Check the Requests tab in the vRA UI for more information.")
|
71
71
|
exit 1
|
72
72
|
end
|
@@ -78,10 +78,10 @@ class Chef
|
|
78
78
|
|
79
79
|
# rubocop:disable Style/GuardClause
|
80
80
|
def check_for_missing_config_values!(*keys)
|
81
|
-
missing = keys.select { |x|
|
81
|
+
missing = keys.select { |x| config[x].nil? }
|
82
82
|
|
83
83
|
unless missing.empty?
|
84
|
-
ui.error("The following required parameters are missing: #{missing.join(
|
84
|
+
ui.error("The following required parameters are missing: #{missing.join(", ")}")
|
85
85
|
exit(1)
|
86
86
|
end
|
87
87
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
#
|
4
4
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
5
|
-
# Copyright:: Copyright (c)
|
5
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
6
6
|
# License:: Apache License, Version 2.0
|
7
7
|
#
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -27,37 +27,37 @@ class Chef
|
|
27
27
|
def self.included(includer)
|
28
28
|
includer.class_eval do
|
29
29
|
option :vra_base_url,
|
30
|
-
long:
|
31
|
-
description:
|
32
|
-
proc: proc { |url| url.sub(%r{/(\/)+$/},
|
30
|
+
long: "--vra-base-url API_URL",
|
31
|
+
description: "URL for the vRA server",
|
32
|
+
proc: proc { |url| url.sub(%r{/(\/)+$/}, "") }
|
33
33
|
|
34
34
|
option :vra_username,
|
35
|
-
long:
|
36
|
-
description:
|
35
|
+
long: "--vra-username USERNAME",
|
36
|
+
description: "Username to use with the vRA API"
|
37
37
|
|
38
38
|
option :vra_password,
|
39
|
-
long:
|
40
|
-
description:
|
39
|
+
long: "--vra-password PASSWORD",
|
40
|
+
description: "Password to use with the vRA API"
|
41
41
|
|
42
42
|
option :vra_tenant,
|
43
|
-
long:
|
44
|
-
description:
|
43
|
+
long: "--vra-tenant TENANT",
|
44
|
+
description: "Tenant name (organization) to use with the vRA API"
|
45
45
|
|
46
46
|
option :vra_disable_ssl_verify,
|
47
|
-
long:
|
48
|
-
description:
|
47
|
+
long: "--vra-disable-ssl-verify",
|
48
|
+
description: "Skip any SSL verification for the vRA API",
|
49
49
|
boolean: true,
|
50
50
|
default: false
|
51
51
|
|
52
52
|
option :vra_page_size,
|
53
|
-
long:
|
54
|
-
description:
|
53
|
+
long: "--page-size NUM_OF_ITEMS",
|
54
|
+
description: "Maximum number of items to fetch from the vRA API when pagination is forced",
|
55
55
|
default: 200,
|
56
56
|
proc: proc { |page_size| page_size.to_i }
|
57
57
|
|
58
58
|
option :request_refresh_rate,
|
59
|
-
long:
|
60
|
-
description:
|
59
|
+
long: "--request-refresh-rate SECS",
|
60
|
+
description: "Number of seconds to sleep between each check of the request status, defaults to 2",
|
61
61
|
default: 2,
|
62
62
|
proc: proc { |secs| secs.to_i }
|
63
63
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
#
|
4
4
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
5
|
-
# Copyright:: Copyright (c)
|
5
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
6
6
|
# License:: Apache License, Version 2.0
|
7
7
|
#
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -18,46 +18,51 @@
|
|
18
18
|
# limitations under the License.
|
19
19
|
#
|
20
20
|
|
21
|
-
require
|
22
|
-
require
|
23
|
-
|
24
|
-
require 'chef/knife/cloud/vra_service_helpers'
|
25
|
-
require 'chef/knife/cloud/vra_service_options'
|
21
|
+
require "chef/knife"
|
22
|
+
require "chef/knife/cloud/list_resource_command"
|
23
|
+
require_relative "cloud/vra_service_options"
|
26
24
|
|
27
25
|
class Chef
|
28
26
|
class Knife
|
29
27
|
class Cloud
|
30
28
|
class VraCatalogList < ResourceListCommand
|
31
|
-
include VraServiceHelpers
|
32
29
|
include VraServiceOptions
|
33
30
|
|
34
|
-
banner
|
31
|
+
banner "knife vra catalog list"
|
32
|
+
|
33
|
+
deps do
|
34
|
+
require_relative "cloud/vra_service"
|
35
|
+
require_relative "cloud/vra_service_helpers"
|
36
|
+
include VraServiceHelpers
|
37
|
+
end
|
35
38
|
|
36
39
|
option :entitled,
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
long: "--entitled-only",
|
41
|
+
description: "only list entitled vRA catalog entries",
|
42
|
+
boolean: true,
|
43
|
+
default: false
|
41
44
|
|
42
45
|
def before_exec_command
|
43
46
|
@columns_with_info = [
|
44
|
-
{ label:
|
45
|
-
{ label:
|
46
|
-
{ label:
|
47
|
-
{ label:
|
48
|
-
{ label:
|
47
|
+
{ label: "Catalog ID", key: "id" },
|
48
|
+
{ label: "Name", key: "name" },
|
49
|
+
{ label: "Description", key: "description" },
|
50
|
+
{ label: "Status", key: "status", value_callback: method(:format_status_value) },
|
51
|
+
{ label: "Subtenant", key: "subtenant_name" },
|
49
52
|
]
|
50
53
|
|
51
|
-
@sort_by_field =
|
54
|
+
@sort_by_field = "name"
|
52
55
|
end
|
53
56
|
|
54
57
|
def query_resource
|
55
|
-
@service.list_catalog_items(
|
58
|
+
@service.list_catalog_items(config[:entitled])
|
56
59
|
end
|
57
60
|
|
58
61
|
def format_status_value(status)
|
62
|
+
return "-" if status.nil?
|
63
|
+
|
59
64
|
status = status.downcase
|
60
|
-
color = if status ==
|
65
|
+
color = if status == "published"
|
61
66
|
:green
|
62
67
|
else
|
63
68
|
:red
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
#
|
4
4
|
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
|
5
|
-
# Copyright:: Copyright (c)
|
5
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
6
6
|
# License:: Apache License, Version 2.0
|
7
7
|
#
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -18,12 +18,10 @@
|
|
18
18
|
# limitations under the License.
|
19
19
|
#
|
20
20
|
|
21
|
-
require
|
22
|
-
require
|
23
|
-
require
|
24
|
-
|
25
|
-
require 'chef/knife/cloud/vra_service_helpers'
|
26
|
-
require 'chef/knife/cloud/vra_service_options'
|
21
|
+
require "chef/knife"
|
22
|
+
require "chef/knife/cloud/server/create_command"
|
23
|
+
require "chef/knife/cloud/server/create_options"
|
24
|
+
require_relative "cloud/vra_service_options"
|
27
25
|
|
28
26
|
class Chef
|
29
27
|
class Knife
|
@@ -33,57 +31,62 @@ class Chef
|
|
33
31
|
include VraServiceOptions
|
34
32
|
include ServerCreateOptions
|
35
33
|
|
36
|
-
banner
|
34
|
+
banner "knife vra server create CATALOG_ID (options)"
|
35
|
+
|
36
|
+
deps do
|
37
|
+
require_relative "cloud/vra_service"
|
38
|
+
require_relative "cloud/vra_service_helpers"
|
39
|
+
end
|
37
40
|
|
38
41
|
option :cpus,
|
39
|
-
|
40
|
-
|
42
|
+
long: "--cpus NUM_CPUS",
|
43
|
+
description: "Number of CPUs the server should have"
|
41
44
|
|
42
45
|
option :node_ssl_verify_mode,
|
43
|
-
|
44
|
-
|
46
|
+
long: "--node-ssl-verify-mode [peer|none]",
|
47
|
+
description: "Whether or not to verify the SSL cert for all HTTPS requests when bootstrapping"
|
45
48
|
option :memory,
|
46
|
-
|
47
|
-
|
49
|
+
long: "--memory RAM_IN_MB",
|
50
|
+
description: "Amount of RAM, in MB, the server should have"
|
48
51
|
|
49
52
|
option :requested_for,
|
50
|
-
|
51
|
-
|
53
|
+
long: "--requested-for LOGIN",
|
54
|
+
description: "The login to list as the owner of this resource. Will default to the vra_username parameter"
|
52
55
|
|
53
56
|
option :server_create_timeout,
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
+
long: "--server-create-timeout SECONDS",
|
58
|
+
description: "number of seconds to wait for the server to complete",
|
59
|
+
default: 600
|
57
60
|
|
58
61
|
option :subtenant_id,
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
+
long: "--subtenant-id ID",
|
63
|
+
description: 'The subtenant ID (a.k.a "business group") to list as the owner of this resource. ' \
|
64
|
+
"Will default to the blueprint subtenant if it exists."
|
62
65
|
|
63
66
|
option :lease_days,
|
64
|
-
|
65
|
-
|
67
|
+
long: "--lease-days NUM_DAYS",
|
68
|
+
description: "Number of days requested for the server lease, provided the blueprint allows this to be specified"
|
66
69
|
|
67
70
|
option :notes,
|
68
|
-
|
69
|
-
|
71
|
+
long: "--notes NOTES",
|
72
|
+
description: "String of text to be included in the request notes."
|
70
73
|
|
71
74
|
option :extra_params,
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
75
|
+
long: "--extra-param KEY=TYPE:VALUE",
|
76
|
+
description: 'Additional parameters to pass to vRA for this catalog request. TYPE must be "string" or "integer". ' \
|
77
|
+
"Can be used multiple times.",
|
78
|
+
default: {},
|
79
|
+
proc: proc { |param|
|
80
|
+
Chef::Config[:knife][:vra_extra_params] ||= {}
|
81
|
+
key, value_str = param.split("=")
|
82
|
+
Chef::Config[:knife][:vra_extra_params].merge!(key => value_str)
|
83
|
+
}
|
81
84
|
|
82
85
|
def validate_params!
|
83
86
|
super
|
84
87
|
|
85
88
|
if @name_args.empty?
|
86
|
-
ui.error(
|
89
|
+
ui.error("You must supply a Catalog ID to use for your new server.")
|
87
90
|
exit 1
|
88
91
|
end
|
89
92
|
|
@@ -96,23 +99,23 @@ class Chef
|
|
96
99
|
super
|
97
100
|
|
98
101
|
@create_options = {
|
99
|
-
catalog_id:
|
100
|
-
cpus:
|
101
|
-
memory:
|
102
|
-
requested_for:
|
103
|
-
subtenant_id:
|
104
|
-
lease_days:
|
105
|
-
notes:
|
106
|
-
extra_params:
|
107
|
-
wait_time:
|
108
|
-
refresh_rate:
|
102
|
+
catalog_id: @name_args.first,
|
103
|
+
cpus: config[:cpus],
|
104
|
+
memory: config[:memory],
|
105
|
+
requested_for: config[:requested_for],
|
106
|
+
subtenant_id: config[:subtenant_id],
|
107
|
+
lease_days: config[:lease_days],
|
108
|
+
notes: config[:notes],
|
109
|
+
extra_params: extra_params,
|
110
|
+
wait_time: config[:server_create_timeout],
|
111
|
+
refresh_rate: config[:request_refresh_rate],
|
109
112
|
}
|
110
113
|
end
|
111
114
|
|
112
115
|
def before_bootstrap
|
113
116
|
super
|
114
117
|
|
115
|
-
config[:chef_node_name] =
|
118
|
+
config[:chef_node_name] = config[:chef_node_name] ? config[:chef_node_name] : server.name
|
116
119
|
config[:bootstrap_ip_address] = hostname_for_server
|
117
120
|
end
|
118
121
|
|
@@ -120,7 +123,7 @@ class Chef
|
|
120
123
|
return if Chef::Config[:knife][:vra_extra_params].nil? || Chef::Config[:knife][:vra_extra_params].empty?
|
121
124
|
|
122
125
|
Chef::Config[:knife][:vra_extra_params].each_with_object([]) do |(key, value_str), memo|
|
123
|
-
type, value = value_str.split(
|
126
|
+
type, value = value_str.split(":")
|
124
127
|
memo << { key: key, type: type, value: value }
|
125
128
|
end
|
126
129
|
end
|
@@ -131,7 +134,7 @@ class Chef
|
|
131
134
|
extra_params.each do |param|
|
132
135
|
raise ArgumentError, "No type and value set for extra parameter #{param[:key]}" if param[:type].nil? || param[:value].nil?
|
133
136
|
raise ArgumentError, "Invalid parameter type for #{param[:key]} - must be string or integer" unless
|
134
|
-
param[:type] ==
|
137
|
+
param[:type] == "string" || param[:type] == "integer"
|
135
138
|
end
|
136
139
|
end
|
137
140
|
|