You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Nate Cole (JIRA)" <ji...@apache.org> on 2014/11/07 15:14:33 UTC

[jira] [Commented] (AMBARI-8164) Repository Version Management - Create API and BE support for creating/retrieving repo versions

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

Nate Cole commented on AMBARI-8164:
-----------------------------------

commit 1bf2795a462e9780f482de306b7eeaf3c6e51f13

> Repository Version Management - Create API and BE support for creating/retrieving repo versions
> -----------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-8164
>                 URL: https://issues.apache.org/jira/browse/AMBARI-8164
>             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-8164.patch
>
>
> Create database table *repoversion*:
> |Column name|type|nullable|key|example|
> |repoversion_id|BIGINT|no|PK|1|
> |stack|VARCHAR(255)|no|UK1|HDP-2.2|
> |version|VARCHAR(255)|no|UK1|2.2.0.1-885 (this is needed for comparisons, anything after the “-” is an internal build number)|
> |display_name|VARCHAR(128)|no|UK2|HDP 2.2.0.1-885 (solely for UI purposes)|
> |upgrade_pack|VARCHAR(255)|no| |xyz (perhaps some relative file name)
> At first, this may be a folder. Later on, it could be a zip file
> |repositories|TEXT|no| | {code}
> {
>  [
>   {
>     "os": "redhat6",
>     "baseurls": [
>       {
>         "type": "HDP",
>         "baseurl":"http://host1/hdp"
>       },
>       {
>          "type": "HDP-UTILS",
>          "baseurl": "http://host1/hdp-utils"
>       }
>     ]
>   }
>  ]
> }
> {code}
> |
> Create the following API:
> {code}
> GET /api/v1/repository_versions
> {
>   "items": [
>     {
>       "RepositoryVersion": {
>         "id": "1"
>       }
>     }
>   ]
> }
> {code}
> {code}
> GET /api/v1/repository_versions/1
> {
>   "RepositoryVersion": {
>     "id": "1",
>     "display_name": "HDP 2.2.0.1",
>     "stack": "HDP-2.2",
>     "version": "2.2.0.1-885",
>     "upgrade_pack": "xyz",
>     "repositories": [
>       {
>         "os": "redhat6",
>         "baseurls": [
>           {
>             "id": "HDP-2.2.0.1-885",
>             "type": "HDP",
>             "baseurl": "http://host1/hdp"
>           },
>           {
>             "id": "HDP-UTILS-1.0.0.20",
>             "type": "HDP-UTILS",
>             "baseurl": "http://host1/hdp-utils"
>           }
>         ]
>       }
>     ]
>   }
> }
> {code}
> {code}
> POST /api/v1/repository_versions
> {
>   "RepositoryVersion": {
>     "display_name": "My 2.2.0.1-885",  
>     "version": "2.2.0.1-885",
>     "stack": "HDP-2.2",
>     "upgrade_pack": "xyz",
>     "repositories": [
>       {
>         "os": "redhat6",
>         "baseurls": [
>           {
>             "id": "HDP-2.2.0.1-885",
>             "type": "HDP",
>             "baseurl": "http://host1/hdp"
>           },
>           {
>             "id": "HDP-UTILS-1.0.0.20",
>             "type": "HDP-UTILS",
>             "baseurl": "http://host1/hdp-utils"
>           }
>         ]
>       }
>     ]
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)