X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=juju%2Fservice.py;h=39570b85b173052e54cf86c1523a1de1c5dc97d8;hb=7fb6b71a8ad5352d15c9a60136962452280917ab;hp=007306a82748d3fce2c5f34f96b0f3172d92d60d;hpb=79da3cabfd6f424ebf303095600d78e1fb1311f2;p=osm%2FN2VC.git diff --git a/juju/service.py b/juju/service.py index 007306a..39570b8 100644 --- a/juju/service.py +++ b/juju/service.py @@ -101,33 +101,46 @@ class Service(object): """ pass - def run(self): + def run(self, command, timeout=None): """Run command on all units for this service. + :param str command: The command to run + :param int timeout: Time to wait before command is considered failed + """ pass - def set_config(self): + def set_config(self, to_default=False, **config): """Set configuration options for this service. + :param bool to_default: Set service options to default values + :param \*\*config: Config key/values + """ pass - def set_constraints(self): + def set_constraints(self, constraints): """Set machine constraints for this service. + :param :class:`juju.Constraints` constraints: Machine constraints + """ pass - def set_meter_status(self): + def set_meter_status(self, status, info=None): """Set the meter status on this status. + :param str status: Meter status, e.g. 'RED', 'AMBER' + :param str info: Extra info message + """ pass - def set_plan(self): + def set_plan(self, plan_name): """Set the plan for this service, effective immediately. + :param str plan_name: Name of plan + """ pass @@ -137,14 +150,29 @@ class Service(object): """ pass - def update_allocation(self): + def update_allocation(self, allocation): """Update existing allocation for this service. + :param int allocation: The allocation to set + """ pass - def upgrade_charm(self): + def upgrade_charm( + self, channel=None, force_series=False, force_units=False, + path=None, resources=None, revision=-1, switch=None): """Upgrade the charm for this service. + :param str channel: Channel to use when getting the charm from the + charm store, e.g. 'development' + :param bool force_series: Upgrade even if series of deployed service + is not supported by the new charm + :param bool force_units: Upgrade all units immediately, even if in + error state + :param str path: Uprade to a charm located at path + :param dict resources: Dictionary of resource name/filepath pairs + :param int revision: Explicit upgrade revision + :param str switch: Crossgrade charm url + """ pass