Bug 1983 fixed: added the possibility to deploy bundles from the Charm Hub 59/11859/3
authorPedro Escaleira <escaleira@av.it.pt>
Tue, 5 Apr 2022 20:01:37 +0000 (21:01 +0100)
committerPedro Escaleira <escaleira@av.it.pt>
Wed, 6 Apr 2022 16:02:10 +0000 (17:02 +0100)
Also upgraded the version of the juju library to 2.9.8 (and made the
necessary changes to the code to work with this version), once the
previous version didn't supported Bundles from the Charm Hub

Change-Id: I34d87dff75b4e77fdbdaef0eaf4da565b0bf213b
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
n2vc/k8s_juju_conn.py
n2vc/libjuju.py
requirements.in
requirements.txt

index 5241d96..d9dc607 100644 (file)
@@ -303,6 +303,10 @@ class K8sJujuConnector(K8sConnector):
             raise K8sException("bundle must be set")
 
         if bundle.startswith("cs:"):
+            # For Juju Bundles provided by the Charm Store
+            pass
+        elif bundle.startswith("ch:"):
+            # For Juju Bundles provided by the Charm Hub (this only works for juju version >= 2.9)
             pass
         elif bundle.startswith("http"):
             # Download the file
index a903860..0c0180f 100644 (file)
@@ -95,7 +95,7 @@ class Libjuju:
         """
         controller = None
         try:
-            controller = Controller(loop=self.loop)
+            controller = Controller()
             await asyncio.wait_for(
                 controller.connect(
                     endpoint=self.vca_connection.data.endpoints,
index ce72c77..576d1ff 100644 (file)
@@ -13,7 +13,7 @@
 #     limitations under the License.
 
 async-timeout<4
-juju==2.9.4
+juju==2.9.8
 kubernetes
 motor==1.3.1
 pyasn1
index c4aaea6..ef0d3a9 100644 (file)
@@ -39,7 +39,7 @@ google-auth==2.3.3
     # via kubernetes
 idna==3.3
     # via requests
-juju==2.9.4
+juju==2.9.8
     # via -r requirements.in
 jujubundlelib==0.5.7
     # via theblues