Project

General

Profile

Revision df1b6e2a

Added by Partha Aji about 5 years ago

Fixes #21661 - Retrieve All for consumers

This commit adds a couple of methods to retrieve all consumers in one
go.

View differences:

test/fixtures/vcr_cassettes/resources/general_methods/consumer_path_with_id.yml
2 2
http_interactions:
3 3
- request:
4 4
    method: post
5
    uri: https://admin:HeQSzZgm6ZEKG8aHrJEGW7aGD85Wrj57@runcible.example.com/pulp/api/v2/consumers/
5
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/consumers/
6 6
    body:
7 7
      encoding: UTF-8
8 8
      string: '{"id":"integration_test_consumer","name":"boo"}'
......
11 11
      - application/json
12 12
      Accept-Encoding:
13 13
      - gzip, deflate
14
      User-Agent:
15
      - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.2.4p230
14 16
      Content-Type:
15 17
      - application/json
16 18
      Content-Length:
17 19
      - '47'
18
      User-Agent:
19
      - Ruby
20
      Host:
21
      - obelix.example.com
20 22
  response:
21 23
    status:
22 24
      code: 201
23 25
      message: CREATED
24 26
    headers:
25 27
      Date:
26
      - Fri, 29 Apr 2016 16:27:15 GMT
28
      - Tue, 14 Nov 2017 20:18:57 GMT
27 29
      Server:
28 30
      - Apache/2.4.6 (CentOS)
29 31
      Content-Length:
30
      - '2485'
32
      - '2497'
31 33
      Location:
32
      - https://runcible.example.com/pulp/api/v2/consumers/integration_test_consumer/
34
      - https://obelix.example.com/pulp/api/v2/consumers/integration_test_consumer/
35
      Connection:
36
      - close
33 37
      Content-Type:
34 38
      - application/json; charset=utf-8
35 39
    body:
36 40
      encoding: UTF-8
37 41
      string: '{"consumer": {"display_name": "integration_test_consumer", "description":
38 42
        null, "_ns": "consumers", "notes": {}, "rsa_pub": null, "capabilities": {},
39
        "_id": {"$oid": "57238b63aca4886d952eeb03"}, "id": "integration_test_consumer",
43
        "_id": {"$oid": "5a0b4fb170be6f049ee2a568"}, "id": "integration_test_consumer",
40 44
        "_href": "/pulp/api/v2/consumers/integration_test_consumer/"}, "certificate":
41
        "-----B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"}'
44 48
    http_version: 
45
  recorded_at: Fri, 29 Apr 2016 16:27:16 GMT
49
  recorded_at: Tue, 14 Nov 2017 20:18:57 GMT
46 50
- request:
47 51
    method: delete
48
    uri: https://admin:HeQSzZgm6ZEKG8aHrJEGW7aGD85Wrj57@runcible.example.com/pulp/api/v2/consumers/integration_test_consumer/
52
    uri: https://admin:admin@obelix.example.com/pulp/api/v2/consumers/integration_test_consumer/
49 53
    body:
50 54
      encoding: US-ASCII
51 55
      string: ''
......
54 58
      - application/json
55 59
      Accept-Encoding:
56 60
      - gzip, deflate
61
      User-Agent:
62
      - rest-client/2.0.2 (linux-gnu x86_64) ruby/2.2.4p230
57 63
      Content-Type:
58 64
      - application/json
59
      User-Agent:
60
      - Ruby
65
      Host:
66
      - obelix.example.com
61 67
  response:
62 68
    status:
63 69
      code: 200
64 70
      message: OK
65 71
    headers:
66 72
      Date:
67
      - Fri, 29 Apr 2016 16:27:16 GMT
73
      - Tue, 14 Nov 2017 20:18:57 GMT
68 74
      Server:
69 75
      - Apache/2.4.6 (CentOS)
70 76
      Content-Length:
71 77
      - '4'
78
      Connection:
79
      - close
72 80
      Content-Type:
73 81
      - application/json; charset=utf-8
74 82
    body:
75 83
      encoding: UTF-8
76 84
      string: 'null'
77 85
    http_version: 
78
  recorded_at: Fri, 29 Apr 2016 16:27:16 GMT
79
recorded_with: VCR 3.0.1
86
  recorded_at: Tue, 14 Nov 2017 20:18:57 GMT
87
recorded_with: VCR 3.0.3

Also available in: Unified diff