Skip to content

Commit

Permalink
Merge pull request #1141 from zancas/2.3-stable
Browse files Browse the repository at this point in the history
Members modify() broken when setting session attribute
  • Loading branch information
pjbreaux authored May 26, 2017
2 parents febd84c + 35c888d commit f4b73d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion f5/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = '2.3.2'
__version__ = '2.3.3'
2 changes: 1 addition & 1 deletion f5/bigip/tm/ltm/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _modify(self, **patch):
"'user-down'" % patch['state']
raise MemberStateModifyUnsupported(msg)
if 'session' in patch:
if patch['session'] != 'user-enabled' and patch['state'] != \
if patch['session'] != 'user-enabled' and patch['session'] != \
'user-disabled':
msg = "The members resource does not support a modify with " \
"the value of the 'session' attribute as %s. " \
Expand Down
10 changes: 10 additions & 0 deletions f5/bigip/tm/ltm/test/functional/test_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ def test_update_session_state_kwargs(self, request, bigip):
m2.session = m1.session
m2.state = m1.state

def test_session_modify(self, request, bigip):
m1, pool = setup_member_test(request, bigip, 'membertestpool1',
'Common')
assert m1.session == 'user-enabled'
m1.modify(session='user-disabled')
m2 = pool.members_s.members.load(
name='192.168.15.15:80', partition='Common')
assert m2.session == 'user-disabled'
assert m1.session == m2.session

def test_state_modify(self, request, bigip):
m1, pool = setup_member_test(request, bigip, 'membertestpool1',
'Common')
Expand Down

0 comments on commit f4b73d9

Please sign in to comment.