lib/awspec/helper/finder/directconnect.rb in awspec-0.33.0 vs lib/awspec/helper/finder/directconnect.rb in awspec-0.34.0
- old
+ new
@@ -5,10 +5,10 @@
res = directconnect_client.describe_virtual_interfaces
ret = res.virtual_interfaces.select do |virtual_interface|
next true if virtual_interface.virtual_interface_id == virtual_interface_id
next true if virtual_interface.virtual_interface_name == virtual_interface_id
end
- return ret.first if ret.count == 1
+ ret.single_resource(virtual_interface_id)
end
def select_virtual_interfaces
res = directconnect_client.describe_virtual_interfaces
res.virtual_interfaces