| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1 | class Juju(object): |
| 2 | def add_cloud(self, name, definition, replace=False): |
| 3 | """Add a user-defined cloud to Juju from among known cloud types. |
| 4 | |
| 5 | :param str name: Name of cloud |
| 6 | :param dict definition: Cloud definition |
| 7 | |
| 8 | Example cloud definition, as yaml:: |
| 9 | |
| 10 | type: openstack |
| 11 | auth-types: [ userpass ] |
| 12 | regions: |
| 13 | london: |
| 14 | endpoint: https://london.mycloud.com:35574/v3.0/ |
| 15 | |
| 16 | """ |
| 17 | raise NotImplementedError() |
| 18 | |
| 19 | def agree(self, *terms): |
| 20 | """Agree to the terms of a charm. |
| 21 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 22 | :param str *terms: Terms to agree to |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 23 | |
| 24 | """ |
| 25 | raise NotImplementedError() |
| 26 | |
| 27 | def autoload_credentials(self): |
| 28 | """Finds cloud credentials and caches them for use by Juju when |
| 29 | bootstrapping. |
| 30 | |
| 31 | """ |
| 32 | raise NotImplementedError() |
| 33 | |
| 34 | def create_budget(self): |
| 35 | """Create a new budget. |
| 36 | |
| 37 | """ |
| 38 | raise NotImplementedError() |
| 39 | |
| 40 | def get_agreements(self): |
| 41 | """Return list of terms to which the current user has agreed. |
| 42 | |
| 43 | """ |
| 44 | raise NotImplementedError() |
| 45 | |
| 46 | def get_budgets(self): |
| 47 | """Return list of available budgets. |
| 48 | |
| 49 | """ |
| 50 | raise NotImplementedError() |
| 51 | |
| 52 | def get_clouds(self): |
| 53 | """Return list of all available clouds. |
| 54 | |
| 55 | """ |
| 56 | raise NotImplementedError() |
| 57 | |
| 58 | def get_controllers(self): |
| 59 | """Return list of all available controllers. |
| 60 | |
| 61 | (maybe move this to Cloud?) |
| 62 | """ |
| 63 | raise NotImplementedError() |
| 64 | |
| 65 | def get_plans(self, charm_url): |
| 66 | """Return list of plans available for the specified charm. |
| 67 | |
| 68 | :param str charm_url: Charm url |
| 69 | |
| 70 | """ |
| 71 | raise NotImplementedError() |
| 72 | |
| 73 | def register(self, registration_string): |
| 74 | """Register a user to a controller. |
| 75 | |
| 76 | :param str registration_string: The registration string |
| 77 | |
| 78 | """ |
| 79 | raise NotImplementedError() |
| 80 | |
| 81 | def set_budget(self, name, limit): |
| 82 | """Set a monthly budget limit. |
| 83 | |
| 84 | :param str name: Name of budget |
| 85 | :param int limit: Monthly limit |
| 86 | |
| 87 | """ |
| 88 | raise NotImplementedError() |
| 89 | |
| 90 | def get_cloud(self, name): |
| 91 | """Get a cloud by name. |
| 92 | |
| 93 | :param str name: Name of cloud |
| 94 | |
| 95 | """ |
| 96 | raise NotImplementedError() |
| 97 | |
| 98 | def get_controller(self, name, include_passwords=False): |
| 99 | """Get a controller by name. |
| 100 | |
| 101 | :param str name: Name of controller |
| 102 | :param bool include_passwords: Include passwords for accounts |
| 103 | |
| 104 | (maybe move this to Cloud?) |
| 105 | """ |
| 106 | raise NotImplementedError() |
| 107 | |
| 108 | def update_clouds(self): |
| 109 | """Update public cloud info available to Juju. |
| 110 | |
| 111 | """ |
| 112 | raise NotImplementedError() |
| 113 | |
| 114 | def version(self): |
| 115 | """Return the Juju version. |
| 116 | |
| 117 | """ |
| 118 | raise NotImplementedError() |