OLD | NEW |
1 # This file is part of the Juju GUI, which lets users view and manage Juju | 1 # This file is part of the Juju GUI, which lets users view and manage Juju |
2 # environments within a graphical interface (https://launchpad.net/juju-gui). | 2 # environments within a graphical interface (https://launchpad.net/juju-gui). |
3 # Copyright (C) 2012-2013 Canonical Ltd. | 3 # Copyright (C) 2012-2013 Canonical Ltd. |
4 # | 4 # |
5 # This program is free software: you can redistribute it and/or modify it under | 5 # This program is free software: you can redistribute it and/or modify it under |
6 # the terms of the GNU Affero General Public License version 3, as published by | 6 # the terms of the GNU Affero General Public License version 3, as published by |
7 # the Free Software Foundation. | 7 # the Free Software Foundation. |
8 # | 8 # |
9 # This program is distributed in the hope that it will be useful, but WITHOUT | 9 # This program is distributed in the hope that it will be useful, but WITHOUT |
10 # ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, | 10 # ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 from charmhelpers import make_charm_config_file | 27 from charmhelpers import make_charm_config_file |
28 | 28 |
29 from helpers import ( | 29 from helpers import ( |
30 command, | 30 command, |
31 juju, | 31 juju, |
32 wait_for_unit, | 32 wait_for_unit, |
33 ) | 33 ) |
34 | 34 |
35 | 35 |
36 rsync = command('rsync', '-a', '--exclude', '.bzr', '--exclude', '/tests') | 36 rsync = command('rsync', '-a', |
| 37 '--exclude', '.git', |
| 38 '--exclude', '.bzr', |
| 39 '--exclude', '/tests') |
37 | 40 |
38 | 41 |
39 def setup_repository(name, source, series='precise'): | 42 def setup_repository(name, source, series='precise'): |
40 """Create a temporary Juju repository to use for charm deployment. | 43 """Create a temporary Juju repository to use for charm deployment. |
41 | 44 |
42 Copy the charm files in source in the precise repository section, using the | 45 Copy the charm files in source in the precise repository section, using the |
43 provided charm name and excluding the virtualenv and Bazaar directories. | 46 provided charm name and excluding the virtualenv and Bazaar directories. |
44 | 47 |
45 Return the repository path. | 48 Return the repository path. |
46 """ | 49 """ |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 logging.debug('exposing {}'.format(service_name)) | 91 logging.debug('exposing {}'.format(service_name)) |
89 juju('expose', service_name) | 92 juju('expose', service_name) |
90 logging.debug('waiting for the unit to be ready') | 93 logging.debug('waiting for the unit to be ready') |
91 return wait_for_unit(service_name) | 94 return wait_for_unit(service_name) |
92 | 95 |
93 | 96 |
94 if __name__ == '__main__': | 97 if __name__ == '__main__': |
95 logging.getLogger().setLevel(logging.DEBUG) | 98 logging.getLogger().setLevel(logging.DEBUG) |
96 unit = juju_deploy('juju-gui') | 99 unit = juju_deploy('juju-gui') |
97 print(json.dumps(unit, indent=2)) | 100 print(json.dumps(unit, indent=2)) |
OLD | NEW |