lib/azure/armrest/resource_group_based_service.rb
# Used to map service name strings to internal classes
Used to map service name strings to internal classes
Used to map service name strings to internal classes
def build_id_string(resource_group = nil, *args)
        id_string = File.join('', 'subscriptions', configuration.subscription_id)
        id_string = File.join(id_string, 'resourceGroups', resource_group) if resource_group
        id_string = File.join(id_string, 'providers', @provider, @service_name)
        query = "?api-version=#{@api_version}"
        args.each do |arg|
          if arg.kind_of?(Hash)
            arg.each do |key, value|
              key = key.to_s.camelize(:lower)
              if key.casecmp('top').zero?
                query << "&$top=#{value}"
              elsif key.casecmp('filter').zero?
                query << "&$filter=#{value}" 
              elsif key.casecmp('expand').zero?
                query << "&$expand=#{value}"
              else
                if query.include?("$filter")
                  query << " and #{key} eq '#{value}'"
                else
                  query << "&$filter=#{key} eq '#{value}'"
                end
              end
            end
          else
            id_string = File.join(id_string, arg)
          end
        end
        id_string + query
      end
def build_id_string ( resource_group = nil , * args ) id_string = File . join ( '' , 'subscriptions' , configuration . subscription_id ) id_string = File . join ( id_string , 'resourceGroups' , resource_group ) if resource_group id_string = File . join ( id_string , 'providers' , @provider , @service_name ) query = "?api-version=#{@api_version}" args . each do | arg | if arg . kind_of? ( Hash ) arg . each do | key , value | key = key . to_s . camelize ( :lower ) if key . casecmp ( 'top' ) . zero? query << "&$top=#{value}" elsif key . casecmp ( 'filter' ) . zero? query << "&$filter=#{value}" elsif key . casecmp ( 'expand' ) . zero? query << "&$expand=#{value}" else if query . include? ( "$filter" ) query << " and #{key} eq '#{value}'" else query << "&$filter=#{key} eq '#{value}'" end end end else id_string = File . join ( id_string , arg ) end end id_string + query end
Used to map service name strings to internal classes
Used to map service name strings to internal classes
# Allow raw filter
resource_group
<not_specific>
args
<not_specific>