Martin Peřina has uploaded a new change for review. Change subject: restapi: Add kdump config status to Host ......................................................................
restapi: Add kdump config status to Host Adds kdump config status to Host entity. Change-Id: Ic6003fe825554df35a0b5d92a0d7d5ec7e527835 Bug-Url: https://bugzilla.redhat.com/1079821 Signed-off-by: Martin Perina <[email protected]> --- M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/85/26485/1 diff --git a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd index 87ab2b2..0f9e9c2 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd +++ b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd @@ -1466,6 +1466,14 @@ </xs:sequence> </xs:complexType> + <xs:simpleType name="KdumpStatus"> + <xs:restriction base="xs:string"> + <xs:enumeration value="UNKNOWN"/> + <xs:enumeration value="DISABLED"/> + <xs:enumeration value="ENABLED"/> + </xs:restriction> + </xs:simpleType> + <xs:element name="certificate" type="Certificate"/> <xs:complexType name="Certificate"> @@ -1515,6 +1523,7 @@ <xs:element name="libvirt_version" type="Version" minOccurs="0" maxOccurs="1"/> <!-- Optionally specify the display address of this host explicitly --> <xs:element ref="display" minOccurs="0"/> + <xs:element name="kdump_status" type="KdumpStatus" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> diff --git a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java index 158ff35..6146366 100644 --- a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java +++ b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java @@ -21,6 +21,7 @@ import org.ovirt.engine.api.model.HostType; import org.ovirt.engine.api.model.IscsiDetails; import org.ovirt.engine.api.model.KSM; +import org.ovirt.engine.api.model.KdumpStatus; import org.ovirt.engine.api.model.OperatingSystem; import org.ovirt.engine.api.model.Option; import org.ovirt.engine.api.model.Options; @@ -386,6 +387,8 @@ model.setDisplay(new Display()); model.getDisplay().setAddress(entity.getConsoleAddress()); } + KdumpStatus hostKdumpStatus = map(entity.getKdumpStatus(), null); + model.setKdumpStatus(hostKdumpStatus); return model; } @@ -559,6 +562,20 @@ } } + @Mapping(from = org.ovirt.engine.core.common.businessentities.KdumpStatus.class, to = KdumpStatus.class) + public static KdumpStatus map(org.ovirt.engine.core.common.businessentities.KdumpStatus entityStatus, + KdumpStatus template) { + switch (entityStatus) { + case UNKNOWN: + return KdumpStatus.UNKNOWN; + case DISABLED: + return KdumpStatus.DISABLED; + case ENABLED: + return KdumpStatus.ENABLED; + default: + return null; + } + } @Mapping(from = VDSType.class, to = HostType.class) public static HostType map(VDSType type, HostType template) { switch (type) { -- To view, visit http://gerrit.ovirt.org/26485 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6003fe825554df35a0b5d92a0d7d5ec7e527835 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
