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
PR to start support for Skydive integration with Ansible #50857
Conversation
@justjais this PR contains more than one new module. Please submit only one new module per pull request. For a detailed explanation, please read the grouped modules documentation |
@justjais, just so you are aware we have a dedicated Working Group for network. |
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.
The skydive module name seems odd to me.
You name it 'add_node', yet you provide a state present/absent.
Why not calling it 'skydive_node', which then manages the lifecycle of the skydive 'object' ?
The test
The test
The test
The test
The test
The test
The test
The test
|
@justjais this PR contains the following merge commits: Please rebase your branch to remove these commits. |
The test
The test
The test
The test
The test
The test
The test
The test
|
The test
|
@safchain @pierrecregut please review the respective PR. |
Adding @lebauce who is core dev of Skydive |
super(skydive_lookup, self).__init__(host, username, password) | ||
self.query_str = "" | ||
|
||
def lookup_query(self, filter_data): |
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.
Limited to nodes and limited to a single Has filter. I would not constrain the gremlin query that can be sent. If you want to
provide a simpler lookup for people who do not want to understand gremlin, provide it as an additional query. Example of things that are useful in practice : Find the interface node (type "interface") named "eth0' that is a child of a host (type "host") that is named "my_machine". When you glue nodes created by ansible and nodes found by skydive, you need at least this expressive power in your lookup queries.
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.
cool, got the use case and shall raise a new PR supporting the chained queries.
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.
I think that the filtering mechanism is a bit limited, maybe adding a chained queries will help but as Pierre suggested I would prefer to let the user uses a raw gremlin expression as they can be complex returning either nodes or edges, few examples :
G.V().Has('Type', 'veth', 'Name', 'eth0').In().Has('Name', 'vm1')
G.V().HasEither('Type', 'ovsbridge', 'Name', 'br-ex').Out('State', NE('UP'))
G.V().HasKey('MTU')
G.E().Has('RelationType', 'layer2').InV().Has('Name', 'en0')
A more complete Skydive gremlin documentation here :
http://skydive.network/documentation/api-gremlin
Do you have an example of how such request will be handled with the chained queries ?
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | ||
|
||
from __future__ import absolute_import, division, print_function | ||
__metaclass__ = type |
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.
use six.add_metaclass for python3 compability tells flake8.
suboptions: | ||
host: | ||
description: | ||
- Specifies the host name or address for connecting to the remote |
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.
Name is not clear and description does not really help to understand the format hostname:port
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.
updated the description to better give the idea of hostname:port
I will add some more generic feedback on how to add nodes and edges to skydive and why some items are necessary.
|
The test
The test
|
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
The test
|
@safchain @pierrecregut Apologies for the delay in updating the code with the review comments as I was on PTO, I have implemented the suggested review comments. Kindly, review and let me know if it's ok to merge. Also, as discussed earlier I shall raise different PR for supporting skydive edge and node modules. |
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
The test
The test
|
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
SUMMARY
Skydive is a network analyzer tool, which helps in analyzing SDNs and network and with this PR Ansible API and lookup modules are added to query Skydive objects using skydive python client. Opened new PR closing the earlier skydive PR #50136
ISSUE TYPE
COMPONENT NAME
skydive
ADDITIONAL INFORMATION