Revision c120ff34

b/lib/cmdlib.py
1878 1878
    "master",
1879 1879
    "offline",
1880 1880
    "drained",
1881
    "role",
1881 1882
    )
1882 1883

  
1883 1884
  def ExpandNames(self):
......
2006 2007
          val = node.drained
2007 2008
        elif self._FIELDS_DYNAMIC.Matches(field):
2008 2009
          val = live_data[node.name].get(field, None)
2010
        elif field == "role":
2011
          if node.name == master_node:
2012
            val = "M"
2013
          elif node.master_candidate:
2014
            val = "C"
2015
          elif node.drained:
2016
            val = "D"
2017
          elif node.offline:
2018
            val = "O"
2019
          else:
2020
            val = "R"
2009 2021
        else:
2010 2022
          raise errors.ParameterError(field)
2011 2023
        node_output.append(val)
b/man/gnt-node.sgml
423 423
              <simpara>whether the node is offline or not</simpara>
424 424
            </listitem>
425 425
          </varlistentry>
426
          <varlistentry>
427
            <term>role</term>
428
            <listitem>
429
              <para>
430
                A condensed version of the node flags; this field will
431
                output a one-character field, with the following
432
                possible values:
433
                <itemizedlist>
434
                  <listitem>
435
                    <simpara><emphasis>M</emphasis> for the master
436
                    node</simpara>
437
                  </listitem>
438
                  <listitem>
439
                    <simpara><emphasis>C</emphasis> for a master
440
                    candidate</simpara>
441
                  </listitem>
442
                  <listitem>
443
                    <simpara><emphasis>R</emphasis> for a regular
444
                    node</simpara>
445
                  </listitem>
446
                  <listitem>
447
                    <simpara><emphasis>D</emphasis> for a drained
448
                    node</simpara>
449
                  </listitem>
450
                  <listitem>
451
                    <simpara><emphasis>O</emphasis> for an offline
452
                    node</simpara>
453
                  </listitem>
454
                </itemizedlist>
455
              </para>
456
            </listitem>
457
          </varlistentry>
426 458
        </variablelist>
427 459
      </para>
428 460

  
b/scripts/gnt-node
56 56
  "master_candidate": "MasterC",
57 57
  "master": "IsMaster",
58 58
  "offline": "Offline", "drained": "Drained",
59
  "role": "Role",
59 60
  }
60 61

  
61 62

  

Also available in: Unified diff