Persist parent_resource_name and make sure it's available

We are persisting for a number of reasons:
- so we don't have to pass this through ever rpc call
- the API exposes parent_resource (currently always None as
  it is not persisted)

Closes-bug: #1438978
Change-Id: Id2db36c0234a085ec4f0ce2ab114ec483ea29d81
diff --git a/functional/test_template_resource.py b/functional/test_template_resource.py
index 5893679..392bddd 100644
--- a/functional/test_template_resource.py
+++ b/functional/test_template_resource.py
@@ -79,7 +79,11 @@
             template=main_templ,
             files={'nested.yaml': nested_templ},
             environment=env_templ)
-        self.assert_resource_is_a_stack(stack_identifier, 'secret1')
+        nested_ident = self.assert_resource_is_a_stack(stack_identifier,
+                                                       'secret1')
+        # prove that resource.parent_resource is populated.
+        sec2 = self.client.resources.get(nested_ident, 'secret2')
+        self.assertEqual('secret1', sec2.parent_resource)
 
     def test_no_infinite_recursion(self):
         """Prove that we can override a python resource.