Lines Matching refs:yaml

6 import yaml
31 def __init__(self, family, yaml): argument
32 self.yaml = yaml
35 if 'name' in self.yaml:
36 self.name = self.yaml['name']
43 return self.yaml[key]
46 return key in self.yaml
49 return self.yaml.get(key, default)
72 def __init__(self, enum_set, yaml, prev, value_start): argument
73 if isinstance(yaml, str):
74 yaml = {'name': yaml}
75 super().__init__(enum_set.family, yaml)
77 self.doc = yaml.get('doc', '')
80 if 'value' in yaml:
81 self.value = yaml['value']
113 def __init__(self, family, yaml): argument
114 super().__init__(family, yaml)
116 self.type = yaml['type']
119 value_start = self.yaml.get('value-start', 0)
122 for entry in self.yaml['entries']:
132 if 'doc' in self.yaml:
161 def __init__(self, family, attr_set, yaml, value): argument
162 super().__init__(family, yaml)
166 self.is_multi = yaml.get('multi-attr', False)
167 self.struct_name = yaml.get('struct')
168 self.sub_type = yaml.get('sub-type')
169 self.byte_order = yaml.get('byte-order')
170 self.len = yaml.get('len')
171 self.display_hint = yaml.get('display-hint')
187 def __init__(self, family, yaml): argument
188 super().__init__(family, yaml)
190 self.subset_of = self.yaml.get('subset-of', None)
197 for elem in self.yaml['attributes']:
207 for elem in self.yaml['attributes']:
241 def __init__(self, family, yaml): argument
242 super().__init__(family, yaml)
243 self.type = yaml['type']
244 self.byte_order = yaml.get('byte-order')
245 self.enum = yaml.get('enum')
246 self.len = yaml.get('len')
247 self.display_hint = yaml.get('display-hint')
258 def __init__(self, family, yaml): argument
259 super().__init__(family, yaml)
262 for member in yaml.get('members', []):
293 def __init__(self, family, yaml, req_value, rsp_value): argument
294 super().__init__(family, yaml)
300 self.is_call = 'do' in yaml or 'dump' in yaml
301 self.is_async = 'notify' in yaml or 'event' in yaml
303 self.fixed_header = self.yaml.get('fixed-header', family.fixed_header)
312 if 'attribute-set' in self.yaml:
313 attr_set_name = self.yaml['attribute-set']
314 elif 'notify' in self.yaml:
315 msg = self.family.msgs[self.yaml['notify']]
340 def __init__(self, family, yaml): argument
341 super().__init__(family, yaml)
342 self.value = self.yaml.get('value')
377 spec = yaml.safe_load(stream)
385 self.proto = self.yaml.get('protocol', 'genetlink')
386 self.msg_id_model = self.yaml['operations'].get('enum-model', 'unified')
394 schema = yaml.safe_load(stream)
399 jsonschema.validate(self.yaml, schema)
448 self.fixed_header = self.yaml['operations'].get('fixed-header')
450 for elem in self.yaml['operations']['list']:
460 self.fixed_header = self.yaml['operations'].get('fixed-header')
462 for elem in self.yaml['operations']['list']:
505 for op in self.yaml['operations']['list']:
513 definitions = self.yaml.get('definitions', [])
522 for elem in self.yaml['attribute-sets']:
541 mcgs = self.yaml.get('mcast-groups')