various improvements
This commit is contained in:
@ -1,2 +1,17 @@
|
||||
# This file is part of Compute
|
||||
#
|
||||
# Compute is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from .pool import StoragePool
|
||||
from .volume import DiskConfig, Volume, VolumeConfig
|
||||
|
@ -1,3 +1,18 @@
|
||||
# This file is part of Compute
|
||||
#
|
||||
# Compute is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""Manage storage pools."""
|
||||
|
||||
import logging
|
||||
|
@ -1,3 +1,18 @@
|
||||
# This file is part of Compute
|
||||
#
|
||||
# Compute is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""Manage storage volumes."""
|
||||
|
||||
from dataclasses import dataclass
|
||||
@ -8,13 +23,14 @@ import libvirt
|
||||
from lxml import etree
|
||||
from lxml.builder import E
|
||||
|
||||
from compute.common import DeviceConfig, EntityConfig
|
||||
from compute.utils import units
|
||||
|
||||
|
||||
@dataclass
|
||||
class VolumeConfig:
|
||||
class VolumeConfig(EntityConfig):
|
||||
"""
|
||||
Storage volume config builder.
|
||||
Storage volume XML config builder.
|
||||
|
||||
Generate XML config for creating a volume in a libvirt
|
||||
storage pool.
|
||||
@ -48,9 +64,9 @@ class VolumeConfig:
|
||||
|
||||
|
||||
@dataclass
|
||||
class DiskConfig:
|
||||
class DiskConfig(DeviceConfig):
|
||||
"""
|
||||
Disk config builder.
|
||||
Disk XML config builder.
|
||||
|
||||
Generate XML config for attaching or detaching storage volumes
|
||||
to compute instances.
|
||||
|
Reference in New Issue
Block a user