def _render_agent_key(_runtime_blueprint_directory):

            with open(
                    util.get_actual_keypath(self.env,
                                            self.env.agent_key_path)) as f:
                key_content = f.read()

            key_template = resources.get_resource(
                'host-pool-service-blueprint/keys/agent_key.pem.template')
            util.render_template_to_file(
                template_path=key_template,
                file_path=os.path.join(_runtime_blueprint_directory, 'keys',
                                       'agent_key.pem'),
                agent_private_key_file_content=key_content)
        def _render_pool(_runtime_blueprint_directory):

            hosts = self.client.deployments.outputs.get(
                deployment_id=self.pool_deployment_id).outputs['hosts']

            pool_template = resources.get_resource(
                'host-pool-service-blueprint/pool.yaml.template')
            util.render_template_to_file(
                template_path=pool_template,
                file_path=os.path.join(_runtime_blueprint_directory,
                                       'pool.yaml'),
                ip_pool_host_1=hosts['host_1']['ip'],
                ip_pool_host_2=hosts['host_2']['ip'],
                public_address_pool_host_1=hosts['host_1']['public_address'],
                public_address_pool_host_2=hosts['host_2']['public_address'],
                password_pool_host=self.password_pool_host)
        def _render_agent_key(_runtime_blueprint_directory):

            with open(util.get_actual_keypath(
                    self.env,
                    self.env.agent_key_path)) as f:
                key_content = f.read()

            key_template = resources.get_resource(
                'host-pool-service-blueprint/keys/agent_key.pem.template')
            util.render_template_to_file(
                template_path=key_template,
                file_path=os.path.join(
                    _runtime_blueprint_directory,
                    'keys',
                    'agent_key.pem'),
                agent_private_key_file_content=key_content
            )
        def _render_pool(_runtime_blueprint_directory):

            hosts = self.client.deployments.outputs.get(
                deployment_id=self.pool_deployment_id).outputs['hosts']

            pool_template = resources.get_resource(
                'host-pool-service-blueprint/pool.yaml.template')
            util.render_template_to_file(
                template_path=pool_template,
                file_path=os.path.join(
                    _runtime_blueprint_directory,
                    'pool.yaml'),
                ip_pool_host_1=hosts['host_1']['ip'],
                ip_pool_host_2=hosts['host_2']['ip'],
                public_address_pool_host_1=hosts['host_1']['public_address'],
                public_address_pool_host_2=hosts['host_2']['public_address'],
                password_pool_host=self.password_pool_host
            )