def content_applicability2(): repo_criteria = { "sort": [["id", "ascending"]], "filters": { "id": { "$in": ["test-repo", "zoo"] } } } options = { "repo_criteria": repo_criteria, } p = Prompt() pprint( "/pulp/api/v2/repositories/actions/content/regenerate_applicability/") p.write('\repo_criteria -', color=COLOR_LIGHT_BLUE) pprint(repo_criteria) p.write('') result = pic.POST( '/pulp/api/v2/repositories/actions/content/regenerate_applicability/', options) pause(p) p.write('\nresult -', color=COLOR_LIGHT_BLUE) pprint(result) p.write('')
def content_applicability1(): consumer_criteria = { "sort": [["id", "ascending"]], "filters": { "id": { "$in": ["lemonade", "sunflower", "voyager"] } } } options = { "consumer_criteria": consumer_criteria, } p = Prompt() pprint("/pulp/api/v2/consumers/actions/content/regenerate_applicability/") p.write('\nconsumer_criteria -', color=COLOR_LIGHT_BLUE) pprint(consumer_criteria) p.write('') result = pic.POST( '/pulp/api/v2/consumers/actions/content/regenerate_applicability/', options) pause(p) p.write('\nresult -', color=COLOR_LIGHT_BLUE) pprint(result) p.write('')
def _publish(repo_id, data=None): """ Publish the specific repo with associated distributor info @param repo_id: repo id to publish @param data: dict of post data eg: {'id' : distributor_id, 'override_config' : {}} @return: (status, call report representing the current state of they sync) """ return pic.POST('/repositories/%s/actions/publish/' % repo_id, data)