Skip to content

Commit

Permalink
[aws|rds] add tagging methods to RDS server model
Browse files Browse the repository at this point in the history
  • Loading branch information
benton committed Oct 29, 2012
1 parent 9bb8a27 commit 2821627
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/fog/aws/models/rds/server.rb
Expand Up @@ -60,6 +60,24 @@ def snapshots
connection.snapshots(:server => self)
end

def tags
requires :id
connection.list_tags_for_resource(id).
body['ListTagsForResourceResult']['TagList']
end

def add_tags(new_tags)
requires :id
connection.add_tags_to_resource(id, new_tags)
tags
end

def remove_tags(tag_keys)
requires :id
connection.remove_tags_from_resource(id, tag_keys)
tags
end

def modify(immediately, options)
options[:security_group_names] ||= options['DBSecurityGroups']
params = self.class.new(options).attributes_to_params
Expand Down

0 comments on commit 2821627

Please sign in to comment.