Skip to content

Commit b1d5a2c

Browse files
committed
Fix list_object method calls by invalid typed parameters
1 parent 27c247f commit b1d5a2c

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

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)