storageinventory: Refactor ceph key generation 21/2021/7
authorAlexandru Antone <Alexandru.Antone@enea.com>
Wed, 20 Nov 2019 16:08:18 +0000 (18:08 +0200)
committerAlexandru Antone <Alexandru.Antone@enea.com>
Thu, 21 Nov 2019 12:31:12 +0000 (14:31 +0200)
commit5c3f9f389f46f719579ac4cd4065490b1723ebff
tree2f3f870e8f47bacf67d494dc3a42b6fcacc964b1
parente8deeb0fdaa020920f27a3a0f6a4355808dd11f6
storageinventory: Refactor ceph key generation

ceph-ansible 3.1 (and newer) refactored the handling of ceph keys
by leveraging the new ceph-key ansible module, which escapes our
current '$(ceph-authtool ...)' string, ending up as a literal string
instead of evaluating the command and catching its output.

To support the new ceph-ansible 3.1, we refactor the ceph key
generation in storageinventory.py by explicitly running ceph-authtool
with subprocess.check_output and passing it down via a variable.
This change is backwards compatible with the current ceph-ansible 3.0.

Signed-off-by: Alexandru Antone <Alexandru.Antone@enea.com>
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Change-Id: I1f0d73399429ef40f414efeb6931db111eba0faf
inventoryhandlers.spec
inventoryhandlers/storageinventory/storageinventory.py