Lines Matching full:yaml

6 import yaml
25 yaml raw spec as loaded from the spec file
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:
167 def __init__(self, family, attr_set, yaml, value): argument
168 super().__init__(family, yaml)
170 self.type = yaml['type']
173 self.is_multi = yaml.get('multi-attr', False)
174 self.struct_name = yaml.get('struct')
175 self.sub_type = yaml.get('sub-type')
176 self.byte_order = yaml.get('byte-order')
177 self.len = yaml.get('len')
178 self.display_hint = yaml.get('display-hint')
179 self.sub_message = yaml.get('sub-message')
180 self.selector = yaml.get('selector')
198 def __init__(self, family, yaml): argument
199 super().__init__(family, yaml)
201 self.subset_of = self.yaml.get('subset-of', None)
208 for elem in self.yaml['attributes']:
218 for elem in self.yaml['attributes']:
252 def __init__(self, family, yaml): argument
253 super().__init__(family, yaml)
254 self.type = yaml['type']
255 self.byte_order = yaml.get('byte-order')
256 self.enum = yaml.get('enum')
257 self.len = yaml.get('len')
258 self.display_hint = yaml.get('display-hint')
269 def __init__(self, family, yaml): argument
270 super().__init__(family, yaml)
273 for member in yaml.get('members', []):
296 def __init__(self, family, yaml): argument
297 super().__init__(family, yaml)
300 for elem in self.yaml['formats']:
319 def __init__(self, family, yaml): argument
320 super().__init__(family, yaml)
322 self.value = yaml.get('value')
323 self.fixed_header = yaml.get('fixed-header')
324 self.attr_set = yaml.get('attribute-set')
343 yaml raw spec as loaded from the spec file
345 def __init__(self, family, yaml, req_value, rsp_value): argument
346 super().__init__(family, yaml)
352 self.is_call = 'do' in yaml or 'dump' in yaml
353 self.is_async = 'notify' in yaml or 'event' in yaml
355 self.fixed_header = self.yaml.get('fixed-header', family.fixed_header)
364 if 'attribute-set' in self.yaml:
365 attr_set_name = self.yaml['attribute-set']
366 elif 'notify' in self.yaml:
367 msg = self.family.msgs[self.yaml['notify']]
390 yaml raw spec as loaded from the spec file
392 def __init__(self, family, yaml): argument
393 super().__init__(family, yaml)
394 self.value = self.yaml.get('value')
400 Netlink family information loaded from a spec (e.g. in YAML).
430 spec = yaml.safe_load(stream)
438 self.proto = self.yaml.get('protocol', 'genetlink')
439 self.msg_id_model = self.yaml['operations'].get('enum-model', 'unified')
442 schema_path = os.path.dirname(os.path.dirname(spec_path)) + f'/{self.proto}.yaml'
447 schema = yaml.safe_load(stream)
452 jsonschema.validate(self.yaml, schema)
505 self.fixed_header = self.yaml['operations'].get('fixed-header')
507 for elem in self.yaml['operations']['list']:
517 self.fixed_header = self.yaml['operations'].get('fixed-header')
519 for elem in self.yaml['operations']['list']:
562 for op in self.yaml['operations']['list']:
570 definitions = self.yaml.get('definitions', [])
579 for elem in self.yaml['attribute-sets']:
583 for elem in self.yaml.get('sub-messages', []):
602 mcgs = self.yaml.get('mcast-groups')