all_tenants and edit_managed not defined using external keystone session

Bug #1457821 reported by Davide Guerri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-designateclient
Fix Released
Medium
Davide Guerri

Bug Description

Initializing designate client with a pre-existing keystone session
won't work as designate expects keystone session to have the
'all_tenants' and 'edit_managed' attributes:

Example code:

    keystone_session = ksc_session.Session(
      auth=keystone_auth,
      verify=True,
      cert=my_cert
    )

than later:

    self._designate_client = designate_client(
      session=keystone_session,
      region_name=region_name
    )

with that code, wrap_api_call() will raise an exception:

  AttributeError: 'Session' object has no attribute 'all_tenants'

Same goes for 'edit_managed'.

description: updated
description: updated
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-designateclient (master)

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

Changed in python-designateclient:
assignee: nobody → Davide Guerri (davide-guerri)
status: New → In Progress
description: updated
summary: - all_tenants not defined when using an external keystone session
+ all_tenants and edit_managed not defined using external keystone session
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-designateclient (master)

Reviewed: https://review.openstack.org/184988
Committed: https://git.openstack.org/cgit/openstack/python-designateclient/commit/?id=34d14b06d91b3d2e90d6531972bc25b8a8de53ab
Submitter: Jenkins
Branch: master

commit 34d14b06d91b3d2e90d6531972bc25b8a8de53ab
Author: Davide Guerri <email address hidden>
Date: Fri May 22 11:22:23 2015 +0100

    Move all_tenants and edit_managed attributes to designate Client

    Initializing designate client with a pre-existing keystone session
    won't work as designate expects keystone session to have the
    'all_tenants' and 'edit_managed' attributes:

    Example code:

        keystone_session = ksc_session.Session(
          auth=keystone_auth,
          verify=True,
          cert=my_cert
        )

    than later:

        self._designate_client = designate_client(
          session=keystone_session,
          region_name=region_name
        )

    with that code, wrap_api_call() will raise an exception:

      AttributeError: 'Session' object has no attribute 'all_tenants'

    Same goes for 'edit_managed'.

    This patch moves both attributes from Keystone session to designate
    Client.

    Closes-Bug: 1457821
    Change-Id: I13d6c9ed46406fefc8cfa5de46811e4be009f1af

Changed in python-designateclient:
status: In Progress → Fix Committed
Tim Simmons (timsim)
Changed in python-designateclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-designateclient (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/190114

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-designateclient (stable/kilo)

Reviewed: https://review.openstack.org/190114
Committed: https://git.openstack.org/cgit/openstack/python-designateclient/commit/?id=7f61582cacc755cfe4be2ba7b1fe9e2fddb1ed68
Submitter: Jenkins
Branch: stable/kilo

commit 7f61582cacc755cfe4be2ba7b1fe9e2fddb1ed68
Author: Davide Guerri <email address hidden>
Date: Fri May 22 11:22:23 2015 +0100

    Move all_tenants and edit_managed attributes to designate Client

    Initializing designate client with a pre-existing keystone session
    won't work as designate expects keystone session to have the
    'all_tenants' and 'edit_managed' attributes:

    Example code:

        keystone_session = ksc_session.Session(
          auth=keystone_auth,
          verify=True,
          cert=my_cert
        )

    than later:

        self._designate_client = designate_client(
          session=keystone_session,
          region_name=region_name
        )

    with that code, wrap_api_call() will raise an exception:

      AttributeError: 'Session' object has no attribute 'all_tenants'

    Same goes for 'edit_managed'.

    This patch moves both attributes from Keystone session to designate
    Client.

    Closes-Bug: 1457821
    Change-Id: I13d6c9ed46406fefc8cfa5de46811e4be009f1af

tags: added: in-stable-kilo
Changed in python-designateclient:
milestone: none → 1.3.0
status: Fix Committed → Fix Released
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.