Implement ExecutionDriver interface in datasource drivers

Registered by Tim Hinrichs

Currently only a couple of datasource drivers allow you to execute actions from within policy: Nova and Neutron. We should enable that functionality on all the datasource drivers. Doing so requires

1) Inheriting from datasource_driver.ExecutionDriver
2) Adding an implementation of execute() to the datasource driver, which could be as simple as ...
    def execute(self, action, action_args):
        """Overwrite ExecutionDriver.execute()."""
        # action can be written as a method or an API call.
        # action_agrs can be utilized for distinguishing the two.
        # This is an API call via client:
        LOG.info("%s:: executing %s on %s", self.name, action, action_args)
        self._execute_api(self.neutron, action, action_args)

3) Adding tests to ensure actions can actually be executed. See congress/tests/test_congress.py and searching for test test_neutron_policy_execute.

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
Tim Hinrichs
Direction:
Needs approval
Assignee:
Masahito Muroi
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon liberty-2
Started by
Masahito Muroi
Completed by
Masahito Muroi

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/add-execution-driver-interface,n,z

Addressed by: https://review.openstack.org/199911
    ExecutionDatasourceDriver inherits DatasourceDriver

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.