Importing code from landscape-client code base is risky
Bug #1577418 reported by
Free Ekanayaka
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
landscape-client-charm |
New
|
Undecided
|
Unassigned |
Bug Description
In hooks/common.py we have code that imports directly from landscape-client:
from landscape.
setup, register, LandscapeSetupC
stop_
The problem with this is that it couples charm and client too much and makes the charm more brittle and sensitive to client changes. Most noticeably this import might break at any time with Python 3 (which is now the Python version that the hooks run with).
This logic should be factored into a script that the client exposes and that the charm can invoke using the subprocess module.
To post a comment you must log in.