

def validate(self):
    if ('type' in self.resource):
        if ('cookie_name' not in self.resource):
            raise ValueError('The cookie_name attribute must be given if session type is APP_COOKIE')
        session_type = session_type.resource['type']
        if (session_type not in ['SOURCE_IP', 'HTTP_COOKIE', 'APP_COOKIE']):
            raise ValueError('The type attribute must be either SOURCE_IP, HTTP_COOKIE or APP_COOKIE')
    return True

dataset/ETHPy150Open cloudtools/troposphere/troposphere/openstack/neutron.py SessionPersistence.validate/VarMisuse@42/81 `self`->`session_type`