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-14750) Provide CRUD API support for settings
Date Fri, 22 Jan 2016 21:43:39 GMT

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

Hudson commented on AMBARI-14750:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #4215 (See [https://builds.apache.org/job/Ambari-trunk-Commit/4215/])
AMBARI-14750: Provide CRUD support for admin settings (Ajit Kumar via (nsomasundaram: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=f2a44a7e101cfdd9ff30abcc2bf36127a7ce75e9])
* ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AdminSettingEntity.java
* ambari-server/src/test/java/org/apache/ambari/server/orm/entities/AdminSettingEntityTest.java
* ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
* ambari-server/src/main/resources/META-INF/persistence.xml
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AdminSettingResourceProvider.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
* ambari-server/src/main/java/org/apache/ambari/server/api/services/AdminSettingService.java
* ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AdminSettingResourceProviderTest.java
* ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
* ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AdminSettingDAOTest.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AdminSettingDAO.java


> Provide CRUD API support for settings
> -------------------------------------
>
>                 Key: AMBARI-14750
>                 URL: https://issues.apache.org/jira/browse/AMBARI-14750
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>    Affects Versions: 2.4.0
>            Reporter: Ajit Kumar
>            Assignee: Ajit Kumar
>             Fix For: 2.4.0
>
>         Attachments: rb42339.patch
>
>
> Introduce a new API for *admin-settings*
> {code}
> api/v1/admin-settings
> {code}
> There can be several class of system wide admin settings - motd  etc. These are like
configurations - basically named property bags. It doesn't need version support.
> *CRUD*
> * create a new entry
> {code}
> curl -u admin:admin -H "X-Requested-By: ambari" -X POST  http://localhost:8080/api/v1/admin-settings
-d '{
>    "AdminSettings" : {
>     "content" : "{test_content1 : test_value1}",
>     "name" : "motd1",
>     "setting_type" : "ambari-server",
>     "updated_by" : "admin"
>   }
> }' 
> {code}
> * read any entry
> {code}
> curl -u test:test  -H 'X-Requested-By: ambari' -X GET  http://localhost:8080/api/v1/admin-settings
> Response:
> {
>   "href" : "http://c6401.ambari.apache.org:8080/api/v1/admin-settings",
>   "items" : [
>     {
>       "href" : "http://c6401.ambari.apache.org:8080/api/v1/admin-settings/motd1",
>       "AdminSettings" : {
>         "name" : "motd1"
>       }
>     }
>   ]
> }
> curl -u test:test -H "X-Requested-By: ambari" -X GET  http://localhost:8080/api/v1/admin-settings/motd1
> Response:
> {
>   "href" : "http://localhost:8080/api/v1/admin-settings/motd1",
>   "AdminSettings" : {
>     "content" : "{test_content1 : test_value1}",
>     "name" : "motd1",
>     "setting_type" : "ambari-server",
>     "update_timestamp" : 1453315409437,
>     "updated_by" : "admin"
>   }
> }
> {code}
> * update - update an entry
> {code}
> curl -u admin:admin -H "X-Requested-By: ambari" -X PUT  http://localhost:8080/api/v1/admin-settings/motd
-d '{
>    "AdminSettings" : {
>     "content" : "{test_content1 : test_value1}",
>     "setting_type" : "ambari-server",
>     "updated_by" : "admin"
>   }
> }' 
> {code}
> * delete an entry
> {code}
> curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE  http://localhost:8080/api/v1/admin-settings/motd
> {code}



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

Mime
View raw message