[ https://issues.apache.org/jira/browse/AMBARI-8510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14232043#comment-14232043 ]
Hadoop QA commented on AMBARI-8510: ----------------------------------- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12684694/AMBARI-8510.patch against trunk revision . {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:green}+1 tests included{color}. The patch appears to include 9 new or modified test files. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:red}-1 core tests{color}. The patch failed these unit tests in ambari-server: org.apache.ambari.server.api.query.QueryImplTest org.apache.ambari.server.controller.internal.RequestImplTest org.apache.ambari.server.api.TestSuite Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/793//testReport/ Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/793//console This message is automatically generated. > Repository Version Management > Refactor API > -------------------------------------------- > > Key: AMBARI-8510 > URL: https://issues.apache.org/jira/browse/AMBARI-8510 > Project: Ambari > Issue Type: Technical task > Components: ambari-server > Affects Versions: 2.0.0 > Reporter: Yurii Shylov > Assignee: Yurii Shylov > Fix For: 2.0.0 > > Attachments: AMBARI-8510.patch > > > Update the APIs for repository_version and stack_version resources to be > consistent with the /stacks API. > For repository_version change existing API to: > Add it to stacks: > {code} > GET /api/v1/stacks/HDP/versions/2.2/ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2", > "Versions" : { > "active" : true, > "min_upgrade_version" : null, > "parent_stack_version" : "2.1", > "stack_name" : "HDP", > "stack_version" : "2.2", > "config_types" : { > "cluster-env" : { > "supports" : { } > } > } > }, > "configurations" : [ ... ], > "services" : [ ... ], > "operating_systems" : [ ... ], > "upgrade_packs" : ["upgrade-2.2"], > "repository_versions" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/repository_versions/1", > "RepositoryVersions" : { > "id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > } > ] > } > {code} > Create: > {code} > POST /api/v1/stacks/HDP/versions/2.2/repository_versions/ > { > "RepositoryVersions": { > "repository_version": "2.2.0.1-885", > "display_name" : "HDP-2.2.0", > "operating_systems" : [ > { > "OperatingSystems" : { > "os_type" : "redhat5" > }, > "repositories" : [ > { > "Repositories" : { > "repo_id" : "HDP-2.2", > "repo_name": "HDP", > "base_url" : > "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos5/2.x/updates/2.2.0.0" > } > }, > { > "Repositories" : { > "repo_id" : "HDP-UTILS-1.1.0.20", > "repo_name": "HDP-UTILS", > "base_url" : > "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos5/2.x/updates/2.2.0.0" > } > } > ] > } > ] > } > } > {code} > Get single: > {code} > GET /api/v1/stacks/HDP/versions/2.2/repository_versions/1 > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/repository_versions/1", > "RepositoryVersions" : { > "display_name" : "HDP 2.2.0", > "id" : 1, > "repository_version" : "2.2.0.1-885", > "stack_name" : "HDP", > "stack_version" : "2.2", > "upgrade_pack" : "upgrade-2.2" > }, > "operating_systems" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/repository_versions/1/operating_systems/redhat5", > "OperatingSystems" : { > "os_type" : "redhat5", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > } > ] > } > {code} > Get all info: > {code} > GET > /api/v1/stacks/HDP/versions/2.2/repository_versions/1?fields=operatingSystems/repositories/* > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/repository_versions/1?fields=operating_systems/repositories/*", > "RepositoryVersions" : { > "id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > }, > "operating_systems" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/repository_versions/1/operating_systems/redhat5", > "OperatingSystems" : { > "os_type" : "redhat5", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > }, > "repositories" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/repository_versions/1/operating_systems/redhat5/repositories/HDP-2.2", > "Repositories" : { > "base_url" : > "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos5/2.x/updates/2.2.0.0", > "default_base_url" : "", > "latest_base_url" : "", > "mirrors_list" : "", > "os_type" : "redhat5", > "repo_id" : "HDP-2.2", > "repo_name" : "HDP", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > }, > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/repository_versions/1/operating_systems/redhat5/repositories/HDP-UTILS-1.1.0.20", > "Repositories" : { > "base_url" : > "http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos5/2.x/updates/2.2.0.0", > "default_base_url" : "", > "latest_base_url" : "", > "mirrors_list" : "", > "os_type" : "redhat5", > "repo_id" : "HDP-UTILS-1.1.0.20", > "repo_name" : "HDP-UTILS", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > } > ] > } > ] > } > {code} > Delete > {code} > DELETE /api/v1/stacks/HDP/versions/2.2/repository_versions/1 > {code} > Update > {code} > PUT /api/v1/stacks/HDP/versions/2.2/repository_versions/1 > {code} > Cluster stack vesrions: > {code} > GET /api/v1/clusters/c1/stack_versions/1 > { > "ClusterStackVersions": { > "id": 1, > "cluster_name": "c1", > "stack": "HDP", > "version": "2.2", > "state": "INSTALLING", > "host_states": { > INIT: [], > INSTALLING: [], > DISTRIBUTED: [], > INSTALLED: ["host2"], > UPGRADING: [], > UPGRADED: [], > UPGRADE_FAILED: [], > CURRENT: ["host1"] > }, > "repository_versions" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/clusters/1/stack_versions/1/repository_versions/2", > "RepositoryVersions" : { > "id" : 2, > "stack_name" : "HDP", > "stack_version" : "2.1" > } > } > ] > } > {code} > Host stack versions: > {code} > GET /api/v1/hosts/host1/stack_versions/1 > { > "HostStackVersions": { > "id": 1, > "host_name": "host1", > "stack": "HDP", > "version": "2.2", > "state": "INSTALLING", > "repository_versions" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/clusters/1/stack_versions/1/repository_versions/2", > "RepositoryVersions" : { > "id" : 2, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > } > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)