Uh oh!
There was an error while loading. Please reload this page.
CLOUDSTACK-10294: PEP-8 fixes and enhancements to security_group.py - #2432
Conversation
We should return a boolean and not a String 'true' or 'false' Although this output is never checked by the calling function(s). Signed-off-by: Wido den Hollander <wido@widodh.nl>
Do not use == False or == None as that is not according to the Python specs. Signed-off-by: Wido den Hollander <wido@widodh.nl>
Calling just print 'hello' is deprecated and won't work in neweer Python versions. We should use the print() function Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Wido den Hollander <wido@widodh.nl>
This is the Python way of executing commands Signed-off-by: Wido den Hollander <wido@widodh.nl>
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM based on code review
DaanHoogland
commented
Jan 26, 2018
#BabySteps save the world LGTM |
yadvr
commented
Feb 10, 2018
@blueorangutan package |
blueorangutan
commented
Feb 10, 2018
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Feb 10, 2018
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1703 |
wido
commented
Feb 14, 2018
We can merge this one, right? |
yadvr
commented
Feb 14, 2018
@wido let me kick a test round. |
blueorangutan
commented
Feb 14, 2018
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Feb 14, 2018
Trillian test result (tid-2259)
|
borisstoyanov
left a comment
There was a problem hiding this comment.
Tests are looking good
yadvr
commented
Feb 15, 2018
@wido can you add a JIRA id for this? |
wido
commented
Feb 15, 2018
Done @rhtyd , updated the title with the issue: https://issues.apache.org/jira/browse/CLOUDSTACK-10294 |
In 6233a77 as a part of PR apache#2432 the bash() function was replaced by the execute() function. Somehow this last calling of the bash() function was not caught by testing and is still in there. This causes Exceptions to be thrown by the Security Group script. Signed-off-by: Wido den Hollander <wido@widodh.nl>
In 6233a77 as a part of PR apache#2432 the bash() function was replaced by the execute() function. Somehow this last calling of the bash() function was not caught by testing and is still in there. This causes Exceptions to be thrown by the Security Group script. Signed-off-by: Wido den Hollander <wido@widodh.nl>
…#2732) In 6233a77 as a part of PR #2432 the bash() function was replaced by the execute() function. Somehow this last calling of the bash() function was not caught by testing and is still in there. This causes Exceptions to be thrown by the Security Group script. Signed-off-by: Wido den Hollander <wido@widodh.nl>
…apache#2732) In 6233a77 as a part of PR apache#2432 the bash() function was replaced by the execute() function. Somehow this last calling of the bash() function was not caught by testing and is still in there. This causes Exceptions to be thrown by the Security Group script. Signed-off-by: Wido den Hollander <wido@widodh.nl>
blueorangutan
commented
Feb 23, 2019
Packaging result: ✖centos6 ✖centos7 ✖debian. JID-2613 |
The code in security_group.py is very old.
I looked into using Libvirt network filters for this, but it's lacking functionality we require.
This is my first attempt in cleaning up this file. There is a lot more work to do.
I tested this on a local system with Basic Networking and that worked just fine in my case.
The quality of the code is still horrible though:
A lot more work is needed, but I'm taking baby-steps so that it makes the review a bit easier and not one big bang with changes.