62c49f7 Resultsdb - API v2.0 implementation

Authored and Committed by jskladan 8 years ago
31 files changed. 2393 lines added. 1002 lines removed.
.arclint
file added
+13
.gitignore
file modified
+1 -0
alembic/env.py
file modified
+8 -7
alembic/versions/433d0b5b3b96_added_index_on_the_keyval_store.py
file modified
+2 -2
alembic/versions/4ace44a44bf_change_index_on_result_data_so_like_can_.py
file modified
+1 -2
alembic/versions/540dbe71fa91_change_schema_to_v2_0_step_1.py
file added
+88
alembic/versions/978007ecd2b_changed_testcase_name_to_text.py
file modified
+2 -1
alembic/versions/dbfab576c81_change_schema_to_v2_0_step_2.py
file added
+106
migration.sh
file added
+8
resultsdb/__init__.py
file modified
+9 -3
resultsdb/cli.py
file modified
+36 -39
resultsdb/controllers/admin.py
file modified
+2 -2
resultsdb/controllers/api_v1.py
file modified
+173 -229
resultsdb/controllers/api_v2.py
file added
+731
resultsdb/controllers/login_page.py
file modified
+5 -6
resultsdb/controllers/main.py
file modified
+1 -2
resultsdb/models/__init__.py
file modified
+0 -1
resultsdb/models/results.py
file modified
+60 -45
resultsdb/models/user.py
file modified
+1 -1
resultsdb/proxy.py
file modified
+2 -0
resultsdb/serializers/__init__.py
file modified
+4 -3
resultsdb/serializers/api_v1.py
file modified
+34 -33
resultsdb/serializers/api_v2.py
file added
+76
run_cli.py
file modified
+0 -1
setup.py
file modified
+3 -2
testing/conftest.py
file modified
+1 -0
testing/functest_api.py
file removed
-490
testing/functest_api_v20.py
file added
+725
testing/functest_create_fedmsg.py
file added
+201
testing/functest_duplicate_result.py
file removed
-133
testing/test_helpers.py
file added
+100
    Resultsdb - API v2.0 implementation
    
    Changes since 1.0
    
    * Removed `Jobs` and replaced with `Groups` to remove the "execution status" (originaly represented by `Job`) from ResultsDB,
      but keeping the ability to group `Results`, as it might make semantical sense
        * `Result` can be a part of 0-n `Groups`
        * UUID as a default `Group` identifier instead of `id`
    * In the response data:
        *`href` (pointer to `self`) is only present in the resource's data, not in the general queries that return collections, since the 'search' queries' `href` was not permalink
        * `ref_url` as a common "external url" attribute
            * `Result.ref_url` instead of `Result.log_url`
            * `Testcase.ref_url` instead of `Testcase.url`
    * Changes in the `Group` object
        * `results` is an URL at which `Results` in that particular `Group` can be
        * `name` renamed to `description`
    * Changes in the `Result` object
        * `ref_url` instead of `log_url`
        * `result_data` replaced with `data`
        * `summary` replaced with `note`
        * only `PASSED, FAILED, INFO, NEEDS_INSPECTION` are now valid `outcome` values
        * `groups` is a list of `Group` urls which the `Result` is part of
        * When submitting new `Result`, `Testcase` and `Group` \[`resource`\] can be represented either by the unique identifier \[`uid`\]
          (`Testcase.name`, `Group.uuid`), or by `object` containing the `uid`, and any other applicable `resource`'s attributes
            * `resource` is identified by `uid` and:
                * exists -> `resource` is linked to the `Result`
                * does _not_ exist -> `resource` is created. Other attributes are set to default values
            * `resource` is identified by `object` and:
                * exists -> relevant attributes of the `resource` are updated to the provided values
                * does _not_ exist -> `resource` is created, relevant attributes are set to the provided values
    * Changes in the `Testcase` object
        * `ref_url` instead of `url`
    * Changes in querying:
        * `*` (star) used as a wildcard instead of `%` (percent sign) in the `like:` filters
        * Result
            * added `testcases` keyword to filter by `Testcase.name`
                * `like` filter allowed
                * multiple values can be provided, separate by commas to get `or` filter based on all the values provided: `...&testcases=name1,name2`
        * Group
            * `like` filter for `description`
    * `_auth` placeholder for the Authorization/Authenticaion data in the Request queries; Ignored at the moment
    
    API documentation is here: http://docs.resultsdb20.apiary.io/#
    
    Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D999
    
        
file added
+13
file modified
+1 -0
file modified
+8 -7
file added
+8
file modified
+9 -3
file modified
+36 -39
file modified
+173 -229
file modified
+0 -1
file modified
+60 -45
file modified
+1 -1
file modified
+2 -0
file modified
+34 -33
file modified
+0 -1
file modified
+3 -2
file modified
+1 -0
file removed
-490