Skip to content

Commit 25260e6

Browse files
committed
Merge pull request #103 from muga/fix_list_object_method_call_with_invalid_parameter
Fix list_object method calls by invalid typed parameters
2 parents b47b8cd + b1d5a2c commit 25260e6

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lib/chef/knife/cs_firewallrule_create.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ def run
4747
locate_config_value(:openfirewall) ? params['openfirewall'] = 'true' : params['openfirewall'] = 'false'
4848

4949
# Lookup all server objects.
50-
connection_result = connection.list_object(
51-
"listVirtualMachines",
52-
"virtualmachine"
53-
)
50+
params_for_list_object = { 'command' => 'listVirtualMachines' }
51+
connection_result = connection.list_object(params_for_list_object, "virtualmachine")
5452

5553
# Lookup the hostname in the connection result
5654
server = {}

lib/chef/knife/cs_forwardrule_create.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ def run
5252
locate_config_value(:openfirewall) ? params['openfirewall'] = 'true' : params['openfirewall'] = 'false'
5353

5454
# Lookup all server objects.
55-
connection_result = connection.list_object(
56-
"listVirtualMachines",
57-
"virtualmachine"
58-
)
55+
params_for_list_object = { 'command' => 'listVirtualMachines' }
56+
connection_result = connection.list_object(params_for_list_object, "virtualmachine")
5957

6058
# Lookup the hostname in the connection result
6159
server = {}

0 commit comments

Comments
 (0)