Description of problem: Need candlepin API to get productid list for a specific sku. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: I need a candlepin API to get productid list from both Stage and Prod candlepin. My test needs to validate "EngProductId(s)" consistency between STAGE and PROD. While in STAGE, I can create account and add subscription pool to my created account by requirement. After that I can register/subscribe and use the certificate in client-side to access proper product in STAGE. However in PROD, we don't have the permission to create such account or add subscription pools, so can't get the "EngProductId(s)" as STAGE. Then I found there is direct REST API http://jenkins-sse.devlab.redhat.com/rest-apidoc/productv3/ to get such product list from server-side, but for some issues described in https://bugzilla.redhat.com/show_bug.cgi?id=1242783, maybe the Java Edge is not the right interface on the server side for the test. I don't see a direct API in Candlepin that exposes the product list, it will be great if we can have one. Actual results: Expected results: Additional info:
Liu, I want to confirm what you expect here and why. RH2264664 product is 'Red Hat Enterprise Linux Developer Support, Enterprise'. This marketing product provides many engineering products e.g.: - 293 Red Hat Container Development Kit - 86 Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support So for example is this [1] correct list that you expect to get in Stage for RH2264664? Second question. You said you want to validate consistency. Can you explain a bit more how do you plan to use this new API for validating the consistency? My guess is that you are going to use our API to run against PROD and STAGE and compare the returned lists? Or are you going to run our API and then compare what is in certificate after consumption? These two tests seem to achieve different goals to me, so I just want to understand the idea behind all this. [1] 201 293 172 180 70 246 133 90 240 273 287 271 92 91 272 84 274 190 93 86 83 69 205 85 132 176
Hi Filip, The first question: Yes, it is a correct list what I expect. The second question: From my side, it seems it returns the same results use the two tests. Is it correct? Or the two tests are totally not same, and returns entirely different lists? BTW, if I use the second test -- run your API and then compare what is in certificate after consumption, is it possible for a common sku in PROD since there is no such test account for most of the skus in PROD? Actually, what I am expecting is list from PROD, STAGE and certificate are all the same. Regards Song
You are correct that the two tests (1) compare PROD and STAGE through API (2) compare PROD API and certs, should probably have the same results. The thing to understand here is that STAGE and PROD do not share the same database. I don't know what are the goals of SKU STAGE testing so you must check with Dan Lah if this is what you want to verify. With regards to getting this RFE implemented. How important is this for you? When do you need to use this?
Hi Filip, SKU 'Eng ID(s)' validation goal: Goal 1: 1. Run API to get 'Eng ID(s)' from STAGE. 2. Run API to get 'Eng ID(s)' from PROD. 3. Validate the two lists are the same. Goal 2: 1. Run API to get 'Eng ID(s)' from STAGE/PROD. 2. Get certificate after consumption. 3. Validate the two lists are the same. Do I need to confirm with Dan Lah? Due to the issue in https://bugzilla.redhat.com/show_bug.cgi?id=1242783, I can't achieve my goals through REST api, I really hoping this RFE API implemented soon. Regards Song
Product information is scoped by organization. Existing APIs should be used to get pool information and then inspect product information on that pool. Please look at /owners/{owner_key}/pools and /owners/{owner_key}/products. Those should be sufficient to get the SKU to products mapping. Please reach out to rhsm testing team (jmolet, jsefler, etc). if you need help.