Class: DrawCloud::RouteTable
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#routes ⇒ Object
Returns the value of attribute routes.
Attributes inherited from Base
#as_groups, #as_launch_configurations, #deletion_policy, #depends_on, #ec2_instances, #elastic_ips, #gateways, #iam_access_keys, #iam_policies, #iam_users, #mappings, #metadata, #network_acls, #network_interfaces, #outputs, #parameters, #parent, #rdses, #resources, #route_tables, #security_groups, #sns_topics, #subnets, #vpcs, #wait_handles
Instance Method Summary collapse
-
#initialize(name, options = {}, &block) ⇒ RouteTable
constructor
A new instance of RouteTable.
- #load_into_config(config) ⇒ Object
- #resource_name ⇒ Object
- #route_table ⇒ Object
- #to(name, to_cidr, options = {}) ⇒ Object
- #to_h ⇒ Object
Methods inherited from Base
#[], #accessor, #add_standard_properties, #create_as_group, #create_as_launch_configuration, #create_ec2_instance, #create_ec2_instance_template, #create_elastic_ip, #create_iam_access_key, #create_iam_policy, #create_iam_user, #create_mapping, #create_network_acl, #create_network_interface, #create_output, #create_parameter, #create_rds, #create_route_table, #create_security_group, #create_service, #create_sns_topic, #create_subnet, #create_vpc, #create_wait_handle, #ref
Methods included from Locations
Methods included from Utilities
#desplice, #fnbase64, #fngetatt, #fnjoin, #hash_to_tag_array, #region, #resource_style, #splice, #stack_name
Constructor Details
#initialize(name, options = {}, &block) ⇒ RouteTable
Returns a new instance of RouteTable.
22 23 24 25 26 |
# File 'lib/draw_cloud/route_table.rb', line 22 def initialize(name, ={}, &block) @name = name @routes = [] super(, &block) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
21 22 23 |
# File 'lib/draw_cloud/route_table.rb', line 21 def name @name end |
#routes ⇒ Object
Returns the value of attribute routes.
21 22 23 |
# File 'lib/draw_cloud/route_table.rb', line 21 def routes @routes end |
Instance Method Details
#load_into_config(config) ⇒ Object
37 38 39 40 41 |
# File 'lib/draw_cloud/route_table.rb', line 37 def load_into_config(config) config.cf_add_resource resource_name, self @routes.each {|r| config.cf_add_resource(r.resource_name, r)} super(config) end |
#resource_name ⇒ Object
43 44 45 |
# File 'lib/draw_cloud/route_table.rb', line 43 def resource_name resource_style(name) + "Table" end |
#route_table ⇒ Object
28 29 30 |
# File 'lib/draw_cloud/route_table.rb', line 28 def route_table self end |
#to(name, to_cidr, options = {}) ⇒ Object
32 33 34 35 |
# File 'lib/draw_cloud/route_table.rb', line 32 def to(name, to_cidr, ={}) raise(Exeception, "No :via specified") unless [:via] @routes << RouteTableEntry.new(name, to_cidr, [:via], .merge(:parent => self)) end |