ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-8510) Repository Version Management > Refactor API
Date Tue, 02 Dec 2014 22:39:12 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-8510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14232248#comment-14232248
] 

Hudson commented on AMBARI-8510:
--------------------------------

SUCCESS: Integrated in Ambari-trunk-Commit #1079 (See [https://builds.apache.org/job/Ambari-trunk-Commit/1079/])
AMBARI-8510. Repository Version Management > Refactor API (Yurii Shylov via ncole) (ncole:
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=7ed98d53c1f1c24dc841baef54e02d2664f6a381)
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/OperatingSystemResourceProvider.java
* ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java
* ambari-server/src/main/resources/key_properties.json
* ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryResponse.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/OperatingSystemRequest.java
* ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryResourceProviderTest.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/RepositoryRequest.java
* ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java
* LICENSE.txt
* ambari-server/src/main/resources/properties.json
* ambari-server/src/main/java/org/apache/ambari/server/api/resources/ComponentStackVersionResourceDefinition.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryEntity.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
* ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
* ambari-server/src/main/java/org/apache/ambari/server/api/resources/RepositoryResourceDefinition.java
* ambari-server/src/test/java/org/apache/ambari/server/api/resources/ComponentStackVersionResourceDefinitionTest.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/OperatingSystemResponse.java
* ambari-server/src/test/java/org/apache/ambari/server/orm/dao/CrudDAOTest.java
* ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java
* ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
* ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAOTest.java
* ambari-server/src/main/java/org/apache/ambari/server/api/resources/RepositoryVersionResourceDefinition.java
* ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryService.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
* ambari-server/src/main/java/org/apache/ambari/server/state/RepositoryVersionState.java
* ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java
* ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseStacksResourceDefinition.java
* ambari-server/src/test/java/org/apache/ambari/server/api/services/RepositoryVersionServiceTest.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java
* ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestImplTest.java
* ambari-server/src/main/java/org/apache/ambari/server/api/services/RepositoryVersionService.java
* ambari-server/pom.xml
* ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
* ambari-server/src/test/java/org/apache/ambari/server/api/resources/RepositoryVersionResourceDefinitionTest.java
* ambari-server/src/main/java/org/apache/ambari/server/api/services/HostStackVersionService.java
* ambari-server/src/main/java/org/apache/ambari/server/api/services/OperatingSystemService.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
* ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAO.java
* ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/entities/OperatingSystemEntity.java
* ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterStackVersionService.java


> 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)

Mime
View raw message