-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
A new execution module: PeeringDB #48688
Conversation
'result': True, | ||
'out': None | ||
} | ||
res = salt.utils.http.query(url, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will default to HTTP. Should we prefer HTTPS given that we're passing credentials in the clear here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. Is there an option to salt.utils.http.query
for that? I've never used it, I'm afraid. Though, the base URL is PEERINGDB_URL = 'https://www.peeringdb.com/api'
and I have assumed that it would use HTTPS therefore. Let me know and I'll update, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! You are right. Yup, we're good here. False alarm on my part.
This is causing a related test to fail: https://jenkinsci.saltstack.com/job/pr-kitchen-ubuntu1604-py2/job/PR-48688/2/ @mirceaulinic Can you take a look? |
@rallytime it seem to me that is complain about the |
@mirceaulinic That'd be great! Thanks! |
I pushed dd10817 - please let me know @rallytime if this don't suffice to pass the tests. |
@mirceaulinic That test is picky and is specifically looking for Thanks again for his and all of your awesome work! |
Hrm, I read the test failure incorrectly. Now it says:
|
ea150ed
to
f3630ec
Compare
HI @rallytime - yes, |
It looks like a rebase helped, the lint check is passing now... |
@mirceaulinic Hrm...still not passing. We just need to add that function to the list of functions to ignore. Can you add that here? |
I pushed fc000b8 let's see if that helps. |
What does this PR do?
Adds another execution module, for the basic interaction with the PeeringDB API. This is useful to gather data about other networks you can potentially peer with, and automatically establish BGP sessions, e.g., given just a specific AS number , the rest of the information (i.e., IP addresses, places where the remote network is available, etc.) is retrieved from PeeringDB, and the session configuration is automated with minimum to no effort (typing manually IP addresses is both tedious and error prone).