Xi Wang created AMBARI-15147:
--------------------------------
Summary: Patch Upgrade: integrate API to POST new repo version
when registering new version
Key: AMBARI-15147
URL: https://issues.apache.org/jira/browse/AMBARI-15147
Project: Ambari
Issue Type: Task
Components: ambari-web
Affects Versions: 2.4.0
Reporter: Xi Wang
Assignee: Xi Wang
Fix For: 2.4.0
On Register Version page, UI provides two ways to upload version definition
file, both should POST new stack version.
1. Browse local files and then Upload file,
{code}
POST /api/v1/version_definitions
<?xml ... >
{code}
The equivalent curl call would look like so (the text/xml header is required):
{code}
curl -u admin:admin -H "Content-Type: text/xml" -X POST -d
@ambari-server/src/test/resources/hbase_version_test.xml
http://localhost:8080/api/v1/version_definitions
{code}
2. Enter the Url then click on "Read Version File" button,
{code}
POST /api/v1/version_definitions
{
"RepositoryVersions": {
"version_url": "http://somewhere/version-definition.xml"
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)