summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eee9ead)
This adds the support to deploy Kuberentes Charm
Bundles that are available locally (directly
inside the vnf descriptor).
Change-Id: Ib2e191df5f905ba909f935f2005347d2cf83da74
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
- <URL_where_to_fetch_juju_bundle>
"""
- <URL_where_to_fetch_juju_bundle>
"""
+ previous_workdir = os.getcwd()
+
bundle = kdu_model
if kdu_model.startswith("cs:"):
bundle = kdu_model
bundle = kdu_model
if kdu_model.startswith("cs:"):
bundle = kdu_model
# Download the file
pass
else:
# Download the file
pass
else:
+ new_workdir = kdu_model.strip(kdu_model.split("/")[-1])
- # if kdu_model.endswith(".tar.gz") or kdu_model.endswith(".tgz")
- # Uncompress temporarily
- # bundle = <uncompressed file>
- pass
+ os.chdir(new_workdir)
+
+ bundle = "local:{}".format(kdu_model)
if not bundle:
# Raise named exception that the bundle could not be found
if not bundle:
# Raise named exception that the bundle could not be found
self.log.debug("All units active.")
except concurrent.futures._base.TimeoutError:
self.log.debug("All units active.")
except concurrent.futures._base.TimeoutError:
+ os.chdir(previous_workdir)
self.log.debug("[install] Timeout exceeded; resetting cluster")
await self.reset(cluster_uuid)
return False
self.log.debug("[install] Timeout exceeded; resetting cluster")
await self.reset(cluster_uuid)
return False
self.log.debug("[install] Disconnecting model")
await model.disconnect()
self.log.debug("[install] Disconnecting model")
await model.disconnect()
+ os.chdir(previous_workdir)
+
return kdu_instance
raise Exception("Unable to install")
return kdu_instance
raise Exception("Unable to install")