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/path.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:14 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": "57238b62aca4886d952eeafb"}, "id": "integration_test_consumer",
43
        "_id": {"$oid": "5a0b4fb170be6f049ca06fd5"}, "id": "integration_test_consumer",
40 44
        "_href": "/pulp/api/v2/consumers/integration_test_consumer/"}, "certificate":
41
        "-----BEGIN RSA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 
45
  recorded_at: Fri, 29 Apr 2016 16:27:14 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:14 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:15 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