Search in sources :

Example 1 with TextOutputUnmarshaller

use of com.emc.aix.command.parse.TextOutputUnmarshaller in project coprhd-controller by CoprHD.

the class ListMountPointsCommand method parseOutput.

@Override
public void parseOutput() {
    results = Maps.newHashMap();
    if (getOutput() != null && getOutput().getStdout() != null) {
        String stdout = getOutput().getStdout();
        TextOutputUnmarshaller parser = TextOutputUnmarshaller.instance();
        List<MountPoint> mountPoints = parser.with(stdout).parse(MountPoint.class);
        for (MountPoint m : mountPoints) {
            results.put(m.getPath(), m);
        }
    }
}
Also used : MountPoint(com.emc.aix.model.MountPoint) TextOutputUnmarshaller(com.emc.aix.command.parse.TextOutputUnmarshaller)

Example 2 with TextOutputUnmarshaller

use of com.emc.aix.command.parse.TextOutputUnmarshaller in project coprhd-controller by CoprHD.

the class TestMountPointMarshaller method main.

public static void main(String[] args) {
    TextOutputUnmarshaller parser = TextOutputUnmarshaller.instance();
    List<MountPoint> mountPoints = parser.with(output).parse(MountPoint.class);
    System.out.println(mountPoints);
    for (MountPoint m : mountPoints) {
        addMountPointToFilesystems(m);
    }
}
Also used : MountPoint(com.emc.aix.model.MountPoint) TextOutputUnmarshaller(com.emc.aix.command.parse.TextOutputUnmarshaller)

Aggregations

TextOutputUnmarshaller (com.emc.aix.command.parse.TextOutputUnmarshaller)2 MountPoint (com.emc.aix.model.MountPoint)2