def _BuildOsFields():
  fields = [
    (_MakeField("name", "Name", QFT_TEXT, "Operating system name"),
     None, 0, _GetItemAttr("name")),
    (_MakeField("valid", "Valid", QFT_BOOL,
                "Whether operating system definition is valid"),
     None, 0, _GetItemAttr("valid")),
    (_MakeField("hidden", "Hidden", QFT_BOOL,
                "Whether operating system is hidden"),
     None, 0, _GetItemAttr("hidden")),
    (_MakeField("blacklisted", "Blacklisted", QFT_BOOL,
                "Whether operating system is blacklisted"),
     None, 0, _GetItemAttr("blacklisted")),
    (_MakeField("variants", "Variants", QFT_OTHER,
                "Operating system variants"),
     None, 0, _ConvWrap(utils.NiceSort, _GetItemAttr("variants"))),
    (_MakeField("api_versions", "ApiVersions", QFT_OTHER,
                "Operating system API versions"),
     None, 0, _ConvWrap(sorted, _GetItemAttr("api_versions"))),
    (_MakeField("parameters", "Parameters", QFT_OTHER,
                "Operating system parameters"),
     None, 0, _ConvWrap(compat.partial(utils.NiceSort, key=compat.fst),
                        _GetItemAttr("parameters"))),
    (_MakeField("node_status", "NodeStatus", QFT_OTHER,
                "Status from node"),
     None, 0, _GetItemAttr("node_status")),
    (_MakeField("os_hvp", "OsHypervisorParams", QFT_OTHER,
                "Operating system specific hypervisor parameters"),
     None, 0, _GetItemAttr("os_hvp")),
    (_MakeField("osparams", "OsParameters", QFT_OTHER,
                "Operating system specific parameters"),
     None, 0, _GetItemAttr("osparams")),
    (_MakeField("trusted", "Trusted", QFT_BOOL,
                "Whether this OS is trusted"),
     None, 0, _GetItemAttr("trusted")),
    ]

  return _PrepareFieldList(fields, [])
Add a line of code to the method body.
dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_BuildOsFields--crossover with--dataset/ETHPy150Open hiranya911/rest-coder/python-lib/codegen_core.py/Method.add_line