Commissioning output xml is hard to understand, would be nice to have yaml as an output option.

Bug #1358859 reported by Newell Jensen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Newell Jensen

Bug Description

It would be nice to have the xml output for commissioning in a more human readable format, such as yaml. This would make the output information more human readable. Here is an example of what we could have:

Current xml (example):

      <node id="network" claimed="true" class="network" handle="PCI:0000:00:03.0">
       <description>Ethernet interface</description>
       <product>Virtio network device</product>
       <vendor>Red Hat, Inc</vendor>
       <physid>3</physid>
       <businfo>pci@0000:00:03.0</businfo>
       <logicalname>eth0</logicalname>
       <version>00</version>
       <serial>52:54:00:35:65:8d</serial>
       <width units="bits">32</width>
       <clock units="Hz">33000000</clock>
       <configuration>
        <setting id="broadcast" value="yes" />
        <setting id="driver" value="virtio_net" />
        <setting id="driverversion" value="1.0.0" />
        <setting id="ip" value="10.17.17.103" />
        <setting id="latency" value="0" />
        <setting id="link" value="yes" />
        <setting id="multicast" value="yes" />
       </configuration>
       <capabilities>
        <capability id="msix" >MSI-X</capability>
        <capability id="bus_master" >bus mastering</capability>
        <capability id="cap_list" >PCI capabilities listing</capability>
        <capability id="rom" >extension ROM</capability>
        <capability id="ethernet" />
        <capability id="physical" >Physical interface</capability>
       </capabilities>
       <resources>
        <resource type="irq" value="10" />
        <resource type="ioport" value="c060(size=32)" />
        <resource type="memory" value="febd5000-febd5fff" />
        <resource type="memory" value="feb80000-febbffff" />
       </resources>
      </node>

Current yaml (example):

        - node:
          - id: network
          - claimed: true
          - class: network
          - handle: PCI:0000:00:03.0
          - description:
            Ethernet interface
          - product:
            Virtio network device
          - vendor:
            Red Hat, Inc
          - physid:
            3
          - businfo:
            pci@0000:00:03.0
          - logicalname:
            eth0
          - version:
            00
          - serial:
            52:54:00:35:65:8d
          - width:
            - units: bits
            32
          - clock:
            - units: Hz
            33000000
          - configuration:
            - setting:
              - id: broadcast
              - value: yes
            - setting:
              - id: driver
              - value: virtio_net
            - setting:
              - id: driverversion
              - value: 1.0.0
            - setting:
              - id: ip
              - value: 10.17.17.103
            - setting:
              - id: latency
              - value: 0
            - setting:
              - id: link
              - value: yes
            - setting:
              - id: multicast
              - value: yes
          - capabilities:
            - capability:
              - id: msix
              MSI-X
            - capability:
              - id: bus_master
              bus mastering
            - capability:
              - id: cap_list
              PCI capabilities listing
            - capability:
              - id: rom
              extension ROM
            - capability:
              - id: ethernet
            - capability:
              - id: physical
              Physical interface
          - resources:
            - resource:
              - type: irq
              - value: 10
            - resource:
              - type: ioport
              - value: c060(size=32)
            - resource:
              - type: memory
              - value: febd5000-febd5fff
            - resource:
              - type: memory
              - value: feb80000-febbffff

Related branches

Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Gavin Panella (allenap) wrote :

There is a reason to show the XML: so that people can write XPath expressions to match it for use with "auto" tags. If you show YAML by default you need to provide a way to see the raw XML too.

Perhaps there is a half-way house, which is to use a JavaScript colourisation library to make the XML prettier and easier to read.

Revision history for this message
Newell Jensen (newell-jensen) wrote :

Gavin,

Yes, we are planning on keeping both. Going to re-title bug to make this more apparent.

Currently the plan is to have a tab in the UI so that any xml output can be switched between "raw" or "yaml" to see the differences.

summary: - Commissioning output xml is hard to understand, yaml would be better
+ Commissioning output xml is hard to understand, would be nice to have
+ yaml as an output option.
Revision history for this message
Newell Jensen (newell-jensen) wrote :

node-view page ui screenshot (this is for the pre-requisite branch).

Revision history for this message
Newell Jensen (newell-jensen) wrote :

commissioningresult-view page ui screen shot (this is for this branch).

description: updated
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: none → 1.7.0
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.