ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject [1/2] AMBARI-6624. Make validation for minimum required number of service components from cardinality field of stacks API (Buzhor Denys via alexantonenko)
Date Mon, 28 Jul 2014 12:25:34 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 883d7b3a1 -> a6873d64c


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6873d64/ambari-web/test/service_components.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/service_components.js b/ambari-web/test/service_components.js
index e4e475e..0f43be8 100644
--- a/ambari-web/test/service_components.js
+++ b/ambari-web/test/service_components.js
@@ -78,26 +78,42 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/FALCON",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/FALCON",
       "StackServices" : {
         "comments" : "Data management and processing platform",
-        "config_types" : [
-          "oozie-site",
-          "global",
-          "falcon-startup.properties",
-          "falcon-runtime.properties"
-        ],
         "service_name" : "FALCON",
         "service_version" : "0.5.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "falcon-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "falcon-runtime.properties" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "falcon-startup.properties" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "oozie-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/FALCON/serviceComponents/FALCON_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/FALCON/components/FALCON_CLIENT",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "FALCON_CLIENT",
             "is_client" : true,
@@ -109,9 +125,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/FALCON/serviceComponents/FALCON_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/FALCON/components/FALCON_SERVER",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1",
             "component_category" : "MASTER",
             "component_name" : "FALCON_SERVER",
             "is_client" : false,
@@ -120,30 +136,63 @@ module.exports = {
             "stack_name" : "HDP",
             "stack_version" : "2.1"
           },
-          "dependencies" : [ ]
+          "dependencies" : [
+            {
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/FALCON/components/FALCON_SERVER/dependencies/OOZIE_CLIENT",
+              "Dependencies" : {
+                "component_name" : "OOZIE_CLIENT",
+                "dependent_component_name" : "FALCON_SERVER",
+                "dependent_service_name" : "FALCON",
+                "stack_name" : "HDP",
+                "stack_version" : "2.1"
+              }
+            },
+            {
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/FALCON/components/FALCON_SERVER/dependencies/OOZIE_SERVER",
+              "Dependencies" : {
+                "component_name" : "OOZIE_SERVER",
+                "dependent_component_name" : "FALCON_SERVER",
+                "dependent_service_name" : "FALCON",
+                "stack_name" : "HDP",
+                "stack_version" : "2.1"
+              }
+            }
+          ]
         }
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/FLUME",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/FLUME",
       "StackServices" : {
         "comments" : "Data management and processing platform",
-        "config_types" : [
-          "flume-conf",
-          "flume-log4j",
-          "global"
-        ],
         "service_name" : "FLUME",
         "service_version" : "1.4.0.2.1.1.0",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "flume-conf" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "flume-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "flume-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/FLUME/serviceComponents/FLUME_HANDLER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/FLUME/components/FLUME_HANDLER",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "0+",
             "component_category" : "SLAVE",
             "component_name" : "FLUME_HANDLER",
             "is_client" : false,
@@ -157,23 +206,27 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/GANGLIA",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/GANGLIA",
       "StackServices" : {
         "comments" : "Ganglia Metrics Collection system (<a href=\"http://oss.oetiker.ch/rrdtool/\" target=\"_blank\">RRDTool</a> will be installed too)",
-        "config_types" : [
-          "global"
-        ],
         "service_name" : "GANGLIA",
         "service_version" : "3.5.0",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "ganglia-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/GANGLIA/serviceComponents/GANGLIA_MONITOR",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/GANGLIA/components/GANGLIA_MONITOR",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "ALL",
             "component_category" : "SLAVE",
             "component_name" : "GANGLIA_MONITOR",
             "is_client" : false,
@@ -182,12 +235,15 @@ module.exports = {
             "stack_name" : "HDP",
             "stack_version" : "2.1"
           },
+          "auto_deploy" : {
+            "enabled" : true
+          },
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/GANGLIA/serviceComponents/GANGLIA_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/GANGLIA/components/GANGLIA_SERVER",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1",
             "component_category" : "MASTER",
             "component_name" : "GANGLIA_SERVER",
             "is_client" : false,
@@ -201,26 +257,42 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HBASE",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HBASE",
       "StackServices" : {
         "comments" : "Non-relational distributed database and centralized service for configuration management &\n        synchronization\n      ",
-        "config_types" : [
-          "global",
-          "hbase-policy",
-          "hbase-site",
-          "hbase-log4j"
-        ],
         "service_name" : "HBASE",
         "service_version" : "0.98.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "hbase-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "hbase-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "hbase-policy" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "hbase-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HBASE/serviceComponents/HBASE_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HBASE/components/HBASE_CLIENT",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "HBASE_CLIENT",
             "is_client" : true,
@@ -232,9 +304,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HBASE/serviceComponents/HBASE_MASTER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HBASE/components/HBASE_MASTER",
           "StackServiceComponents" : {
-            "cardinality" : "1",
+            "cardinality" : "1+",
             "component_category" : "MASTER",
             "component_name" : "HBASE_MASTER",
             "is_client" : false,
@@ -245,7 +317,7 @@ module.exports = {
           },
           "dependencies" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HBASE/serviceComponents/HBASE_MASTER/dependencies/HDFS_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HBASE/components/HBASE_MASTER/dependencies/HDFS_CLIENT",
               "Dependencies" : {
                 "component_name" : "HDFS_CLIENT",
                 "dependent_component_name" : "HBASE_MASTER",
@@ -255,7 +327,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HBASE/serviceComponents/HBASE_MASTER/dependencies/ZOOKEEPER_SERVER",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HBASE/components/HBASE_MASTER/dependencies/ZOOKEEPER_SERVER",
               "Dependencies" : {
                 "component_name" : "ZOOKEEPER_SERVER",
                 "dependent_component_name" : "HBASE_MASTER",
@@ -267,9 +339,9 @@ module.exports = {
           ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HBASE/serviceComponents/HBASE_REGIONSERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HBASE/components/HBASE_REGIONSERVER",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1+",
             "component_category" : "SLAVE",
             "component_name" : "HBASE_REGIONSERVER",
             "is_client" : false,
@@ -283,21 +355,30 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HCATALOG",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HCATALOG",
       "StackServices" : {
         "comments" : "This is comment for HCATALOG service",
-        "config_types" : [
-          "global"
-        ],
         "service_name" : "HCATALOG",
         "service_version" : "0.12.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "hive-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "hive-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HCATALOG/serviceComponents/HCAT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HCATALOG/components/HCAT",
           "StackServiceComponents" : {
             "cardinality" : null,
             "component_category" : "CLIENT",
@@ -313,27 +394,47 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HDFS",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HDFS",
       "StackServices" : {
         "comments" : "Apache Hadoop Distributed File System",
-        "config_types" : [
-          "core-site",
-          "global",
-          "hdfs-site",
-          "hadoop-policy",
-          "hdfs-log4j"
-        ],
         "service_name" : "HDFS",
         "service_version" : "2.4.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "core-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "hadoop-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "hadoop-policy" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "hdfs-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "hdfs-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HDFS/serviceComponents/DATANODE",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HDFS/components/DATANODE",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1+",
             "component_category" : "SLAVE",
             "component_name" : "DATANODE",
             "is_client" : false,
@@ -345,9 +446,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HDFS/serviceComponents/HDFS_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HDFS/components/HDFS_CLIENT",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "HDFS_CLIENT",
             "is_client" : true,
@@ -359,13 +460,13 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HDFS/serviceComponents/JOURNALNODE",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HDFS/components/JOURNALNODE",
           "StackServiceComponents" : {
-            "cardinality" : null,
-            "component_category" : "MASTER",
+            "cardinality" : "0+",
+            "component_category" : "SLAVE",
             "component_name" : "JOURNALNODE",
             "is_client" : false,
-            "is_master" : true,
+            "is_master" : false,
             "service_name" : "HDFS",
             "stack_name" : "HDP",
             "stack_version" : "2.1"
@@ -373,9 +474,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HDFS/serviceComponents/NAMENODE",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HDFS/components/NAMENODE",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1-2",
             "component_category" : "MASTER",
             "component_name" : "NAMENODE",
             "is_client" : false,
@@ -387,9 +488,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HDFS/serviceComponents/SECONDARY_NAMENODE",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HDFS/components/SECONDARY_NAMENODE",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1",
             "component_category" : "MASTER",
             "component_name" : "SECONDARY_NAMENODE",
             "is_client" : false,
@@ -401,9 +502,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HDFS/serviceComponents/ZKFC",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HDFS/components/ZKFC",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "0+",
             "component_category" : "SLAVE",
             "component_name" : "ZKFC",
             "is_client" : false,
@@ -417,27 +518,47 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE",
       "StackServices" : {
         "comments" : "Data warehouse system for ad-hoc queries & analysis of large datasets and table & storage management service",
-        "config_types" : [
-          "hive-site",
-          "hive-log4j",
-          "hive-exec-log4j",
-          "global",
-          "mapred-site"
-        ],
         "service_name" : "HIVE",
         "service_version" : "0.13.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "hive-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "hive-exec-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "hive-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "hive-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "tez-site" : {
+            "supports" : {
+              "final" : "false"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE/serviceComponents/HIVE_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE/components/HIVE_CLIENT",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "HIVE_CLIENT",
             "is_client" : true,
@@ -449,7 +570,7 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE/serviceComponents/HIVE_METASTORE",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE/components/HIVE_METASTORE",
           "StackServiceComponents" : {
             "cardinality" : "1",
             "component_category" : "MASTER",
@@ -467,7 +588,7 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE/serviceComponents/HIVE_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE/components/HIVE_SERVER",
           "StackServiceComponents" : {
             "cardinality" : "1",
             "component_category" : "MASTER",
@@ -480,7 +601,7 @@ module.exports = {
           },
           "dependencies" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE/serviceComponents/HIVE_SERVER/dependencies/MAPREDUCE2_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE/components/HIVE_SERVER/dependencies/MAPREDUCE2_CLIENT",
               "Dependencies" : {
                 "component_name" : "MAPREDUCE2_CLIENT",
                 "dependent_component_name" : "HIVE_SERVER",
@@ -490,7 +611,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE/serviceComponents/HIVE_SERVER/dependencies/TEZ_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE/components/HIVE_SERVER/dependencies/TEZ_CLIENT",
               "Dependencies" : {
                 "component_name" : "TEZ_CLIENT",
                 "dependent_component_name" : "HIVE_SERVER",
@@ -500,7 +621,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE/serviceComponents/HIVE_SERVER/dependencies/YARN_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE/components/HIVE_SERVER/dependencies/YARN_CLIENT",
               "Dependencies" : {
                 "component_name" : "YARN_CLIENT",
                 "dependent_component_name" : "HIVE_SERVER",
@@ -510,7 +631,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE/serviceComponents/HIVE_SERVER/dependencies/ZOOKEEPER_SERVER",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE/components/HIVE_SERVER/dependencies/ZOOKEEPER_SERVER",
               "Dependencies" : {
                 "component_name" : "ZOOKEEPER_SERVER",
                 "dependent_component_name" : "HIVE_SERVER",
@@ -522,9 +643,9 @@ module.exports = {
           ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/HIVE/serviceComponents/MYSQL_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/HIVE/components/MYSQL_SERVER",
           "StackServiceComponents" : {
-            "cardinality" : "1",
+            "cardinality" : "0-1",
             "component_category" : "MASTER",
             "component_name" : "MYSQL_SERVER",
             "is_client" : false,
@@ -533,33 +654,45 @@ module.exports = {
             "stack_name" : "HDP",
             "stack_version" : "2.1"
           },
-          "auto_deploy" : {
-            "enabled" : true,
-            "location" : "HIVE/HIVE_SERVER"
-          },
           "dependencies" : [ ]
         }
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/MAPREDUCE2",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/MAPREDUCE2",
       "StackServices" : {
         "comments" : "Apache Hadoop NextGen MapReduce (YARN)",
-        "config_types" : [
-          "core-site",
-          "global",
-          "mapred-site",
-          "mapred-queue-acls"
-        ],
         "service_name" : "MAPREDUCE2",
         "service_version" : "2.1.0.2.0.6.0",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "core-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "mapred-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "mapred-queue-acls" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "mapred-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/MAPREDUCE2/serviceComponents/HISTORYSERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/MAPREDUCE2/components/HISTORYSERVER",
           "StackServiceComponents" : {
             "cardinality" : "1",
             "component_category" : "MASTER",
@@ -576,7 +709,7 @@ module.exports = {
           },
           "dependencies" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/MAPREDUCE2/serviceComponents/HISTORYSERVER/dependencies/HDFS_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/MAPREDUCE2/components/HISTORYSERVER/dependencies/HDFS_CLIENT",
               "Dependencies" : {
                 "component_name" : "HDFS_CLIENT",
                 "dependent_component_name" : "HISTORYSERVER",
@@ -588,7 +721,7 @@ module.exports = {
           ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/MAPREDUCE2/serviceComponents/MAPREDUCE2_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/MAPREDUCE2/components/MAPREDUCE2_CLIENT",
           "StackServiceComponents" : {
             "cardinality" : "0+",
             "component_category" : "CLIENT",
@@ -604,21 +737,25 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/NAGIOS",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/NAGIOS",
       "StackServices" : {
         "comments" : "Nagios Monitoring and Alerting system",
-        "config_types" : [
-          "global"
-        ],
         "service_name" : "NAGIOS",
         "service_version" : "3.5.0",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "nagios-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/NAGIOS/serviceComponents/NAGIOS_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/NAGIOS/components/NAGIOS_SERVER",
           "StackServiceComponents" : {
             "cardinality" : "1",
             "component_category" : "MASTER",
@@ -631,7 +768,7 @@ module.exports = {
           },
           "dependencies" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/NAGIOS/serviceComponents/NAGIOS_SERVER/dependencies/HCAT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/NAGIOS/components/NAGIOS_SERVER/dependencies/HCAT",
               "Dependencies" : {
                 "component_name" : "HCAT",
                 "dependent_component_name" : "NAGIOS_SERVER",
@@ -641,7 +778,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/NAGIOS/serviceComponents/NAGIOS_SERVER/dependencies/HDFS_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/NAGIOS/components/NAGIOS_SERVER/dependencies/HDFS_CLIENT",
               "Dependencies" : {
                 "component_name" : "HDFS_CLIENT",
                 "dependent_component_name" : "NAGIOS_SERVER",
@@ -651,7 +788,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/NAGIOS/serviceComponents/NAGIOS_SERVER/dependencies/MAPREDUCE2_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/NAGIOS/components/NAGIOS_SERVER/dependencies/MAPREDUCE2_CLIENT",
               "Dependencies" : {
                 "component_name" : "MAPREDUCE2_CLIENT",
                 "dependent_component_name" : "NAGIOS_SERVER",
@@ -661,7 +798,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/NAGIOS/serviceComponents/NAGIOS_SERVER/dependencies/OOZIE_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/NAGIOS/components/NAGIOS_SERVER/dependencies/OOZIE_CLIENT",
               "Dependencies" : {
                 "component_name" : "OOZIE_CLIENT",
                 "dependent_component_name" : "NAGIOS_SERVER",
@@ -671,7 +808,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/NAGIOS/serviceComponents/NAGIOS_SERVER/dependencies/TEZ_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/NAGIOS/components/NAGIOS_SERVER/dependencies/TEZ_CLIENT",
               "Dependencies" : {
                 "component_name" : "TEZ_CLIENT",
                 "dependent_component_name" : "NAGIOS_SERVER",
@@ -681,7 +818,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/NAGIOS/serviceComponents/NAGIOS_SERVER/dependencies/YARN_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/NAGIOS/components/NAGIOS_SERVER/dependencies/YARN_CLIENT",
               "Dependencies" : {
                 "component_name" : "YARN_CLIENT",
                 "dependent_component_name" : "NAGIOS_SERVER",
@@ -695,25 +832,42 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/OOZIE",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/OOZIE",
       "StackServices" : {
-        "comments" : "System for workflow coordination and execution of Apache Hadoop jobs.  This also includes the installation of the optional Oozie Web Console which relies on and will install the <a target=\"_blank\" href=\"http://www.sencha.com/products/extjs/license/\">ExtJS</a> Library.\n      ",
-        "config_types" : [
-          "global",
-          "oozie-site",
-          "oozie-log4j"
-        ],
+        "comments" : "System for workflow coordination and execution of Apache Hadoop jobs.  This also includes the installation of the optional Oozie Web Console which relies on and will install the <a target=\"_blank\" href=\"http://www.sencha.com/legal/open-source-faq/\">ExtJS</a> Library.\n      ",
         "service_name" : "OOZIE",
         "service_version" : "4.0.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "oozie-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "oozie-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "oozie-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "yarn-site" : {
+            "supports" : {
+              "final" : "false"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/OOZIE/serviceComponents/OOZIE_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/OOZIE/components/OOZIE_CLIENT",
           "StackServiceComponents" : {
-            "cardinality" : "0+",
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "OOZIE_CLIENT",
             "is_client" : true,
@@ -724,7 +878,7 @@ module.exports = {
           },
           "dependencies" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/OOZIE/serviceComponents/OOZIE_CLIENT/dependencies/HDFS_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/OOZIE/components/OOZIE_CLIENT/dependencies/HDFS_CLIENT",
               "Dependencies" : {
                 "component_name" : "HDFS_CLIENT",
                 "dependent_component_name" : "OOZIE_CLIENT",
@@ -734,7 +888,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/OOZIE/serviceComponents/OOZIE_CLIENT/dependencies/MAPREDUCE2_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/OOZIE/components/OOZIE_CLIENT/dependencies/MAPREDUCE2_CLIENT",
               "Dependencies" : {
                 "component_name" : "MAPREDUCE2_CLIENT",
                 "dependent_component_name" : "OOZIE_CLIENT",
@@ -746,7 +900,7 @@ module.exports = {
           ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/OOZIE/serviceComponents/OOZIE_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/OOZIE/components/OOZIE_SERVER",
           "StackServiceComponents" : {
             "cardinality" : "1",
             "component_category" : "MASTER",
@@ -759,7 +913,7 @@ module.exports = {
           },
           "dependencies" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/OOZIE/serviceComponents/OOZIE_SERVER/dependencies/HDFS_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/OOZIE/components/OOZIE_SERVER/dependencies/HDFS_CLIENT",
               "Dependencies" : {
                 "component_name" : "HDFS_CLIENT",
                 "dependent_component_name" : "OOZIE_SERVER",
@@ -769,7 +923,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/OOZIE/serviceComponents/OOZIE_SERVER/dependencies/MAPREDUCE2_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/OOZIE/components/OOZIE_SERVER/dependencies/MAPREDUCE2_CLIENT",
               "Dependencies" : {
                 "component_name" : "MAPREDUCE2_CLIENT",
                 "dependent_component_name" : "OOZIE_SERVER",
@@ -779,7 +933,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/OOZIE/serviceComponents/OOZIE_SERVER/dependencies/YARN_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/OOZIE/components/OOZIE_SERVER/dependencies/YARN_CLIENT",
               "Dependencies" : {
                 "component_name" : "YARN_CLIENT",
                 "dependent_component_name" : "OOZIE_SERVER",
@@ -793,22 +947,35 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/PIG",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/PIG",
       "StackServices" : {
         "comments" : "Scripting platform for analyzing large datasets",
-        "config_types" : [
-          "global",
-          "pig-log4j"
-        ],
         "service_name" : "PIG",
         "service_version" : "0.12.1.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "pig-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "pig-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "pig-properties" : {
+            "supports" : {
+              "final" : "false"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/PIG/serviceComponents/PIG",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/PIG/components/PIG",
           "StackServiceComponents" : {
             "cardinality" : "0+",
             "component_category" : "CLIENT",
@@ -824,21 +991,27 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/SQOOP",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/SQOOP",
       "StackServices" : {
         "comments" : "Tool for transferring bulk data between Apache Hadoop and\n        structured data stores such as relational databases\n      ",
-        "config_types" : [ ],
         "service_name" : "SQOOP",
         "service_version" : "1.4.4.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "sqoop-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/SQOOP/serviceComponents/SQOOP",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/SQOOP/components/SQOOP",
           "StackServiceComponents" : {
-            "cardinality" : "0+",
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "SQOOP",
             "is_client" : true,
@@ -849,7 +1022,7 @@ module.exports = {
           },
           "dependencies" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/SQOOP/serviceComponents/SQOOP/dependencies/HDFS_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/SQOOP/components/SQOOP/dependencies/HDFS_CLIENT",
               "Dependencies" : {
                 "component_name" : "HDFS_CLIENT",
                 "dependent_component_name" : "SQOOP",
@@ -859,7 +1032,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/SQOOP/serviceComponents/SQOOP/dependencies/MAPREDUCE2_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/SQOOP/components/SQOOP/dependencies/MAPREDUCE2_CLIENT",
               "Dependencies" : {
                 "component_name" : "MAPREDUCE2_CLIENT",
                 "dependent_component_name" : "SQOOP",
@@ -873,24 +1046,32 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/STORM",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/STORM",
       "StackServices" : {
         "comments" : "Apache Hadoop Stream processing framework",
-        "config_types" : [
-          "storm-site",
-          "global"
-        ],
         "service_name" : "STORM",
         "service_version" : "0.9.1.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "storm-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "storm-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/STORM/serviceComponents/DRPC_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/STORM/components/DRPC_SERVER",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1",
             "component_category" : "MASTER",
             "component_name" : "DRPC_SERVER",
             "is_client" : false,
@@ -902,9 +1083,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/STORM/serviceComponents/NIMBUS",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/STORM/components/NIMBUS",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1",
             "component_category" : "MASTER",
             "component_name" : "NIMBUS",
             "is_client" : false,
@@ -913,12 +1094,23 @@ module.exports = {
             "stack_name" : "HDP",
             "stack_version" : "2.1"
           },
-          "dependencies" : [ ]
+          "dependencies" : [
+            {
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/STORM/components/NIMBUS/dependencies/ZOOKEEPER_SERVER",
+              "Dependencies" : {
+                "component_name" : "ZOOKEEPER_SERVER",
+                "dependent_component_name" : "NIMBUS",
+                "dependent_service_name" : "STORM",
+                "stack_name" : "HDP",
+                "stack_version" : "2.1"
+              }
+            }
+          ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/STORM/serviceComponents/STORM_REST_API",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/STORM/components/STORM_REST_API",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1",
             "component_category" : "MASTER",
             "component_name" : "STORM_REST_API",
             "is_client" : false,
@@ -930,9 +1122,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/STORM/serviceComponents/STORM_UI_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/STORM/components/STORM_UI_SERVER",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1",
             "component_category" : "MASTER",
             "component_name" : "STORM_UI_SERVER",
             "is_client" : false,
@@ -944,9 +1136,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/STORM/serviceComponents/SUPERVISOR",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/STORM/components/SUPERVISOR",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1+",
             "component_category" : "SLAVE",
             "component_name" : "SUPERVISOR",
             "is_client" : false,
@@ -960,24 +1152,32 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/TEZ",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/TEZ",
       "StackServices" : {
         "comments" : "Tez is the next generation Hadoop Query Processing framework written on top of YARN.",
-        "config_types" : [
-          "global",
-          "tez-site"
-        ],
         "service_name" : "TEZ",
         "service_version" : "0.4.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "tez-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "tez-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/TEZ/serviceComponents/TEZ_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/TEZ/components/TEZ_CLIENT",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "TEZ_CLIENT",
             "is_client" : true,
@@ -991,21 +1191,30 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/WEBHCAT",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/WEBHCAT",
       "StackServices" : {
         "comments" : "This is comment for WEBHCAT service",
-        "config_types" : [
-          "webhcat-site"
-        ],
         "service_name" : "WEBHCAT",
         "service_version" : "0.13.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "webhcat-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "webhcat-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/WEBHCAT/serviceComponents/WEBHCAT_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/WEBHCAT/components/WEBHCAT_SERVER",
           "StackServiceComponents" : {
             "cardinality" : "1",
             "component_category" : "MASTER",
@@ -1018,7 +1227,7 @@ module.exports = {
           },
           "dependencies" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/WEBHCAT/serviceComponents/WEBHCAT_SERVER/dependencies/HDFS_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/WEBHCAT/components/WEBHCAT_SERVER/dependencies/HDFS_CLIENT",
               "Dependencies" : {
                 "component_name" : "HDFS_CLIENT",
                 "dependent_component_name" : "WEBHCAT_SERVER",
@@ -1028,7 +1237,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/WEBHCAT/serviceComponents/WEBHCAT_SERVER/dependencies/MAPREDUCE2_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/WEBHCAT/components/WEBHCAT_SERVER/dependencies/MAPREDUCE2_CLIENT",
               "Dependencies" : {
                 "component_name" : "MAPREDUCE2_CLIENT",
                 "dependent_component_name" : "WEBHCAT_SERVER",
@@ -1038,7 +1247,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/WEBHCAT/serviceComponents/WEBHCAT_SERVER/dependencies/YARN_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/WEBHCAT/components/WEBHCAT_SERVER/dependencies/YARN_CLIENT",
               "Dependencies" : {
                 "component_name" : "YARN_CLIENT",
                 "dependent_component_name" : "WEBHCAT_SERVER",
@@ -1048,7 +1257,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/WEBHCAT/serviceComponents/WEBHCAT_SERVER/dependencies/ZOOKEEPER_CLIENT",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/WEBHCAT/components/WEBHCAT_SERVER/dependencies/ZOOKEEPER_CLIENT",
               "Dependencies" : {
                 "component_name" : "ZOOKEEPER_CLIENT",
                 "dependent_component_name" : "WEBHCAT_SERVER",
@@ -1058,7 +1267,7 @@ module.exports = {
               }
             },
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/WEBHCAT/serviceComponents/WEBHCAT_SERVER/dependencies/ZOOKEEPER_SERVER",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/WEBHCAT/components/WEBHCAT_SERVER/dependencies/ZOOKEEPER_SERVER",
               "Dependencies" : {
                 "component_name" : "ZOOKEEPER_SERVER",
                 "dependent_component_name" : "WEBHCAT_SERVER",
@@ -1072,29 +1281,47 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/YARN",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/YARN",
       "StackServices" : {
         "comments" : "Apache Hadoop NextGen MapReduce (YARN)",
-        "config_types" : [
-          "yarn-site",
-          "capacity-scheduler",
-          "core-site",
-          "global",
-          "yarn-log4j",
-          "mapred-site",
-          "mapred-queue-acls"
-        ],
         "service_name" : "YARN",
         "service_version" : "2.4.0.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "capacity-scheduler" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "core-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          },
+          "yarn-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "yarn-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "yarn-site" : {
+            "supports" : {
+              "final" : "true"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/YARN/serviceComponents/APP_TIMELINE_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/YARN/components/APP_TIMELINE_SERVER",
           "StackServiceComponents" : {
-            "cardinality" : null,
+            "cardinality" : "0-1",
             "component_category" : "SLAVE",
             "component_name" : "APP_TIMELINE_SERVER",
             "is_client" : false,
@@ -1106,7 +1333,7 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/YARN/serviceComponents/NODEMANAGER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/YARN/components/NODEMANAGER",
           "StackServiceComponents" : {
             "cardinality" : "1+",
             "component_category" : "SLAVE",
@@ -1120,9 +1347,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/YARN/serviceComponents/RESOURCEMANAGER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/YARN/components/RESOURCEMANAGER",
           "StackServiceComponents" : {
-            "cardinality" : "1",
+            "cardinality" : "1-2",
             "component_category" : "MASTER",
             "component_name" : "RESOURCEMANAGER",
             "is_client" : false,
@@ -1134,9 +1361,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/YARN/serviceComponents/YARN_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/YARN/components/YARN_CLIENT",
           "StackServiceComponents" : {
-            "cardinality" : "0+",
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "YARN_CLIENT",
             "is_client" : true,
@@ -1150,25 +1377,37 @@ module.exports = {
       ]
     },
     {
-      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/ZOOKEEPER",
+      "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/ZOOKEEPER",
       "StackServices" : {
         "comments" : "Centralized service which provides highly reliable distributed\n        coordination.",
-        "config_types" : [
-          "global",
-          "zookeeper-log4j",
-          "zoo.cfg"
-        ],
         "service_name" : "ZOOKEEPER",
         "service_version" : "3.4.5.2.1",
         "stack_name" : "HDP",
         "stack_version" : "2.1",
-        "user_name" : null
+        "user_name" : null,
+        "config_types" : {
+          "zoo.cfg" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "zookeeper-env" : {
+            "supports" : {
+              "final" : "false"
+            }
+          },
+          "zookeeper-log4j" : {
+            "supports" : {
+              "final" : "false"
+            }
+          }
+        }
       },
       "serviceComponents" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/ZOOKEEPER/serviceComponents/ZOOKEEPER_CLIENT",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/ZOOKEEPER/components/ZOOKEEPER_CLIENT",
           "StackServiceComponents" : {
-            "cardinality" : "0+",
+            "cardinality" : "1+",
             "component_category" : "CLIENT",
             "component_name" : "ZOOKEEPER_CLIENT",
             "is_client" : true,
@@ -1180,9 +1419,9 @@ module.exports = {
           "dependencies" : [ ]
         },
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/stackServices/ZOOKEEPER/serviceComponents/ZOOKEEPER_SERVER",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.1/services/ZOOKEEPER/components/ZOOKEEPER_SERVER",
           "StackServiceComponents" : {
-            "cardinality" : "1",
+            "cardinality" : "1+",
             "component_category" : "MASTER",
             "component_name" : "ZOOKEEPER_SERVER",
             "is_client" : false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/a6873d64/ambari-web/test/utils/number_utils_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/utils/number_utils_test.js b/ambari-web/test/utils/number_utils_test.js
index 0ad6167..9fd2780 100644
--- a/ambari-web/test/utils/number_utils_test.js
+++ b/ambari-web/test/utils/number_utils_test.js
@@ -18,7 +18,7 @@
 
 var numberUtils = require('utils/number_utils');
 
-describe('', function() {
+describe('utils/number_utils', function() {
 
   describe('#bytesToSize', function() {
 
@@ -245,4 +245,32 @@ describe('', function() {
     });
   });
 
+  describe('#getCardinalityValue()', function() {
+    var generateTestObject = function(cardinality, isMax, expected) {
+      return {
+        cardinality: cardinality,
+        isMax: isMax,
+        e: expected
+      }
+    };
+    var tests = [
+      generateTestObject(null, true, 0),
+      generateTestObject(undefined, true, 0),
+      generateTestObject('1', true, 1),
+      generateTestObject('1', false, 1),
+      generateTestObject('0+', true, Infinity),
+      generateTestObject('0+', false, 0),
+      generateTestObject('1+', true, Infinity),
+      generateTestObject('1-2', false, 1),
+      generateTestObject('1-2', true, 2),
+      generateTestObject('ALL', true, Infinity),
+      generateTestObject('ALL', false, Infinity)
+    ];
+    var message = 'cardinality `{0}`. {1} value should be {2}';
+    tests.forEach(function(test) {
+      it(message.format('' + test.cardinality, (test.isMax ? 'maximum' : 'minimum'), test.e), function() {
+        expect(numberUtils.getCardinalityValue(test.cardinality, test.isMax)).to.be.eql(test.e);
+      });
+    })
+  });
 });
\ No newline at end of file


Mime
View raw message