Lines Matching refs:attr
166 for attr in pb_spec.struct_value:
167 if attr.name in py_value:
168 provided_attrs.remove(attr.name)
169 curr_value = py_value[attr.name]
171 if attr.type == CompSpecMsg.TYPE_ENUM:
172 PyValue2PbEnum(attr_msg, attr, curr_value)
173 elif attr.type == CompSpecMsg.TYPE_SCALAR:
174 PyValue2PbScalar(attr_msg, attr, curr_value)
175 elif attr.type == CompSpecMsg.TYPE_STRING:
176 PyString2PbString(attr_msg, attr, curr_value)
177 elif attr.type == CompSpecMsg.TYPE_VECTOR:
178 PyList2PbVector(attr_msg, attr, curr_value)
179 elif attr.type == CompSpecMsg.TYPE_STRUCT:
180 sub_attr = FindSubStructType(pb_spec, attr.predefined_type)
186 elif attr.type == CompSpecMsg.TYPE_UNION:
187 sub_attr = FindSubStructType(pb_spec, attr.predefined_type)
195 attr.type)
200 logging.error("PyDict2PbStruct: attr %s not provided", attr.name)
231 for attr in pb_spec.union_value:
234 if attr.name in py_value:
235 provided_attrs.remove(attr.name)
236 curr_value = py_value[attr.name]
238 if attr.type == CompSpecMsg.TYPE_ENUM:
239 PyValue2PbEnum(attr_msg, attr, curr_value)
240 elif attr.type == CompSpecMsg.TYPE_SCALAR:
241 PyValue2PbScalar(attr_msg, attr, curr_value)
242 elif attr.type == CompSpecMsg.TYPE_STRING:
243 PyString2PbString(attr_msg, attr, curr_value)
244 elif attr.type == CompSpecMsg.TYPE_VECTOR:
245 PyList2PbVector(attr_msg, attr, curr_value)
246 elif attr.type == CompSpecMsg.TYPE_STRUCT:
248 sub_attr = FindSubUnionType(pb_spec, attr.predefined_type)
254 elif attr.type == CompSpecMsg.TYPE_UNION:
255 sub_attr = FindSubUnionType(pb_spec, attr.predefined_type)
263 attr.type)