Skip to content
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

BSD: find_devs_with_ refactoring #298

Merged
merged 3 commits into from
Apr 24, 2020

Conversation

goneri
Copy link
Contributor

@goneri goneri commented Mar 31, 2020

Refactoring of the find_devs_with_xxx() methods:

  • centralize everything in util.py
  • add test coverage

@goneri goneri changed the title BSD: find_devs_with_ refactoring WIP: BSD: find_devs_with_ refactoring Mar 31, 2020
Copy link
Collaborator

@igalic igalic left a comment

Choose a reason for hiding this comment

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

not a fan of ad-hoc parsers, but this one was already in place, so, 🤷‍♀️

cloudinit/util.py Show resolved Hide resolved
@OddBloke OddBloke added the wip Work in progress, do not land label Apr 1, 2020
@blackboxsw blackboxsw self-assigned this Apr 2, 2020
@goneri goneri force-pushed the BSD-find_devs_with_-refactoring branch from c8446d7 to df56859 Compare April 2, 2020 16:58
# Query optical drive to get it in blkid cache for 2.6 kernels
util.find_devs_with(path="/dev/sr0")
util.find_devs_with(path="/dev/sr1")
# Query optical drive to get it in blkid cache for 2.6 kernels
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this still something useful?

@goneri goneri changed the title WIP: BSD: find_devs_with_ refactoring BSD: find_devs_with_ refactoring Apr 2, 2020
@blackboxsw blackboxsw removed the wip Work in progress, do not land label Apr 2, 2020
@goneri goneri force-pushed the BSD-find_devs_with_-refactoring branch from df56859 to 544f26e Compare April 3, 2020 01:07
@goneri goneri requested a review from OddBloke April 3, 2020 16:47
@goneri goneri force-pushed the BSD-find_devs_with_-refactoring branch from 544f26e to 76e71f0 Compare April 14, 2020 16:47
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

looks good, thanks for the refactor @goneri. Minor nits mentioned inline.

cloudinit/util.py Outdated Show resolved Hide resolved
cloudinit/util.py Outdated Show resolved Hide resolved
cloudinit/util.py Outdated Show resolved Hide resolved
cloudinit/util.py Show resolved Hide resolved
tests/unittests/test_datasource/test_nocloud.py Outdated Show resolved Hide resolved
@goneri goneri force-pushed the BSD-find_devs_with_-refactoring branch from 76e71f0 to c35884e Compare April 19, 2020 21:08
cloudinit/util.py Outdated Show resolved Hide resolved
cloudinit/util.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

Thanks just leaving a couple of nits in there to see if you find them objectionable and then we can land either way.

@goneri goneri requested a review from blackboxsw April 22, 2020 14:07
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

+1 @goneri just a git rebase -i master and resolve a minor conflict now that your other branch landed.

Refactoring of the `find_devs_with_xxx()` methods:

- centralize everything in `util.py`
- add test coverage
@goneri goneri force-pushed the BSD-find_devs_with_-refactoring branch from b9ceace to 0f4a189 Compare April 24, 2020 19:23
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

Great thanks a ton.

@blackboxsw blackboxsw merged commit 72f6eb0 into canonical:master Apr 24, 2020
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.

4 participants