Fix minor comment typos in VPNaaS
Were a couple minor typos in comments, so fixing since looking at code: "valdiator" -> "validator" "Retreive" -> "Retrieve" "verison" -> "version" "ipser_site_connection" -> "ipsec_site_connection" Based on feedback also fixed other errors including vendor files: "minimul" -> "minimal" "implemenations" -> "implementations" "rotuer" -> "router" "processs" -> "process" "capablities" -> "capabilities" "datatbase" -> "database" "actived" -> "active" "toctree" -> "doctree" "thise" -> "these" "ot" -> "to" "conneciton" -> "connection" "itegration" -> "integration" "settions" -> "settings" "infromation" -> "information" "notificaiton" -> "notification" "visted" -> "visited" "simluates" -> "simulates" "indentify" -> "identify" Change-Id: Iea9478287fe04ade381a1d3b898967057ce5dad6 Closes-Bug: #1498614
This commit is contained in:
parent
388df45415
commit
ef39d5b77d
@ -64,7 +64,7 @@ source_suffix = '.rst'
|
|||||||
# The encoding of source files.
|
# The encoding of source files.
|
||||||
#source_encoding = 'utf-8'
|
#source_encoding = 'utf-8'
|
||||||
|
|
||||||
# The master toctree document.
|
# The master doctree document.
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
|
@ -186,7 +186,7 @@ VPNaaS.
|
|||||||
There are several attributes that are involve here. One is the subnet ID
|
There are several attributes that are involve here. One is the subnet ID
|
||||||
attribute in the VPN service API. The other is the peer CIDR attribute in
|
attribute in the VPN service API. The other is the peer CIDR attribute in
|
||||||
the IPSec connection API. Both would be specified by endpoint groups in
|
the IPSec connection API. Both would be specified by endpoint groups in
|
||||||
the new API, and thise groups would be called out in the IPSec connection
|
the new API, and these groups would be called out in the IPSec connection
|
||||||
API.
|
API.
|
||||||
|
|
||||||
A plan to meet the backward compatibility goal of allowing both APIs to
|
A plan to meet the backward compatibility goal of allowing both APIs to
|
||||||
|
@ -44,7 +44,7 @@ class VPNPluginDb(vpnaas.VPNPluginBase, base_db.CommonDbMixin):
|
|||||||
def _get_validator(self):
|
def _get_validator(self):
|
||||||
"""Obtain validator to use for attribute validation.
|
"""Obtain validator to use for attribute validation.
|
||||||
|
|
||||||
Subclasses may override this with a different valdiator, as needed.
|
Subclasses may override this with a different validator, as needed.
|
||||||
Note: some UTs will directly create a VPNPluginDb object and then
|
Note: some UTs will directly create a VPNPluginDb object and then
|
||||||
call its methods, instead of creating a VPNDriverPlugin, which
|
call its methods, instead of creating a VPNDriverPlugin, which
|
||||||
will have a service driver associated that will provide a
|
will have a service driver associated that will provide a
|
||||||
@ -523,7 +523,7 @@ class VPNPluginRpcDbMixin(object):
|
|||||||
agent = plugin._get_agent_by_type_and_host(
|
agent = plugin._get_agent_by_type_and_host(
|
||||||
context, n_constants.AGENT_TYPE_L3, host)
|
context, n_constants.AGENT_TYPE_L3, host)
|
||||||
agent_conf = plugin.get_configuration_dict(agent)
|
agent_conf = plugin.get_configuration_dict(agent)
|
||||||
# Retreive the agent_mode to check if this is the
|
# Retrieve the agent_mode to check if this is the
|
||||||
# right agent to deploy the vpn service. In the
|
# right agent to deploy the vpn service. In the
|
||||||
# case of distributed the vpn service should reside
|
# case of distributed the vpn service should reside
|
||||||
# only on a dvr_snat node.
|
# only on a dvr_snat node.
|
||||||
@ -558,7 +558,7 @@ class VPNPluginRpcDbMixin(object):
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
The agent will set updated_pending_status as True,
|
The agent will set updated_pending_status as True,
|
||||||
when agent update any pending status.
|
when agent updates any pending status.
|
||||||
"""
|
"""
|
||||||
with context.session.begin(subtransactions=True):
|
with context.session.begin(subtransactions=True):
|
||||||
for vpnservice in service_status_info_list:
|
for vpnservice in service_status_info_list:
|
||||||
|
@ -59,7 +59,7 @@ class VpnReferenceValidator(object):
|
|||||||
|
|
||||||
def validate_peer_address(self, ip_version, router):
|
def validate_peer_address(self, ip_version, router):
|
||||||
# NOTE: peer_address ip version should match with
|
# NOTE: peer_address ip version should match with
|
||||||
# at least one external gateway address ip verison.
|
# at least one external gateway address ip version.
|
||||||
# ipsec won't work with IPv6 LLA and neutron unaware GUA.
|
# ipsec won't work with IPv6 LLA and neutron unaware GUA.
|
||||||
# So to support vpnaas with ipv6, external network must
|
# So to support vpnaas with ipv6, external network must
|
||||||
# have ipv6 subnet
|
# have ipv6 subnet
|
||||||
|
@ -92,7 +92,7 @@ class CiscoCsrIPsecDriver(device_drivers.DeviceDriver):
|
|||||||
|
|
||||||
This class is designed for use with L3-agent now.
|
This class is designed for use with L3-agent now.
|
||||||
However this driver will be used with another agent in future.
|
However this driver will be used with another agent in future.
|
||||||
so the use of "Router" is kept minimul now.
|
so the use of "Router" is kept minimal now.
|
||||||
Instead of router_id, we are using process_id in this code.
|
Instead of router_id, we are using process_id in this code.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -522,8 +522,8 @@ class IPsecDriver(device_drivers.DeviceDriver):
|
|||||||
"""VPN Device Driver for IPSec.
|
"""VPN Device Driver for IPSec.
|
||||||
|
|
||||||
This class is designed for use with L3-agent now.
|
This class is designed for use with L3-agent now.
|
||||||
However this driver will be used with another agent in future.
|
However this driver will be used with another agent in future
|
||||||
so the use of "Router" is kept minimul now.
|
so the use of "Router" is kept minimal now.
|
||||||
Instead of router_id, we are using process_id in this code.
|
Instead of router_id, we are using process_id in this code.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -533,7 +533,7 @@ class IPsecDriver(device_drivers.DeviceDriver):
|
|||||||
|
|
||||||
def __init__(self, vpn_service, host):
|
def __init__(self, vpn_service, host):
|
||||||
# TODO(pc_m) Replace vpn_service with config arg, once all driver
|
# TODO(pc_m) Replace vpn_service with config arg, once all driver
|
||||||
# implemenations no longer need vpn_service.
|
# implementations no longer need vpn_service.
|
||||||
self.conf = vpn_service.conf
|
self.conf = vpn_service.conf
|
||||||
self.host = host
|
self.host = host
|
||||||
self.conn = n_rpc.create_connection(new=True)
|
self.conn = n_rpc.create_connection(new=True)
|
||||||
@ -599,7 +599,7 @@ class IPsecDriver(device_drivers.DeviceDriver):
|
|||||||
:param rule: a string of rule
|
:param rule: a string of rule
|
||||||
:param top: if top is true, the rule
|
:param top: if top is true, the rule
|
||||||
will be placed on the top of chain
|
will be placed on the top of chain
|
||||||
Note if there is no rotuer, this method do nothing
|
Note if there is no router, this method does nothing
|
||||||
"""
|
"""
|
||||||
router = self.routers.get(router_id)
|
router = self.routers.get(router_id)
|
||||||
if not router:
|
if not router:
|
||||||
@ -676,7 +676,7 @@ class IPsecDriver(device_drivers.DeviceDriver):
|
|||||||
"""Ensuring process.
|
"""Ensuring process.
|
||||||
|
|
||||||
If the process doesn't exist, it will create process
|
If the process doesn't exist, it will create process
|
||||||
and store it in self.processs
|
and store it in self.process
|
||||||
"""
|
"""
|
||||||
process = self.processes.get(process_id)
|
process = self.processes.get(process_id)
|
||||||
if not process or not process.namespace:
|
if not process or not process.namespace:
|
||||||
|
@ -139,7 +139,7 @@ class LibreSwanProcess(ipsec.OpenSwanProcess):
|
|||||||
# override or things refactored to special-case start() when
|
# override or things refactored to special-case start() when
|
||||||
# called from restart().
|
# called from restart().
|
||||||
|
|
||||||
# LibreSwan's use of the capablities library may prevent the ctl
|
# LibreSwan's use of the capabilities library may prevent the ctl
|
||||||
# and pid files from being cleaned up, so we check to see if the
|
# and pid files from being cleaned up, so we check to see if the
|
||||||
# process is running and if not, attempt a cleanup. In either case
|
# process is running and if not, attempt a cleanup. In either case
|
||||||
# we fall through to allow the LibreSwan process to start or fail
|
# we fall through to allow the LibreSwan process to start or fail
|
||||||
|
@ -109,7 +109,7 @@ class VyattaIPSecDriver(device_drivers.DeviceDriver):
|
|||||||
conn.create_consumer(node_topic, endpoints, fanout=False)
|
conn.create_consumer(node_topic, endpoints, fanout=False)
|
||||||
conn.consume_in_threads()
|
conn.consume_in_threads()
|
||||||
|
|
||||||
# initialize agent ot server RPC link
|
# initialize agent to server RPC link
|
||||||
self.server_api = NeutronServerAPI(
|
self.server_api = NeutronServerAPI(
|
||||||
topics.BROCADE_IPSEC_DRIVER_TOPIC)
|
topics.BROCADE_IPSEC_DRIVER_TOPIC)
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ def get_next_available_ipsec_policy_id(session):
|
|||||||
|
|
||||||
|
|
||||||
def find_conn_with_policy(policy_field, policy_id, conn_id, session):
|
def find_conn_with_policy(policy_field, policy_id, conn_id, session):
|
||||||
"""Return ID of another conneciton (if any) that uses same policy ID."""
|
"""Return ID of another connection (if any) that uses same policy ID."""
|
||||||
qry = session.query(vpn_models.IPsecSiteConnection.id)
|
qry = session.query(vpn_models.IPsecSiteConnection.id)
|
||||||
match = qry.filter_request(
|
match = qry.filter_request(
|
||||||
policy_field == policy_id,
|
policy_field == policy_id,
|
||||||
|
@ -1629,7 +1629,7 @@ class TestVpnaas(VPNPluginDbTestCase):
|
|||||||
class NeutronResourcesMixin(object):
|
class NeutronResourcesMixin(object):
|
||||||
|
|
||||||
def create_network(self, overrides=None):
|
def create_network(self, overrides=None):
|
||||||
"""Create datatbase entry for network."""
|
"""Create database entry for network."""
|
||||||
network_info = {'network': {'name': 'my-net',
|
network_info = {'network': {'name': 'my-net',
|
||||||
'tenant_id': self.tenant_id,
|
'tenant_id': self.tenant_id,
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
|
@ -1027,7 +1027,7 @@ class TestCsrRestIPSecConnectionCreate(CiscoCsrBaseTestCase):
|
|||||||
"""Test IPSec site-to-site connection REST requests.
|
"""Test IPSec site-to-site connection REST requests.
|
||||||
|
|
||||||
This requires us to have first created an IKE policy, IPSec policy,
|
This requires us to have first created an IKE policy, IPSec policy,
|
||||||
and pre-shared key, so it's more of an itegration test, when used
|
and pre-shared key, so it's more of an integration test, when used
|
||||||
with a real CSR (as we can't mock out these pre-conditions).
|
with a real CSR (as we can't mock out these pre-conditions).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -1545,7 +1545,7 @@ class TestCsrRestIkeKeepaliveCreate(CiscoCsrBaseTestCase):
|
|||||||
|
|
||||||
Each test case will have a normal authentication, get, and put mock
|
Each test case will have a normal authentication, get, and put mock
|
||||||
responses registered, although the test may replace them, if needed.
|
responses registered, although the test may replace them, if needed.
|
||||||
Dead Peer Detection settions will be saved for each test, and
|
Dead Peer Detection settings will be saved for each test, and
|
||||||
restored afterwards.
|
restored afterwards.
|
||||||
"""
|
"""
|
||||||
super(TestCsrRestIkeKeepaliveCreate, self).setUp(host,
|
super(TestCsrRestIkeKeepaliveCreate, self).setUp(host,
|
||||||
|
@ -127,7 +127,7 @@ class TestCiscoCsrIPSecConnection(base.BaseTestCase):
|
|||||||
peer networks), and ensure that the create steps are called in
|
peer networks), and ensure that the create steps are called in
|
||||||
order (except for create_static_route), and that the delete
|
order (except for create_static_route), and that the delete
|
||||||
steps are called in reverse order. At the end, there should be no
|
steps are called in reverse order. At the end, there should be no
|
||||||
rollback infromation for the connection.
|
rollback information for the connection.
|
||||||
"""
|
"""
|
||||||
def fake_route_check_fails(*args):
|
def fake_route_check_fails(*args):
|
||||||
if args[0] == 'Static Route':
|
if args[0] == 'Static Route':
|
||||||
@ -755,7 +755,7 @@ class TestCiscoCsrIPsecDeviceDriverSyncStatuses(base.BaseTestCase):
|
|||||||
def test_update_new_service_admin_down(self):
|
def test_update_new_service_admin_down(self):
|
||||||
"""Unknown VPN service updated to admin down state - nop.
|
"""Unknown VPN service updated to admin down state - nop.
|
||||||
|
|
||||||
Can happen if agent restarts and then gets its first notificaiton
|
Can happen if agent restarts and then gets its first notification
|
||||||
of a service that is in the admin down state. Structures will be
|
of a service that is in the admin down state. Structures will be
|
||||||
created, but forced down.
|
created, but forced down.
|
||||||
"""
|
"""
|
||||||
@ -900,7 +900,7 @@ class TestCiscoCsrIPsecDeviceDriverSyncStatuses(base.BaseTestCase):
|
|||||||
vpn_service = self.driver.create_vpn_service(self.service123_data)
|
vpn_service = self.driver.create_vpn_service(self.service123_data)
|
||||||
connection = vpn_service.create_connection(self.conn1_data)
|
connection = vpn_service.create_connection(self.conn1_data)
|
||||||
self.driver.mark_existing_connections_as_dirty()
|
self.driver.mark_existing_connections_as_dirty()
|
||||||
# Simulate that the update phase visted both of them
|
# Simulate that the update phase visited both of them
|
||||||
vpn_service.is_dirty = False
|
vpn_service.is_dirty = False
|
||||||
connection.is_dirty = False
|
connection.is_dirty = False
|
||||||
self.driver.remove_unknown_connections(self.context)
|
self.driver.remove_unknown_connections(self.context)
|
||||||
@ -970,7 +970,7 @@ class TestCiscoCsrIPsecDeviceDriverSyncStatuses(base.BaseTestCase):
|
|||||||
connection_state):
|
connection_state):
|
||||||
"""Create internal structures for single service with connection.
|
"""Create internal structures for single service with connection.
|
||||||
|
|
||||||
Creates a service and corresponding connection. Then, simluates
|
Creates a service and corresponding connection. Then, simulates
|
||||||
the mark/update/sweep operation by marking both the service and
|
the mark/update/sweep operation by marking both the service and
|
||||||
connection as clean and updating their status. Override the REST
|
connection as clean and updating their status. Override the REST
|
||||||
client created for the service, with a mock, so that all calls
|
client created for the service, with a mock, so that all calls
|
||||||
|
@ -1077,7 +1077,7 @@ class IPsecStrongswanDeviceDriverLegacy(IPSecDeviceLegacy):
|
|||||||
ipsec_site_conn[connection_id]['status'])
|
ipsec_site_conn[connection_id]['status'])
|
||||||
|
|
||||||
def test_status_handling_for_active_connection(self):
|
def test_status_handling_for_active_connection(self):
|
||||||
"""Test status handling for actived connection."""
|
"""Test status handling for active connection."""
|
||||||
router_id = self.router.router_id
|
router_id = self.router.router_id
|
||||||
connection_id = FAKE_IPSEC_SITE_CONNECTION2_ID
|
connection_id = FAKE_IPSEC_SITE_CONNECTION2_ID
|
||||||
self.driver.ensure_process(router_id, self.vpnservice)
|
self.driver.ensure_process(router_id, self.vpnservice)
|
||||||
|
@ -180,7 +180,7 @@ class VpnUtils(scenario.OpenStackScenario):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
:param nova_client: nova client
|
:param nova_client: nova client
|
||||||
:param nova_id: uuid of the nova instance whose ip is wanted
|
:param server_id: uuid of the nova instance whose ip is wanted
|
||||||
:param network_suffix: network name suffix
|
:param network_suffix: network name suffix
|
||||||
:return: ip address of the instance
|
:return: ip address of the instance
|
||||||
"""
|
"""
|
||||||
@ -249,7 +249,6 @@ class VpnUtils(scenario.OpenStackScenario):
|
|||||||
:param name: name of vpn service
|
:param name: name of vpn service
|
||||||
:param rally_subnet: local subnet
|
:param rally_subnet: local subnet
|
||||||
:param rally_router: router endpoint
|
:param rally_router: router endpoint
|
||||||
:param admin_state_up: admin state of the vpn_service
|
|
||||||
:return: vpn_service
|
:return: vpn_service
|
||||||
"""
|
"""
|
||||||
LOG.debug("CREATING VPN_SERVICE")
|
LOG.debug("CREATING VPN_SERVICE")
|
||||||
@ -279,7 +278,6 @@ class VpnUtils(scenario.OpenStackScenario):
|
|||||||
:param peer_address: peer_address
|
:param peer_address: peer_address
|
||||||
:param vpn_service: vpn_service
|
:param vpn_service: vpn_service
|
||||||
:param secret: pre shared secret
|
:param secret: pre shared secret
|
||||||
:param admin_state_up: admin state of the ipsec site connections
|
|
||||||
:param mtu: max transmission unit
|
:param mtu: max transmission unit
|
||||||
:param name: name of the ipsec site connections
|
:param name: name of the ipsec site connections
|
||||||
:return:ipsec_site_connection
|
:return:ipsec_site_connection
|
||||||
@ -335,7 +333,7 @@ class VpnUtils(scenario.OpenStackScenario):
|
|||||||
:param resource: resource whose status has to be checked
|
:param resource: resource whose status has to be checked
|
||||||
:param final_status: desired final status of the resource
|
:param final_status: desired final status of the resource
|
||||||
:param resource_tag: to identify the resource as vpnservice or
|
:param resource_tag: to identify the resource as vpnservice or
|
||||||
ipser_site_connection
|
ipsec_site_connection
|
||||||
:param wait_timeout: timeout value in seconds
|
:param wait_timeout: timeout value in seconds
|
||||||
:param check_interval: time to sleep before each check for the status
|
:param check_interval: time to sleep before each check for the status
|
||||||
change
|
change
|
||||||
|
@ -90,7 +90,7 @@ def cleanup_test_name(name, strip_tags=True, strip_scenarios=False):
|
|||||||
|
|
||||||
Make it possible to strip out the testscenarios information (not to
|
Make it possible to strip out the testscenarios information (not to
|
||||||
be confused with tempest scenarios) however that's often needed to
|
be confused with tempest scenarios) however that's often needed to
|
||||||
indentify generated negative tests.
|
identify generated negative tests.
|
||||||
"""
|
"""
|
||||||
if strip_tags:
|
if strip_tags:
|
||||||
tags_start = name.find('[')
|
tags_start = name.find('[')
|
||||||
|
Loading…
Reference in New Issue
Block a user