Add multicloud controller support 03/8703/2
authorDominik Fleischmann <dominik.fleischmann@canonical.com>
Thu, 19 Mar 2020 09:32:55 +0000 (10:32 +0100)
committerDominik Fleischmann <dominik.fleischmann@canonical.com>
Thu, 19 Mar 2020 09:36:33 +0000 (10:36 +0100)
This commit depends on 8702. As it needs
the cloud VCA config variable.
https://osm.etsi.org/gerrit/#/c/osm/LCM/+/8702/

Change-Id: If55cebd90ad69f0c09a4e6f27e63c1c5aff5d34f
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
n2vc/n2vc_juju_conn.py

index c6c9890..f57b008 100644 (file)
@@ -168,6 +168,7 @@ class N2VCJujuConnector(N2VCConnector):
         else:
             self.apt_mirror = None
 
+        self.cloud = vca_config.get('cloud')
         self.log.debug('Arguments have been checked')
 
         # juju data
@@ -1166,7 +1167,8 @@ class N2VCJujuConnector(N2VCConnector):
 
                 model = await self.controller.add_model(
                     model_name=model_name,
-                    config=config_dict
+                    config=config_dict,
+                    cloud_name=self.cloud,
                 )
                 self.log.info('New model created, name={}'.format(model_name))
             else: