Skip to content

scripts/network/exdhcp: cleaned up code in dhcpd_edithosts.py#3166

Closed
falcon78921 wants to merge 1 commit intoapache:masterfrom
falcon78921:wip-cloudstack-cleanup
Closed

scripts/network/exdhcp: cleaned up code in dhcpd_edithosts.py#3166
falcon78921 wants to merge 1 commit intoapache:masterfrom
falcon78921:wip-cloudstack-cleanup

Conversation

@falcon78921
Copy link

@falcon78921 falcon78921 commented Feb 5, 2019

Description

Minor cleanups in dhcpd_edithosts.py. Updated string formatting
to str.format(). Aligning code to Python3.

Signed-off-by: James McClune jmcclune@mcclunetechnologies.net

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

How Has This Been Tested?

@falcon78921 falcon78921 force-pushed the wip-cloudstack-cleanup branch 2 times, most recently from 83134f7 to 0b0d426 Compare February 8, 2019 03:43
Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like a good cleanup, but I doubt this is bringing us closer to python3 ;(

@falcon78921
Copy link
Author

@DaanHoogland Yeah, I used str.format(), which is becoming a more widespread and recommended way to format strings in Python3 (replacing the % operator). I saw that os.path is also used. pathlib is becoming a better alternative for file manipulations as well (replacing os.path). If there's anything I'm missing, please let me know and I'll fix. :)

@borisstoyanov
Copy link
Contributor

@blueorangutan package

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'll run some smoke tests

@blueorangutan
Copy link

@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2605

@borisstoyanov
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-3401)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 31633 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3166-t3401-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_iso.py
Intermittent failure detected: /marvin/tests/smoke/test_templates.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Smoke tests completed. 66 look OK, 4 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestTemplateHierarchy>:setup Error 1519.82 test_accounts.py
test_04_extract_Iso Failure 1.08 test_iso.py
test_04_extract_template Failure 1.09 test_templates.py
test_06_download_detached_volume Failure 11.51 test_volumes.py

@falcon78921
Copy link
Author

@borisstoyanov @DaanHoogland I'm just following up on this PR. If there's anything else I need to do, please let me know :)

@DaanHoogland
Copy link
Contributor

@falcon78921 master is frozen till 4.12 is released. Also there are a lot of errors in travis. I see a lot of false positives so my first instinct is restarting. Please have a look if these continue to appear.

@falcon78921
Copy link
Author

@DaanHoogland Cool :) Thanks for the update.

@yadvr
Copy link
Member

yadvr commented May 27, 2019

We'll need to check but current systemvmtemplate only has python 2.7.

@yadvr
Copy link
Member

yadvr commented May 27, 2019

@blueorangutan package

@yadvr yadvr added this to the 4.13.0.0 milestone May 27, 2019
@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@yadvr
Copy link
Member

yadvr commented May 27, 2019

Confirmed, current systemvmtemplate based on Debian 9 does not have python 3 by default:
![Screenshot from 2019-05-27 18-04-42](https://user-images.githubusercontent.com/95203/58420073-
f2a15b00-80a9-11e9-9e95-54f00cf95231.png)

-1 The change may be breaking, the bigger change would be to replace all of the VR programming codebase (about 2-3k loc) with new rpc mechanism.

@yadvr yadvr removed this from the 4.13.0.0 milestone May 27, 2019
@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2791

@falcon78921
Copy link
Author

@rhtyd Do you want me to close?

@falcon78921 falcon78921 force-pushed the wip-cloudstack-cleanup branch from 0b0d426 to 624919b Compare August 23, 2019 01:55
@falcon78921
Copy link
Author

Made some corrections regarding pathlib usage

Cleaned up code in dhcpd_edithosts.py. Updated string formatting
to str.format().

Signed-off-by: James McClune <jmcclune@mcclunetechnologies.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants