cfn_helper Metadata fallback to files if getting remote metadata fails
cfn_helper Metadata fallback to files if getting remote metadata fails

We need to fall back to local files when retrieval of remote metadata
fails, for example when we do not have any local credentials yet (as
they are in the cloud-init deployed metadata).

This patch tries to retrieve data from the following locations (in this
order):
- Remote metadata from CFN API
- Local saved remote metadata (/tmp/last_metadata)
- Local cloud-init intial metadata (/var/lib/cloud/data/cfn-init-data)

This should hopefully mean both cfn-init and cfn-hup now work as required

Fixes #33

Signed-off-by: Steven Hardy <4d1810d1ff6d7f22d774341c4549c02173d2f2ab@redhat.com>

sdake/heat-jeos,bbandaru/heat-cfntools,openstack/heat-cfntools,steveb/heat-cfntools,steveb/heat-cfntools