Method: Awspec::Type::Ec2#has_network_interface?
- Defined in:
- lib/awspec/type/ec2.rb
#has_network_interface?(network_interface_id, device_index = nil) ⇒ Boolean
101 102 103 104 105 106 107 108 109 110 |
# File 'lib/awspec/type/ec2.rb', line 101 def has_network_interface?(network_interface_id, device_index = nil) res = find_network_interface(network_interface_id) check_existence interfaces = resource_via_client.network_interfaces ret = interfaces.find do |interface| next false if device_index && interface..device_index != device_index interface.network_interface_id == res.network_interface_id end end |