diff options
author | chenjiankun <chenjiankun1@huawei.com> | 2017-01-16 09:17:48 +0000 |
---|---|---|
committer | chenjiankun <chenjiankun1@huawei.com> | 2017-01-16 09:18:44 +0000 |
commit | fa3afbcac13e1aa3ae9cc2977dcb4cd882112f6f (patch) | |
tree | b9884b84f976f5d75d22b447d38f3c49e4a947fd /yardstick/benchmark/contexts/heat.py | |
parent | f036e9898a69f5041f9cde02e3652c29e2de1643 (diff) |
Use """ to replace ''' in docstring
JIRA: YARDSTICK-525
For consistency, we always use """triple double quotes""" around
docstrings.
Change-Id: I47a20bbd8b55bc544b4841ea4006929af0a044ac
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
Diffstat (limited to 'yardstick/benchmark/contexts/heat.py')
-rw-r--r-- | yardstick/benchmark/contexts/heat.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py index 0b2fbdcd6..0346efcf4 100644 --- a/yardstick/benchmark/contexts/heat.py +++ b/yardstick/benchmark/contexts/heat.py @@ -31,7 +31,7 @@ LOG = logging.getLogger(__name__) class HeatContext(Context): - '''Class that represents a context in the logical model''' + """Class that represents a context in the logical model""" __context_type__ = "Heat" @@ -58,7 +58,7 @@ class HeatContext(Context): super(self.__class__, self).__init__() def init(self, attrs): - '''initializes itself from the supplied arguments''' + """initializes itself from the supplied arguments""" self.name = attrs["name"] if "user" in attrs: @@ -101,21 +101,21 @@ class HeatContext(Context): @property def image(self): - '''returns application's default image name''' + """returns application's default image name""" return self._image @property def flavor(self): - '''returns application's default flavor name''' + """returns application's default flavor name""" return self._flavor @property def user(self): - '''return login user name corresponding to image''' + """return login user name corresponding to image""" return self._user def _add_resources_to_template(self, template): - '''add to the template the resources represented by this context''' + """add to the template the resources represented by this context""" template.add_keypair(self.keypair_name, self.key_uuid) template.add_security_group(self.secgroup_name) @@ -200,7 +200,7 @@ class HeatContext(Context): server.add_to_template(template, self.networks, {}) def deploy(self): - '''deploys template into a stack using cloud''' + """deploys template into a stack using cloud""" print("Deploying context '%s'" % self.name) heat_template = HeatTemplate(self.name, self.template_file, @@ -232,7 +232,7 @@ class HeatContext(Context): print("Context '%s' deployed" % self.name) def undeploy(self): - '''undeploys stack from cloud''' + """undeploys stack from cloud""" if self.stack: print("Undeploying context '%s'" % self.name) self.stack.delete() @@ -247,10 +247,10 @@ class HeatContext(Context): LOG.exception("Key filename %s", self.key_filename) def _get_server(self, attr_name): - '''lookup server info by name from context + """lookup server info by name from context attr_name: either a name for a server created by yardstick or a dict with attribute name mapping when using external heat templates - ''' + """ key_filename = pkg_resources.resource_filename( 'yardstick.resources', 'files/yardstick_key-' + get_short_key_uuid(self.key_uuid)) |