'Check work of AutoScaing and Neutron LBaaS v2 resource in Heat.
The scenario is the following:
1. Launch a stack with a load balancer and autoscaling group
of one server, wait until stack create is complete.
2. Check that there is only one distinctive response from
loadbalanced IP.
3. Signal the scale_up policy, wait until all resources in
autoscaling group are complete.
4. Check that now there are two distinctive responses from
loadbalanced IP.'

def test_autoscaling_loadbalancer_neutron(self):

    parameters = {'flavor': self.conf.minimal_instance_type, 'image': self.conf.minimal_image_ref, 'net': self.conf.fixed_network_name, 'subnet': self.conf.fixed_subnet_name, 'public_net': self.conf.floating_network_name}
    app_server_template = self._load_template(__file__, self.app_server_template_name, self.sub_dir)
    webapp_template = self._load_template(__file__, self.webapp_template_name, self.sub_dir)
    files = {'appserver.yaml': app_server_template, 'webapp.yaml': webapp_template}
    env = {'resource_registry': {'OS::Test::NeutronAppServer': 'appserver.yaml', 'OS::Test::WebAppConfig': 'webapp.yaml'}}
    sid = self.launch_stack(template_name=self.template_name, parameters=parameters, files=files, environment=env)
    stack = self.client.stacks.get(sid)
    lb_url = self._stack_output(stack, 'lburl')
    self.check_num_responses(lb_url, 1)
    self.client.resources.signal(sid, 'scale_up')
    asg = self.client.resources.get(sid, 'asg')
    test.call_until_true(self.conf.build_timeout, self.conf.build_interval, self.check_autoscale_complete, asg.physical_resource_id, 2, sid, 'scale_up')
    self.check_num_responses(lb_url, 2)
