X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=modules%2Flibjuju%2Fjuju%2Fclient%2Fclient.py;fp=modules%2Flibjuju%2Fjuju%2Fclient%2Fclient.py;h=0000000000000000000000000000000000000000;hp=2721d07f9bdc9a909c9514a8f3841e688a240369;hb=5aa242fe2d61c2da9fdb29ed65029f3e27b6966d;hpb=e2051cca7dac12aa09f6ed33555dcc4548c4b52b diff --git a/modules/libjuju/juju/client/client.py b/modules/libjuju/juju/client/client.py deleted file mode 100644 index 2721d07..0000000 --- a/modules/libjuju/juju/client/client.py +++ /dev/null @@ -1,33 +0,0 @@ -'''Replace auto-generated classes with our own, where necessary. -''' - -from . import _client, _definitions, overrides # isort:skip - -for o in overrides.__all__: - if "Facade" not in o: - # Override stuff in _definitions, which is all imported - # into _client. We Monkey patch both the original class and - # the ref in _client (import shenanigans are fun!) - setattr(_definitions, o, getattr(overrides, o)) - setattr(_client, o, getattr(overrides, o)) - # We shouldn't be overriding Facades! - else: - raise ValueError( - "Cannot override a versioned Facade class -- you must patch " - "it instead.") - -for o in overrides.__patches__: - # Patch a versioned Facade. - for client_version in _client.CLIENTS.values(): - try: - c_type = getattr(client_version, o) - except AttributeError: - # Not all the _client modules may have the - # facade. That's okay -- we just skip over them. - continue - o_type = getattr(overrides, o) - for a in dir(o_type): - if not a.startswith('_'): - setattr(c_type, a, getattr(o_type, a)) - -from ._client import * # noqa, isort:skip