Sha256: 1d5fb8455d0fae5d0f85cd73bf90f69a83442a9410ce7ec74cfbf111e0a5276d
Contents?: true
Size: 879 Bytes
Versions: 5
Compression:
Stored size: 879 Bytes
Contents
require 'fog/core/collection' require 'fog/azurerm/models/resources/azure_resource' module Fog module Resources class AzureRM # This class is giving implementation of all/list and get. class AzureResources < Fog::Collection attribute :tag_name attribute :tag_value model Fog::Resources::AzureRM::AzureResource def all unless tag_name.nil? && tag_value.nil? resources = [] service.list_tagged_resources(tag_name, tag_value).each do |resource| resources << Fog::Resources::AzureRM::AzureResource.parse(resource) end resources.inspect return load(resources) end nil end def get(resource_id) all.find { |f| f.id == resource_id } end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems