It is important to understand the fact that even training basic commands to a wild animal is not an easy task, and the adventurers would have to dedicate time every day reinforcing teaching of even basic commands before moving on to the commands that they are looking for.
Until the creature is trained, it won't listen to commands, it is unlikely to do what the player wants, and it may end up lashing out at some party members. It can create a great in game role-playing scenario, and that alone may make it worth justifying limited combat skills and such after the time has passed to allow that form of training to have been completed.
Mechanically, nothing is concretedefined at all, but a series of a few months worth of skill checks to train the animal based on a DC that the DM decides is appropriate for that specific beast to be trained over time would be appropriate. If your DM disallows it, then that is simply the way it is, but most DM's outside of organized play are likely willing to work with you in at least a limited sense if it promotes role-playing and takes work before it has any mechanical merit.
I would say that the first step is to 'tame' the creature so it won't attack players or bolt at the first opportunity. After this, it should have a check/training attempt associated with each trick it is to be 'taught'. "War training" should be separate as well, so they don't bolt in combat. The DC should be based on the DM's discretion, considering the trick and the animal. (War training a rabbit is unlikely.)
As this method would need to consider both active days (perhaps during long rests) and inactive (downtime) days, it is likely in the Player/DM's best interests to look at the downtime rules to design something similar to the crafting or carousing rules in order to better create mechanics for training an animal. It would give a codified way to take care of the process that keeps it from being too bogged down by rolls every day.
The carousing rules seems like a particularly good fit, allowing animal handling to adjust a table for a single roll that has results ranging from the animal leaving/going berserk to becoming a very well trained creature.
The cost of food/shelter for the creature would need to be considered, of course, and will be as important to an animal trainer as they are to a knight with his horse, and this would adjust the normal downtime day costs for the character.