def promote(cls, version_id, environment_id): js = {'environment_id': environment_id} url = "/katello/api/v2/content_view_versions/{0}/promote".format( version_id ) result = request('post', path=url, json=js) return Task(result.json())
def synchronize(cls, instance): """Synchronize repository """ id = instance.id url = "/katello/api/v2/repositories/{0}/sync".format(id) result = request('post', path=url) return Task(result.json())
def publish(cls, instance): """Synchronize repository """ id = instance.id url = "/katello/api/v2/content_views/{0}/publish".format(id) result = request('post', path=url) return Task(result.json())
def add_host_collection(cls, instance, host_collection_ids): """Add host collections to an activation key record""" url = "/katello/api/v2/activation_keys/{}/host_collections".format( instance.id) return request('put', path=url, json={ 'activation_key': { 'host_collection_ids': host_collection_ids }, })
def add_host_collection(cls, instance, host_collection_ids): """Add host collections to an activation key record""" url = "/katello/api/v2/activation_keys/{0}/host_collections".format( instance.id) return request( 'put', path=url, json={ 'activation_key': { 'host_collection_ids': host_collection_ids }, })
def promote(cls, version_id, environment_id): js = {'environment_id': environment_id} url = "/katello/api/v2/content_view_versions/{0}/promote".format( version_id) result = request('post', path=url, json=js) return Task(result.json())