Subscription modification via API

katello
api

#1

Problem:
I am trying to automate katello / pulp entitlement via Ansible and plan to use the API to allocate non-standard repositories to a host. Unfortunately, I can’t seem to find a CURL example of how to override a repo to enabled in the API (even in the official satellite documentation)

Expected outcome:
API call via ansible to switch a repo to enabled for host X

Foreman and Proxy versions:
1.22.0

Foreman and Proxy plugin versions:
Katello 3.12.0

Other relevant data:


#2

@stiflermt which endpoint are you do you want to reach? Or are you asking if this is possible?


#3

I am asking if this is possible let’s say the end point is
foreman.testdomain.local and the client is testclient.testdonain.local

I would like to override the MySQL5.6 product to enabled for the MySQLRepo
on the test client


#4

Take a look at Foreman :: Plugin Manuals, and look for
PUT /api/hosts/:host_id/subscriptions/content_override

The parameter you are looking for would be "contents_override[“enabled”] with a value of “true”.


#5

Awesome thanks mate for the heads up will give it a look :slight_smile:


#6

No problem! Let us know how it goes.