From b64327bb58139f1e1f770b16492968423f011eab Mon Sep 17 00:00:00 2001 From: Tim Van Steenburgh Date: Fri, 9 Dec 2016 12:26:21 -0500 Subject: [PATCH] s/service_name/application_name/g --- docs/index.rst | 2 +- examples/config.py | 2 +- examples/controller.py | 2 +- examples/deploy.py | 2 +- examples/future.py | 4 ++-- examples/relate.py | 4 ++-- examples/unitrun.py | 2 +- juju/model.py | 10 +++++----- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 93479ce..a38e3a4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -70,7 +70,7 @@ and in the documentation. # stable channel of the Charm Store. ubuntu_app = await model.deploy( 'ubuntu-0', - service_name='ubuntu', + application_name='ubuntu', series='xenial', channel='stable', ) diff --git a/examples/config.py b/examples/config.py index eda9891..579308b 100644 --- a/examples/config.py +++ b/examples/config.py @@ -22,7 +22,7 @@ async def run(): ubuntu_app = await model.deploy( 'mysql', - service_name='mysql', + application_name='mysql', series='trusty', channel='stable', config={ diff --git a/examples/controller.py b/examples/controller.py index 7bd4b03..7e7f0da 100644 --- a/examples/controller.py +++ b/examples/controller.py @@ -24,7 +24,7 @@ async def run(): ) await model.deploy( 'ubuntu-0', - service_name='ubuntu', + application_name='ubuntu', series='trusty', channel='stable', ) diff --git a/examples/deploy.py b/examples/deploy.py index d7ca29a..7887d24 100644 --- a/examples/deploy.py +++ b/examples/deploy.py @@ -51,7 +51,7 @@ async def run(): await model.deploy( 'ubuntu-0', - service_name='ubuntu', + application_name='ubuntu', series='trusty', channel='stable', ) diff --git a/examples/future.py b/examples/future.py index dd3d04b..d0dd463 100644 --- a/examples/future.py +++ b/examples/future.py @@ -16,7 +16,7 @@ async def run(): goal_state = Model.from_yaml('bundle-like-thing') ubuntu_app = await model.deploy( 'ubuntu-0', - service_name='ubuntu', + application_name='ubuntu', series='trusty', channel='stable', ) @@ -24,7 +24,7 @@ async def run(): await model.deploy( 'nrpe-11', - service_name='nrpe', + application_name='nrpe', series='trusty', channel='stable', num_units=0, diff --git a/examples/relate.py b/examples/relate.py index 8e42bab..01cee37 100644 --- a/examples/relate.py +++ b/examples/relate.py @@ -48,7 +48,7 @@ async def run(): ubuntu_app = await model.deploy( 'ubuntu', - service_name='ubuntu', + application_name='ubuntu', series='trusty', channel='stable', ) @@ -75,7 +75,7 @@ async def run(): )) await model.deploy( 'nrpe', - service_name='nrpe', + application_name='nrpe', series='trusty', channel='stable', num_units=1, diff --git a/examples/unitrun.py b/examples/unitrun.py index a5b294b..0436259 100644 --- a/examples/unitrun.py +++ b/examples/unitrun.py @@ -38,7 +38,7 @@ async def run(): await model.deploy( 'ubuntu-0', - service_name='ubuntu', + application_name='ubuntu', series='trusty', channel='stable', ) diff --git a/juju/model.py b/juju/model.py index 7464e2c..e2d3d52 100644 --- a/juju/model.py +++ b/juju/model.py @@ -809,14 +809,14 @@ class Model(object): pass async def deploy( - self, entity_url, service_name=None, bind=None, budget=None, + self, entity_url, application_name=None, bind=None, budget=None, channel=None, config=None, constraints=None, force=False, num_units=1, plan=None, resources=None, series=None, storage=None, to=None): """Deploy a new service or bundle. :param str entity_url: Charm or bundle url - :param str service_name: Name to give the service + :param str application_name: Name to give the service :param dict bind: : pairs :param dict budget: : pairs :param str channel: Charm store channel from which to retrieve @@ -842,7 +842,7 @@ class Model(object): TODO:: - - service_name is required; fill this in automatically if not + - application_name is required; fill this in automatically if not provided by caller - series is required; how do we pick a default? @@ -896,7 +896,7 @@ class Model(object): await client_facade.AddCharm(channel, entity_id) app = client.ApplicationDeploy( - application=service_name, + application=application_name, channel=channel, charm_url=entity_id, config=config, @@ -910,7 +910,7 @@ class Model(object): ) await app_facade.Deploy([app]) - return await self._wait_for_new('application', service_name) + return await self._wait_for_new('application', application_name) def destroy(self): """Terminate all machines and resources for this model. -- 2.17.1