Skip to content

Commit

Permalink
Fix invalid API request to Rackspace Cloud DNS - Issue AnalogJ#981 (A…
Browse files Browse the repository at this point in the history
…nalogJ#989)

* Solution for Issue AnalogJ#981. Update _request method for Rackspace Cloud

* Add @mattgauf to CODEOWNERS for Rackspace
  • Loading branch information
mattgauf authored and MasinAD committed Mar 29, 2022
1 parent adbf4bb commit 7f35de0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ lexicon/providers/ovh.py @adferrand
lexicon/providers/plesk.py @ctron
lexicon/providers/pointhq.py @analogj
lexicon/providers/powerdns.py @insertjokehere @splashx
lexicon/providers/rackspace.py @rmarscher
lexicon/providers/rackspace.py @rmarscher @mattgauf
lexicon/providers/rage4.py @analogj
lexicon/providers/rcodezero.py @MikeAT
lexicon/providers/route53.py @eadmundo
Expand Down
3 changes: 2 additions & 1 deletion lexicon/providers/rackspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ def _request(self, action="GET", url="/", data=None, query_params=None):
full_url = (
f"{self.api_endpoint}/{self._get_rackspace_option('auth_account')}{url}"
)
# For data= argument, use None value for GET requests to comply with Rackspace API
response = requests.request(
action,
full_url,
params=query_params,
data=json.dumps(data),
data=json.dumps(data) if action != "GET" else None,
headers={
"X-Auth-Token": self._get_rackspace_option("auth_token"),
"Content-Type": "application/json",
Expand Down

0 comments on commit 7f35de0

Please sign in to comment.