Sha256: 107cf458b889b621e7544748b3db16d4ba7545aa58e1f15b2551237bb1b7a3fd
Contents?: true
Size: 1.53 KB
Versions: 39
Compression:
Stored size: 1.53 KB
Contents
module Fog module Compute class AWS class RouteTable < Fog::Model identity :id, :aliases => 'routeTableId' attribute :vpc_id, :aliases => 'vpcId' attribute :routes, :aliases => 'routeSet' attribute :associations, :aliases => 'associationSet' attribute :tags, :aliases => 'tagSet' def initialize(attributes={}) super end # Remove an existing route table # # route_tables.destroy # # ==== Returns # # True or false depending on the result # def destroy requires :id service.delete_route_table(id) true end # Create a route table # # >> routetable = connection.route_tables.new # >> routetable.save # # == Returns: # # True or an exception depending on the result. Keep in mind that this *creates* a new route table. # def save requires :vpc_id data = service.create_route_table(vpc_id).body['routeTable'].first new_attributes = data.reject {|key,value| key == 'requestId'} merge_attributes(new_attributes) true end private def associationSet=(new_association_set) merge_attributes(new_association_set.first || {}) end def routeSet=(new_route_set) merge_attributes(new_route_set || {}) end end end end end
Version data entries
39 entries across 37 versions & 3 rubygems