lib/azure/armrest/resource_group_based_service.rb
# Use a single call to get all resources for the service. You may
# optionally provide a filter on various properties to limit the
# result set.
#
# Example:
#
#   vms = Azure::Armrest::VirtualMachineService.new(conf)
#   vms.list_all(:location => "eastus", :resource_group => "rg1")
#
# Note that comparisons against string values are caseless.
#
Use a single call to get all resources for the service. You may
optionally provide a filter on various properties to limit the
result set.





Note that comparisons against string values are caseless.
Use a single call to get all resources for the service . You may optionally provide a filter on various properties to limit the result set . Note that comparisons against string values are caseless .
def list_all(filter = {})
        url = build_url
        url = yield(url) || url if block_given?
        skip_accessors_definition = filter.delete(:skip_accessors_definition) || false
        response = rest_get(url)
        results  = get_all_results(response, skip_accessors_definition)
        if filter.empty?
          results
        else
          results.select do |obj|
            filter.all? do |method_name, value|
              if value.kind_of?(String)
                if skip_accessors_definition
                  obj[method_name.to_s].casecmp(value).zero?
                else
                  obj.public_send(method_name).casecmp(value).zero?
                end
              else
                obj.public_send(method_name) == value
              end
            end
          end
        end
      end
def list_all ( filter = { } ) url = build_url url = yield ( url ) || url if block_given? skip_accessors_definition = filter . delete ( :skip_accessors_definition ) || false response = rest_get ( url ) results = get_all_results ( response , skip_accessors_definition ) if filter . empty? results else results . select do | obj | filter . all? do | method_name , value | if value . kind_of? ( String ) if skip_accessors_definition obj [ method_name . to_s ] . casecmp ( value ) . zero? else obj . public_send ( method_name ) . casecmp ( value ) . zero? end else obj . public_send ( method_name ) == value end end end end end
Use a single call to get all resources for the service.
Use a single call to get all resources for the service .
filter
<not_specific>