lib/azure/armrest/resource_group_based_service.rb
# Aggregate resources from all resource groups.
#
# To be used in the cases where the API does not support list_all with
# one call. Note that this does not set the skip token because we're
# actually collating the results of multiple calls internally.
#
Aggregate resources from all resource groups.
To be used in the cases where the API does not support list_all with
one call. Note that this does not set the skip token because we're
actually collating the results of multiple calls internally.
Aggregate resources from all resource groups . To be used in the cases where the API does not support list_all with one call . Note that this does not set the skip token because we ' re actually collating the results of multiple calls internally .
def list_in_all_groups(options = {})
        array   = []
        mutex   = Mutex.new
        headers = nil
        code    = nil
        Parallel.each(list_resource_groups, :in_threads => configuration.max_threads) do |rg|
          url = build_url(rg.name, options)
          response = rest_get(url)
          json_response = JSON.parse(response.body)['value']
          headers = Azure::Armrest::ResponseHeaders.new(response.headers)
          code = response.code
          results = json_response.map { |hash| model_class.new(hash) }
          mutex.synchronize { array << results } unless results.blank?
        end
        array = ArmrestCollection.new(array.flatten)
        array.response_headers = headers
        array.response_code = code
        array
      end
def list_in_all_groups ( options = { } ) array = [ ] mutex = Mutex . new headers = nil code = nil Parallel . each ( list_resource_groups , :in_threads => configuration . max_threads ) do | rg | url = build_url ( rg . name , options ) response = rest_get ( url ) json_response = JSON . parse ( response . body ) [ 'value' ] headers = Azure :: Armrest :: ResponseHeaders . new ( response . headers ) code = response . code results = json_response . map { | hash | model_class . new ( hash ) } mutex . synchronize { array << results } unless results . blank? end array = ArmrestCollection . new ( array . flatten ) array . response_headers = headers array . response_code = code array end
Aggregate resources from all resource groups.
Aggregate resources from all resource groups .
# Use the last set of headers and response code for the overall result.
options
<not_specific>