From 3c387ae1c18c4a80a752c3e5a2409f4a602b9e20 Mon Sep 17 00:00:00 2001 From: spisarski Date: Fri, 17 Nov 2017 14:05:29 -0700 Subject: Refactoring of VolumeTypeSettings to extend VolumeTypeConfig This also includes VolumeTypeEncryptionSettings extending to VolumeTypeEncryptionConfig which is a member of VolumeTypeConfig VolumeTypeSettings and cinder_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the VolumeTypeSettings class. JIRA: SNAPS-228 Change-Id: Iaa9c7a1cd810cf63d1badb00f71bcdcefb527e12 Signed-off-by: spisarski --- docs/how-to-use/LibraryUsage.rst | 11 ++++++----- docs/how-to-use/UnitTests.rst | 8 +++++++- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/how-to-use/LibraryUsage.rst b/docs/how-to-use/LibraryUsage.rst index d7f3177..8e2a330 100644 --- a/docs/how-to-use/LibraryUsage.rst +++ b/docs/how-to-use/LibraryUsage.rst @@ -451,19 +451,20 @@ Create Volume Type - Volume Type - snaps.openstack.create\_volume\_type.OpenStackVolumeType - - snaps.openstack.create\_volume\_type.VolumeTypeSettings + - snaps.config.volume\_type.VolumeTypeConfig - name - the volume type's name (required) - description - the volume type's description (optional) - - encryption - instance or config for VolumeTypeEncryptionSettings (optional) + - encryption - instance or config for VolumeTypeEncryptionConfig (optional) - qos\_spec\_name - name of the QoS Spec to associate (optional) - - public - instance or config for VolumeTypeEncryptionSettings (optional) + - public - instance or config for VolumeTypeEncryptionConfig (optional) .. code:: python - from snaps.openstack.create_volume_type import VolumeTypeSettings, OpenStackVolumeType + from snaps.config.volume_type import VolumeTypeConfig + from snaps.openstack.create_volume_type import OpenStackVolumeType - vol_type_settings = VolumeTypeSettings(name='stack-name') + vol_type_settings = VolumeTypeConfig(name='stack-name') vol_type_creator = OpenStackHeatStack(os_creds, vol_type_settings) vol_type_creator.create() diff --git a/docs/how-to-use/UnitTests.rst b/docs/how-to-use/UnitTests.rst index bc5515b..74404fa 100644 --- a/docs/how-to-use/UnitTests.rst +++ b/docs/how-to-use/UnitTests.rst @@ -276,11 +276,17 @@ VolumeDomainObjectTests Ensures that all required members are included when constructing a Volume domain object (for Cinder) +VolumeTypeConfigUnitTests +------------------------- + +Ensures that all required members are included when constructing a +VolumeTypeConfig object + VolumeTypeSettingsUnitTests --------------------------- Ensures that all required members are included when constructing a -VolumeTypeSettings object +deprecated VolumeTypeSettings object VolumeTypeDomainObjectTests --------------------------- -- cgit 1.2.3-korg