diff options
author | Thomas Morin <thomas.morin@orange.com> | 2015-10-12 12:18:55 +0200 |
---|---|---|
committer | Thomas Morin <tmmorin.orange@gmail.com> | 2015-10-16 10:10:01 +0000 |
commit | 05908356a7c6828ec26b399e45387a12a6d5cec7 (patch) | |
tree | dfab3fab8578948dcd7da236f9ac3533696c02bf | |
parent | da14399062a51bc6ac04ad9c727aba04b394e39b (diff) | |
download | python-neutronclient-05908356a7c6828ec26b399e45387a12a6d5cec7.tar.gz |
Revert parent_id and obj_id parameter order
This change reverts the parameter order between parent_id and
object id in the definition of obj_updater, obj_deleter, and obj_shower
in neutronclient/v2_0/client.py, to match the call order in
neutronclient/neutron/v2_0/__init__.py .
Fixing the caller code would be the alternative, but would require
changing the sig of many non-dynmically created methods in
neutronclient/v2_0/client.py .
Change-Id: Ia5d499e5a3cf3ff1b357c954f7e82a9066c94982
Closes-Bug: 1505170
(cherry picked from commit 1ced38c1a72271faabb7ef6d3b37d3f7d329ac4f)
-rw-r--r-- | neutronclient/v2_0/client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/neutronclient/v2_0/client.py b/neutronclient/v2_0/client.py index ce6a8b1..72c280a 100644 --- a/neutronclient/v2_0/client.py +++ b/neutronclient/v2_0/client.py @@ -1716,7 +1716,7 @@ class Client(ClientBase): def _fx(obj, **_params): return self.show_ext(path, obj, **_params) - def _parent_fx(parent_id, obj, **_params): + def _parent_fx(obj, parent_id, **_params): return self.show_ext(path % parent_id, obj, **_params) fn = _fx if not parent_resource else _parent_fx setattr(self, "show_%s" % resource_plural, fn) @@ -1743,7 +1743,7 @@ class Client(ClientBase): def _fx(obj): return self.delete_ext(path, obj) - def _parent_fx(parent_id, obj): + def _parent_fx(obj, parent_id): return self.delete_ext(path % parent_id, obj) fn = _fx if not parent_resource else _parent_fx setattr(self, "delete_%s" % resource_singular, fn) @@ -1752,7 +1752,7 @@ class Client(ClientBase): def _fx(obj, body=None): return self.update_ext(path, obj, body) - def _parent_fx(parent_id, obj, body=None): + def _parent_fx(obj, parent_id, body=None): return self.update_ext(path % parent_id, obj, body) fn = _fx if not parent_resource else _parent_fx setattr(self, "update_%s" % resource_singular, fn) |