Best Python code snippet using hypothesis
security_groups.py
Source:security_groups.py
...200 sg_rule['group'] = group_rule_data201 else:202 sg_rule['ip_range'] = {'cidr': rule['cidr']}203 return sg_rule204 def _format_security_group(self, context, group):205 security_group = {}206 security_group['id'] = group['id']207 security_group['description'] = group['description']208 security_group['name'] = group['name']209 security_group['tenant_id'] = group['project_id']210 security_group['rules'] = []211 for rule in group['rules']:212 formatted_rule = self._format_security_group_rule(context, rule)213 if formatted_rule:214 security_group['rules'] += [formatted_rule]215 return security_group216 def _from_body(self, body, key):217 if not body:218 raise exc.HTTPUnprocessableEntity()219 value = body.get(key, None)220 if value is None:221 raise exc.HTTPUnprocessableEntity()222 return value223class SecurityGroupController(SecurityGroupControllerBase):224 """The Security group API controller for the OpenStack API."""225 @wsgi.serializers(xml=SecurityGroupTemplate)226 def show(self, req, id):227 """Return data about the given security group."""228 context = _authorize_context(req)229 with translate_exceptions():230 id = self.security_group_api.validate_id(id)231 security_group = self.security_group_api.get(context, None, id,232 map_exception=True)233 return {'security_group': self._format_security_group(context,234 security_group)}235 def delete(self, req, id):236 """Delete a security group."""237 context = _authorize_context(req)238 with translate_exceptions():239 id = self.security_group_api.validate_id(id)240 security_group = self.security_group_api.get(context, None, id,241 map_exception=True)242 self.security_group_api.destroy(context, security_group)243 return webob.Response(status_int=202)244 @wsgi.serializers(xml=SecurityGroupsTemplate)245 def index(self, req):246 """Returns a list of security groups."""247 context = _authorize_context(req)248 search_opts = {}249 search_opts.update(req.GET)250 with translate_exceptions():251 project_id = context.project_id252 raw_groups = self.security_group_api.list(context,253 project=project_id,254 search_opts=search_opts)255 limited_list = common.limited(raw_groups, req)256 result = [self._format_security_group(context, group)257 for group in limited_list]258 return {'security_groups':259 list(sorted(result,260 key=lambda k: (k['tenant_id'], k['name'])))}261 @wsgi.serializers(xml=SecurityGroupTemplate)262 @wsgi.deserializers(xml=SecurityGroupXMLDeserializer)263 def create(self, req, body):264 """Creates a new security group."""265 context = _authorize_context(req)266 security_group = self._from_body(body, 'security_group')267 group_name = security_group.get('name', None)268 group_description = security_group.get('description', None)269 with translate_exceptions():270 self.security_group_api.validate_property(group_name, 'name', None)271 self.security_group_api.validate_property(group_description,272 'description', None)273 group_ref = self.security_group_api.create_security_group(274 context, group_name, group_description)275 return {'security_group': self._format_security_group(context,276 group_ref)}277 @wsgi.serializers(xml=SecurityGroupTemplate)278 def update(self, req, id, body):279 """Update a security group."""280 context = _authorize_context(req)281 with translate_exceptions():282 id = self.security_group_api.validate_id(id)283 security_group = self.security_group_api.get(context, None, id,284 map_exception=True)285 security_group_data = self._from_body(body, 'security_group')286 group_name = security_group_data.get('name', None)287 group_description = security_group_data.get('description', None)288 with translate_exceptions():289 self.security_group_api.validate_property(group_name, 'name', None)290 self.security_group_api.validate_property(group_description,291 'description', None)292 group_ref = self.security_group_api.update_security_group(293 context, security_group, group_name, group_description)294 return {'security_group': self._format_security_group(context,295 group_ref)}296class SecurityGroupRulesController(SecurityGroupControllerBase):297 @wsgi.serializers(xml=SecurityGroupRuleTemplate)298 @wsgi.deserializers(xml=SecurityGroupRulesXMLDeserializer)299 def create(self, req, body):300 context = _authorize_context(req)301 sg_rule = self._from_body(body, 'security_group_rule')302 with translate_exceptions():303 parent_group_id = self.security_group_api.validate_id(304 sg_rule.get('parent_group_id', None))305 security_group = self.security_group_api.get(context, None,306 parent_group_id,307 map_exception=True)308 try:309 new_rule = self._rule_args_to_dict(context,310 to_port=sg_rule.get('to_port'),311 from_port=sg_rule.get('from_port'),312 ip_protocol=sg_rule.get('ip_protocol'),313 cidr=sg_rule.get('cidr'),314 group_id=sg_rule.get('group_id'))315 except Exception as exp:316 raise exc.HTTPBadRequest(explanation=unicode(exp))317 if new_rule is None:318 msg = _("Not enough parameters to build a valid rule.")319 raise exc.HTTPBadRequest(explanation=msg)320 new_rule['parent_group_id'] = security_group['id']321 if 'cidr' in new_rule:322 net, prefixlen = netutils.get_net_and_prefixlen(new_rule['cidr'])323 if net not in ('0.0.0.0', '::') and prefixlen == '0':324 msg = _("Bad prefix for network in cidr %s") % new_rule['cidr']325 raise exc.HTTPBadRequest(explanation=msg)326 group_rule_data = None327 with translate_exceptions():328 if sg_rule.get('group_id'):329 source_group = self.security_group_api.get(330 context, id=sg_rule['group_id'])331 group_rule_data = {'name': source_group.get('name'),332 'tenant_id': source_group.get('project_id')}333 security_group_rule = (334 self.security_group_api.create_security_group_rule(335 context, security_group, new_rule))336 formatted_rule = self._format_security_group_rule(context,337 security_group_rule,338 group_rule_data)339 return {"security_group_rule": formatted_rule}340 def _rule_args_to_dict(self, context, to_port=None, from_port=None,341 ip_protocol=None, cidr=None, group_id=None):342 if group_id is not None:343 group_id = self.security_group_api.validate_id(group_id)344 # check if groupId exists345 self.security_group_api.get(context, id=group_id)346 return self.security_group_api.new_group_ingress_rule(347 group_id, ip_protocol, from_port, to_port)348 else:349 cidr = self.security_group_api.parse_cidr(cidr)350 return self.security_group_api.new_cidr_ingress_rule(351 cidr, ip_protocol, from_port, to_port)352 def delete(self, req, id):353 context = _authorize_context(req)354 with translate_exceptions():355 id = self.security_group_api.validate_id(id)356 rule = self.security_group_api.get_rule(context, id)357 group_id = rule['parent_group_id']358 security_group = self.security_group_api.get(context, None,359 group_id,360 map_exception=True)361 self.security_group_api.remove_rules(context, security_group,362 [rule['id']])363 return webob.Response(status_int=202)364class ServerSecurityGroupController(SecurityGroupControllerBase):365 @wsgi.serializers(xml=SecurityGroupsTemplate)366 def index(self, req, server_id):367 """Returns a list of security groups for the given instance."""368 context = _authorize_context(req)369 self.security_group_api.ensure_default(context)370 with translate_exceptions():371 instance = self.compute_api.get(context, server_id)372 groups = self.security_group_api.get_instance_security_groups(373 context, instance['uuid'], True)374 result = [self._format_security_group(context, group)375 for group in groups]376 return {'security_groups':377 list(sorted(result,378 key=lambda k: (k['tenant_id'], k['name'])))}379class SecurityGroupActionController(wsgi.Controller):380 def __init__(self, *args, **kwargs):381 super(SecurityGroupActionController, self).__init__(*args, **kwargs)382 self.security_group_api = (383 openstack_driver.get_openstack_security_group_driver())384 self.compute_api = compute.API(385 security_group_api=self.security_group_api)386 def _parse(self, body, action):387 try:388 body = body[action]389 group_name = body['name']390 except TypeError:391 msg = _("Missing parameter dict")392 raise webob.exc.HTTPBadRequest(explanation=msg)393 except KeyError:394 msg = _("Security group not specified")395 raise webob.exc.HTTPBadRequest(explanation=msg)396 if not group_name or group_name.strip() == '':397 msg = _("Security group name cannot be empty")398 raise webob.exc.HTTPBadRequest(explanation=msg)399 return group_name400 def _invoke(self, method, context, id, group_name):401 with translate_exceptions():402 instance = self.compute_api.get(context, id)403 method(context, instance, group_name)404 return webob.Response(status_int=202)405 @wsgi.action('addSecurityGroup')406 def _addSecurityGroup(self, req, id, body):407 context = req.environ['nova.context']408 authorize(context)409 group_name = self._parse(body, 'addSecurityGroup')410 return self._invoke(self.security_group_api.add_to_instance,411 context, id, group_name)412 @wsgi.action('removeSecurityGroup')413 def _removeSecurityGroup(self, req, id, body):414 context = req.environ['nova.context']415 authorize(context)416 group_name = self._parse(body, 'removeSecurityGroup')417 return self._invoke(self.security_group_api.remove_from_instance,418 context, id, group_name)419class SecurityGroupsOutputController(wsgi.Controller):420 def __init__(self, *args, **kwargs):421 super(SecurityGroupsOutputController, self).__init__(*args, **kwargs)422 self.compute_api = compute.API()423 self.security_group_api = (424 openstack_driver.get_openstack_security_group_driver())425 def _extend_servers(self, req, servers):426 # TODO(arosen) this function should be refactored to reduce duplicate427 # code and use get_instance_security_groups instead of get_db_instance.428 if not len(servers):429 return430 key = "security_groups"431 context = _authorize_context(req)432 if not openstack_driver.is_neutron_security_groups():433 for server in servers:434 instance = req.get_db_instance(server['id'])435 groups = instance.get(key)436 if groups:437 server[key] = [{"name": group["name"]} for group in groups]438 else:439 # If method is a POST we get the security groups intended for an440 # instance from the request. The reason for this is if using441 # neutron security groups the requested security groups for the442 # instance are not in the db and have not been sent to neutron yet.443 if req.method != 'POST':444 sg_instance_bindings = (445 self.security_group_api446 .get_instances_security_groups_bindings(context,447 servers))448 for server in servers:449 groups = sg_instance_bindings.get(server['id'])450 if groups:451 server[key] = groups452 # In this section of code len(servers) == 1 as you can only POST453 # one server in an API request.454 else:455 try:456 # try converting to json457 req_obj = jsonutils.loads(req.body)458 # Add security group to server, if no security group was in459 # request add default since that is the group it is part of460 servers[0][key] = req_obj['server'].get(461 key, [{'name': 'default'}])462 except ValueError:463 root = xmlutils.safe_minidom_parse_string(req.body)464 sg_root = root.getElementsByTagName(key)465 groups = []466 if sg_root:467 security_groups = sg_root[0].getElementsByTagName(468 'security_group')469 for security_group in security_groups:470 groups.append(471 {'name': security_group.getAttribute('name')})472 if not groups:473 groups = [{'name': 'default'}]474 servers[0][key] = groups475 def _show(self, req, resp_obj):476 if not softauth(req.environ['nova.context']):477 return478 if 'server' in resp_obj.obj:479 resp_obj.attach(xml=SecurityGroupServerTemplate())480 self._extend_servers(req, [resp_obj.obj['server']])481 @wsgi.extends482 def show(self, req, resp_obj, id):483 return self._show(req, resp_obj)484 @wsgi.extends485 def create(self, req, resp_obj, body):486 return self._show(req, resp_obj)487 @wsgi.extends488 def detail(self, req, resp_obj):489 if not softauth(req.environ['nova.context']):490 return491 resp_obj.attach(xml=SecurityGroupServersTemplate())492 self._extend_servers(req, list(resp_obj.obj['servers']))493class SecurityGroupsTemplateElement(xmlutil.TemplateElement):494 def will_render(self, datum):495 return "security_groups" in datum496def make_server(elem):497 secgrps = SecurityGroupsTemplateElement('security_groups')498 elem.append(secgrps)499 secgrp = xmlutil.SubTemplateElement(secgrps, 'security_group',500 selector="security_groups")501 secgrp.set('name')502class SecurityGroupServerTemplate(xmlutil.TemplateBuilder):503 def construct(self):504 root = xmlutil.TemplateElement('server')505 make_server(root)506 return xmlutil.SlaveTemplate(root, 1)507class SecurityGroupServersTemplate(xmlutil.TemplateBuilder):508 def construct(self):509 root = xmlutil.TemplateElement('servers')510 elem = xmlutil.SubTemplateElement(root, 'server', selector='servers')511 make_server(elem)512 return xmlutil.SlaveTemplate(root, 1)513class Security_groups(extensions.ExtensionDescriptor):514 """Security group support."""515 name = "SecurityGroups"516 alias = "os-security-groups"517 namespace = "http://docs.openstack.org/compute/ext/securitygroups/api/v1.1"518 updated = "2013-05-28T00:00:00Z"519 def get_controller_extensions(self):520 controller = SecurityGroupActionController()521 actions = extensions.ControllerExtension(self, 'servers', controller)522 controller = SecurityGroupsOutputController()523 output = extensions.ControllerExtension(self, 'servers', controller)524 return [actions, output]525 def get_resources(self):526 resources = []527 res = extensions.ResourceExtension('os-security-groups',528 controller=SecurityGroupController())529 resources.append(res)530 res = extensions.ResourceExtension('os-security-group-rules',531 controller=SecurityGroupRulesController())532 resources.append(res)533 res = extensions.ResourceExtension(534 'os-security-groups',535 controller=ServerSecurityGroupController(),536 parent=dict(member_name='server', collection_name='servers'))537 resources.append(res)538 return resources539class NativeSecurityGroupExceptions(object):540 @staticmethod541 def raise_invalid_property(msg):542 raise exception.Invalid(msg)543 @staticmethod544 def raise_group_already_exists(msg):545 raise exception.Invalid(msg)546 @staticmethod547 def raise_invalid_group(msg):548 raise exception.Invalid(msg)549 @staticmethod550 def raise_invalid_cidr(cidr, decoding_exception=None):551 raise exception.InvalidCidr(cidr=cidr)552 @staticmethod553 def raise_over_quota(msg):554 raise exception.SecurityGroupLimitExceeded(msg)555 @staticmethod556 def raise_not_found(msg):557 raise exception.SecurityGroupNotFound(msg)558class NativeNovaSecurityGroupAPI(NativeSecurityGroupExceptions,559 compute_api.SecurityGroupAPI):560 pass561class NativeNeutronSecurityGroupAPI(NativeSecurityGroupExceptions,...
ec2_group.py
Source:ec2_group.py
...204 else:205 if not rule.get('group_desc', '').strip():206 module.fail_json(msg="group %s will be automatically created by rule %s and no description was provided" % (group_name, rule))207 if not module.check_mode:208 auto_group = ec2.create_security_group(group_name, rule['group_desc'], vpc_id=vpc_id)209 group_id = auto_group.id210 groups[group_id] = auto_group211 groups[group_name] = auto_group212 target_group_created = True213 elif 'cidr_ip' in rule:214 ip = rule['cidr_ip']215 return group_id, ip, target_group_created216def main():217 argument_spec = ec2_argument_spec()218 argument_spec.update(dict(219 name=dict(type='str', required=True),220 description=dict(type='str', required=False),221 vpc_id=dict(type='str'),222 rules=dict(type='list'),223 rules_egress=dict(type='list'),224 state = dict(default='present', type='str', choices=['present', 'absent']),225 purge_rules=dict(default=True, required=False, type='bool'),226 purge_rules_egress=dict(default=True, required=False, type='bool'),227 )228 )229 module = AnsibleModule(230 argument_spec=argument_spec,231 supports_check_mode=True,232 )233 if not HAS_BOTO:234 module.fail_json(msg='boto required for this module')235 name = module.params['name']236 description = module.params['description']237 vpc_id = module.params['vpc_id']238 rules = module.params['rules']239 rules_egress = module.params['rules_egress']240 state = module.params.get('state')241 purge_rules = module.params['purge_rules']242 purge_rules_egress = module.params['purge_rules_egress']243 if state == 'present' and not description:244 module.fail_json(msg='Must provide description when state is present.')245 changed = False246 ec2 = ec2_connect(module)247 # find the group if present248 group = None249 groups = {}250 for curGroup in ec2.get_all_security_groups():251 groups[curGroup.id] = curGroup252 if curGroup.name in groups:253 # Prioritise groups from the current VPC254 if vpc_id is None or curGroup.vpc_id == vpc_id:255 groups[curGroup.name] = curGroup256 else:257 groups[curGroup.name] = curGroup258 if curGroup.name == name and (vpc_id is None or curGroup.vpc_id == vpc_id):259 group = curGroup260 # Ensure requested group is absent261 if state == 'absent':262 if group:263 '''found a match, delete it'''264 try:265 if not module.check_mode:266 group.delete()267 except Exception as e:268 module.fail_json(msg="Unable to delete security group '%s' - %s" % (group, e))269 else:270 group = None271 changed = True272 else:273 '''no match found, no changes required'''274 # Ensure requested group is present275 elif state == 'present':276 if group:277 '''existing group found'''278 # check the group parameters are correct279 group_in_use = False280 rs = ec2.get_all_instances()281 for r in rs:282 for i in r.instances:283 group_in_use |= reduce(lambda x, y: x | (y.name == 'public-ssh'), i.groups, False)284 if group.description != description:285 if group_in_use:286 module.fail_json(msg="Group description does not match, but it is in use so cannot be changed.")287 # if the group doesn't exist, create it now288 else:289 '''no match found, create it'''290 if not module.check_mode:291 group = ec2.create_security_group(name, description, vpc_id=vpc_id)292 # When a group is created, an egress_rule ALLOW ALL293 # to 0.0.0.0/0 is added automatically but it's not294 # reflected in the object returned by the AWS API295 # call. We re-read the group for getting an updated object296 # amazon sometimes takes a couple seconds to update the security group so wait till it exists297 while len(ec2.get_all_security_groups(filters={ 'group_id': group.id, })) == 0:298 time.sleep(0.1)299 group = ec2.get_all_security_groups(group_ids=(group.id,))[0]300 changed = True301 else:302 module.fail_json(msg="Unsupported state requested: %s" % state)303 # create a lookup for all existing rules on the group304 if group:305 # Manage ingress rules...
course_util.py
Source:course_util.py
...123 except Exception as e:124 logger.info('that we can\'t find this information from this model {}'.format(modelclass))125 raise exceptions.NotFound(CourseResError.NOT_FOUND_JSTREE)126 return course_instance127def _new_group(user_ids):128 group = {129 'users': user_ids,130 }131 return group132def check_class_groups(classes, groups):133 user_ids = []134 for group in groups:135 user_ids.extend(group['users'])136 real_user_ids = [user.id for user in classes.user_set.exclude(status=User.USER.DELETE).filter(groups=GroupType.USER)]137 if (set(user_ids) - set(real_user_ids)) or (set(real_user_ids) - set(user_ids)):138 return False139 return True140def get_class_group_info(classes, groups):141 users = classes.user_set.exclude(status=User.USER.DELETE).filter(groups=GroupType.USER)142 user_dict = {user.id: user for user in users}143 group_infos = []144 for group in groups:145 group_info = {}146 group_user_ids = group['users']147 user_list = []148 for user_id in group_user_ids:149 user = user_dict.pop(user_id, None)150 if user:151 user_list.append({152 'id': user.id,153 'name': user.first_name or user.username,154 })155 group_info['users'] = user_list156 group_infos.append(group_info)157 if user_dict:158 group_changed = True159 group_user_len = sum([len(group['users']) for group in groups])160 avg_len = int(math.ceil(group_user_len * 1.0 / len(groups))) if groups else 0161 extra_user_ids = user_dict.keys()162 index = 0163 while extra_user_ids[index: index + avg_len]:164 group_user_ids = extra_user_ids[index: index + avg_len]165 group = _new_group(group_user_ids)166 groups.append(group)167 user_list = []168 for user_id in group_user_ids:169 user = user_dict.pop(user_id, None)170 if user:171 user_list.append({172 'id': user.id,173 'name': user.first_name or user.username,174 })175 group_infos.append({176 'users': user_list177 })178 index = index + avg_len179 else:180 group_changed = False181 return {182 'group_changed': group_changed,183 'groups': groups,184 'group_infos': group_infos,185 }186def get_class_group_env_info(class_group):187 classes = class_group.classroom.classes188 groups = json.loads(class_group.groups)189 info_ret = get_class_group_info(classes, groups)190 groups = info_ret['groups']191 group_infos = info_ret['group_infos']192 group_changed = info_ret['group_changed']193 group_lesson_envs = class_group.classroom.lesson.envs.filter(type=LessonEnv.Type.GROUP)194 lesson_env_ids = []195 group_keys = []196 for i, group_info in enumerate(group_infos):197 group = groups[i]198 if 'key' not in group:199 group_changed = True200 group_key = group.setdefault('key', generate_unique_key())201 group_keys.append(group_key)202 lesson_env_id = group.get('lesson_env')203 if lesson_env_id:204 lesson_env_ids.append(lesson_env_id)205 group_info['key'] = group_key206 lesson_env_map = {lesson_env.id: lesson_env for lesson_env in group_lesson_envs.filter(pk__in=lesson_env_ids)}207 group_wait_map = {wait.extra: wait for wait in class_group.waits.filter(extra__in=group_keys)}208 for i, group_info in enumerate(group_infos):209 group = groups[i]210 wait = group_wait_map.get(group_info['key'])211 if wait:212 group_info['wait'] = get_executor_info(instance=wait)213 lesson_env_id = group.get('lesson_env')214 if lesson_env_id:215 group_lesson_env = lesson_env_map.get(lesson_env_id)216 if group_lesson_env:217 estimate_consume_time = Getter.get_estimate_env_consume_time(group_lesson_env.env.json_config)218 loaded_seconds, remain_seconds = Getter.get_estimate_remain_seconds(group_lesson_env.env.create_time,219 estimate_consume_time)220 group_info['env'] = {221 'status': group_lesson_env.env.status,222 'error': group_lesson_env.env.error,223 'loaded_seconds': loaded_seconds,224 'estimate_consume_time': estimate_consume_time,225 }226 if group_changed:227 class_group.groups = json.dumps(groups)228 class_group.save()229 return group_infos230def create_default_class_group_info(classroom):231 users = classroom.classes.user_set.exclude(status=User.USER.DELETE).filter(groups=GroupType.USER)232 groups = [_new_group([user.id]) for user in users]233 return ClassroomGroupInfo.objects.create(234 classroom=classroom,235 groups=json.dumps(groups),236 )237def update_class_group_info(classroom_group_info, groups):238 from ..widgets.env.error import error239 old_groups = json.loads(classroom_group_info.groups)240 for group in old_groups:241 lesson_env_id = group.get('lesson_env')242 if lesson_env_id:243 using_status = Env.ActiveStatusList244 lesson_env = LessonEnv.objects.filter(pk=lesson_env_id).first()245 if lesson_env and lesson_env.env and lesson_env.env.status in using_status:246 raise exceptions.PermissionDenied(error.NO_PERMISSION)247 if not check_class_groups(classroom_group_info.classroom.classes, groups):248 raise exceptions.PermissionDenied(error.NO_PERMISSION)249 for group in groups:250 group['key'] = generate_unique_key()251 group['lesson_env'] = None252 classroom_group_info.groups = json.dumps(groups)253 classroom_group_info.save()254 return classroom_group_info255def create_group_env(user_id, class_group_id, group_key):256 from ..widgets.env.error import error257 try:258 user = User.objects.get(pk=user_id)259 except User.DoesNotExist as e:260 raise exceptions.PermissionDenied(error.NO_PERMISSION)261 try:262 class_room_group_info = ClassroomGroupInfo.objects.get(pk=class_group_id)263 except Exception as e:264 raise exceptions.PermissionDenied(error.NO_PERMISSION)265 groups = json.loads(class_room_group_info.groups)266 group_dict = {group['key']: group for group in groups}267 if group_key not in group_dict:268 raise exceptions.PermissionDenied(error.NO_PERMISSION)269 group = group_dict[group_key]270 lesson_env_id = group.get('lesson_env')271 if lesson_env_id:272 using_status = Env.ActiveStatusList273 lesson_env = LessonEnv.objects.filter(pk=lesson_env_id).first()274 if lesson_env and lesson_env.env and lesson_env.env.status in using_status:275 raise exceptions.PermissionDenied(error.NO_PERMISSION)276 lesson = class_room_group_info.classroom.lesson277 executor = get_create_group_env_executor(user_id, class_group_id, group_key)278 try:279 env_handler = EnvHandler(user, executor=executor)280 except MsgException as e:281 raise exceptions.NotFound(e.message)282 try:283 lesson_env = env_handler.create(lesson, group_users=group['users'])284 except MsgException as e:285 raise exceptions.PermissionDenied(e.message)286 except PoolFullException as e:287 class_room_group_info.waits.add(e.executor_instance)288 raise e289 except Exception as e:290 logger.error('create lessonenv error[lesson_hash=%s, user_id=%s]: %s' % (lesson.id, user.id, e))291 raise exceptions.APIException(error.CREATE_LESSON_ENV_ERROR)292 group['lesson_env'] = lesson_env.id293 class_room_group_info.groups = json.dumps(groups)294 class_room_group_info.save()295 return lesson_env296def get_create_group_env_executor(user_id, class_group_id, group_key):297 executor = {298 'func': create_group_env,299 'params': {300 'user_id': user_id,301 'class_group_id': class_group_id,302 'group_key': group_key,303 },304 'extra': group_key,305 }306 return executor307def delete_group_env(class_room_group_info, group_key):308 groups = json.loads(class_room_group_info.groups)309 group_dict = {group['key']: group for group in groups}310 if group_key not in group_dict:311 raise exceptions.PermissionDenied()312 group = group_dict[group_key]313 lesson_env_id = group.get('lesson_env')314 if lesson_env_id:315 can_delete_status = Env.UseStatusList316 lesson_env = LessonEnv.objects.filter(pk=lesson_env_id).first()317 if lesson_env and lesson_env.env and lesson_env.env.status in can_delete_status:318 admin_delete_env(lesson_env.env)319 # å é¤éå320 class_room_group_info.waits.filter(extra=group_key).delete()321def leave_group(user_id, group):322 from ..widgets.env.error import error323 group_users = group['users']324 if user_id not in group_users:325 return False326 group_users.remove(user_id)327 lesson_env_id = group.get('lesson_env')328 if lesson_env_id:329 if LessonEnv.objects.filter(pk=lesson_env_id, env__status__in=Env.ActiveStatusList).exists():330 raise exceptions.PermissionDenied(error.NO_PERMISSION)331 # lesson_env = LessonEnv.objects.filter(pk=lesson_env_id).first()332 # if lesson_env:333 # lesson_env.group_users.remove(user_id)334 return True335def enter_group(user_id, group):336 from ..widgets.env.error import error337 group_users = group['users']338 if user_id in group_users:339 return False340 group_users.append(user_id)341 lesson_env_id = group.get('lesson_env')342 if lesson_env_id:343 if LessonEnv.objects.filter(pk=lesson_env_id, env__status__in=Env.ActiveStatusList).exists():344 raise exceptions.PermissionDenied(error.NO_PERMISSION)345 # lesson_env = LessonEnv.objects.filter(pk=lesson_env_id).first()346 # if lesson_env:347 # lesson_env.group_users.add(user_id)348 return True349def transfer_group_user(class_room_group_info, user_id, from_group_key, to_group_key):350 from ..widgets.env.error import error351 groups = json.loads(class_room_group_info.groups)352 group_dict = {group['key']: group for group in groups}353 if from_group_key not in group_dict or to_group_key not in group_dict:354 raise exceptions.PermissionDenied(error.NO_PERMISSION)355 from_group = group_dict[from_group_key]356 leave_flag = leave_group(user_id, from_group)357 to_group = group_dict[to_group_key]358 enter_flag = enter_group(user_id, to_group)359 if leave_flag or enter_flag:360 class_room_group_info.groups = json.dumps(groups)361 class_room_group_info.save()362def add_experiment_time(user, lesson, seconds):363 try:364 if CourseUserStat.objects.filter(user=user, lesson=lesson).exists():365 CourseUserStat.objects.filter(user=user, lesson=lesson).update(366 experiment_seconds=F('experiment_seconds') + seconds,367 experiment_update_time=timezone.now(),368 )369 else:370 CourseUserStat.objects.create(371 user=user,372 lesson=lesson,...
navtreeindex2.js
Source:navtreeindex2.js
1var NAVTREEINDEX2 =2{3"group__group-_iterable.html#ga5332fd1dd82edf08379958ba21d57a87":[1,0,9,7],4"group__group-_iterable.html#ga8a484304380eae38f3d9663d98860129":[1,0,9,0],5"group__group-_iterable.html#ga8a67ea10e8082dbe6705e573fa978444":[1,0,9,6],6"group__group-_iterable.html#ga9f1d02c74a6bdc1db260e0d6a8f1ee56":[1,0,9,5],7"group__group-_iterable.html#gab3f4d0035345a453284e46303862d463":[1,0,9,2],8"group__group-_iterable.html#gad23ce0a4906e2bb0a52f38837b134757":[1,0,9,3],9"group__group-_logical.html":[1,0,10],10"group__group-_logical.html#ga08a767b86c330cac67daa891406d2730":[1,0,10,5],11"group__group-_logical.html#ga14066f5672867c123524e0e0978069eb":[1,0,10,0],12"group__group-_logical.html#ga4a7c9d7037601d5e553fd20777958980":[1,0,10,3],13"group__group-_logical.html#ga68c00efbeb69339bfa157a78ebdd3f87":[1,0,10,4],14"group__group-_logical.html#gab64636f84de983575aac0208f5fa840c":[1,0,10,1],15"group__group-_logical.html#gafd655d2222367131e7a63616e93dd080":[1,0,10,2],16"group__group-_metafunction.html":[1,0,11],17"group__group-_metafunction.html#ga246419f6c3263b648412f346106e6543":[1,0,11,0],18"group__group-_metafunction.html#ga6d4093318f46472e62f9539a4dc998a9":[1,0,11,4],19"group__group-_metafunction.html#gaaa4f85cb8cbce21f5c04ef40ca35cc6a":[1,0,11,1],20"group__group-_metafunction.html#gacec153d7f86aa7cf1efd813b3fd212b4":[1,0,11,2],21"group__group-_metafunction.html#gaf7045fe6a627f88f5f646dad22d37aae":[1,0,11,3],22"group__group-_monad.html":[1,0,12],23"group__group-_monad.html#ga5e0735de01a24f681c55aedfeb6d13bf":[1,0,12,0],24"group__group-_monad.html#gaaddd3789de43cf989babb10cdc0b447a":[1,0,12,1],25"group__group-_monad_plus.html":[1,0,13],26"group__group-_monad_plus.html#ga08624924fe05f0cfbfbd6e439db01873":[1,0,13,0],27"group__group-_monad_plus.html#ga1946e96c3b4c178c7ae8703724c29c37":[1,0,13,1],28"group__group-_monad_plus.html#ga3022fdfe454dc9bc1f79b5dfeba13b5e":[1,0,13,5],29"group__group-_monad_plus.html#ga5ee54dc1195f9e5cf48bfd51ba231ae5":[1,0,13,7],30"group__group-_monad_plus.html#ga61dab15f6ecf379121d4096fe0c8ab13":[1,0,13,9],31"group__group-_monad_plus.html#ga65cc6d9f522fb9e8e3b28d80ee5c822a":[1,0,13,4],32"group__group-_monad_plus.html#ga69afbfd4e91125e3e52fcb409135ca7c":[1,0,13,6],33"group__group-_monad_plus.html#gaa6be1e83ad72b9d69b43b4bada0f3a75":[1,0,13,3],34"group__group-_monad_plus.html#gaaf46c168f721da9effcc7336a997f5d6":[1,0,13,2],35"group__group-_monad_plus.html#gad5f48c79d11923d6c1d70b18b7dd3f19":[1,0,13,8],36"group__group-_monoid.html":[1,0,14],37"group__group-_monoid.html#gad459ac17b6bab8ead1cae7de0032f3c6":[1,0,14,1],38"group__group-_monoid.html#gaeb5d4a1e967e319712f9e4791948896c":[1,0,14,0],39"group__group-_orderable.html":[1,0,15],40"group__group-_orderable.html#ga2d54f189ea6f57fb2c0d772169440c5c":[1,0,15,5],41"group__group-_orderable.html#ga6023631e7d0a01e16dc3fa4221fbd703":[1,0,15,1],42"group__group-_orderable.html#ga9917dd82beb67151bf5657245d37b851":[1,0,15,3],43"group__group-_orderable.html#ga999eee8ca8750f9b1afa0d7a1db28030":[1,0,15,4],44"group__group-_orderable.html#gad510011602bdb14686f1c4ec145301c9":[1,0,15,2],45"group__group-_orderable.html#gaf7e94ba859710cd6ba6152e5dc18977d":[1,0,15,6],46"group__group-_orderable.html#gaf9a073eafebbe514fb19dff82318f198":[1,0,15,0],47"group__group-_product.html":[1,0,16],48"group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4":[1,0,16,0],49"group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077":[1,0,16,1],50"group__group-_ring.html":[1,0,17],51"group__group-_ring.html#ga052d31c269a6a438cc8004c9ad1efdfa":[1,0,17,0],52"group__group-_ring.html#ga0ee3cff9ec646bcc7217f00ee6099b72":[1,0,17,2],53"group__group-_ring.html#gadea531feb3b0a1c5c3d777f7ab45e932":[1,0,17,1],54"group__group-_searchable.html":[1,0,18],55"group__group-_searchable.html#ga0d9456ceda38b6ca664998e79d7c45b7":[1,0,18,6],56"group__group-_searchable.html#ga38e7748956cbc9f3d9bb035ac8577906":[1,0,18,5],57"group__group-_searchable.html#ga3a168950082f38afd9edf256f336c8ba":[1,0,18,1],58"group__group-_searchable.html#ga3b8269d4f5cdd6dd549fae32280795a0":[1,0,18,9],59"group__group-_searchable.html#ga3c1826aee6c6eb577810bb99c5c3e53d":[1,0,18,4],60"group__group-_searchable.html#ga43954c791b5b1351fb009e2a643d00f5":[1,0,18,12],61"group__group-_searchable.html#ga5f7ff0125c448983e1b96c3ffb84f646":[1,0,18,3],62"group__group-_searchable.html#ga614ff1e575806f59246b17006e19d479":[1,0,18,11],63"group__group-_searchable.html#ga6b6cdd69942b0fe3bf5254247f9c861e":[1,0,18,7],64"group__group-_searchable.html#ga7f99b80672aa80a7eb8b223955ce546f":[1,0,18,8],65"group__group-_searchable.html#ga81ae9764dd7818ad36270c6419fb1082":[1,0,18,0],66"group__group-_searchable.html#gab7d632b9319b10b1eb7e98f9e1cf8a28":[1,0,18,2],67"group__group-_searchable.html#gadccfc79f1acdd8043d2baa16df16ec9f":[1,0,18,10],68"group__group-_sequence.html":[1,0,19],69"group__group-_sequence.html#ga245d8abaf6ba67e64020be51c8366081":[1,0,19,12],70"group__group-_sequence.html#ga28037560e8f224c53cf6ac168d03a067":[1,0,19,9],71"group__group-_sequence.html#ga2d4db4ec5ec5bc16fe74f57de12697fd":[1,0,19,18],72"group__group-_sequence.html#ga3410ba833cf1ff1d929fcfda4df2eae1":[1,0,19,2],73"group__group-_sequence.html#ga3779f62fea92af00113a9290f1c680eb":[1,0,19,17],74"group__group-_sequence.html#ga4696efcdee7d95ab4a391bb896a840b5":[1,0,19,8],75"group__group-_sequence.html#ga5112e6070d29b4f7fde3f44825da3316":[1,0,19,16],76"group__group-_sequence.html#ga54d141f901866dfab29b052857123bab":[1,0,19,11],77"group__group-_sequence.html#ga6a4bf8549ce69b5b5b7377aec225a0e3":[1,0,19,22],78"group__group-_sequence.html#ga6f6d5c1f335780c91d29626fde615c78":[1,0,19,7],79"group__group-_sequence.html#ga80724ec8ecf319a1e695988a69e22f87":[1,0,19,5],80"group__group-_sequence.html#ga8d302de01b94b4b17f3bd81e09f42920":[1,0,19,14],81"group__group-_sequence.html#gaa18061cd0f63cfaae89abf43ff92b79e":[1,0,19,3],82"group__group-_sequence.html#gaa4d4818952083e3b27c83b0ed645e322":[1,0,19,15],83"group__group-_sequence.html#gaa5a378d4e71a91e0d6cd3959d9818e8a":[1,0,19,19],84"group__group-_sequence.html#gac10231310abc86b056585ea0d0e96ef7":[1,0,19,0],85"group__group-_sequence.html#gac1e182ac088f1990edd739424d30ea07":[1,0,19,4],86"group__group-_sequence.html#gade78593b3ff51fc5479e1da97142fef5":[1,0,19,20],87"group__group-_sequence.html#gae1f6a2a9cb70564d43c6b3c663b25dd7":[1,0,19,13],88"group__group-_sequence.html#gae22a1a184b1b2dd550fa4fa619bed2e9":[1,0,19,1],89"group__group-_sequence.html#gae70b0815645c7d81bb636a1eed1a65c6":[1,0,19,6],90"group__group-_sequence.html#gae7a51104a77db79a0407d7d67b034667":[1,0,19,21],91"group__group-_sequence.html#gaec484fb349500149d90717f6e68f7bcd":[1,0,19,10],92"group__group-_struct.html":[1,0,20],93"group__group-_struct.html#ga141761435a7826b3cbe646b4f59eaf0a":[1,0,20,0],94"group__group-_struct.html#ga983a55dbd93d766fd37689ea32e4ddfb":[1,0,20,3],95"group__group-_struct.html#gab9efb238a82207d91643994c5295cf8c":[1,0,20,2],96"group__group-_struct.html#gaba3b4d2cf342bfca773e90fc20bfae91":[1,0,20,1],97"group__group-_struct.html#gad301dd8e9fb4639d7874619c97d6d427":[1,0,20,5],98"group__group-_struct.html#gaf8c7199742581e6e66c8397def68e2d3":[1,0,20,4],99"group__group-assertions.html":[1,7],100"group__group-assertions.html#ga046d7ee458de8da63812fe2f059c0a4d":[1,7,6],101"group__group-assertions.html#ga046d7ee458de8da63812fe2f059c0a4d":[3,0,0,19,6],102"group__group-assertions.html#ga0a1327b758604bf330efeba450dd4a95":[1,7,7],103"group__group-assertions.html#ga0a1327b758604bf330efeba450dd4a95":[3,0,0,19,7],104"group__group-assertions.html#ga1d4feb0a2414f9b17249dff3dc441bf4":[1,7,8],105"group__group-assertions.html#ga1d4feb0a2414f9b17249dff3dc441bf4":[3,0,0,19,8],106"group__group-assertions.html#ga2626fa0c92b308cee62ac423ae2dba41":[1,7,2],107"group__group-assertions.html#ga2626fa0c92b308cee62ac423ae2dba41":[3,0,0,19,2],108"group__group-assertions.html#ga2c5006540936d9f8880e3a39f4fcc035":[1,7,11],109"group__group-assertions.html#ga2c5006540936d9f8880e3a39f4fcc035":[3,0,0,19,11],110"group__group-assertions.html#ga2e25bbdeefb0e5fbf45ffa9227ddb8d2":[1,7,1],111"group__group-assertions.html#ga2e25bbdeefb0e5fbf45ffa9227ddb8d2":[3,0,0,19,1],112"group__group-assertions.html#ga3faec2cf9e803f4fe5537fe1831e82ce":[1,7,10],113"group__group-assertions.html#ga3faec2cf9e803f4fe5537fe1831e82ce":[3,0,0,19,10],114"group__group-assertions.html#ga4796ae107d58b67e0bbccd5ae6f70101":[1,7,9],115"group__group-assertions.html#ga4796ae107d58b67e0bbccd5ae6f70101":[3,0,0,19,9],116"group__group-assertions.html#ga90c1df2cb8eb67e8e0c822eac180b7bc":[1,7,4],117"group__group-assertions.html#ga90c1df2cb8eb67e8e0c822eac180b7bc":[3,0,0,19,4],118"group__group-assertions.html#ga932876152d7f87b6b24077322a2e4139":[1,7,13],119"group__group-assertions.html#ga932876152d7f87b6b24077322a2e4139":[3,0,0,19,13],120"group__group-assertions.html#ga9961218055c571b279bb6e07befbba4d":[3,0,0,19,3],121"group__group-assertions.html#ga9961218055c571b279bb6e07befbba4d":[1,7,3],122"group__group-assertions.html#gaa7690973ea7b2ba5b6a72a6293fce873":[1,7,5],123"group__group-assertions.html#gaa7690973ea7b2ba5b6a72a6293fce873":[3,0,0,19,5],124"group__group-assertions.html#gabf13a9c600ad4fd014ede3c2fd42b1a4":[3,0,0,19,14],125"group__group-assertions.html#gabf13a9c600ad4fd014ede3c2fd42b1a4":[1,7,14],126"group__group-assertions.html#gac7aafc41e4dcc7d1f1929fb00f010d2a":[3,0,0,19,15],127"group__group-assertions.html#gac7aafc41e4dcc7d1f1929fb00f010d2a":[1,7,15],128"group__group-assertions.html#gad4134ab51e9f2e5d41595ef40d4d0c5b":[1,7,12],129"group__group-assertions.html#gad4134ab51e9f2e5d41595ef40d4d0c5b":[3,0,0,19,12],130"group__group-assertions.html#gae4eb14a3b31e44f433b080d9bc2d14fd":[1,7,0],131"group__group-assertions.html#gae4eb14a3b31e44f433b080d9bc2d14fd":[3,0,0,19,0],132"group__group-concepts.html":[1,0],133"group__group-config.html":[1,6],134"group__group-config.html#ga08dcc32bef198420e646244e851d1995":[1,6,0],135"group__group-config.html#ga08dcc32bef198420e646244e851d1995":[3,0,0,30,0],136"group__group-config.html#ga2fb384037c12a706e1a1cac053065648":[1,6,7],137"group__group-config.html#ga2fb384037c12a706e1a1cac053065648":[3,0,0,152,4],138"group__group-config.html#ga50940f9267eacd0da0d4d8ccbfac8817":[3,0,0,152,3],139"group__group-config.html#ga50940f9267eacd0da0d4d8ccbfac8817":[1,6,6],140"group__group-config.html#ga81de60f5bea16e6ff4a38c94e3022f10":[1,6,2],141"group__group-config.html#ga81de60f5bea16e6ff4a38c94e3022f10":[3,0,0,30,2],142"group__group-config.html#ga95603295cd6cc840c0dbc50b75e02ee9":[1,6,3],143"group__group-config.html#ga95603295cd6cc840c0dbc50b75e02ee9":[3,0,0,30,3],144"group__group-config.html#gac1f8e58978bf4fe02f68ca4646124aee":[3,0,0,152,1],145"group__group-config.html#gac1f8e58978bf4fe02f68ca4646124aee":[1,6,4],146"group__group-config.html#gad2b44f7cf8a6ba1002437a1a89e62acd":[1,6,1],147"group__group-config.html#gad2b44f7cf8a6ba1002437a1a89e62acd":[3,0,0,30,1],148"group__group-config.html#gafd6a702442b280083efe2690da5621bd":[1,6,5],149"group__group-config.html#gafd6a702442b280083efe2690da5621bd":[3,0,0,152,2],150"group__group-core.html":[1,3],151"group__group-core.html#ga0f5d717bbf6646619bb6219b104384dc":[1,3,11],152"group__group-core.html#ga1d92480f0af1029878e773dafa3e2f60":[1,3,14],153"group__group-core.html#ga38cf78e1e3e262f7f1c71ddd9ca70cd9":[1,3,12],154"group__group-core.html#ga4da46c97755c0f430b063711b66ca05b":[1,3,9],155"group__group-core.html#ga686d1236161b5690ab302500077988e1":[1,3,10],156"group__group-core.html#ga7fdbde52f5fe384a816c6f39ff272df9":[1,3,13],157"group__group-core.html#gadc70755c1d059139297814fb3bfeb91e":[1,3,15],158"group__group-datatypes.html":[1,1],159"group__group-details.html":[1,8],160"group__group-details.html#ga1be7a4bd805ffff2882fe54995dc41bd":[3,0,0,2,27,1],161"group__group-details.html#ga1be7a4bd805ffff2882fe54995dc41bd":[1,8,19],162"group__group-details.html#ga444e73a2fe13732b802a770b55b4a99c":[3,0,0,2,25,0],163"group__group-details.html#ga444e73a2fe13732b802a770b55b4a99c":[1,8,14],164"group__group-details.html#ga4bd17b3ef62e1e275dfe485923fdf666":[3,0,0,2,25,3],165"group__group-details.html#ga4bd17b3ef62e1e275dfe485923fdf666":[1,8,17],166"group__group-details.html#ga5de7a0132a80e37c73d544ece1e6dd4e":[3,0,0,2,9,0],167"group__group-details.html#ga5de7a0132a80e37c73d544ece1e6dd4e":[1,8,13],168"group__group-details.html#ga62fe3327023c37706c827cc82624998b":[3,0,0,2,27,0],169"group__group-details.html#ga62fe3327023c37706c827cc82624998b":[1,8,18],170"group__group-details.html#ga6b4ca5cb5cefc6cf77455d7d7ef6f381":[3,0,0,2,25,1],171"group__group-details.html#ga6b4ca5cb5cefc6cf77455d7d7ef6f381":[1,8,15],172"group__group-details.html#ga9acac3c4609cff5f0957572744c61ec4":[1,8,22],173"group__group-details.html#gadcf0cf5cb650681b8cac90d94ce52d44":[3,0,0,2,27,2],174"group__group-details.html#gadcf0cf5cb650681b8cac90d94ce52d44":[1,8,20],175"group__group-details.html#gae85b604ae6c7a386f0fc3631c561091b":[1,8,21],176"group__group-details.html#gaf8319341c937c45415ae0eae8d656723":[3,0,0,2,25,2],177"group__group-details.html#gaf8319341c937c45415ae0eae8d656723":[1,8,16],178"group__group-experimental.html":[1,4],179"group__group-experimental.html#ga660c0769106006a86948b5b355fad050":[1,4,2],180"group__group-experimental.html#gaf14876d1f1a3c42ce7a0243d7b263bec":[1,4,1],181"group__group-ext-boost.html":[1,5,2],182"group__group-ext-fusion.html":[1,5,0],183"group__group-ext-mpl.html":[1,5,1],184"group__group-ext-std.html":[1,5,3],185"group__group-ext.html":[1,5],186"group__group-functional.html":[1,2],187"group__group-functional.html#ga004f884cdbb85c2efe3383c1db450094":[1,2,8],188"group__group-functional.html#ga1393f40da2e8da6e0c12fce953e56a6c":[1,2,7],189"group__group-functional.html#ga30027c383676084be151ef3c6cf2829f":[1,2,1],190"group__group-functional.html#ga35c4fc3c5677b9f558150b90e74d3ab1":[1,2,12],191"group__group-functional.html#ga3b16146e53efcdf9ecbb9a7b21f8cd0b":[1,2,4],192"group__group-functional.html#ga41ada6b336e9d5bcb101ff0c737acbd0":[1,2,3],193"group__group-functional.html#ga49ea872ade5ac8f6c10052c495302e89":[1,2,5],194"group__group-functional.html#ga6acc765a35c4dc85f0deab4785831a3d":[1,2,2],195"group__group-functional.html#ga6e648f0d3fc0209ec024e9d759a5e8f8":[1,2,17],196"group__group-functional.html#ga778b2daa27882e71d28b6f2b38982ddf":[1,2,15],197"group__group-functional.html#ga7bdafba6dc801f1d2d83731ad9714557":[1,2,10],198"group__group-functional.html#ga835970cb25a0c8dc200f1e5f8943538b":[1,2,0],199"group__group-functional.html#ga83e71bae315e299f9f5f9de77b012139":[1,2,13],200"group__group-functional.html#ga8c6f17b58ce527c7650eb878f01f2cd2":[1,2,6],201"group__group-functional.html#gaa46de6f618d9f14edb1589b36b6e75ec":[1,2,14],202"group__group-functional.html#gaef38cf34324c8edbd3597ae71811d00d":[1,2,9],203"group__group-functional.html#gaefe9fd152cba94be71c2b5b9de689d23":[1,2,16],204"group__group-functional.html#gafca60c09e1f7a32a2b52baaf6515c279":[1,2,11],205"hana_8hpp.html":[3,0,1],206"has__common__embedding_8hpp.html":[3,0,0,2,13],207"has__common__embedding_8hpp.html#ga9acac3c4609cff5f0957572744c61ec4":[3,0,0,2,13,1],208"has__common__embedding_8hpp.html#gae85b604ae6c7a386f0fc3631c561091b":[3,0,0,2,13,0],209"has__duplicates_8hpp.html":[3,0,0,2,14],210"hash_8hpp.html":[3,0,0,67],211"hash__table_8hpp.html":[3,0,0,2,15],212"id_8hpp.html":[3,0,0,5,9],213"id_8hpp.html#gaef38cf34324c8edbd3597ae71811d00d":[3,0,0,5,9,0],214"if_8hpp.html":[3,0,0,68],215"index.html":[],216"index.html":[0],217"index.html#autotoc_md419":[0],218"index.html#tutorial-acknowledgements":[0,18],219"index.html#tutorial-algorithms":[0,11],220"index.html#tutorial-algorithms-codegen":[0,11,2],221"index.html#tutorial-algorithms-cross_phase":[0,11,4],222"index.html#tutorial-algorithms-effects":[0,11,3],223"index.html#tutorial-algorithms-laziness":[0,11,1],224"index.html#tutorial-algorithms-value":[0,11,0],225"index.html#tutorial-appendix-constexpr":[0,21],226"index.html#tutorial-appendix-constexpr-effects":[0,21,2],227"index.html#tutorial-appendix-constexpr-stripping":[0,21,0],228"index.html#tutorial-assert":[0,6],229"index.html#tutorial-cheatsheet":[0,5],230"index.html#tutorial-conclusion":[0,16],231"index.html#tutorial-conclusion-projects_using_hana":[0,16,2],232"index.html#tutorial-conclusion-related_material":[0,16,1],233"index.html#tutorial-conclusion-warning":[0,16,0],234"index.html#tutorial-containers":[0,10],235"index.html#tutorial-containers-creating":[0,10,0],236"index.html#tutorial-containers-elements":[0,10,2],237"index.html#tutorial-containers-types":[0,10,1],238"index.html#tutorial-containers-types-overloading":[0,10,1,0],239"index.html#tutorial-core":[0,14],240"index.html#tutorial-core-concepts":[0,14,2],241"index.html#tutorial-core-tag_dispatching":[0,14,1],242"index.html#tutorial-core-tags":[0,14,0],243"index.html#tutorial-description":[0,0],244"index.html#tutorial-ext":[0,13],245"index.html#tutorial-glossary":[0,19],246"index.html#tutorial-header_organization":[0,15],247"index.html#tutorial-installation":[0,1],248"index.html#tutorial-installation-cmake":[0,1,0],249"index.html#tutorial-installation-requirements":[0,1,1],250"index.html#tutorial-integral":[0,7],251"index.html#tutorial-integral-arithmetic":[0,7,0],252"index.html#tutorial-integral-branching":[0,7,2]...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!