Add expect_response_code to base network client
This commit adds a new kwarg called expect_response_code to the
base network client, since it currently does not allow the
expected response code to be overriden. This is problematic
because commits like Icfff444ee7638a3220d228330f9162044673636c
rely on different response codes. For example, creating a network
tag uses a PUT but expects a 201 (since it does creation) --
so it is impossible to use update_resource.
This commit does the following:
- adds new kwarg expect_response_code to create/update functions
in base network client
- adds unit tests for base network client that test the functions
including with the new kwarg
- update ``create_tag`` client method in network ``tags_client``
to use update_resource with expect_response_code=201
Change-Id: I9b4685e7ceb3005219e6c9831c1f4a293c73a340
3 files changed