Skip to content

Commit 7b66c0a

Browse files
authored
Minor fixes to compute key_pairs (#548)
* `delete_key_pair()` now passes options in query string if provided * The Mock implementation for `get_key_pair()` is no longer misnamed
1 parent 8e7fb3a commit 7b66c0a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/fog/openstack/compute/requests/delete_key_pair.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ def delete_key_pair(key_name, user_id = nil)
88
request(
99
:expects => [202, 204],
1010
:method => 'DELETE',
11-
:path => "os-keypairs/#{Fog::OpenStack.escape(key_name)}"
11+
:path => "os-keypairs/#{Fog::OpenStack.escape(key_name)}",
12+
:query => options
1213
)
1314
end
1415
end
1516

1617
class Mock
17-
def delete_key_pair(_key_name)
18+
def delete_key_pair(_key_name, _user_id = nil)
1819
response = Excon::Response.new
1920
response.status = 202
2021
response.headers = {

lib/fog/openstack/compute/requests/get_key_pair.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def get_key_pair(key_name)
1212
end
1313

1414
class Mock
15-
def delete_key_pair(key_name)
15+
def get_key_pair(key_name)
1616
response = Excon::Response.new
1717
response.status = 200
1818
response.headers = {

0 commit comments

Comments
 (0)