-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Add injection to python rest api #1508
Add injection to python rest api #1508
Conversation
it is nice to have some tests and squash the commits. |
add to whitelist |
run skydive-python-tests |
@ofirZelig Thank you for this. Could you please also add support for deletion ? |
Please add some tests, it would be easy to validate the code. |
Can one of the admin review this patch ? |
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.
Could you please add test for that ?
@ofirZelig - please squash the commits - for that you can use:
and then place an "s" command on each but your first commit. and then doing so please provide a concise commit message |
@ofirZelig - please extend the description of what this PR does; and why |
@ofirZelig - to test your code please use: https://docs.python.org/3/library/unittest.html the tests should be wrapped by a script which can be invoked via CI:
if you need any setup run before running these tests - then implement it in:
and as a development environment please use a http://skydive.network/documentation/contribute#development-box |
Hi @hunchback , We are trying to deploy the development environment on ubuntu 18.04 using virtualbox 5.2.18 and vagrant 2.1.1. The problem is that the files sharing between the guest and the host doesnt work. We cant find the source code inside the guest so we cant build it. Can you think of any explanation or solution for this? |
@hunchback [vagrant@dev skydive]$ make |
Install by hand is pretty simple, you could try this: |
@ofirZelig It seems your GOPATH is /home/vagrant. Therefore, your GOROOT is inside GOPATH which is known to cause problems. We updated the Vagrant box in this commit 9bb05e8 |
@ofirZelig - I recommend that you use our standard test/development environment which can be deployed on your laptop/host by following: http://skydive.network/documentation/contribute#development-box Once done I can provide additional details on running the specific tests you have. |
@safchain I'm currently working on adding InjectionRule to rules.py, but it is not clear which fileds are optional in the injection. Can you say which is optional from the following fields: Thank you |
a59430b
to
33c29c8
Compare
@safchain
|
@ofirZelig maybe the loopback interface as source and destination |
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.
In order to be able to test packet injection we need to start an analyzer and an agent however only an analyzer is currently started. In order to have both you need to change
analyzer
by allinone
https://github.com/skydive-project/skydive/blob/master/contrib/python/api/tests/tests.py#L51
Then you could use the eth0
interface like this G.V().Has('Name', 'eth0')
I tested by hand and it worked so I guess it should work with python
…list, test and packet injection rule
@safchain Is there progress in our PR? |
@ofirZelig there are multiple coding style issue to fix, please have a look at the CI result |
run skydive-python-tests |
run skydive-python-tests |
1 similar comment
run skydive-python-tests |
@ofirZelig why did you reverted this one 3b51fa0 |
@safchain |
@ofirZelig I'm checking why with TLS it is not working |
@ofirZelig I submitted this #1621 to fix the TLS issue |
@safchain |
@ofirZelig can you please rebase on top of master |
add support for creation, deletion, list and added tests
run skydive-python-tests |
Fixed the message, and as I understood, squashing the commits is much easier after the PR is accepted |
@ofirZelig you need to rebase on top of master as we just merged the patch that fixes the TLS/allinone issue otherwise the tests won't pass |
@safchain |
run skydive-python-tests |
@safchain |
@ofirZelig can you apply this https://paste.fedoraproject.org/paste/naOHo3~ylIlW5B-x9HfTJQ Please squash it if it passes I'll merge it. Thanks |
run skydive-python-tests |
added a functions to the RestApi that supports injections in skydive :
injection_create - support creation of injections, the function returns an InjectionRule.
injection_delete - support deletion of injections.
injection_list - returns a list of all the current injections in the system.