Author: ncole
Date: Tue May  7 17:33:55 2013
New Revision: 1479989

URL: http://svn.apache.org/r1479989
Log:
AMBARI-1890. Updated test_api for config changes

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-server/src/test/resources/test_api.sh

Modified: incubator/ambari/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1479989&r1=1479988&r2=1479989&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue May  7 17:33:55 2013
@@ -488,6 +488,8 @@ Trunk (unreleased changes):
 
  AMBARI-1546. Improve Cluster Management loading screen. (Xi Wang via yusaku)
 
+ AMBARI-1890. Add configuration to test_api.sh script (ncole)
+
  AMBARI-2026. Add WebHCat to live status checks. (ncole)
 
  AMBARI-1975. Add Clover coverage (ncole)

Modified: incubator/ambari/trunk/ambari-server/src/test/resources/test_api.sh
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/test/resources/test_api.sh?rev=1479989&r1=1479988&r2=1479989&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/test/resources/test_api.sh 
(original)
+++ incubator/ambari/trunk/ambari-server/src/test/resources/test_api.sh Tue May 
 7 17:33:55 2013
@@ -21,18 +21,18 @@ curl -i -X POST http://localhost:8080/ap
 curl -i -X POST http://localhost:8080/api/v1/clusters/c1/services/HBASE
 curl -i -X POST http://localhost:8080/api/v1/clusters/c1/services/GANGLIA
 curl -i -X POST http://localhost:8080/api/v1/clusters/c1/services/NAGIOS
-curl -i -X POST -d '{"type": "core-site", "tag": "version1", "properties" : { 
"fs.default.name" : "localhost:8020"}}' 
http://localhost:8080/api/v1/clusters/c1/configurations
-curl -i -X POST -d '{"type": "hdfs-site", "tag": "version1", "properties" : { 
"dfs.datanode.data.dir.perm" : "750"}}' 
http://localhost:8080/api/v1/clusters/c1/configurations
-curl -i -X POST -d '{"type": "global", "tag": "version1", "properties" : { 
"hbase_hdfs_root_dir" : "/apps/hbase/"}}' 
http://localhost:8080/api/v1/clusters/c1/configurations
-curl -i -X POST -d '{"type": "mapred-site", "tag": "version1", "properties" : 
{ "mapred.job.tracker" : "localhost:50300", 
"mapreduce.history.server.embedded": "false", 
"mapreduce.history.server.http.address": "localhost:51111"}}' 
http://localhost:8080/api/v1/clusters/c1/configurations
-curl -i -X POST -d '{"type": "hbase-site", "tag": "version1", "properties" : { 
"hbase.rootdir" : "hdfs://localhost:8020/apps/hbase/", 
"hbase.cluster.distributed" : "true", "hbase.zookeeper.quorum": "localhost", 
"zookeeper.session.timeout": "60000" }}' 
http://localhost:8080/api/v1/clusters/c1/configurations
-curl -i -X POST -d '{"type": "hbase-env", "tag": "version1", "properties" : { 
"hbase_hdfs_root_dir" : "/apps/hbase/"}}' 
http://localhost:8080/api/v1/clusters/c1/configurations
-curl -i -X POST -d '{"type": "nagios-global", "tag": "version2", "properties" 
: { "nagios_web_login" : "nagiosadmin", "nagios_web_password" : "password", 
"nagios_contact": "a\u0040b.c" }}' 
http://localhost:8080/api/v1/clusters/c1/configurations
-curl -i -X POST -d '{"type": "nagios-global", "tag": "version1", "properties" 
: { "nagios_web_login" : "nagiosadmin", "nagios_web_password" : "password"  }}' 
http://localhost:8080/api/v1/clusters/c1/configurations
-curl -i -X PUT -d '{"config": {"core-site": "version1", "hdfs-site": 
"version1", "global" : "version1" }}'  
http://localhost:8080/api/v1/clusters/c1/services/HDFS
-curl -i -X PUT -d '{"config": {"core-site": "version1", "mapred-site": 
"version1"}}'  http://localhost:8080/api/v1/clusters/c1/services/MAPREDUCE
-curl -i -X PUT -d '{"config": {"hbase-site": "version1", "hbase-env": 
"version1"}}'  http://localhost:8080/api/v1/clusters/c1/services/HBASE
-curl -i -X PUT -d '{"config": {"nagios-global": "version2" }}'  
http://localhost:8080/api/v1/clusters/c1/services/NAGIOS
+
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "core-site", 
"tag": "version1", "properties" : { "fs.default.name" : "localhost:8020"}}}}' 
http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "core-site", 
"tag": "version2", "properties" : { "fs.default.name" : "localhost:8020"}}}}' 
http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "core-site", 
"tag": "version1"}}}' http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "hdfs-site", 
"tag": "version1", "properties" : { "dfs.datanode.data.dir.perm" : "750"}}}}' 
http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "global", "tag": 
"version1", "properties" : { "hbase_hdfs_root_dir" : "/apps/hbase/"}}}}' 
http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "mapred-site", 
"tag": "version1", "properties" : { "mapred.job.tracker" : "localhost:50300", 
"mapreduce.history.server.embedded": "false", 
"mapreduce.history.server.http.address": "localhost:51111"}}}}' 
http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "hbase-site", 
"tag": "version1", "properties" : { "hbase.rootdir" : 
"hdfs://localhost:8020/apps/hbase/", "hbase.cluster.distributed" : "true", 
"hbase.zookeeper.quorum": "localhost", "zookeeper.session.timeout": "60000" 
}}}}' http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "hbase-env", 
"tag": "version1", "properties" : { "hbase_hdfs_root_dir" : "/apps/hbase/"}}}}' 
http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "nagios-global", 
"tag": "version2", "properties" : { "nagios_web_login" : "nagiosadmin", 
"nagios_web_password" : "password", "nagios_contact": "a\u0040b.c" }}}}' 
http://localhost:8080/api/v1/clusters/c1
+curl -i -X PUT -d '{"Clusters": {"desired_config": {"type": "nagios-global", 
"tag": "version1", "properties" : { "nagios_web_login" : "nagiosadmin", 
"nagios_web_password" : "password"  }}}}' 
http://localhost:8080/api/v1/clusters/c1
+
 curl -i -X POST 
http://localhost:8080/api/v1/clusters/c1/services/HDFS/components/NAMENODE
 curl -i -X POST 
http://localhost:8080/api/v1/clusters/c1/services/HDFS/components/SECONDARY_NAMENODE
 curl -i -X POST 
http://localhost:8080/api/v1/clusters/c1/services/HDFS/components/DATANODE
@@ -60,6 +60,7 @@ curl -i -X POST http://localhost:8080/ap
 curl -i -X POST 
http://localhost:8080/api/v1/clusters/c1/hosts/$AGENT_HOST/host_components/HBASE_REGIONSERVER
 curl -i -X POST 
http://localhost:8080/api/v1/clusters/c1/hosts/$AGENT_HOST/host_components/HBASE_CLIENT
 curl -i -X POST 
http://localhost:8080/api/v1/clusters/c1/hosts/$AGENT_HOST/host_components/NAGIOS_SERVER
+curl -i -X PUT -d '{"Hosts": {"desired_config": {"type": "core-site", "tag": 
"version3", "properties" : { "nagios_web_login" : "nagiosadmin", 
"nagios_web_password" : "password"  }}}}' 
http://localhost:8080/api/v1/clusters/c1/hosts/$AGENT_HOST
 curl -i -X PUT  -d '{"ServiceInfo": {"state" : "INSTALLED"}}'   
http://localhost:8080/api/v1/clusters/c1/services?state=INIT
 #curl -i -X PUT  -d '{"ServiceInfo": {"state" : "STARTED"}}'   
http://localhost:8080/api/v1/clusters/c1/services?state=INSTALLED
 # http://localhost:8080/api/v1/clusters/c1/requests/2


Reply via email to