mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-06 13:17:58 +03:00
48e32b429d
The copyright headers in every file were chjanged in this previous commit
commit b6dcee8eb7
Author: Cole Robinson <crobinso@redhat.com>
Date: Tue Mar 20 15:00:02 2018 -0400
Use consistent and minimal license header for every file
Where before this they said "
"either version 2 of the License, or (at your option) any later version."
Now they just say
"GNU GPLv2"
This fixes it to say "GNU GPLv2 or later" again.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
#
|
|
# Copyright 2017 Red Hat, Inc.
|
|
#
|
|
# This work is licensed under the GNU GPLv2 or later.
|
|
# See the COPYING file in the top-level directory.
|
|
|
|
|
|
from .device import Device
|
|
from ..xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty
|
|
|
|
|
|
class _DeviceMemoryTarget(XMLBuilder):
|
|
XML_NAME = "target"
|
|
|
|
size = XMLProperty("./size", is_int=True)
|
|
node = XMLProperty("./node", is_int=True)
|
|
label_size = XMLProperty("./label/size", is_int=True)
|
|
|
|
|
|
class _DeviceMemorySource(XMLBuilder):
|
|
XML_NAME = "source"
|
|
|
|
pagesize = XMLProperty("./pagesize", is_int=True)
|
|
nodemask = XMLProperty("./nodemask")
|
|
path = XMLProperty("./path")
|
|
|
|
|
|
class DeviceMemory(Device):
|
|
XML_NAME = "memory"
|
|
|
|
MODEL_DIMM = "dimm"
|
|
MODEL_NVDIMM = "nvdimm"
|
|
models = [MODEL_DIMM, MODEL_NVDIMM]
|
|
|
|
ACCESS_SHARED = "shared"
|
|
ACCESS_PRIVATE = "private"
|
|
accesses = [ACCESS_SHARED, ACCESS_PRIVATE]
|
|
|
|
model = XMLProperty("./@model")
|
|
access = XMLProperty("./@access")
|
|
|
|
source = XMLChildProperty(_DeviceMemorySource, is_single=True)
|
|
target = XMLChildProperty(_DeviceMemoryTarget, is_single=True)
|