From 88c180252d78226e06ecf53a23d4f0eca9815bb8 Mon Sep 17 00:00:00 2001 From: spisarski Date: Fri, 17 Nov 2017 08:35:45 -0700 Subject: Refactoring of KeypairSettings to extend KeypairConfig KeypairSettings and glance_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the KeypairSettings class. JIRA: SNAPS-219 Change-Id: I92f51ecb77238444697e922c8f089e78d1c643aa Signed-off-by: spisarski --- docs/how-to-use/LibraryUsage.rst | 9 +++++---- docs/how-to-use/UnitTests.rst | 8 +++++++- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'docs/how-to-use') diff --git a/docs/how-to-use/LibraryUsage.rst b/docs/how-to-use/LibraryUsage.rst index c6b40a1..c45cc83 100644 --- a/docs/how-to-use/LibraryUsage.rst +++ b/docs/how-to-use/LibraryUsage.rst @@ -211,7 +211,7 @@ Create Keypair -------------- - Keypair - snaps.openstack.create\_keypair.OpenStackKeypair - - snaps.openstack.create\_keypair.KeypairSettings + - snaps.openstack.keypair.KeypairConfig - name - the keypair name (required) - public\_filepath - the file location to where the public key is @@ -227,8 +227,9 @@ Create Keypair .. code:: python - from snaps.openstack.create_keypairs import KeypairSettings, OpenStackKeypair - keypair_settings = KeypairSettings(name='kepair-name', private_filepath='/tmp/priv-kp') + from snaps.openstack.keypair.KeypairConfig + from snaps.openstack.create_keypairs import OpenStackKeypair + keypair_settings = KeypairConfig(name='kepair-name', private_filepath='/tmp/priv-kp') keypair_creator = OpenStackKeypair(os_creds, keypair_settings) keypair_creator.create() @@ -576,7 +577,7 @@ Create VM Instance - image\_settings - see snaps.config.image.ImageConfig above (required) - keypair\_settings - see - snaps.openstack.create\_keypairs.KeypairSettings above (optional) + snaps.openstack.keypair.KeypairConfig above (optional) .. code:: python diff --git a/docs/how-to-use/UnitTests.rst b/docs/how-to-use/UnitTests.rst index 398a08e..013b646 100644 --- a/docs/how-to-use/UnitTests.rst +++ b/docs/how-to-use/UnitTests.rst @@ -96,11 +96,17 @@ FlavorDomainObjectTests Ensures that all required members are included when constructing a Flavor domain object +KeypairConfigUnitTests +---------------------- + +Ensures that all required members are included when constructing a +KeypairConfig object + KeypairSettingsUnitTests ------------------------ Ensures that all required members are included when constructing a -KeypairSettings object +deprecated KeypairSettings object KeypairDomainObjectTests ------------------------ -- cgit 1.2.3-korg