Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 12070179C6 for ; Fri, 7 Nov 2014 13:31:34 +0000 (UTC) Received: (qmail 47136 invoked by uid 500); 7 Nov 2014 13:31:33 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 47097 invoked by uid 500); 7 Nov 2014 13:31:33 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 47085 invoked by uid 99); 7 Nov 2014 13:31:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Nov 2014 13:31:33 +0000 Date: Fri, 7 Nov 2014 13:31:33 +0000 (UTC) From: "Yurii Shylov (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-8164) Repository Version Management - Create API and BE support for creating/retrieving repo versions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-8164?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Yurii Shylov updated AMBARI-8164: --------------------------------- Attachment: AMBARI-8164.patch > Repository Version Management - Create API and BE support for creating/re= trieving 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 =E2=80=9C-=E2=80=9D 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", =20 > "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)