Tests for manifests/db/instance.pp
It consists of two tests
1.With ensure is equal to present
  It will test mysql_database
  It will test mysql_user
  It will test mysql_grant
2.With ensure is equal to absent
  It will ensure mysql_databse should not be escaped
  It will ensure mysql_user should not be escaped
  It will ensure mysql_databse should  be escaped
Merge pull request #46 from amar266/master

Tests for manifests/db/instance.pp
Add status validation and service discovery

This commit adds two feauters to our script
that calls out to Puppet.

1. status checks so that we can keep track of
   two types of failures.

   * when Puppet fails
   * when validation checks fail

2. service dicsovery (this is a much bigger
   feature)

Adds a feature where each service can register itself,
and other services can discover registered services
to figure out how to confgure themselves.

Services can register themselves using the class

    rjil::profile

which adds single line to the local file

    /var/lib/puppet/profile_list.txt

This file is used to determine what services
a node will register itself for.

Before any node runs Puppet, it calls the

    python -m jiocloud.orchestrate cache_services

which write the file services.yaml into hiera.

Since an array may be written into hiera and we
want to perform recursive lookups, this commit
also adds a custom hiera backend that can
perform two kinds of lookups:

    lookup_array : performs a recursive lookup of
    and array

    lookup_array_first_element : retrieves the first
    element of an array via recursive lookup

3. also fixes a bug so that hiera data is copied
   across when we perform a from source installation.