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 12 matching lines...) Expand all Loading... |
23 | 23 |
24 from charmhelpers import make_charm_config_file | 24 from charmhelpers import make_charm_config_file |
25 | 25 |
26 from helpers import ( | 26 from helpers import ( |
27 command, | 27 command, |
28 juju, | 28 juju, |
29 wait_for_unit, | 29 wait_for_unit, |
30 ) | 30 ) |
31 | 31 |
32 | 32 |
33 rsync = command('rsync', '-a', '--exclude', '.bzr', '--exclude', '.venv') | 33 rsync = command('rsync', '-a', '--exclude', '.bzr', '--exclude', '/tests') |
34 | 34 |
35 | 35 |
36 def setup_repository(name, source, series='precise'): | 36 def setup_repository(name, source, series='precise'): |
37 """Create a temporary Juju repository to use for charm deployment. | 37 """Create a temporary Juju repository to use for charm deployment. |
38 | 38 |
39 Copy the charm files in source in the precise repository section, using the | 39 Copy the charm files in source in the precise repository section, using the |
40 provided charm name and excluding the virtualenv and Bazaar directories. | 40 provided charm name and excluding the virtualenv and Bazaar directories. |
41 | 41 |
42 Return the repository path. | 42 Return the repository path. |
43 """ | 43 """ |
(...skipping 27 matching lines...) Expand all Loading... |
71 args.extend(['--to', str(force_machine)]) | 71 args.extend(['--to', str(force_machine)]) |
72 args.append('local:{}/{}'.format(series, charm)) | 72 args.append('local:{}/{}'.format(series, charm)) |
73 juju(*args) | 73 juju(*args) |
74 juju('expose', charm) | 74 juju('expose', charm) |
75 return wait_for_unit(charm) | 75 return wait_for_unit(charm) |
76 | 76 |
77 | 77 |
78 if __name__ == '__main__': | 78 if __name__ == '__main__': |
79 unit = juju_deploy('juju-gui') | 79 unit = juju_deploy('juju-gui') |
80 print(json.dumps(unit, indent=2)) | 80 print(json.dumps(unit, indent=2)) |
OLD | NEW |