def test_update_member(self): """lbaas-member-update myid --name newname.""" resource = 'member' cmd_resource = 'lbaas_member' my_id = 'my-id' pool_id = 'pool-id' args = [my_id, pool_id, '--name', 'newname'] cmd = member.UpdateMember(test_cli20.MyApp(sys.stdout), None) self._test_update_resource(resource, cmd, my_id, args, { 'name': 'newname', }, cmd_resource=cmd_resource, parent_id=pool_id)
def test_update_member(self): # lbaas-member-update myid --name newname. resource = 'member' cmd_resource = 'lbaas_member' my_id = 'my-id' pool_id = 'pool-id' args = [my_id, pool_id, '--name', 'newname'] cmd = member.UpdateMember(test_cli20.MyApp(sys.stdout), None) self._test_update_resource(resource, cmd, my_id, args, {'name': 'newname', }, cmd_resource=cmd_resource, parent_id=pool_id) # lbaas-member-update myid --weight 100. args = [my_id, pool_id, '--weight', '100'] self._test_update_resource(resource, cmd, my_id, args, {'weight': '100', }, cmd_resource=cmd_resource, parent_id=pool_id) # lbaas-member-update myid --admin-state-up False args = [my_id, pool_id, '--admin-state-up', 'False'] self._test_update_resource(resource, cmd, my_id, args, {'admin_state_up': 'False', }, cmd_resource=cmd_resource, parent_id=pool_id)