Пример #1
0
    def create_app_cookie_stickiness_policy(self):
        load_balancer_name = self._get_param('LoadBalancerName')

        policy = AppCookieStickinessPolicy()
        policy.policy_name = self._get_param("PolicyName")
        policy.cookie_name = self._get_param("CookieName")

        self.elb_backend.create_app_cookie_stickiness_policy(load_balancer_name, policy)

        template = self.response_template(CREATE_LOAD_BALANCER_POLICY_TEMPLATE)
        return template.render()
Пример #2
0
    def create_app_cookie_stickiness_policy(self):
        load_balancer_name = self._get_param('LoadBalancerName')

        policy = AppCookieStickinessPolicy()
        policy.policy_name = self._get_param("PolicyName")
        policy.cookie_name = self._get_param("CookieName")

        self.elb_backend.create_app_cookie_stickiness_policy(load_balancer_name, policy)

        template = self.response_template(CREATE_LOAD_BALANCER_POLICY_TEMPLATE)
        return template.render()
Пример #3
0
    def create_lbcookie_stickiness_policy(self):
        load_balancer_name = self._get_param('LoadBalancerName')

        policy = AppCookieStickinessPolicy()
        policy.policy_name = self._get_param("PolicyName")
        cookie_expirations = self._get_param("CookieExpirationPeriod")
        if cookie_expirations:
            policy.cookie_expiration_period = int(cookie_expirations)
        else:
            policy.cookie_expiration_period = None

        self.elb_backend.create_lb_cookie_stickiness_policy(load_balancer_name, policy)

        template = self.response_template(CREATE_LOAD_BALANCER_POLICY_TEMPLATE)
        return template.render()
Пример #4
0
    def create_lbcookie_stickiness_policy(self):
        load_balancer_name = self._get_param('LoadBalancerName')

        policy = AppCookieStickinessPolicy()
        policy.policy_name = self._get_param("PolicyName")
        cookie_expirations = self._get_param("CookieExpirationPeriod")
        if cookie_expirations:
            policy.cookie_expiration_period = int(cookie_expirations)
        else:
            policy.cookie_expiration_period = None

        self.elb_backend.create_lb_cookie_stickiness_policy(load_balancer_name, policy)

        template = self.response_template(CREATE_LOAD_BALANCER_POLICY_TEMPLATE)
        return template.render()