abilty to use FakeKeystoneClient at runtime

Bug #1723639 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Low
Dan Prince

Bug Description

I would like the ability to use Heats FakeKeystoneClient class at runtime by leveraging the 'keystone_backend' config file option:

keystone_backend = heat.tests.fakes.FakeKeystoneClient

This would work fine but introduces runtime dependencies on mox/mox3 as this module resides in the tests heat modules directory.

---

As the Class has no mox dependencies itself it would be better if we could move it to common and just consume it directly, also providing end user docs on how someone else could also consume this Class at runtime to disable Heats keystone dependencies.

So I would like it to be:

keystone_backend = heat.common.fakes.FakeKeystoneClient

Dan Prince (dan-prince)
Changed in heat:
assignee: nobody → Dan Prince (dan-prince)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/512035

Rico Lin (rico-lin)
Changed in heat:
milestone: none → queens-1
importance: Undecided → Low
Rico Lin (rico-lin)
Changed in heat:
milestone: queens-1 → queens-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/512035
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=14b0451fc9ebfd8e775b2aa9c8feac31e456a9ad
Submitter: Zuul
Branch: master

commit 14b0451fc9ebfd8e775b2aa9c8feac31e456a9ad
Author: Dan Prince <email address hidden>
Date: Mon Oct 16 16:18:44 2017 -0400

    Move FakeKeystoneClient to engine.clients

    Add the ability to consume FakeKeystoneClient class as a client
    module. This avoids extra dependencies on the Python mox/mox3
    libraries at runtime and allows the end user to wire in the
    custom class by simply making the following config setting:

      keystone_backend = heat.engine.clients.os.keystone.fake_keystoneclient.FakeKeystoneClient

    This use case for this is the TripleO undercloud installer which
    uses a heat-all process to transform heat templates into Ansible
    playbooks. Previously we leveraged a "fake_keystone" service
    as multiple applications and binaries required keystone dependencies.
    (Both Heat, os-collect-config, and some openstackclients wanted
     a fully version of keystone running)

    Now that we've streamlined these dependencies allowing heat to use
    a fake KeystoneClient library shim instead of the full fake_keystone
    process is much lighter and avoids the security concerns of the extra
    socket. This patch allows us to do all of this without installing extra
    test time dependencies on mox/mox3.

    Change-Id: I03f1789957ba157871fd13164592116d7fcdabe4
    Closes-bug: #1723639

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 10.0.0.0b2

This issue was fixed in the openstack/heat 10.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.