jkaluza / odcs

Forked from odcs 6 years ago
Clone

1730395 Introduce new odcs.client.odcs.ODCS.request_compose method to make requests easier.

5 files Authored by jkaluza 4 years ago, Committed by lsedlar 4 years ago,
    Introduce new odcs.client.odcs.ODCS.request_compose method to make requests easier.
    
    The current `ODCS.new_compose` method combines all the possible compose arguments
    to single method which is very confusing for people who try to use this API.
    It is not clearly visible which argument can be used with which source_type.
    
    In this commit, I'm trying to improve this situation by new `request_compose`
    method which accepts `source` argument. This `source` argument is instance
    of `ComposeSourceGeneric` subclass. These subclasses directly map to some
    source type and their arguments are clearly defined now.
    
    This commit also adds new `docs/modules.rst` documentation for the Python
    module API in general.
    
    The `odcs` client is also improved in this commit. New subcommands are
    added to match the source type (for example `create-tag`, `create-pulp`,
    `create-raw-config`, ...). These new commands also use new API.
    
    Old API remains available in both ODCS python module and ODCS client
    for backward compatibility.
    
    Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
    
        
file modified
+154 -12
file modified
+151 -0
file modified
+3 -0
file modified
+1 -0
file added
+6