Class: Chef::Resource::AwsNetworkInterface
- Inherits:
-
Provisioning::AWSDriver::AWSResourceWithEntry
- Object
- LWRPBase
- Provisioning::AWSDriver::SuperLWRP
- Provisioning::AWSDriver::AWSResource
- Provisioning::AWSDriver::AWSResourceWithEntry
- Chef::Resource::AwsNetworkInterface
- Includes:
- Provisioning::AWSDriver::AWSTaggable
- Defined in:
- lib/chef/resource/aws_network_interface.rb
Constant Summary
Constants inherited from Provisioning::AWSDriver::AWSResource
Provisioning::AWSDriver::AWSResource::NOT_PASSED
Instance Method Summary collapse
-
#aws_object ⇒ Object
TODO: implement eip address association attribute :elastic_ip_address, kind_of: [ String, ::Aws::OpsWorks::Types::ElasticIp, AwsEipAddress, FalseClass ].
- #exists?(result) ⇒ Boolean
Methods included from Provisioning::AWSDriver::AWSTaggable
Methods inherited from Provisioning::AWSDriver::AWSResourceWithEntry
#delete_managed_entry, #get_id_from_managed_entry, #save_managed_entry, #to_s
Methods inherited from Provisioning::AWSDriver::AWSResource
#action, #action=, #aws_object_id, get_aws_object, get_aws_object_id, #initialize, lookup_options
Methods inherited from Provisioning::AWSDriver::SuperLWRP
Constructor Details
This class inherits a constructor from Chef::Provisioning::AWSDriver::AWSResource
Instance Method Details
#aws_object ⇒ Object
TODO: implement eip address association attribute :elastic_ip_address, kind_of: [ String, ::Aws::OpsWorks::Types::ElasticIp, AwsEipAddress, FalseClass ]
31 32 33 34 35 |
# File 'lib/chef/resource/aws_network_interface.rb', line 31 def aws_object driver, id = get_driver_and_id result = driver.ec2_resource.network_interface(id) if id result && exists?(result) ? result : nil end |
#exists?(result) ⇒ Boolean
37 38 39 40 41 |
# File 'lib/chef/resource/aws_network_interface.rb', line 37 def exists?(result) return true if result.data rescue ::Aws::EC2::Errors::InvalidNetworkInterfaceIDNotFound false end |