I am trying to find out after a cluster has been provisioned, if it is active and the IP address of the named node using shell scripting. Below is the response of the API output when using the shell commands listed here: http://docs.rackspace.com/cbd/api/v1.0/cbd-getting-started/content/viewing_Details.html.
+----------+--------------------------------------+
| Property | Value |
+----------+--------------------------------------+
| Id | 4820deb2-6212-44f9-b92f-979fe723ffb8 |
| Name | foo |
| Status | ACTIVE |
| Nodes | 3 |
| Type | HADOOP_HDP2_1 |
| Flavor | hadoop1-7 |
+----------+--------------------------------------+
and
--------------+
| Id | Name | Role | Status | Public IP | Private IP |
+--------------------------------------+--------------+----------+--------+----------------+----------------+
| f530a9f1-79a8-4378-bf2a-b7f7e0c2bdd3 | NAMENODE-1 | NAMENODE | ACTIVE | 166.78.132.85 | 10.190.240.88 |
I believe I can do this using some sort of regex or sed/awk. So just to clarify I would like to extract the current status and the public IP
Thank you in advanced