X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Fng-ui%2Fsrc%2Fcharm.py;h=6f5ca5b50d8f137c0d8070887f1817d9bb17f7d8;hb=refs%2Fchanges%2F45%2F9945%2F1;hp=8e21bcd2fb3944d647f29986b8b76d0ce2a8cc2d;hpb=68faf8d30c3e08ca7dc1974281ade474f6f815b7;p=osm%2Fdevops.git diff --git a/installers/charm/ng-ui/src/charm.py b/installers/charm/ng-ui/src/charm.py index 8e21bcd2..6f5ca5b5 100755 --- a/installers/charm/ng-ui/src/charm.py +++ b/installers/charm/ng-ui/src/charm.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import sys -import logging import base64 - -sys.path.append("lib") +from glob import glob +import logging +from pathlib import Path +from string import Template +import sys from ops.charm import CharmBase from ops.framework import StoredState, Object @@ -30,9 +31,6 @@ from ops.model import ( WaitingStatus, ) -from glob import glob -from pathlib import Path -from string import Template logger = logging.getLogger(__name__) @@ -129,7 +127,11 @@ class NGUICharm(CharmBase): ] port = config["https_port"] if ssl_enabled else config["port"] ports = [ - {"name": "port", "containerPort": port, "protocol": "TCP", }, + { + "name": "port", + "containerPort": port, + "protocol": "TCP", + }, ] kubernetes = { @@ -158,12 +160,18 @@ class NGUICharm(CharmBase): } ) + logger.debug(files) + spec = { "version": 2, "containers": [ { "name": self.framework.model.app.name, - "image": "{}".format(config["image"]), + "imageDetails": { + "imagePath": config["image"], + "username": config["image_username"], + "password": config["image_password"], + }, "ports": ports, "kubernetes": kubernetes, "files": files,