Importing code from landscape-client code base is risky

Bug #1577418 reported by Free Ekanayaka
6
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.configuration import (
    setup, register, LandscapeSetupConfiguration, ConfigurationError,
    stop_client_and_disable_init_script)

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.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.