Feature #22781

RH Subscriptions: add GET API actions and reducers

Added by Walden Raines 4 months ago. Updated 5 days ago.

Status:Closed
Priority:Normal
Assigned To:Walden Raines
Category:Subscriptions
Target version:-
Difficulty: Pull request:https://github.com/Katello/katello/pull/7230
Bugzilla link:
Story points-
Velocity based estimate-
ReleaseKatello 3.7.0Release relationshipAuto

Description

Add the API actions and reducers for the following APIs:

Request:

GET /katello/api/v2/organizations/1/subscriptions

Response:

{
    "organization": {},
    "total": 81,
    "subtotal": 81,
    "page": 1,
    "per_page": 20,
    "error": null,
    "search": null,
    "sort": {
        "by": "cp_id",
        "order": "asc" 
    },
    "results": [{
        "id": 3,
        "cp_id": "ff8080815ea5ea44015ea617b1a5000b",
        "subscription_id": 2,
        "name": "zoo",
        "start_date": "2017-09-21 16:18:44 -0400",
        "end_date": "2047-09-14 15:18:44 -0500",
        "available": -2,
        "quantity": -1,
        "consumed": 1,
        "account_number": null,
        "contract_number": null,
        "support_level": null,
        "product_id": "853987721546",
        "sockets": null,
        "cores": null,
        "ram": null,
        "instance_multiplier": 1,
        "stacking_id": null,
        "multi_entitlement": null,
        "type": "NORMAL",
        "product_name": "zoo",
        "unmapped_guest": false,
        "virt_only": false,
        "virt_who": false
    }, {
        "id": 4,
        "cp_id": "ff8080815ea5ea44015ebb08e95a0024",
        "subscription_id": 3,
        "name": "hsdfhsdh",
        "start_date": "2017-09-25 17:54:36 -0400",
        "end_date": "2047-09-18 16:54:36 -0500",
        "available": -1,
        "quantity": -1,
        "consumed": 0,
        "account_number": null,
        "contract_number": null,
        "support_level": null,
        "product_id": "947637693017",
        "sockets": null,
        "cores": null,
        "ram": null,
        "instance_multiplier": 1,
        "stacking_id": null,
        "multi_entitlement": null,
        "type": "NORMAL",
        "product_name": "hsdfhsdh",
        "unmapped_guest": false,
        "virt_only": false,
        "virt_who": false
    }]
}

GET /katello/api/v2/organizations/1/upstream_subscriptions

Response:

[
      {
            "pool_id": "8a85f9813f14fe33013f81b33d820c7a",
            "quantity": 300,
            "start_date": "2011-10-11T04:00:00+0000",
            "end_date": "2022-01-01T04:59:59+0000",
            "contract_number": "2595500",
            "consumed": 300,
            "product_name": "Red Hat Satellite (Self-Supported)",
            "product_id": "SYS1198",
            "subscription_id": "2251811" 
        },
    ...
]


Related issues

Blocks Katello - Tracker #22365: Show Allocations on the Red Hat Subscriptions page New 01/23/2018
Blocks Katello - Feature #22819: RH Subscriptions: add page for adding subscriptions to an... New 03/08/2018

Associated revisions

Revision 6dbf2352
Added by Walden Raines 3 months ago

Fixes #22728, #22781, #22366: add subscription tables.

Add the subscription and upstream subscription tables and the
actions and reducers necessary for fetching the data from the
APIs. Also add empty state handling.

http://projects.theforeman.org/issues/22728
http://projects.theforeman.org/issues/22781
http://projects.theforeman.org/issues/22366

History

#1 Updated by Walden Raines 4 months ago

  • Related to Tracker #22365: Show Allocations on the Red Hat Subscriptions page added

#2 Updated by Walden Raines 4 months ago

  • Related to deleted (Tracker #22365: Show Allocations on the Red Hat Subscriptions page)

#3 Updated by Walden Raines 4 months ago

  • Blocks Tracker #22365: Show Allocations on the Red Hat Subscriptions page added

#4 Updated by Walden Raines 4 months ago

These two APIs will be tied together with the following:

        "upstreamPoolId": "8a85f98153a7bdce0153aa46b4717ee6",
        "upstreamEntitlementId": "8a85f9815839d62901583f3ee930042d",
        "upstreamConsumerId": "a7c5b09d-ed99-412c-980c-7be32988ab2d",

#5 Updated by Walden Raines 4 months ago

  • Blocks Feature #22819: RH Subscriptions: add page for adding subscriptions to an allocation added

#6 Updated by Walden Raines 4 months ago

  • Assigned To set to Walden Raines

#7 Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/Katello/katello/pull/7230 added

#8 Updated by Walden Raines 4 months ago

  • Status changed from New to Ready For Testing

#9 Updated by Walden Raines 3 months ago

  • Target version changed from Team UX - Iteration 29 to Team UX - Current Iteration

#10 Updated by Walden Raines 3 months ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#11 Updated by Walden Raines 5 days ago

  • Target version deleted (Team UX - Current Iteration)

Also available in: Atom PDF