Sha256: 334e00441d1f4a74cfe1f8fdde5f404183fab643f26d2dbe0c626687f234ca1c
Contents?: true
Size: 1.46 KB
Versions: 13
Compression:
Stored size: 1.46 KB
Contents
# This file is part of RestConnection # # RestConnection is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # RestConnection is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with RestConnection. If not, see <http://www.gnu.org/licenses/>. class Tag include RightScale::Api::Base extend RightScale::Api::BaseExtend def self.search(resource_name, tags) result = connection.get("tags/search", :resource_type => resource_name.to_s, :tags => tags ) end #TAGGABLE_RESOURCES = [ 'Server', 'Ec2EbsSnapshot', 'Ec2EbsVolume', 'Ec2Image', 'Image', 'ServerArray', 'Ec2Instance', # 'Instance', 'Deployment', 'ServerTemplate', 'Ec2ServerTemplate' ] # # Tag.set( resource_href, tags ) where tags is an array of tags to set on the resource. def self.set(resource_href, tags) connection.put("tags/set", :resource_href => resource_href, :tags => tags) end def self.unset(resource_href, tags) connection.put("tags/unset", :resource_href => resource_href, :tags => tags) end end
Version data entries
13 entries across 13 versions & 1 rubygems