Merge pull request #43 from juju/feature/get-controller-cloud
authorTim Van Steenburgh <tvansteenburgh@gmail.com>
Thu, 5 Jan 2017 21:59:01 +0000 (16:59 -0500)
committerGitHub <noreply@github.com>
Thu, 5 Jan 2017 21:59:01 +0000 (16:59 -0500)
Add ability to get cloud for controller

1  2 
juju/model.py

diff --combined juju/model.py
@@@ -931,7 -931,10 +931,10 @@@ class Model(object)
                  storage=storage,
              )
  
-             await app_facade.Deploy([app])
+             result = await app_facade.Deploy([app])
+             errors = [r.error.message for r in result.results if r.error]
+             if errors:
+                 raise JujuError('\n'.join(errors))
              return await self._wait_for_new('application', application_name)
  
      def destroy(self):
              's' if len(unit_names) == 1 else '',
              ' '.join(unit_names))
  
 -        return await app_facade.Destroy(self.name)
 +        return await app_facade.DestroyUnits(list(unit_names))
      destroy_units = destroy_unit
  
      def get_backup(self, archive_id):