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())
Beispiel #2
0
 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())
Beispiel #3
0
 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())
Beispiel #5
0
    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())
Beispiel #6
0
    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
                           },
                       })
Beispiel #7
0
    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
                },
            })
Beispiel #8
0
 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())