Method: SDM::RemoteIdentities#list
- Defined in:
- lib/svc.rb
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of RemoteIdentities matching a given set of criteria.
902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 |
# File 'lib/svc.rb', line 902 def list( filter, *args, deadline: nil ) req = V1::RemoteIdentityListRequest.new() req. = V1::ListRequestMetadata.new() page_size_option = @parent.["PageSize"] if page_size_option.is_a? Integer req..limit = page_size_option end req.filter = Plumbing::quote_filter_args(filter, *args) resp = Enumerator::Generator.new { |g| tries = 0 loop do begin plumbing_response = @stub.list(req, metadata: @parent.("RemoteIdentities.List", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end tries = 0 plumbing_response.remote_identities.each do |plumbing_item| g.yield Plumbing::convert_remote_identity_to_porcelain(plumbing_item) end break if plumbing_response..next_cursor == "" req..cursor = plumbing_response..next_cursor end } resp end |