X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fjuju.py;h=fe3ce923adb89e3effd1f1bd50b627317b2db0a6;hb=0a3b685af80dc92e039241b17e712b15994f5769;hp=b1dcabdfd002f0974314d5dacab5202ab0571c5b;hpb=3817609d3a0889b444f3cd4ffd3a72bbb21d0c9d;p=osm%2FN2VC.git diff --git a/juju/juju.py b/juju/juju.py index b1dcabd..fe3ce92 100644 --- a/juju/juju.py +++ b/juju/juju.py @@ -1,13 +1,26 @@ class Juju(object): - def add_cloud(self): + def add_cloud(self, name, definition, replace=False): """Add a user-defined cloud to Juju from among known cloud types. + :param str name: Name of cloud + :param dict definition: Cloud definition + + Example cloud definition, as yaml:: + + type: openstack + auth-types: [ userpass ] + regions: + london: + endpoint: https://london.mycloud.com:35574/v3.0/ + """ pass - def agree(self): + def agree(self, *terms): """Agree to the terms of a charm. + :param str \*terms: Terms to agree to + """ pass @@ -49,20 +62,27 @@ class Juju(object): """ pass - def get_plans(self, charm_name): + def get_plans(self, charm_url): """Return list of plans available for the specified charm. + :param str charm_url: Charm url + """ pass def register(self, registration_string): """Register a user to a controller. + :param str registration_string: The registration string + """ pass - def set_budget(self, name, amount): - """Set a budget limit. + def set_budget(self, name, limit): + """Set a monthly budget limit. + + :param str name: Name of budget + :param int limit: Monthly limit """ pass @@ -70,12 +90,17 @@ class Juju(object): def get_cloud(self, name): """Get a cloud by name. + :param str name: Name of cloud + """ pass - def get_controller(self): + def get_controller(self, name, include_passwords=False): """Get a controller by name. + :param str name: Name of controller + :param bool include_passwords: Include passwords for accounts + (maybe move this to Cloud?) """ pass