Class: Chef::Resource::AwsEipAddress
- Inherits:
-
Provisioning::AWSDriver::AWSResourceWithEntry
- Object
- LWRPBase
- Provisioning::AWSDriver::SuperLWRP
- Provisioning::AWSDriver::AWSResource
- Provisioning::AWSDriver::AWSResourceWithEntry
- Chef::Resource::AwsEipAddress
- Defined in:
- lib/chef/resource/aws_eip_address.rb
Constant Summary
Constants inherited from Provisioning::AWSDriver::AWSResource
Provisioning::AWSDriver::AWSResource::NOT_PASSED
Instance Method Summary collapse
Methods inherited from Provisioning::AWSDriver::AWSResourceWithEntry
aws_sdk_type, #delete_managed_entry, #get_id_from_managed_entry, managed_entry_id_name, managed_entry_type, #save_managed_entry, #to_s
Methods inherited from Provisioning::AWSDriver::AWSResource
#action=, attribute, aws_id_attribute, aws_id_prefix, #aws_object_id, aws_option_handlers, aws_sdk_class, aws_sdk_class_id, aws_sdk_option_name, aws_sdk_type, 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
#action(*args) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/chef/resource/aws_eip_address.rb', line 23 def action(*args) # Backcompat for associate and disassociate if args == [ :associate ] super(:create) elsif args == [ :disassociate ] machine false super(:create) else super end end |
#aws_object ⇒ Object
17 18 19 20 21 |
# File 'lib/chef/resource/aws_eip_address.rb', line 17 def aws_object driver, public_ip = get_driver_and_id result = driver.ec2.elastic_ips[public_ip] if public_ip result && result.exists? ? result : nil end |