X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Fk8s_juju_conn.py;h=bffa8bf6c9bf5b8960ca1b7f34f2d4fc34b51e32;hp=1f7cc0057e66d7abe32e1d1b4a3112a60020ffde;hb=refs%2Ftags%2Fv7.0.1rc1;hpb=408992171fc8c4f1456f2ebdf6d51ed82214c64c diff --git a/n2vc/k8s_juju_conn.py b/n2vc/k8s_juju_conn.py index 1f7cc00..bffa8bf 100644 --- a/n2vc/k8s_juju_conn.py +++ b/n2vc/k8s_juju_conn.py @@ -316,16 +316,16 @@ class K8sJujuConnector(K8sConnector): await self.login(cluster_uuid) ## - # Get or create the model, based on the namespace the cluster was - # instantiated with. - namespace = self.get_namespace(cluster_uuid) + # Get or create the model, based on the NS + # uuid. + model_name = db_dict["filter"]["_id"] - self.log.debug("Checking for model named {}".format(namespace)) - model = await self.get_model(namespace, cluster_uuid=cluster_uuid) + self.log.debug("Checking for model named {}".format(model_name)) + model = await self.get_model(model_name, cluster_uuid=cluster_uuid) if not model: # Create the new model - self.log.debug("Adding model: {}".format(namespace)) - model = await self.add_model(namespace, cluster_uuid=cluster_uuid) + self.log.debug("Adding model: {}".format(model_name)) + model = await self.add_model(model_name, cluster_uuid=cluster_uuid) if model: # TODO: Instantiation parameters