openstack-ansible-plugins/connection
Kevin Carter 35727b8eb8 Reduce interactions by nearly 50%
The container interactions require a couple interactions to address the
container namespace as well as pad the pathing when transmitting a file.
This change reduces those interactions by nearly half for a single task
by storing information about a target container instead of looking it up
for every interaction.

Example file transfer:
  > Before this PR: http://paste.openstack.org/show/691341/
  > After this PR: http://paste.openstack.org/show/691338/

In the example we can see the "Before" runnins 20 commands to transfer
a file to a target while the "After" is running only 11.

Example command:
  > Before: http://paste.openstack.org/show/691343/
  > After: http://paste.openstack.org/show/691344/

In the command example we can see the "Before" is running 10 commands
to run a single command task while the "After" is running only 6.

This change will improve general ansible performance by cutting down the
number of operations needed to be completed to execute any one task.

Change-Id: Ia8405ec5c3b55ed3f7f134c4882d337c5e0b625f
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
(cherry picked from commit 9dc4ce2a04)
2018-03-06 10:48:43 -06:00
..
ssh.py Reduce interactions by nearly 50% 2018-03-06 10:48:43 -06:00