From e12851f2df398d12359b2aef1406748be426a694 Mon Sep 17 00:00:00 2001 From: Edgar Magana Date: Tue, 4 Aug 2015 08:03:20 -0700 Subject: [PATCH] Fix typos in neutron code Fix typos found in neutron code and docs Change-Id: I4afc3a4b36dd47d47d1238ac22e7f09e2d75050d Related-Bug: #1424139 --- neutron/db/flavors_db.py | 2 +- neutron/tests/common/conn_testers.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/neutron/db/flavors_db.py b/neutron/db/flavors_db.py index 75f5241be9b..8dc3f2edf3a 100644 --- a/neutron/db/flavors_db.py +++ b/neutron/db/flavors_db.py @@ -276,7 +276,7 @@ class FlavorManager(common_db_mixin.CommonDbMixin): sp = service_profile['service_profile'] with context.session.begin(subtransactions=True): driver_klass = self._load_dummy_driver(sp['driver']) - # 'get_service_type' must be a static method so it cant be changed + # 'get_service_type' must be a static method so it can't be changed svc_type = DummyServiceDriver.get_service_type() sp_db = ServiceProfile(id=uuidutils.generate_uuid(), diff --git a/neutron/tests/common/conn_testers.py b/neutron/tests/common/conn_testers.py index 2de8f422dec..7d04831e02d 100644 --- a/neutron/tests/common/conn_testers.py +++ b/neutron/tests/common/conn_testers.py @@ -154,11 +154,12 @@ class ConnectionTester(fixtures.Fixture): dst_port_info = str() src_port_info = str() if dst_port is not None: - dst_port_info = " and destionation port %d" % dst_port + dst_port_info = " and destination port %d" % dst_port if src_port is not None: src_port_info = " and source port %d" % src_port - raise ConnectionTesterException("%s connection with %s protocol%s" - "%s was established but it " + raise ConnectionTesterException("%s connection with protocol %s, " + "source port %s, destination " + "port %s was established but it " "shouldn't be possible" % ( direction, protocol, src_port_info, dst_port_info)) @@ -191,8 +192,8 @@ class ConnectionTester(fixtures.Fixture): pass else: raise ConnectionTesterException( - 'Established %s connection with protocol %s, source port %s, ' - 'destination port %s can still send packets throught' % ( + 'Established %s connection with protocol %s, source port %s, ' + 'destination port %s can still send packets through' % ( direction, protocol, src_port, dst_port)) @_validate_direction