-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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 include support for Skydive Node and Edge modules with Ansible #53112
Conversation
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
cc: @safchain @pierrecregut please review the respective PR. |
@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 |
The test
The test
The test
The test
The test
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>
@safchain @pierrecregut ansible |
This is only a partial review. I will continue it when at least examples given in the documentation work. |
@pierrecregut for me the documentation examples is working as expected, not sure why it's failing for you. Can we meet over BJ call if feasible, so that I can run it to you and also need to clarify a few changes that I did |
I test your code in a clean Ubuntu 18.04 VM. pip install skydive-client. cloned ansible. run hacking/env-setup ---
- name: Foo
hosts: 127.0.0.1
connection: local
tasks:
- name: create node
skydive_node:
name: TOR
node_type: fabric
seed: xxxx
metadata:
Brand: Cisco
state: present
provider:
endpoint: 192.168.122.23:8082
I have added an epdb.serve() before the connect so that I can set a breakpoint:
So as expected, the protocol object handled by trolius is the protocol object given to WSClient, it does not implement the protocol api as it extends object not the WSClientDefaultProtocol class. I understand why it fails, not why it would work in your setting. |
@pierrecregut @justjais Sorry I'm currently on vacation, adding @lebauce @nplanel @masco-enovance who can help |
@pierrecregut ah got my mistake, earlier I had inherited I'll revert the same as earlier and shall try to fix the ansible sanity check error. Also, I'll write unit tests for these particular modules, so that such a mistake can be avoided in the future. Thanks |
A fast way to correct is to create a class in the init of skydive_wsclient: class skydive_full_inject_protocol(skydive_inject_protocol, WSClientDefaultProtocol) :
pass and using this class as protocol argument. Still you need to make two other modifications : you must call |
or (probably more pythonic): protocol=type('skydive_full_inject_protocol',(skydive_inject_protocol, WSClientDefaultProtocol), dict()) |
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
@pierrecregut I have updated the PR fixing the review comments, kindly check and lemme me know if it's ok to merge. Also, thanks for guiding me in fixing the shippable error. I shall raise another PR covering the unit tests for all ansible skydive modules. |
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