1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|rds] add tagging methods to RDS server model

This commit is contained in:
Benton Roberts 2012-10-28 23:18:21 -04:00
parent 9bb8a2702d
commit 28216278eb

View file

@ -60,6 +60,24 @@ module Fog
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