Skip to content

Commit

Permalink
Merge pull request #1647 from grycap/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
micafer authored Jan 17, 2025
2 parents 5d50d7a + e007695 commit dd66d51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 6 additions & 2 deletions IM/tosca/Tosca.py
Original file line number Diff line number Diff line change
Expand Up @@ -1902,8 +1902,12 @@ def _get_attached_disks(self, node):
volume_id = self._final_function_result(trgt.get_property_value('volume_id'), trgt)
snapshot_id = self._final_function_result(trgt.get_property_value('snapshot_id'), trgt)
size, unit = Tosca._get_size_and_unit(full_size)
disks.append((size, unit, location, device, count, fs_type, volume_id, snapshot_id, vol_type))
count += 1

if size or volume_id or snapshot_id:
disks.append((size, unit, location, device, count, fs_type, volume_id, snapshot_id, vol_type))
count += 1
else:
Tosca.logger.debug("Attached item without size or volume id, ignored.")
else:
Tosca.logger.debug("Attached item of type %s ignored." % trgt.type_definition.type)

Expand Down
11 changes: 6 additions & 5 deletions doc/source/radl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,31 +347,32 @@ machine. The supported features are:
Set the source of the disk image by its name in the VMRC server.

``disk.<diskId>.device = <string>``
Set the device name, if it is disk with no source set.
Set the device name, in case of disk with no source set.
It specifies the device where the disk will be located in the system
(hdb, hdc, etc.). Depending on the Cloud provider the meaning of this
field may change. In Docker connector the device
refers to a path to create a bind in the container, if it starts with
character ``/`` or the name of a volume otherwise.

``disk.<diskId>.mount_path = <string>``
Set the mount point, if it is disk with no source set.
Set the mount point, in case of disk with no source set.
It specifies a path to mount the device. In Docker and Kubernetes
connectors this path refers to the directory in the container to
mount a PVC or the bind host directory specified in ``device``.

``disk.<diskId>.fstype = <string>``
Set the filesystem, if it is disk with no source set.
Set the filesystem, in case of disk with no source set.
It specifies the type of the filesystem of this disk. If specified
the contextualization agent will try to format and mount this disk
in the path specified in ``mount_path`` field. In case of Docker
the fstype refers to the driver to use in case of using a volume.
If set to ``swap`` the disk will be used as swap space.

``disk.<diskId>.size = <positive integer value>B|K|M|G``
Set the size of the disk, if it is a disk with no source set.
Set the size of the disk, in case of disk with no source set.

``disk.<diskId>.type = <string>``
Set the type of the disk, if it is a disk with no source set.
Set the type of the disk, in case of disk with no source set.
The types depends on the provider: e.g. in GCE posible types are: pd-standard | pd-ssd,
in EC2 possible values are: standard | io1 | gp2. In OpenStack possible values are ephemeral,
or any volume type supported by the provider.
Expand Down

0 comments on commit dd66d51

Please sign in to comment.