Move suspend/resume autoscaling tests to functional

Note:
- there is no special suspend/resume logic in the autoscaling code
  (this is just calling the nested stack's action)
- this patch includes a basic functional test to suspend/resume.

part of blueprint decouple-nested

Change-Id: I506a8e8258ebfb136637645e51b1faf3a7be4260
diff --git a/functional/test_autoscaling.py b/functional/test_autoscaling.py
index a169c71..a8a8fc4 100644
--- a/functional/test_autoscaling.py
+++ b/functional/test_autoscaling.py
@@ -302,6 +302,35 @@
                                                res.resource_name,
                                                'CREATE_FAILED')
 
+    def test_group_suspend_resume(self):
+
+        files = {'provider.yaml': self.instance_template}
+        env = {'resource_registry': {'AWS::EC2::Instance': 'provider.yaml'},
+               'parameters': {'size': 4,
+                              'image': self.conf.image_ref,
+                              'flavor': self.conf.instance_type}}
+        stack_identifier = self.stack_create(template=self.template,
+                                             files=files, environment=env)
+
+        nested_ident = self.assert_resource_is_a_stack(stack_identifier,
+                                                       'JobServerGroup')
+
+        self.client.actions.suspend(stack_id=stack_identifier)
+        self._wait_for_resource_status(
+            stack_identifier, 'JobServerGroup', 'SUSPEND_COMPLETE')
+        for res in self.client.resources.list(nested_ident):
+            self._wait_for_resource_status(nested_ident,
+                                           res.resource_name,
+                                           'SUSPEND_COMPLETE')
+
+        self.client.actions.resume(stack_id=stack_identifier)
+        self._wait_for_resource_status(
+            stack_identifier, 'JobServerGroup', 'RESUME_COMPLETE')
+        for res in self.client.resources.list(nested_ident):
+            self._wait_for_resource_status(nested_ident,
+                                           res.resource_name,
+                                           'RESUME_COMPLETE')
+
 
 class AutoscalingGroupUpdatePolicyTest(AutoscalingGroupTest):