| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1 | class Cloud(object): |
| 2 | """Cloud |
| 3 | |
| 4 | :ivar name: Name of the cloud |
| 5 | |
| 6 | """ |
| 7 | def add_credential(self, credential): |
| 8 | """Add or replaces credentials for this cloud. |
| 9 | |
| 10 | :param `juju.Credential` credential: The Credential to add |
| 11 | |
| 12 | """ |
| 13 | raise NotImplementedError() |
| 14 | |
| 15 | def get_credentials(self): |
| 16 | """Return list of all credentials for this cloud. |
| 17 | |
| 18 | """ |
| 19 | raise NotImplementedError() |
| 20 | |
| 21 | def remove_credential(self, credential_name): |
| 22 | """Remove a credential for this cloud. |
| 23 | |
| 24 | :param str credential_name: Name of the credential to remove |
| 25 | |
| 26 | """ |
| 27 | raise NotImplementedError() |
| 28 | |
| 29 | def bootstrap( |
| 30 | self, controller_name, region=None, agent_version=None, |
| 31 | auto_upgrade=False, bootstrap_constraints=None, |
| 32 | bootstrap_series=None, config=None, constraints=None, |
| 33 | credential=None, default_model=None, keep_broken=False, |
| 34 | metadata_source=None, no_gui=False, to=None, |
| 35 | upload_tools=False): |
| 36 | |
| 37 | """Initialize a cloud environment. |
| 38 | |
| 39 | :param str controller_name: Name of controller to create |
| 40 | :param str region: Cloud region in which to bootstrap |
| 41 | :param str agent_version: Version of tools to use for Juju agents |
| 42 | :param bool auto_upgrade: Upgrade to latest path release tools on first |
| 43 | bootstrap |
| 44 | :param bootstrap_constraints: Constraints for the bootstrap machine |
| 45 | :type bootstrap_constraints: :class:`juju.Constraints` |
| 46 | :param str bootstrap_series: Series of the bootstrap machine |
| 47 | :param dict config: Controller configuration |
| 48 | :param constraints: Default constraints for all future workload |
| 49 | machines |
| 50 | :type constraints: :class:`juju.Constraints` |
| 51 | :param credential: Credential to use when bootstrapping |
| 52 | :type credential: :class:`juju.Credential` |
| 53 | :param str default_model: Name to give the default model |
| 54 | :param bool keep_broken: Don't destroy model if bootstrap fails |
| 55 | :param str metadata_source: Local path to use as tools and/or metadata |
| 56 | source |
| 57 | :param bool no_gui: Don't install the Juju GUI in the controller when |
| 58 | bootstrapping |
| 59 | :param str to: Placement directive for bootstrap node (typically used |
| 60 | with MAAS) |
| 61 | :param bool upload_tools: Upload local version of tools before |
| 62 | bootstrapping |
| 63 | |
| 64 | """ |
| 65 | raise NotImplementedError() |
| 66 | |
| 67 | def set_default_credential(self, credential_name): |
| 68 | """Set the default credentials for this cloud. |
| 69 | |
| 70 | :param str credential_name: Credential to make default |
| 71 | |
| 72 | """ |
| 73 | raise NotImplementedError() |
| 74 | |
| 75 | def set_default_region(self, region): |
| 76 | """Set the default region for this cloud. |
| 77 | |
| 78 | :param str region: Name of region to make default |
| 79 | |
| 80 | """ |
| 81 | raise NotImplementedError() |