-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create_ssh_key returns 404 #78
Comments
UpdateWhen using a Project Level API key the above error exists, When using a Personal API key the above code works as expected. |
Referenced in #80 |
I was able to reproduce this problem (gist) in the latest master branch by using a project API key instead of a user API key. $ for APIKEY in USER_APIKEY PROJECT_APIKEY; do \
echo "## $APIKEY"; \
APIKEY=${!APIKEY} python3 test-sshkey-create.py; \
done
## USER_APIKEY
## PROJECT_APIKEY
Traceback (most recent call last):
File "test-sshkey-create.py", line 16, in <module>
public_key=Path("/Users/marques/.ssh/id_rsa.pub").read_text(),
File "/usr/local/lib/python3.7/site-packages/packet_python-1.42.0-py3.7.egg/packet/Manager.py", line 199, in create_ssh_key
File "/usr/local/lib/python3.7/site-packages/packet_python-1.42.0-py3.7.egg/packet/Manager.py", line 31, in call_api
File "/usr/local/lib/python3.7/site-packages/packet_python-1.42.0-py3.7.egg/packet/baseapi.py", line 115, in call_api
packet.baseapi.ResponseError: Error 404: Not found I created this branch to attempt to prevent the redirect from happening after the 201 response is received, but I still received a 404. |
This problem should now be resolved thanks to changes in the Equinix Metal (Packet) API. We should be able to revert the work-around created here: Feel free to re-open this, @mattdavis0351 if the problem persists. |
Problem
Using this method returns 404 even though the resource gets created as expected in the Packet Project.
Method:
Error:
Resource actually created:
The key that is set for this label is the correct public key from my key file. Therefore returning
404
makes no sense.This error also stops the rest of the execution for this script... as expected.
The text was updated successfully, but these errors were encountered: