From 2b8d66466df6183e5f3e75b07416c2c3366fa3bf Mon Sep 17 00:00:00 2001 From: melissaml Date: Thu, 24 May 2018 15:13:22 +0800 Subject: [PATCH] fix typos in documentation and codes Change-Id: I962036afb1a1e59142ae673c54d32f249bad2280 --- README.md | 2 +- charms_openstack/charm/classes.py | 8 ++++---- unit_tests/charms_openstack/charm/test_classes.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 768ba66..8703413 100644 --- a/README.md +++ b/README.md @@ -323,7 +323,7 @@ That if `required_relations` is `['identity-service']`, then the `identity-service.available` states. If the charm author requires additional states to be checked for an interface, -then the method `states_to_check` should be overriden in the derived class and +then the method `states_to_check` should be overridden in the derived class and additional states, the status and error message provided. See the code for further details. diff --git a/charms_openstack/charm/classes.py b/charms_openstack/charm/classes.py index 656a88b..fbed420 100644 --- a/charms_openstack/charm/classes.py +++ b/charms_openstack/charm/classes.py @@ -181,7 +181,7 @@ class OpenStackAPICharm(OpenStackCharm): # If None, then the default ConfigurationAdapter is used. configuration_class = os_adapters.APIConfigurationAdapter - # These can be overriden in the derived charm class to allow specialism of + # These can be overridden in the derived charm class to allow specialism of # config files. These values are read in the APIConfigurationAdapter and # used to furnish the dictionary provided from the property # 'wsgi_worker_context'. e.g. config.wsgi_worker_context.processes would @@ -238,13 +238,13 @@ class OpenStackAPICharm(OpenStackCharm): def get_amqp_credentials(self): """Provide the default amqp username and vhost as a tuple. - This needs to be overriden in a derived class to provide the username + This needs to be overridden in a derived class to provide the username and vhost to the amqp interface IF the default amqp handlers are being used. :returns (username, host): two strings to send to the amqp provider. """ raise RuntimeError( - "get_amqp_credentials() needs to be overriden in the derived " + "get_amqp_credentials() needs to be overridden in the derived " "class") def get_database_setup(self): @@ -270,7 +270,7 @@ class OpenStackAPICharm(OpenStackCharm): :returns [{'database': ...}, ...]: credentials for multiple databases """ raise RuntimeError( - "get_database_setup() needs to be overriden in the derived " + "get_database_setup() needs to be overridden in the derived " "class") def get_certificate_requests(self): diff --git a/unit_tests/charms_openstack/charm/test_classes.py b/unit_tests/charms_openstack/charm/test_classes.py index 01bf791..2b34e67 100644 --- a/unit_tests/charms_openstack/charm/test_classes.py +++ b/unit_tests/charms_openstack/charm/test_classes.py @@ -335,12 +335,12 @@ class TestOpenStackAPICharm(BaseOpenStackCharmTest): self.assertEqual(self.target.token_cache_pkgs(), []) def test_get_amqp_credentials(self): - # verify that the instance throws an error if not overriden + # verify that the instance throws an error if not overridden with self.assertRaises(RuntimeError): self.target.get_amqp_credentials() def test_get_database_setup(self): - # verify that the instance throws an error if not overriden + # verify that the instance throws an error if not overridden with self.assertRaises(RuntimeError): self.target.get_database_setup()