From: Tim Van Steenburgh Date: Thu, 19 May 2016 02:05:21 +0000 (-0400) Subject: More work on params, docstrings X-Git-Tag: 0.1.0~104 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=31063e719029bcb9c6b65c210156cf920375c4da;p=osm%2FN2VC.git More work on params, docstrings --- diff --git a/juju/cloud.py b/juju/cloud.py index b1a1276..f569af1 100644 --- a/juju/cloud.py +++ b/juju/cloud.py @@ -18,9 +18,11 @@ class Cloud(object): """ pass - def remove_credential(self): + def remove_credential(self, credential_name): """Remove a credential for this cloud. + :param str credential_name: Name of the credential to remove + """ pass diff --git a/juju/controller.py b/juju/controller.py index d7911a5..b15c687 100644 --- a/juju/controller.py +++ b/juju/controller.py @@ -88,9 +88,11 @@ class Controller(object): """ pass - def get_users(self): + def get_users(self, all_=False): """Return list of users that can connect to this controller. + :param bool all_: Include disabled users + """ pass @@ -100,9 +102,12 @@ class Controller(object): """ pass - def logout(self): + def logout(self, force=False): """Log out of this controller. + :param bool force: Don't fail even if user not previously logged in + with a password + """ pass diff --git a/juju/juju.py b/juju/juju.py index 45e5c9e..b2c6152 100644 --- a/juju/juju.py +++ b/juju/juju.py @@ -73,6 +73,8 @@ class Juju(object): def register(self, registration_string): """Register a user to a controller. + :param str registration_string: The registration string + """ pass diff --git a/juju/model.py b/juju/model.py index e6fcda1..83f9511 100644 --- a/juju/model.py +++ b/juju/model.py @@ -264,21 +264,30 @@ class Model(object): pass get_ssh_keys = get_ssh_key - def get_storage(self): + def get_storage(self, filesystem=False, volume=False): """Return details of storage instances. + :param bool filesystem: Include filesystem storage + :param bool volume: Include volume storage + """ pass - def get_storage_pools(self): + def get_storage_pools(self, names=None, providers=None): """Return list of storage pools. + :param list names: Only include pools with these names + :param list providers: Only include pools for these providers + """ pass - def get_subnets(self): + def get_subnets(self, space=None, zone=None): """Return list of known subnets. + :param str space: Only include subnets in this space + :param str zone: Only include subnets in this zone + """ pass @@ -288,37 +297,41 @@ class Model(object): """ pass - def remove_backup(self): + def remove_backup(self, backup_id): """Delete a backup. + :param str backup_id: The id of the backup to remove + """ pass - def remove_cached_images(self): + def remove_cached_images(self, arch=None, kind=None, series=None): """Remove cached OS images. + :param str arch: Architecture of the images to remove + :param str kind: Image kind to remove, e.g. 'lxd' + :param str series: Image series to remove, e.g. 'xenial' + """ pass - def remove_machine(self): + def remove_machine(self, *machine_ids): """Remove a machine from this model. + :param str \*machine_ids: Ids of the machines to remove + """ pass remove_machines = remove_machine - def remove_ssh_key(self): + def remove_ssh_key(self, *keys): """Remove a public SSH key(s) from this model. - """ - pass - remove_ssh_keys = remove_ssh_key - - def resolved(self): - """Mark unit errors resolved. + :param str \*keys: Keys to remove """ pass + remove_ssh_keys = remove_ssh_key def restore_backup(self): """Restore a backup archive to a new controller. diff --git a/juju/unit.py b/juju/unit.py index 6450691..0e031e2 100644 --- a/juju/unit.py +++ b/juju/unit.py @@ -31,6 +31,14 @@ class Unit(object): """ pass + def resolved(self, retry=False): + """Mark unit errors resolved. + + :param bool retry: Re-execute failed hooks + + """ + pass + def run(self): """Run command on this unit.