heat.engine.os clients duplicate client args logic

Bug #1461041 reported by Kanagaraj Manickam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Triaged
Low
Kanagaraj Manickam

Bug Description

Heat has client plugins for those supported OpenStack resources under heat.engine.clients.os and many of these plugins duplicate the logic of forming the arguments required to create the given client.

Following is the args logic being used across these client plugins: (these args are used by the keystone client, from which all other OpenStack clients are derived)

        args = {
            'auth_url': con.auth_url,
            'service_type': 'metering',
            'project_id': con.tenant,
            'token': lambda: self.auth_token,
            'endpoint_type': endpoint_type,
            'os_endpoint': endpoint,
            'cacert': self._get_client_option('ceilometer', 'ca_file'),
            'cert_file': self._get_client_option('ceilometer', 'cert_file'),
            'key_file': self._get_client_option('ceilometer', 'key_file'),
            'insecure': self._get_client_option('ceilometer', 'insecure')
        }

Here only the service name, type are varying for the given OpenStack service where as other parameters are same across. endpoint type and endpoint could be retrieved based on these service name and type.

So this bug is filed to remove the duplication of this logic. and there by reduce the maintenance effort in future.

Changed in heat:
assignee: nobody → Kanagaraj Manickam (kanagaraj-manickam)
description: updated
description: updated
Angus Salkeld (asalkeld)
Changed in heat:
status: New → Triaged
importance: Undecided → Low
Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
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.