Revision 6b07e510
Added by Matthieu CERDA over 7 years ago
inventory-api/src/main/scala/com/normation/inventory/domain/MachineInventory.scala | ||
---|---|---|
case object QEmu extends VmType("qemu") with HashcodeCaching
|
||
case object Xen extends VmType("xen") with HashcodeCaching
|
||
case object AixLPAR extends VmType("aixlpar") with HashcodeCaching
|
||
case object HyperV extends VmType("hyperv") with HashcodeCaching
|
||
|
||
|
||
|
inventory-fusion/src/main/scala/com/normation/inventory/provisioning/fusion/FusionReportUnmarshaller.scala | ||
---|---|---|
* 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, Aix LPAR
|
||
* Can be: Physical (default), Xen, VirtualBox, Virtual Machine, VMware, QEMU, SolarisZone, Aix LPAR, Hyper-V
|
||
*
|
||
* MEMORY : RAM for that OS
|
||
* Ex: "512"
|
||
... | ... | |
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 "hyper-v" => report.machine.copy(machineType = VirtualMachineType(HyperV) )
|
||
case _ => report.machine.copy(machineType = VirtualMachineType(UnknownVmType) )
|
||
}
|
||
}
|
inventory-repository/src/main/resources/ldap/inventory.schema | ||
---|---|---|
SUP VirtualMachine
|
||
AUXILIARY )
|
||
|
||
objectclass ( InventoryObjectClasses:80:7
|
||
NAME 'hyperV'
|
||
DESC 'A Hyper-V VM'
|
||
SUP VirtualMachine
|
||
AUXILIARY )
|
||
|
||
|
||
objectclass ( InventoryObjectClasses:4
|
||
NAME 'physicalElement'
|
inventory-repository/src/main/scala/com/normation/inventory/ldap/core/InventoryMapper.scala | ||
---|---|---|
case VirtualMachineType(SolarisZone) => OC(OC_VM_SOLARIS_ZONE)
|
||
case VirtualMachineType(QEmu) => OC(OC_VM_QEMU)
|
||
case VirtualMachineType(AixLPAR) => OC(OC_VM_AIX_LPAR)
|
||
case VirtualMachineType(HyperV) => OC(OC_VM_HYPERV)
|
||
case PhysicalMachineType => OC(OC_PM)
|
||
}
|
||
}
|
||
... | ... | |
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_VM_HYPERV,_,_,_) => Some(VirtualMachineType(HyperV))
|
||
case LDAPObjectClass(OC_PM,_,_,_) => Some(PhysicalMachineType)
|
||
case _ => None
|
||
}
|
inventory-repository/src/main/scala/com/normation/inventory/ldap/core/LDAPConstants.scala | ||
---|---|---|
val OC_VM_SOLARIS_ZONE = "solarisZone"
|
||
val OC_VM_QEMU = "qemu"
|
||
val OC_VM_AIX_LPAR = "aixLpar"
|
||
val OC_VM_HYPERV = "hyperV"
|
||
|
||
|
||
implicit val OC = new LDAPSchema()
|
||
... | ... | |
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_VM_HYPERV, OC(OC_VM))
|
||
|
||
OC +=(OC_PE,
|
||
must = Set(),
|
||
... | ... | |
OC_VM_VMWARE,
|
||
OC_VM_SOLARIS_ZONE,
|
||
OC_VM_QEMU,
|
||
OC_VM_AIX_LPAR
|
||
OC_VM_AIX_LPAR,
|
||
OC_VM_HYPERV
|
||
)
|
||
|
||
OC +=(OC_MEMORY, sup = OC(OC_PE),
|
Also available in: Unified diff
Fixes #9262: Virtual machine detection does not recognize HyperV machines