Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Fixes #4888: Add missing AIX LPAR VM support #41

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ case object VirtualBox extends VmType("vbox") with HashcodeCaching
case object VMWare extends VmType("vmware") with HashcodeCaching
case object QEmu extends VmType("qemu") with HashcodeCaching
case object Xen extends VmType("xen") with HashcodeCaching
case object AixLPAR extends VmType("aixlpar") with HashcodeCaching



/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class FusionReportUnmarshaller(
* ARCHNAME : architecture type.
* Ex: "x86_64-linux-gnu-thread-multi"
* VMSYSTEM : The virtualization technologie used if the machine is a virtual machine.
* Can be: Physical (default), Xen, VirtualBox, Virtual Machine, VMware, QEMU, SolarisZone
* Can be: Physical (default), Xen, VirtualBox, Virtual Machine, VMware, QEMU, SolarisZone, Aix LPAR
*
* MEMORY : RAM for that OS
* Ex: "512"
Expand Down Expand Up @@ -392,6 +392,7 @@ class FusionReportUnmarshaller(
case "vmware" => report.machine.copy(machineType = VirtualMachineType(VMWare) )
case "qemu" => report.machine.copy(machineType = VirtualMachineType(QEmu) )
case "solariszone" => report.machine.copy(machineType = VirtualMachineType(SolarisZone) )
case "aix_lpar" => report.machine.copy(machineType = VirtualMachineType(AixLPAR) )
case _ => report.machine.copy(machineType = VirtualMachineType(UnknownVmType) )
}
}
Expand Down
7 changes: 7 additions & 0 deletions inventory-repository/src/main/resources/ldap/inventory.schema
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,13 @@ objectclass ( InventoryObjectClasses:80:5
SUP VirtualMachine
AUXILIARY )

objectclass ( InventoryObjectClasses:80:6
NAME 'aixLpar'
DESC 'An LPAR partition on AIX'
SUP VirtualMachine
AUXILIARY )


objectclass ( InventoryObjectClasses:4
NAME 'physicalElement'
DESC 'A physical element, ie a component of a machine (network card, memory slots, etc)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ class InventoryMapper(
case VirtualMachineType(VMWare) => OC(OC_VM_VMWARE)
case VirtualMachineType(SolarisZone) => OC(OC_VM_SOLARIS_ZONE)
case VirtualMachineType(QEmu) => OC(OC_VM_QEMU)
case VirtualMachineType(AixLPAR) => OC(OC_VM_AIX_LPAR)
case PhysicalMachineType => OC(OC_PM)
}
}
Expand All @@ -394,6 +395,7 @@ class InventoryMapper(
case LDAPObjectClass(OC_VM_VMWARE,_,_,_) => Some(VirtualMachineType(VMWare))
case LDAPObjectClass(OC_VM_SOLARIS_ZONE,_,_,_) => Some(VirtualMachineType(SolarisZone))
case LDAPObjectClass(OC_VM_QEMU,_,_,_) => Some(VirtualMachineType(QEmu))
case LDAPObjectClass(OC_VM_AIX_LPAR,_,_,_) => Some(VirtualMachineType(AixLPAR))
case LDAPObjectClass(OC_PM,_,_,_) => Some(PhysicalMachineType)
case _ => None
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ object LDAPConstants {
val OC_VM_VMWARE = "vmWare"
val OC_VM_SOLARIS_ZONE = "solarisZone"
val OC_VM_QEMU = "qemu"
val OC_VM_AIX_LPAR = "aixLpar"


implicit val OC = new LDAPSchema()
Expand All @@ -257,6 +258,7 @@ object LDAPConstants {
OC +=(OC_VM_VMWARE, OC(OC_VM))
OC +=(OC_VM_SOLARIS_ZONE, OC(OC_VM))
OC +=(OC_VM_QEMU, OC(OC_VM))
OC +=(OC_VM_AIX_LPAR, OC(OC_VM))

OC +=(OC_PE,
must = Set(),
Expand All @@ -271,7 +273,8 @@ object LDAPConstants {
OC_VM_XEN,
OC_VM_VMWARE,
OC_VM_SOLARIS_ZONE,
OC_VM_QEMU
OC_VM_QEMU,
OC_VM_AIX_LPAR
)

OC +=(OC_MEMORY, sup = OC(OC_PE),
Expand Down