patch taken from https://gitlab.cern.ch/cloud-infrastructure/python-magnumclient/-/merge_requests/5 jira https://its.cern.ch/jira/browse/OS-14592