From c9d08b7a28f7540b6c10893abb4d849cb2103e83 Mon Sep 17 00:00:00 2001 From: jillr Date: Mon, 2 Mar 2020 19:25:18 +0000 Subject: [PATCH 01/38] Initial commit This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/eb75681585a23ea79e642b86a0f8e64e0f40a6d7 --- plugins/modules/ec2_vpc_vpn.py | 780 ++++++++++++++++++++++++++++ plugins/modules/ec2_vpc_vpn_info.py | 218 ++++++++ 2 files changed, 998 insertions(+) create mode 100644 plugins/modules/ec2_vpc_vpn.py create mode 100644 plugins/modules/ec2_vpc_vpn_info.py diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py new file mode 100644 index 00000000000..586138d3a1b --- /dev/null +++ b/plugins/modules/ec2_vpc_vpn.py @@ -0,0 +1,780 @@ +#!/usr/bin/python +# Copyright (c) 2017 Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +ANSIBLE_METADATA = {'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community'} + + +DOCUMENTATION = ''' +--- +module: ec2_vpc_vpn +short_description: Create, modify, and delete EC2 VPN connections. +description: + - This module creates, modifies, and deletes VPN connections. Idempotence is achieved by using the filters + option or specifying the VPN connection identifier. +extends_documentation_fragment: +- ansible.amazon.ec2 +- ansible.amazon.aws + +requirements: ['boto3', 'botocore'] +author: "Sloane Hertel (@s-hertel)" +options: + state: + description: + - The desired state of the VPN connection. + choices: ['present', 'absent'] + default: present + required: no + type: str + customer_gateway_id: + description: + - The ID of the customer gateway. + type: str + connection_type: + description: + - The type of VPN connection. + - At this time only 'ipsec.1' is supported. + default: ipsec.1 + type: str + vpn_gateway_id: + description: + - The ID of the virtual private gateway. + type: str + vpn_connection_id: + description: + - The ID of the VPN connection. Required to modify or delete a connection if the filters option does not provide a unique match. + type: str + tags: + description: + - Tags to attach to the VPN connection. + type: dict + purge_tags: + description: + - Whether or not to delete VPN connections tags that are associated with the connection but not specified in the task. + type: bool + default: false + static_only: + description: + - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP. + default: False + type: bool + required: no + tunnel_options: + description: + - An optional list object containing no more than two dict members, each of which may contain 'TunnelInsideCidr' + and/or 'PreSharedKey' keys with appropriate string values. AWS defaults will apply in absence of either of + the aforementioned keys. + required: no + type: list + elements: dict + suboptions: + TunnelInsideCidr: + type: str + description: The range of inside IP addresses for the tunnel. + PreSharedKey: + type: str + description: The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. + filters: + description: + - An alternative to using vpn_connection_id. If multiple matches are found, vpn_connection_id is required. + If one of the following suboptions is a list of items to filter by, only one item needs to match to find the VPN + that correlates. e.g. if the filter 'cidr' is ['194.168.2.0/24', '192.168.2.0/24'] and the VPN route only has the + destination cidr block of '192.168.2.0/24' it will be found with this filter (assuming there are not multiple + VPNs that are matched). Another example, if the filter 'vpn' is equal to ['vpn-ccf7e7ad', 'vpn-cb0ae2a2'] and one + of of the VPNs has the state deleted (exists but is unmodifiable) and the other exists and is not deleted, + it will be found via this filter. See examples. + suboptions: + cgw-config: + description: + - The customer gateway configuration of the VPN as a string (in the format of the return value) or a list of those strings. + static-routes-only: + description: + - The type of routing; true or false. + cidr: + description: + - The destination cidr of the VPN's route as a string or a list of those strings. + bgp: + description: + - The BGP ASN number associated with a BGP device. Only works if the connection is attached. + This filtering option is currently not working. + vpn: + description: + - The VPN connection id as a string or a list of those strings. + vgw: + description: + - The virtual private gateway as a string or a list of those strings. + tag-keys: + description: + - The key of a tag as a string or a list of those strings. + tag-values: + description: + - The value of a tag as a string or a list of those strings. + tags: + description: + - A dict of key value pairs. + cgw: + description: + - The customer gateway id as a string or a list of those strings. + type: dict + routes: + description: + - Routes to add to the connection. + type: list + elements: str + purge_routes: + description: + - Whether or not to delete VPN connections routes that are not specified in the task. + type: bool + wait_timeout: + description: + - How long before wait gives up, in seconds. + default: 600 + type: int + required: false + delay: + description: + - The time to wait before checking operation again. in seconds. + required: false + type: int + default: 15 +''' + +EXAMPLES = """ +# Note: None of these examples set aws_access_key, aws_secret_key, or region. +# It is assumed that their matching environment variables are set. + +- name: create a VPN connection + ec2_vpc_vpn: + state: present + vpn_gateway_id: vgw-XXXXXXXX + customer_gateway_id: cgw-XXXXXXXX + +- name: modify VPN connection tags + ec2_vpc_vpn: + state: present + vpn_connection_id: vpn-XXXXXXXX + tags: + Name: ansible-tag-1 + Other: ansible-tag-2 + +- name: delete a connection + ec2_vpc_vpn: + vpn_connection_id: vpn-XXXXXXXX + state: absent + +- name: modify VPN tags (identifying VPN by filters) + ec2_vpc_vpn: + state: present + filters: + cidr: 194.168.1.0/24 + tag-keys: + - Ansible + - Other + tags: + New: Tag + purge_tags: true + static_only: true + +- name: set up VPN with tunnel options utilizing 'TunnelInsideCidr' only + ec2_vpc_vpn: + state: present + filters: + vpn: vpn-XXXXXXXX + static_only: true + tunnel_options: + - + TunnelInsideCidr: '169.254.100.1/30' + - + TunnelInsideCidr: '169.254.100.5/30' + +- name: add routes and remove any preexisting ones + ec2_vpc_vpn: + state: present + filters: + vpn: vpn-XXXXXXXX + routes: + - 195.168.2.0/24 + - 196.168.2.0/24 + purge_routes: true + +- name: remove all routes + ec2_vpc_vpn: + state: present + vpn_connection_id: vpn-XXXXXXXX + routes: [] + purge_routes: true + +- name: delete a VPN identified by filters + ec2_vpc_vpn: + state: absent + filters: + tags: + Ansible: Tag +""" + +RETURN = """ +changed: + description: If the VPN connection has changed. + type: bool + returned: always + sample: + changed: true +customer_gateway_configuration: + description: The configuration of the VPN connection. + returned: I(state=present) + type: str +customer_gateway_id: + description: The customer gateway connected via the connection. + type: str + returned: I(state=present) + sample: + customer_gateway_id: cgw-1220c87b +vpn_gateway_id: + description: The virtual private gateway connected via the connection. + type: str + returned: I(state=present) + sample: + vpn_gateway_id: vgw-cb0ae2a2 +options: + description: The VPN connection options (currently only containing static_routes_only). + type: complex + returned: I(state=present) + contains: + static_routes_only: + description: If the VPN connection only allows static routes. + returned: I(state=present) + type: str + sample: + static_routes_only: true +routes: + description: The routes of the VPN connection. + type: list + returned: I(state=present) + sample: + routes: [{ + 'destination_cidr_block': '192.168.1.0/24', + 'state': 'available' + }] +state: + description: The status of the VPN connection. + type: str + returned: I(state=present) + sample: + state: available +tags: + description: The tags associated with the connection. + type: dict + returned: I(state=present) + sample: + tags: + name: ansible-test + other: tag +type: + description: The type of VPN connection (currently only ipsec.1 is available). + type: str + returned: I(state=present) + sample: + type: "ipsec.1" +vgw_telemetry: + type: list + returned: I(state=present) + description: The telemetry for the VPN tunnel. + sample: + vgw_telemetry: [{ + 'outside_ip_address': 'string', + 'status': 'up', + 'last_status_change': datetime(2015, 1, 1), + 'status_message': 'string', + 'accepted_route_count': 123 + }] +vpn_connection_id: + description: The identifier for the VPN connection. + type: str + returned: I(state=present) + sample: + vpn_connection_id: vpn-781e0e19 +""" + +from ansible_collections.ansible.amazon.plugins.module_utils.aws.core import AnsibleAWSModule +from ansible.module_utils._text import to_text +from ansible_collections.ansible.amazon.plugins.module_utils.ec2 import ( + camel_dict_to_snake_dict, + boto3_tag_list_to_ansible_dict, + compare_aws_tags, + ansible_dict_to_boto3_tag_list, +) + +try: + from botocore.exceptions import BotoCoreError, ClientError, WaiterError +except ImportError: + pass # Handled by AnsibleAWSModule + + +class VPNConnectionException(Exception): + def __init__(self, msg, exception=None): + self.msg = msg + self.exception = exception + + +def find_connection(connection, module_params, vpn_connection_id=None): + ''' Looks for a unique VPN connection. Uses find_connection_response() to return the connection found, None, + or raise an error if there were multiple viable connections. ''' + + filters = module_params.get('filters') + + # vpn_connection_id may be provided via module option; takes precedence over any filter values + if not vpn_connection_id and module_params.get('vpn_connection_id'): + vpn_connection_id = module_params.get('vpn_connection_id') + + if not isinstance(vpn_connection_id, list) and vpn_connection_id: + vpn_connection_id = [to_text(vpn_connection_id)] + elif isinstance(vpn_connection_id, list): + vpn_connection_id = [to_text(connection) for connection in vpn_connection_id] + + formatted_filter = [] + # if vpn_connection_id is provided it will take precedence over any filters since it is a unique identifier + if not vpn_connection_id: + formatted_filter = create_filter(module_params, provided_filters=filters) + + # see if there is a unique matching connection + try: + if vpn_connection_id: + existing_conn = connection.describe_vpn_connections(VpnConnectionIds=vpn_connection_id, + Filters=formatted_filter) + else: + existing_conn = connection.describe_vpn_connections(Filters=formatted_filter) + except (BotoCoreError, ClientError) as e: + raise VPNConnectionException(msg="Failed while describing VPN connection.", + exception=e) + + return find_connection_response(connections=existing_conn) + + +def add_routes(connection, vpn_connection_id, routes_to_add): + for route in routes_to_add: + try: + connection.create_vpn_connection_route(VpnConnectionId=vpn_connection_id, + DestinationCidrBlock=route) + except (BotoCoreError, ClientError) as e: + raise VPNConnectionException(msg="Failed while adding route {0} to the VPN connection {1}.".format(route, vpn_connection_id), + exception=e) + + +def remove_routes(connection, vpn_connection_id, routes_to_remove): + for route in routes_to_remove: + try: + connection.delete_vpn_connection_route(VpnConnectionId=vpn_connection_id, + DestinationCidrBlock=route) + except (BotoCoreError, ClientError) as e: + raise VPNConnectionException(msg="Failed to remove route {0} from the VPN connection {1}.".format(route, vpn_connection_id), + exception=e) + + +def create_filter(module_params, provided_filters): + """ Creates a filter using the user-specified parameters and unmodifiable options that may have been specified in the task """ + boto3ify_filter = {'cgw-config': 'customer-gateway-configuration', + 'static-routes-only': 'option.static-routes-only', + 'cidr': 'route.destination-cidr-block', + 'bgp': 'bgp-asn', + 'vpn': 'vpn-connection-id', + 'vgw': 'vpn-gateway-id', + 'tag-keys': 'tag-key', + 'tag-values': 'tag-value', + 'tags': 'tag', + 'cgw': 'customer-gateway-id'} + + # unmodifiable options and their filter name counterpart + param_to_filter = {"customer_gateway_id": "customer-gateway-id", + "vpn_gateway_id": "vpn-gateway-id", + "vpn_connection_id": "vpn-connection-id"} + + flat_filter_dict = {} + formatted_filter = [] + + for raw_param in dict(provided_filters): + + # fix filter names to be recognized by boto3 + if raw_param in boto3ify_filter: + param = boto3ify_filter[raw_param] + provided_filters[param] = provided_filters.pop(raw_param) + elif raw_param in list(boto3ify_filter.items()): + param = raw_param + else: + raise VPNConnectionException(msg="{0} is not a valid filter.".format(raw_param)) + + # reformat filters with special formats + if param == 'tag': + for key in provided_filters[param]: + formatted_key = 'tag:' + key + if isinstance(provided_filters[param][key], list): + flat_filter_dict[formatted_key] = str(provided_filters[param][key]) + else: + flat_filter_dict[formatted_key] = [str(provided_filters[param][key])] + elif param == 'option.static-routes-only': + flat_filter_dict[param] = [str(provided_filters[param]).lower()] + else: + if isinstance(provided_filters[param], list): + flat_filter_dict[param] = provided_filters[param] + else: + flat_filter_dict[param] = [str(provided_filters[param])] + + # if customer_gateway, vpn_gateway, or vpn_connection was specified in the task but not the filter, add it + for param in param_to_filter: + if param_to_filter[param] not in flat_filter_dict and module_params.get(param): + flat_filter_dict[param_to_filter[param]] = [module_params.get(param)] + + # change the flat dict into something boto3 will understand + formatted_filter = [{'Name': key, 'Values': value} for key, value in flat_filter_dict.items()] + + return formatted_filter + + +def find_connection_response(connections=None): + """ Determine if there is a viable unique match in the connections described. Returns the unique VPN connection if one is found, + returns None if the connection does not exist, raise an error if multiple matches are found. """ + + # Found no connections + if not connections or 'VpnConnections' not in connections: + return None + + # Too many results + elif connections and len(connections['VpnConnections']) > 1: + viable = [] + for each in connections['VpnConnections']: + # deleted connections are not modifiable + if each['State'] not in ("deleted", "deleting"): + viable.append(each) + if len(viable) == 1: + # Found one viable result; return unique match + return viable[0] + elif len(viable) == 0: + # Found a result but it was deleted already; since there was only one viable result create a new one + return None + else: + raise VPNConnectionException(msg="More than one matching VPN connection was found. " + "To modify or delete a VPN please specify vpn_connection_id or add filters.") + + # Found unique match + elif connections and len(connections['VpnConnections']) == 1: + # deleted connections are not modifiable + if connections['VpnConnections'][0]['State'] not in ("deleted", "deleting"): + return connections['VpnConnections'][0] + + +def create_connection(connection, customer_gateway_id, static_only, vpn_gateway_id, connection_type, max_attempts, delay, tunnel_options=None): + """ Creates a VPN connection """ + + options = {'StaticRoutesOnly': static_only} + if tunnel_options and len(tunnel_options) <= 2: + t_opt = [] + for m in tunnel_options: + # See Boto3 docs regarding 'create_vpn_connection' + # tunnel options for allowed 'TunnelOptions' keys. + if not isinstance(m, dict): + raise TypeError("non-dict list member") + t_opt.append(m) + if t_opt: + options['TunnelOptions'] = t_opt + + if not (customer_gateway_id and vpn_gateway_id): + raise VPNConnectionException(msg="No matching connection was found. To create a new connection you must provide " + "both vpn_gateway_id and customer_gateway_id.") + try: + vpn = connection.create_vpn_connection(Type=connection_type, + CustomerGatewayId=customer_gateway_id, + VpnGatewayId=vpn_gateway_id, + Options=options) + connection.get_waiter('vpn_connection_available').wait( + VpnConnectionIds=[vpn['VpnConnection']['VpnConnectionId']], + WaiterConfig={'Delay': delay, 'MaxAttempts': max_attempts} + ) + except WaiterError as e: + raise VPNConnectionException(msg="Failed to wait for VPN connection {0} to be available".format(vpn['VpnConnection']['VpnConnectionId']), + exception=e) + except (BotoCoreError, ClientError) as e: + raise VPNConnectionException(msg="Failed to create VPN connection", + exception=e) + + return vpn['VpnConnection'] + + +def delete_connection(connection, vpn_connection_id, delay, max_attempts): + """ Deletes a VPN connection """ + try: + connection.delete_vpn_connection(VpnConnectionId=vpn_connection_id) + connection.get_waiter('vpn_connection_deleted').wait( + VpnConnectionIds=[vpn_connection_id], + WaiterConfig={'Delay': delay, 'MaxAttempts': max_attempts} + ) + except WaiterError as e: + raise VPNConnectionException(msg="Failed to wait for VPN connection {0} to be removed".format(vpn_connection_id), + exception=e) + except (BotoCoreError, ClientError) as e: + raise VPNConnectionException(msg="Failed to delete the VPN connection: {0}".format(vpn_connection_id), + exception=e) + + +def add_tags(connection, vpn_connection_id, add): + try: + connection.create_tags(Resources=[vpn_connection_id], + Tags=add) + except (BotoCoreError, ClientError) as e: + raise VPNConnectionException(msg="Failed to add the tags: {0}.".format(add), + exception=e) + + +def remove_tags(connection, vpn_connection_id, remove): + # format tags since they are a list in the format ['tag1', 'tag2', 'tag3'] + key_dict_list = [{'Key': tag} for tag in remove] + try: + connection.delete_tags(Resources=[vpn_connection_id], + Tags=key_dict_list) + except (BotoCoreError, ClientError) as e: + raise VPNConnectionException(msg="Failed to remove the tags: {0}.".format(remove), + exception=e) + + +def check_for_update(connection, module_params, vpn_connection_id): + """ Determines if there are any tags or routes that need to be updated. Ensures non-modifiable attributes aren't expected to change. """ + tags = module_params.get('tags') + routes = module_params.get('routes') + purge_tags = module_params.get('purge_tags') + purge_routes = module_params.get('purge_routes') + + vpn_connection = find_connection(connection, module_params, vpn_connection_id=vpn_connection_id) + current_attrs = camel_dict_to_snake_dict(vpn_connection) + + # Initialize changes dict + changes = {'tags_to_add': [], + 'tags_to_remove': [], + 'routes_to_add': [], + 'routes_to_remove': []} + + # Get changes to tags + current_tags = boto3_tag_list_to_ansible_dict(current_attrs.get('tags', []), u'key', u'value') + tags_to_add, changes['tags_to_remove'] = compare_aws_tags(current_tags, tags, purge_tags) + changes['tags_to_add'] = ansible_dict_to_boto3_tag_list(tags_to_add) + # Get changes to routes + if 'Routes' in vpn_connection: + current_routes = [route['DestinationCidrBlock'] for route in vpn_connection['Routes']] + if purge_routes: + changes['routes_to_remove'] = [old_route for old_route in current_routes if old_route not in routes] + changes['routes_to_add'] = [new_route for new_route in routes if new_route not in current_routes] + + # Check if nonmodifiable attributes are attempted to be modified + for attribute in current_attrs: + if attribute in ("tags", "routes", "state"): + continue + elif attribute == 'options': + will_be = module_params.get('static_only', None) + is_now = bool(current_attrs[attribute]['static_routes_only']) + attribute = 'static_only' + elif attribute == 'type': + will_be = module_params.get("connection_type", None) + is_now = current_attrs[attribute] + else: + is_now = current_attrs[attribute] + will_be = module_params.get(attribute, None) + + if will_be is not None and to_text(will_be) != to_text(is_now): + raise VPNConnectionException(msg="You cannot modify {0}, the current value of which is {1}. Modifiable VPN " + "connection attributes are tags and routes. The value you tried to change it to " + "is {2}.".format(attribute, is_now, will_be)) + + return changes + + +def make_changes(connection, vpn_connection_id, changes): + """ changes is a dict with the keys 'tags_to_add', 'tags_to_remove', 'routes_to_add', 'routes_to_remove', + the values of which are lists (generated by check_for_update()). + """ + changed = False + + if changes['tags_to_add']: + changed = True + add_tags(connection, vpn_connection_id, changes['tags_to_add']) + + if changes['tags_to_remove']: + changed = True + remove_tags(connection, vpn_connection_id, changes['tags_to_remove']) + + if changes['routes_to_add']: + changed = True + add_routes(connection, vpn_connection_id, changes['routes_to_add']) + + if changes['routes_to_remove']: + changed = True + remove_routes(connection, vpn_connection_id, changes['routes_to_remove']) + + return changed + + +def get_check_mode_results(connection, module_params, vpn_connection_id=None, current_state=None): + """ Returns the changes that would be made to a VPN Connection """ + state = module_params.get('state') + if state == 'absent': + if vpn_connection_id: + return True, {} + else: + return False, {} + + changed = False + results = {'customer_gateway_configuration': '', + 'customer_gateway_id': module_params.get('customer_gateway_id'), + 'vpn_gateway_id': module_params.get('vpn_gateway_id'), + 'options': {'static_routes_only': module_params.get('static_only')}, + 'routes': [module_params.get('routes')]} + + # get combined current tags and tags to set + present_tags = module_params.get('tags') + if current_state and 'Tags' in current_state: + current_tags = boto3_tag_list_to_ansible_dict(current_state['Tags']) + if module_params.get('purge_tags'): + if current_tags != present_tags: + changed = True + elif current_tags != present_tags: + if not set(present_tags.keys()) < set(current_tags.keys()): + changed = True + # add preexisting tags that new tags didn't overwrite + present_tags.update((tag, current_tags[tag]) for tag in current_tags if tag not in present_tags) + elif current_tags.keys() == present_tags.keys() and set(present_tags.values()) != set(current_tags.values()): + changed = True + elif module_params.get('tags'): + changed = True + if present_tags: + results['tags'] = present_tags + + # get combined current routes and routes to add + present_routes = module_params.get('routes') + if current_state and 'Routes' in current_state: + current_routes = [route['DestinationCidrBlock'] for route in current_state['Routes']] + if module_params.get('purge_routes'): + if set(current_routes) != set(present_routes): + changed = True + elif set(present_routes) != set(current_routes): + if not set(present_routes) < set(current_routes): + changed = True + present_routes.extend([route for route in current_routes if route not in present_routes]) + elif module_params.get('routes'): + changed = True + results['routes'] = [{"destination_cidr_block": cidr, "state": "available"} for cidr in present_routes] + + # return the vpn_connection_id if it's known + if vpn_connection_id: + results['vpn_connection_id'] = vpn_connection_id + else: + changed = True + results['vpn_connection_id'] = 'vpn-XXXXXXXX' + + return changed, results + + +def ensure_present(connection, module_params, check_mode=False): + """ Creates and adds tags to a VPN connection. If the connection already exists update tags. """ + vpn_connection = find_connection(connection, module_params) + changed = False + delay = module_params.get('delay') + max_attempts = module_params.get('wait_timeout') // delay + + # No match but vpn_connection_id was specified. + if not vpn_connection and module_params.get('vpn_connection_id'): + raise VPNConnectionException(msg="There is no VPN connection available or pending with that id. Did you delete it?") + + # Unique match was found. Check if attributes provided differ. + elif vpn_connection: + vpn_connection_id = vpn_connection['VpnConnectionId'] + # check_for_update returns a dict with the keys tags_to_add, tags_to_remove, routes_to_add, routes_to_remove + changes = check_for_update(connection, module_params, vpn_connection_id) + if check_mode: + return get_check_mode_results(connection, module_params, vpn_connection_id, current_state=vpn_connection) + changed = make_changes(connection, vpn_connection_id, changes) + + # No match was found. Create and tag a connection and add routes. + else: + changed = True + if check_mode: + return get_check_mode_results(connection, module_params) + vpn_connection = create_connection(connection, + customer_gateway_id=module_params.get('customer_gateway_id'), + static_only=module_params.get('static_only'), + vpn_gateway_id=module_params.get('vpn_gateway_id'), + connection_type=module_params.get('connection_type'), + tunnel_options=module_params.get('tunnel_options'), + max_attempts=max_attempts, + delay=delay) + changes = check_for_update(connection, module_params, vpn_connection['VpnConnectionId']) + make_changes(connection, vpn_connection['VpnConnectionId'], changes) + + # get latest version if a change has been made and make tags output nice before returning it + if vpn_connection: + vpn_connection = find_connection(connection, module_params, vpn_connection['VpnConnectionId']) + if 'Tags' in vpn_connection: + vpn_connection['Tags'] = boto3_tag_list_to_ansible_dict(vpn_connection['Tags']) + + return changed, vpn_connection + + +def ensure_absent(connection, module_params, check_mode=False): + """ Deletes a VPN connection if it exists. """ + vpn_connection = find_connection(connection, module_params) + + if check_mode: + return get_check_mode_results(connection, module_params, vpn_connection['VpnConnectionId'] if vpn_connection else None) + + delay = module_params.get('delay') + max_attempts = module_params.get('wait_timeout') // delay + + if vpn_connection: + delete_connection(connection, vpn_connection['VpnConnectionId'], delay=delay, max_attempts=max_attempts) + changed = True + else: + changed = False + + return changed, {} + + +def main(): + argument_spec = dict( + state=dict(type='str', default='present', choices=['present', 'absent']), + filters=dict(type='dict', default={}), + vpn_gateway_id=dict(type='str'), + tags=dict(default={}, type='dict'), + connection_type=dict(default='ipsec.1', type='str'), + tunnel_options=dict(no_log=True, type='list', default=[]), + static_only=dict(default=False, type='bool'), + customer_gateway_id=dict(type='str'), + vpn_connection_id=dict(type='str'), + purge_tags=dict(type='bool', default=False), + routes=dict(type='list', default=[]), + purge_routes=dict(type='bool', default=False), + wait_timeout=dict(type='int', default=600), + delay=dict(type='int', default=15), + ) + module = AnsibleAWSModule(argument_spec=argument_spec, + supports_check_mode=True) + connection = module.client('ec2') + + state = module.params.get('state') + parameters = dict(module.params) + + try: + if state == 'present': + changed, response = ensure_present(connection, parameters, module.check_mode) + elif state == 'absent': + changed, response = ensure_absent(connection, parameters, module.check_mode) + except VPNConnectionException as e: + if e.exception: + module.fail_json_aws(e.exception, msg=e.msg) + else: + module.fail_json(msg=e.msg) + + module.exit_json(changed=changed, **camel_dict_to_snake_dict(response)) + + +if __name__ == '__main__': + main() diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py new file mode 100644 index 00000000000..fa7a1ea7973 --- /dev/null +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -0,0 +1,218 @@ +#!/usr/bin/python +# Copyright: Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + + +ANSIBLE_METADATA = {'status': ['preview'], + 'supported_by': 'community', + 'metadata_version': '1.1'} + + +DOCUMENTATION = ''' +--- +module: ec2_vpc_vpn_info +short_description: Gather information about VPN Connections in AWS. +description: + - Gather information about VPN Connections in AWS. + - This module was called C(ec2_vpc_vpn_facts) before Ansible 2.9. The usage did not change. +requirements: [ boto3 ] +author: Madhura Naniwadekar (@Madhura-CSI) +options: + filters: + description: + - A dict of filters to apply. Each dict item consists of a filter key and a filter value. + See U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpnConnections.html) for possible filters. + required: false + type: dict + vpn_connection_ids: + description: + - Get details of a specific VPN connections using vpn connection ID/IDs. This value should be provided as a list. + required: false + type: list + elements: str +extends_documentation_fragment: +- ansible.amazon.aws +- ansible.amazon.ec2 + +''' + +EXAMPLES = ''' +# # Note: These examples do not set authentication details, see the AWS Guide for details. +- name: Gather information about all vpn connections + ec2_vpc_vpn_info: + +- name: Gather information about a filtered list of vpn connections, based on tags + ec2_vpc_vpn_info: + filters: + "tag:Name": test-connection + register: vpn_conn_info + +- name: Gather information about vpn connections by specifying connection IDs. + ec2_vpc_vpn_info: + filters: + vpn-gateway-id: vgw-cbe66beb + register: vpn_conn_info +''' + +RETURN = ''' +vpn_connections: + description: List of one or more VPN Connections. + returned: always + type: complex + contains: + category: + description: The category of the VPN connection. + returned: always + type: str + sample: VPN + customer_gatway_configuration: + description: The configuration information for the VPN connection's customer gateway (in the native XML format). + returned: always + type: str + customer_gateway_id: + description: The ID of the customer gateway at your end of the VPN connection. + returned: always + type: str + sample: cgw-17a53c37 + options: + description: The VPN connection options. + returned: always + type: dict + sample: { + "static_routes_only": false + } + routes: + description: List of static routes associated with the VPN connection. + returned: always + type: complex + contains: + destination_cidr_block: + description: The CIDR block associated with the local subnet of the customer data center. + returned: always + type: str + sample: 10.0.0.0/16 + state: + description: The current state of the static route. + returned: always + type: str + sample: available + state: + description: The current state of the VPN connection. + returned: always + type: str + sample: available + tags: + description: Any tags assigned to the VPN connection. + returned: always + type: dict + sample: { + "Name": "test-conn" + } + type: + description: The type of VPN connection. + returned: always + type: str + sample: ipsec.1 + vgw_telemetry: + description: Information about the VPN tunnel. + returned: always + type: complex + contains: + accepted_route_count: + description: The number of accepted routes. + returned: always + type: int + sample: 0 + last_status_change: + description: The date and time of the last change in status. + returned: always + type: str + sample: "2018-02-09T14:35:27+00:00" + outside_ip_address: + description: The Internet-routable IP address of the virtual private gateway's outside interface. + returned: always + type: str + sample: 13.127.79.191 + status: + description: The status of the VPN tunnel. + returned: always + type: str + sample: DOWN + status_message: + description: If an error occurs, a description of the error. + returned: always + type: str + sample: IPSEC IS DOWN + certificate_arn: + description: The Amazon Resource Name of the virtual private gateway tunnel endpoint certificate. + returned: when a private certificate is used for authentication + type: str + sample: "arn:aws:acm:us-east-1:123456789101:certificate/c544d8ce-20b8-4fff-98b0-example" + vpn_connection_id: + description: The ID of the VPN connection. + returned: always + type: str + sample: vpn-f700d5c0 + vpn_gateway_id: + description: The ID of the virtual private gateway at the AWS side of the VPN connection. + returned: always + type: str + sample: vgw-cbe56bfb +''' + +import json +try: + from botocore.exceptions import ClientError, BotoCoreError +except ImportError: + pass # caught by AnsibleAWSModule + +from ansible_collections.ansible.amazon.plugins.module_utils.aws.core import AnsibleAWSModule +from ansible_collections.ansible.amazon.plugins.module_utils.ec2 import ansible_dict_to_boto3_filter_list, boto3_tag_list_to_ansible_dict, camel_dict_to_snake_dict + + +def date_handler(obj): + return obj.isoformat() if hasattr(obj, 'isoformat') else obj + + +def list_vpn_connections(connection, module): + params = dict() + + params['Filters'] = ansible_dict_to_boto3_filter_list(module.params.get('filters')) + params['VpnConnectionIds'] = module.params.get('vpn_connection_ids') + + try: + result = json.loads(json.dumps(connection.describe_vpn_connections(**params), default=date_handler)) + except ValueError as e: + module.fail_json_aws(e, msg="Cannot validate JSON data") + except (ClientError, BotoCoreError) as e: + module.fail_json_aws(e, msg="Could not describe customer gateways") + snaked_vpn_connections = [camel_dict_to_snake_dict(vpn_connection) for vpn_connection in result['VpnConnections']] + if snaked_vpn_connections: + for vpn_connection in snaked_vpn_connections: + vpn_connection['tags'] = boto3_tag_list_to_ansible_dict(vpn_connection.get('tags', [])) + module.exit_json(changed=False, vpn_connections=snaked_vpn_connections) + + +def main(): + + argument_spec = dict( + vpn_connection_ids=dict(default=[], type='list'), + filters=dict(default={}, type='dict') + ) + + module = AnsibleAWSModule(argument_spec=argument_spec, + mutually_exclusive=[['vpn_connection_ids', 'filters']], + supports_check_mode=True) + if module._module._name == 'ec2_vpc_vpn_facts': + module._module.deprecate("The 'ec2_vpc_vpn_facts' module has been renamed to 'ec2_vpc_vpn_info'", version='2.13') + + connection = module.client('ec2') + + list_vpn_connections(connection, module) + + +if __name__ == '__main__': + main() From 4d466463c74191432e363c81791ea10ae3344b40 Mon Sep 17 00:00:00 2001 From: jillr Date: Tue, 3 Mar 2020 19:43:21 +0000 Subject: [PATCH 02/38] migration test cleanup This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/13b104b912784bb31a0bff23eed4c27b0f5e0283 --- plugins/modules/ec2_vpc_vpn_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index fa7a1ea7973..bcb11b657a0 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -170,7 +170,10 @@ pass # caught by AnsibleAWSModule from ansible_collections.ansible.amazon.plugins.module_utils.aws.core import AnsibleAWSModule -from ansible_collections.ansible.amazon.plugins.module_utils.ec2 import ansible_dict_to_boto3_filter_list, boto3_tag_list_to_ansible_dict, camel_dict_to_snake_dict +from ansible_collections.ansible.amazon.plugins.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, + boto3_tag_list_to_ansible_dict, + camel_dict_to_snake_dict, + ) def date_handler(obj): From ec104aed4cc00054e29c287fb099e546a26a15b4 Mon Sep 17 00:00:00 2001 From: Jill R <4121322+jillr@users.noreply.github.com> Date: Wed, 25 Mar 2020 15:39:40 -0700 Subject: [PATCH 03/38] Rename collection (#12) * Rename core collection Rename references to ansible.amazon to amazon.aws. * Rename community.amazon to community.aws Fix pep8 line lengths for rewritten amazon.aws imports * Missed a path in shippable.sh * Dependency repos moved This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/235c5db571cc45db5839476c94356c9b91e1f228 --- plugins/modules/ec2_vpc_vpn.py | 8 ++++---- plugins/modules/ec2_vpc_vpn_info.py | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 586138d3a1b..a1b6bd82b07 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -18,8 +18,8 @@ - This module creates, modifies, and deletes VPN connections. Idempotence is achieved by using the filters option or specifying the VPN connection identifier. extends_documentation_fragment: -- ansible.amazon.ec2 -- ansible.amazon.aws +- amazon.aws.ec2 +- amazon.aws.aws requirements: ['boto3', 'botocore'] author: "Sloane Hertel (@s-hertel)" @@ -300,9 +300,9 @@ vpn_connection_id: vpn-781e0e19 """ -from ansible_collections.ansible.amazon.plugins.module_utils.aws.core import AnsibleAWSModule +from ansible_collections.amazon.aws.plugins.module_utils.aws.core import AnsibleAWSModule from ansible.module_utils._text import to_text -from ansible_collections.ansible.amazon.plugins.module_utils.ec2 import ( +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ( camel_dict_to_snake_dict, boto3_tag_list_to_ansible_dict, compare_aws_tags, diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index bcb11b657a0..991977346d0 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -34,8 +34,8 @@ type: list elements: str extends_documentation_fragment: -- ansible.amazon.aws -- ansible.amazon.ec2 +- amazon.aws.aws +- amazon.aws.ec2 ''' @@ -169,11 +169,11 @@ except ImportError: pass # caught by AnsibleAWSModule -from ansible_collections.ansible.amazon.plugins.module_utils.aws.core import AnsibleAWSModule -from ansible_collections.ansible.amazon.plugins.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, - boto3_tag_list_to_ansible_dict, - camel_dict_to_snake_dict, - ) +from ansible_collections.amazon.aws.plugins.module_utils.aws.core import AnsibleAWSModule +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, + boto3_tag_list_to_ansible_dict, + camel_dict_to_snake_dict, + ) def date_handler(obj): From 0779afabfff825e7d7d576597d8d376fde83e4ff Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 24 Apr 2020 23:09:16 +0200 Subject: [PATCH 04/38] Fix docs issues in aws_s3_bucket_info and ec2_vpc_vpn (#47) * Make sure that example string is parsed as string and not as datetime. * Make sure that expression is treated as string. This is probably not the correct value either, but at least it doesn't cause ansible-doc --json to crash. This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/dedf734b21def6c1968869f8ac57cf59a20ee18f --- plugins/modules/ec2_vpc_vpn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index a1b6bd82b07..5f8707bf909 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -288,7 +288,7 @@ vgw_telemetry: [{ 'outside_ip_address': 'string', 'status': 'up', - 'last_status_change': datetime(2015, 1, 1), + 'last_status_change': 'datetime(2015, 1, 1)', 'status_message': 'string', 'accepted_route_count': 123 }] From 1d05c6f42c77f2a1379a0508b4d3bc21f5918cae Mon Sep 17 00:00:00 2001 From: Jill R <4121322+jillr@users.noreply.github.com> Date: Tue, 19 May 2020 16:06:12 -0700 Subject: [PATCH 05/38] Remove METADATA and cleanup galaxy.yml (#70) * Remove ANSIBLE_METADATA entirely, see ansible/ansible/pull/69454. Remove `license` field from galaxy.yml, in favor of `license_file`. This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/05672a64e2362cc2d865b5af6a57da6bc3cd08e3 --- plugins/modules/ec2_vpc_vpn.py | 4 ---- plugins/modules/ec2_vpc_vpn_info.py | 5 ----- 2 files changed, 9 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 5f8707bf909..c344cc8e73e 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -5,10 +5,6 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], - 'supported_by': 'community'} - DOCUMENTATION = ''' --- diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 991977346d0..3041a747d69 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -6,11 +6,6 @@ __metaclass__ = type -ANSIBLE_METADATA = {'status': ['preview'], - 'supported_by': 'community', - 'metadata_version': '1.1'} - - DOCUMENTATION = ''' --- module: ec2_vpc_vpn_info From b5eb759416ef434dae3def8c9337669245c6ae7b Mon Sep 17 00:00:00 2001 From: Jill R <4121322+jillr@users.noreply.github.com> Date: Tue, 16 Jun 2020 11:23:52 -0700 Subject: [PATCH 06/38] Collections related fixes for CI (#96) * Update module deprecations Switch version to `removed_at_date` * Don't install amazon.aws from galaxy We've been using galaxy to install amazon.aws in shippable, but that doesn't really work if we aren't publising faster. Get that collection from git so it is most up to date. * We need to declare python test deps now * missed a python dep This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/7cd211e9383db26bc2aa4cc06e657cf60ed0acc0 --- plugins/modules/ec2_vpc_vpn_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 3041a747d69..427b4b8cec8 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -205,7 +205,7 @@ def main(): mutually_exclusive=[['vpn_connection_ids', 'filters']], supports_check_mode=True) if module._module._name == 'ec2_vpc_vpn_facts': - module._module.deprecate("The 'ec2_vpc_vpn_facts' module has been renamed to 'ec2_vpc_vpn_info'", version='2.13') + module._module.deprecate("The 'ec2_vpc_vpn_facts' module has been renamed to 'ec2_vpc_vpn_info'", date='2021-12-01', collection_name='community.aws') connection = module.client('ec2') From ff21f9c997752e2b6d45c4bf9638bafd4f19b22e Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Wed, 17 Jun 2020 01:24:54 +0530 Subject: [PATCH 07/38] Update Examples with FQCN (#67) Updated module examples with FQCN Signed-off-by: Abhijeet Kasurde This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/98173aefbbceed7fc0d9db62687b73f96a55a999 --- plugins/modules/ec2_vpc_vpn.py | 16 ++++++++-------- plugins/modules/ec2_vpc_vpn_info.py | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index c344cc8e73e..4d0f06fb5a3 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -145,13 +145,13 @@ # It is assumed that their matching environment variables are set. - name: create a VPN connection - ec2_vpc_vpn: + community.aws.ec2_vpc_vpn: state: present vpn_gateway_id: vgw-XXXXXXXX customer_gateway_id: cgw-XXXXXXXX - name: modify VPN connection tags - ec2_vpc_vpn: + community.aws.ec2_vpc_vpn: state: present vpn_connection_id: vpn-XXXXXXXX tags: @@ -159,12 +159,12 @@ Other: ansible-tag-2 - name: delete a connection - ec2_vpc_vpn: + community.aws.ec2_vpc_vpn: vpn_connection_id: vpn-XXXXXXXX state: absent - name: modify VPN tags (identifying VPN by filters) - ec2_vpc_vpn: + community.aws.ec2_vpc_vpn: state: present filters: cidr: 194.168.1.0/24 @@ -177,7 +177,7 @@ static_only: true - name: set up VPN with tunnel options utilizing 'TunnelInsideCidr' only - ec2_vpc_vpn: + community.aws.ec2_vpc_vpn: state: present filters: vpn: vpn-XXXXXXXX @@ -189,7 +189,7 @@ TunnelInsideCidr: '169.254.100.5/30' - name: add routes and remove any preexisting ones - ec2_vpc_vpn: + community.aws.ec2_vpc_vpn: state: present filters: vpn: vpn-XXXXXXXX @@ -199,14 +199,14 @@ purge_routes: true - name: remove all routes - ec2_vpc_vpn: + community.aws.ec2_vpc_vpn: state: present vpn_connection_id: vpn-XXXXXXXX routes: [] purge_routes: true - name: delete a VPN identified by filters - ec2_vpc_vpn: + community.aws.ec2_vpc_vpn: state: absent filters: tags: diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 427b4b8cec8..f34ddb8a937 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -37,16 +37,16 @@ EXAMPLES = ''' # # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Gather information about all vpn connections - ec2_vpc_vpn_info: + community.aws.ec2_vpc_vpn_info: - name: Gather information about a filtered list of vpn connections, based on tags - ec2_vpc_vpn_info: + community.aws.ec2_vpc_vpn_info: filters: "tag:Name": test-connection register: vpn_conn_info - name: Gather information about vpn connections by specifying connection IDs. - ec2_vpc_vpn_info: + community.aws.ec2_vpc_vpn_info: filters: vpn-gateway-id: vgw-cbe66beb register: vpn_conn_info From c2d11fbd8e0a5cea60293af039341ae645f76cc8 Mon Sep 17 00:00:00 2001 From: flowerysong Date: Tue, 16 Jun 2020 19:30:00 -0400 Subject: [PATCH 08/38] Update module_utils paths to remove aws subdir (#23) Co-authored-by: Ezekiel Hendrickson This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/10853d9441a586ba177006dd889325cfb24a3dd6 --- plugins/modules/ec2_vpc_vpn.py | 2 +- plugins/modules/ec2_vpc_vpn_info.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 4d0f06fb5a3..72a3b9a3eb1 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -296,7 +296,7 @@ vpn_connection_id: vpn-781e0e19 """ -from ansible_collections.amazon.aws.plugins.module_utils.aws.core import AnsibleAWSModule +from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule from ansible.module_utils._text import to_text from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ( camel_dict_to_snake_dict, diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index f34ddb8a937..b9830d7d31e 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -164,7 +164,7 @@ except ImportError: pass # caught by AnsibleAWSModule -from ansible_collections.amazon.aws.plugins.module_utils.aws.core import AnsibleAWSModule +from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule from ansible_collections.amazon.aws.plugins.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, boto3_tag_list_to_ansible_dict, camel_dict_to_snake_dict, From 641f933408b2ba0e20570dad9bfe34fb9cae2da5 Mon Sep 17 00:00:00 2001 From: Jill R <4121322+jillr@users.noreply.github.com> Date: Wed, 17 Jun 2020 09:31:32 -0700 Subject: [PATCH 09/38] Update docs (#99) * Update docs Remove .git from repo url so links in readme will generate correctly Add required ansible version Run latest version of add_docs.py Add version_added string to modules * galaxy.yml was missing authors This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/96ee268e5267f5b12c3d59892bc1279f75aa3135 --- plugins/modules/ec2_vpc_vpn.py | 1 + plugins/modules/ec2_vpc_vpn_info.py | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 72a3b9a3eb1..1ac818485bb 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -9,6 +9,7 @@ DOCUMENTATION = ''' --- module: ec2_vpc_vpn +version_added: 1.0.0 short_description: Create, modify, and delete EC2 VPN connections. description: - This module creates, modifies, and deletes VPN connections. Idempotence is achieved by using the filters diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index b9830d7d31e..1ba8210a722 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -9,6 +9,7 @@ DOCUMENTATION = ''' --- module: ec2_vpc_vpn_info +version_added: 1.0.0 short_description: Gather information about VPN Connections in AWS. description: - Gather information about VPN Connections in AWS. From 2cc6c8e03a74885752ad4f1ebb4a15afcdd64009 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Thu, 16 Jul 2020 01:31:41 +0530 Subject: [PATCH 10/38] Docs: sanity fixes (#133) Signed-off-by: Abhijeet Kasurde This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/059cf9efc95bb976de21ab4f8e4d9ddd001983fc --- plugins/modules/ec2_vpc_vpn.py | 10 +++++----- plugins/modules/ec2_vpc_vpn_info.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 1ac818485bb..9067d522129 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_vpc_vpn version_added: 1.0.0 @@ -141,7 +141,7 @@ default: 15 ''' -EXAMPLES = """ +EXAMPLES = r""" # Note: None of these examples set aws_access_key, aws_secret_key, or region. # It is assumed that their matching environment variables are set. @@ -214,7 +214,7 @@ Ansible: Tag """ -RETURN = """ +RETURN = r""" changed: description: If the VPN connection has changed. type: bool @@ -742,12 +742,12 @@ def main(): vpn_gateway_id=dict(type='str'), tags=dict(default={}, type='dict'), connection_type=dict(default='ipsec.1', type='str'), - tunnel_options=dict(no_log=True, type='list', default=[]), + tunnel_options=dict(no_log=True, type='list', default=[], elements='dict'), static_only=dict(default=False, type='bool'), customer_gateway_id=dict(type='str'), vpn_connection_id=dict(type='str'), purge_tags=dict(type='bool', default=False), - routes=dict(type='list', default=[]), + routes=dict(type='list', default=[], elements='str'), purge_routes=dict(type='bool', default=False), wait_timeout=dict(type='int', default=600), delay=dict(type='int', default=15), diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 1ba8210a722..e96583f669e 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_vpc_vpn_info version_added: 1.0.0 @@ -35,7 +35,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Gather information about all vpn connections community.aws.ec2_vpc_vpn_info: @@ -53,7 +53,7 @@ register: vpn_conn_info ''' -RETURN = ''' +RETURN = r''' vpn_connections: description: List of one or more VPN Connections. returned: always @@ -198,7 +198,7 @@ def list_vpn_connections(connection, module): def main(): argument_spec = dict( - vpn_connection_ids=dict(default=[], type='list'), + vpn_connection_ids=dict(default=[], type='list', elements='str'), filters=dict(default={}, type='dict') ) From 0cf2f5c8734fcdae14a9d46802981f79cda690c7 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 7 Dec 2020 08:48:06 +0100 Subject: [PATCH 11/38] Sanity test / doc-default-does-not-match-spec fixups (#320) * Sanity test / doc-default-does-not-match-spec fixups * General docs cleanup This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/b22f2804372a3d35683debffb9a1c0908a819ca1 --- plugins/modules/ec2_vpc_vpn.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 9067d522129..6e18e724258 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -35,7 +35,7 @@ connection_type: description: - The type of VPN connection. - - At this time only 'ipsec.1' is supported. + - At this time only C(ipsec.1) is supported. default: ipsec.1 type: str vpn_gateway_id: @@ -63,8 +63,8 @@ required: no tunnel_options: description: - - An optional list object containing no more than two dict members, each of which may contain 'TunnelInsideCidr' - and/or 'PreSharedKey' keys with appropriate string values. AWS defaults will apply in absence of either of + - An optional list object containing no more than two dict members, each of which may contain I(TunnelInsideCidr) + and/or I(PreSharedKey) keys with appropriate string values. AWS defaults will apply in absence of either of the aforementioned keys. required: no type: list @@ -78,11 +78,11 @@ description: The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway. filters: description: - - An alternative to using vpn_connection_id. If multiple matches are found, vpn_connection_id is required. + - An alternative to using I(vpn_connection_id). If multiple matches are found, vpn_connection_id is required. If one of the following suboptions is a list of items to filter by, only one item needs to match to find the VPN - that correlates. e.g. if the filter 'cidr' is ['194.168.2.0/24', '192.168.2.0/24'] and the VPN route only has the - destination cidr block of '192.168.2.0/24' it will be found with this filter (assuming there are not multiple - VPNs that are matched). Another example, if the filter 'vpn' is equal to ['vpn-ccf7e7ad', 'vpn-cb0ae2a2'] and one + that correlates. e.g. if the filter I(cidr) is C(['194.168.2.0/24', '192.168.2.0/24']) and the VPN route only has the + destination cidr block of C(192.168.2.0/24) it will be found with this filter (assuming there are not multiple + VPNs that are matched). Another example, if the filter I(vpn) is equal to C(['vpn-ccf7e7ad', 'vpn-cb0ae2a2']) and one of of the VPNs has the state deleted (exists but is unmodifiable) and the other exists and is not deleted, it will be found via this filter. See examples. suboptions: @@ -91,7 +91,7 @@ - The customer gateway configuration of the VPN as a string (in the format of the return value) or a list of those strings. static-routes-only: description: - - The type of routing; true or false. + - The type of routing; C(true) or C(false). cidr: description: - The destination cidr of the VPN's route as a string or a list of those strings. @@ -127,15 +127,16 @@ description: - Whether or not to delete VPN connections routes that are not specified in the task. type: bool + default: false wait_timeout: description: - - How long before wait gives up, in seconds. + - How long, in seconds, before wait gives up. default: 600 type: int required: false delay: description: - - The time to wait before checking operation again. in seconds. + - The time, in seconds, to wait before checking operation again. required: false type: int default: 15 From cb32644f390431ca50bfa755b7639b1525fef499 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 5 Feb 2021 18:43:33 +0100 Subject: [PATCH 12/38] Move module unit tests to the right location (#392) * Remove cloudformation (amazon.aws) placebo recordings * Move module unit tests to the right location so ansible-test finds them This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/1cf83b190fe4159e59c4a503a879a85a6362f52e --- .../ec2_vpc_vpn/__init__.py | 0 .../ec2.CreateVpnConnectionRoute_1.json | 16 + .../ec2.CreateVpnConnectionRoute_2.json | 16 + .../add_routes/ec2.CreateVpnConnection_1.json | 29 ++ .../add_routes/ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 179 +++++++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 66 ++++ .../ec2.DescribeVpnConnections_16.json | 66 ++++ .../ec2.DescribeVpnConnections_17.json | 66 ++++ .../ec2.DescribeVpnConnections_18.json | 66 ++++ .../ec2.DescribeVpnConnections_19.json | 235 ++++++++++++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_20.json | 39 ++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../add_tags/ec2.CreateTags_1.json | 17 + .../add_tags/ec2.CreateVpnConnection_1.json | 29 ++ .../add_tags/ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 149 ++++++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 66 ++++ .../ec2.DescribeVpnConnections_16.json | 202 ++++++++++ .../ec2.DescribeVpnConnections_17.json | 36 ++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 137 +++++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 30 ++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.CreateTags_1.json | 17 + .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 115 ++++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 162 ++++++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 76 ++++ .../ec2.DescribeVpnConnections_16.json | 76 ++++ .../ec2.DescribeVpnConnections_17.json | 40 ++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 66 ++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 30 ++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 79 ++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 66 ++++ .../ec2.DescribeVpnConnections_16.json | 66 ++++ .../ec2.DescribeVpnConnections_17.json | 126 +++++++ .../ec2.DescribeVpnConnections_18.json | 66 ++++ .../ec2.DescribeVpnConnections_19.json | 66 ++++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_20.json | 30 ++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 103 +++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 150 ++++++++ .../ec2.DescribeVpnConnections_16.json | 30 ++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.DescribeVpnConnections_1.json | 17 + .../ec2.CreateTags_1.json | 17 + .../ec2.CreateTags_2.json | 17 + .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.CreateVpnConnection_2.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DeleteVpnConnection_2.json | 16 + .../ec2.DescribeVpnConnections_1.json | 30 ++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 30 ++ .../ec2.DescribeVpnConnections_15.json | 66 ++++ .../ec2.DescribeVpnConnections_16.json | 66 ++++ .../ec2.DescribeVpnConnections_17.json | 66 ++++ .../ec2.DescribeVpnConnections_18.json | 66 ++++ .../ec2.DescribeVpnConnections_19.json | 66 ++++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_20.json | 66 ++++ .../ec2.DescribeVpnConnections_21.json | 66 ++++ .../ec2.DescribeVpnConnections_22.json | 66 ++++ .../ec2.DescribeVpnConnections_23.json | 66 ++++ .../ec2.DescribeVpnConnections_24.json | 66 ++++ .../ec2.DescribeVpnConnections_25.json | 66 ++++ .../ec2.DescribeVpnConnections_26.json | 66 ++++ .../ec2.DescribeVpnConnections_27.json | 66 ++++ .../ec2.DescribeVpnConnections_28.json | 78 ++++ .../ec2.DescribeVpnConnections_29.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_30.json | 72 ++++ .../ec2.DescribeVpnConnections_31.json | 78 ++++ .../ec2.DescribeVpnConnections_32.json | 66 ++++ .../ec2.DescribeVpnConnections_33.json | 72 ++++ .../ec2.DescribeVpnConnections_34.json | 72 ++++ .../ec2.DescribeVpnConnections_35.json | 36 ++ .../ec2.DescribeVpnConnections_36.json | 36 ++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.CreateTags_1.json | 17 + .../ec2.CreateTags_2.json | 17 + .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.CreateVpnConnection_2.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DeleteVpnConnection_2.json | 16 + .../ec2.DescribeVpnConnections_1.json | 48 +++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 72 ++++ .../ec2.DescribeVpnConnections_14.json | 48 +++ .../ec2.DescribeVpnConnections_15.json | 66 ++++ .../ec2.DescribeVpnConnections_16.json | 66 ++++ .../ec2.DescribeVpnConnections_17.json | 66 ++++ .../ec2.DescribeVpnConnections_18.json | 66 ++++ .../ec2.DescribeVpnConnections_19.json | 66 ++++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_20.json | 66 ++++ .../ec2.DescribeVpnConnections_21.json | 66 ++++ .../ec2.DescribeVpnConnections_22.json | 66 ++++ .../ec2.DescribeVpnConnections_23.json | 66 ++++ .../ec2.DescribeVpnConnections_24.json | 66 ++++ .../ec2.DescribeVpnConnections_25.json | 66 ++++ .../ec2.DescribeVpnConnections_26.json | 66 ++++ .../ec2.DescribeVpnConnections_27.json | 66 ++++ .../ec2.DescribeVpnConnections_28.json | 72 ++++ .../ec2.DescribeVpnConnections_29.json | 143 +++++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_30.json | 36 ++ .../ec2.DescribeVpnConnections_31.json | 36 ++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.DescribeVpnConnections_1.json | 73 ++++ .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.CreateVpnConnection_2.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DeleteVpnConnection_2.json | 16 + .../ec2.DescribeVpnConnections_1.json | 17 + .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 66 ++++ .../ec2.DescribeVpnConnections_16.json | 66 ++++ .../ec2.DescribeVpnConnections_17.json | 66 ++++ .../ec2.DescribeVpnConnections_18.json | 17 + .../ec2.DescribeVpnConnections_19.json | 66 ++++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_20.json | 66 ++++ .../ec2.DescribeVpnConnections_21.json | 66 ++++ .../ec2.DescribeVpnConnections_22.json | 66 ++++ .../ec2.DescribeVpnConnections_23.json | 66 ++++ .../ec2.DescribeVpnConnections_24.json | 66 ++++ .../ec2.DescribeVpnConnections_25.json | 66 ++++ .../ec2.DescribeVpnConnections_26.json | 66 ++++ .../ec2.DescribeVpnConnections_27.json | 66 ++++ .../ec2.DescribeVpnConnections_28.json | 66 ++++ .../ec2.DescribeVpnConnections_29.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_30.json | 66 ++++ .../ec2.DescribeVpnConnections_31.json | 66 ++++ .../ec2.DescribeVpnConnections_32.json | 30 ++ .../ec2.DescribeVpnConnections_33.json | 30 ++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.CreateVpnConnection_1.json | 29 ++ .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 91 +++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 30 ++ .../ec2.DescribeVpnConnections_15.json | 30 ++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../ec2.CreateVpnConnection_1.json | 29 ++ .../remove_tags/ec2.DeleteTags_1.json | 17 + .../ec2.DeleteVpnConnection_1.json | 16 + .../ec2.DescribeVpnConnections_1.json | 167 +++++++++ .../ec2.DescribeVpnConnections_10.json | 66 ++++ .../ec2.DescribeVpnConnections_11.json | 66 ++++ .../ec2.DescribeVpnConnections_12.json | 66 ++++ .../ec2.DescribeVpnConnections_13.json | 66 ++++ .../ec2.DescribeVpnConnections_14.json | 66 ++++ .../ec2.DescribeVpnConnections_15.json | 214 +++++++++++ .../ec2.DescribeVpnConnections_16.json | 30 ++ .../ec2.DescribeVpnConnections_2.json | 66 ++++ .../ec2.DescribeVpnConnections_3.json | 66 ++++ .../ec2.DescribeVpnConnections_4.json | 66 ++++ .../ec2.DescribeVpnConnections_5.json | 66 ++++ .../ec2.DescribeVpnConnections_6.json | 66 ++++ .../ec2.DescribeVpnConnections_7.json | 66 ++++ .../ec2.DescribeVpnConnections_8.json | 66 ++++ .../ec2.DescribeVpnConnections_9.json | 66 ++++ .../unit/plugins/modules/test_ec2_vpc_vpn.py | 352 ++++++++++++++++++ 294 files changed, 18437 insertions(+) create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/__init__.py create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json create mode 100644 tests/unit/plugins/modules/test_ec2_vpc_vpn.py diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/__init__.py b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json new file mode 100644 index 00000000000..2b8018f2548 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "22cf9d88-b0ca-4a6c-8bfa-a2969541f25b", + "HTTPHeaders": { + "content-length": "249", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json new file mode 100644 index 00000000000..540cb22d86b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnectionRoute_2.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ee7493f2-1db0-4edb-a2c8-66dc31c41df8", + "HTTPHeaders": { + "content-length": "249", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..16510d83d40 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9b06e28e", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b0fe4793-77a1-4c92-978c-975c7b963c59", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..30d8ac08ee9 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "92162d1f-1563-4b14-8fc5-0821c50687cb", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:48 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..97f64fd2526 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,179 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9843e24b-c094-451f-9be3-3f859dc39385", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5887", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..d67ec8ac010 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d5d76451-0539-4de2-a197-dac87c4eb91b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:17:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..c61544026a8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7906c368-77fc-4afc-9ee4-c822dab4864e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:17:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..95032ac3f5b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b9e2ca97-e467-4dcc-a8fc-eff788e8ed49", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:17:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..76d21af3c23 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "249f8e82-8137-4b69-8002-969e880dbcd2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..101822a5d9c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "554aea72-2359-4c35-956b-1cd55c3b1ded", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..a4fd2ecce72 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a9203775-14d5-4020-aa61-f6709cd6c455", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:32 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..6092812e211 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 18, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c0621c72-8851-4c34-9d3d-7ae4bb5de50f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000000..ef7b5d3723b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 18, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "62aae2fc-e699-4a66-9bea-1b4b2b26ce35", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000000..afa295f3bfd --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 18, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0d20ed3c-a88e-42ba-87cc-f573d22b0a11", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000000..320101d50cd --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,235 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [ + { + "DestinationCidrBlock": "195.168.2.0/24", + "State": "available" + }, + { + "DestinationCidrBlock": "196.168.2.0/24", + "State": "available" + } + ], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 2, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 18, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 2, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 23, + "minute": 17, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d5ce628c-8270-4bb8-b0d9-c68b5834a9a8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:18:48 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..12e36ed156e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "96ef43c9-1210-47a7-87f7-22c85a05eb2b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000000..bca49264855 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,39 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "Routes": [ + { + "DestinationCidrBlock": "196.168.2.0/24", + "State": "deleted" + }, + { + "DestinationCidrBlock": "195.168.2.0/24", + "State": "deleted" + } + ], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3a0d05ae-dbf7-4885-9b50-db2899bc30d5", + "HTTPHeaders": { + "content-length": "1066", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:18:48 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..b868885c82d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c4fb8aa0-39ad-4333-9b45-25b48ce5a8cd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:22 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..619c4866240 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b728a197-4790-4987-afe1-23ba2d2edf55", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:38 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..9ab3007c3a9 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "06bdac8b-d1ec-48d6-9af4-b2d5bf3fa2f4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:55 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..193586bf442 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "baefffe5-7638-423e-84fc-fd21fa7fc6d1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:16:10 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..b8569545efc --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "591329e5-78f5-4655-90c0-bf2b312b54af", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:16:26 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..66e29949af0 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4e526b69-b5ea-4f05-a81b-831aa5825e18", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:16:42 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..35f035130df --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_routes/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9b06e28e", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.38\n 255.255.255.252\n 30\n \n \n \n \n 52.11.116.135\n \n \n 169.254.13.37\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n OwpaQwQaVjEM2nWZRYOhh3.TxgU5QyG1\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.130\n 255.255.255.252\n 30\n \n \n \n \n 52.38.13.135\n \n \n 169.254.13.129\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oIbjSO1e2SVBqRuW2PzKn.CgsAdSOMME\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.11.116.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.13.135", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 7, + "minute": 15, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "534f5ec5-2d5f-46ac-8216-453fc4cad713", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:16:58 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json new file mode 100644 index 00000000000..8af115a96ec --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9661b9b4-e18b-491b-8182-6548bfb680bb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:12:21 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..e7cd28ab8b1 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9e06e28b", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0c445bcd-4e37-4368-b45d-b4560bde459f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5236", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..e190e232a71 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8deda3c9-1498-44ef-a663-111e93657c7f", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:22 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..6d975f1ac7c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,149 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e3c0cd84-d327-4a9e-8cac-0361a0afaaac", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "4836", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..6066eb507ba --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3888db16-157b-404a-9fea-fe27e8bd556d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:11:34 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..92d1f1e7f57 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ada7d223-32a6-4b60-81bb-63bca2cb2d56", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:11:50 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..e60cb21cec4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "def174a4-c5c2-4e5b-a5b6-1c2448e869f1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..055f7de90ef --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7c65999e-0e70-4aac-a720-b2216dbe70af", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:20 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..e199f3c0fc3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1153ff47-87b6-40b1-bcdd-ae66c4d4a3ae", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..f67a916094c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c0748f40-1e33-4f0b-9417-77092bfc9090", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..8b6d7e2d30a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,202 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 41, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 11, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "16aa6a4d-0fca-4035-b607-c223fc424f81", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:12:22 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000000..78a05ba8605 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0d463b0f-87ea-4ada-a79a-f2bb0910c31c", + "HTTPHeaders": { + "content-length": "878", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:22 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..5c0dea83c39 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bab29653-3411-49bb-af70-3d7b3284ca06", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..3b47382cf9d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d3732d64-34fb-40eb-bddb-c34e5e571921", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..701f05ae0a9 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bd3ccd25-a6d6-44cf-9371-f01ca22d3f57", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:10:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..f25da7060f1 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "36906e17-078f-4c15-9e01-af3e233af2d3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:10:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..f8aa9ec9734 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "cab9bb1a-7afe-4c5f-b106-038b10cba813", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:10:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..1a8a4f86aae --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "938c6207-f582-4935-bef5-a9e3b01e18e1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:10:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..e7f974dced9 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0bf3fb58-412a-447c-8cf7-af7185ec7f93", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:11:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..dbbefcbc5a6 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/add_tags/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 34.212.254.7\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n b2DU0T9yhIWbDPukoG2NBtbPNrruDTRm\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.106\n 255.255.255.252\n 30\n \n \n \n \n 35.160.254.75\n \n \n 169.254.15.105\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n FOhYu_zZqXdic2Bvm_dYS03ONJCK.LfP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.212.254.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.160.254.75", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b67d7024-2bad-4283-b440-5519b5541867", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:11:18 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..503422fc263 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9f06e28a", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3239a34a-f3ed-4ba7-9d31-99265ceda2a9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5237", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..46de4d6ab4c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bdcbf647-c1cc-4971-b133-3e1cd8ee36d5", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..835d53a9d95 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,137 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "87d4db59-f8e6-4d4c-9800-7c0bda5ebee2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "4397", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:46 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..7ee030b7d87 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "40e8326d-2f4b-4761-a2f9-011c989b0d11", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:08:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..9e4979b24f6 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5c5688ae-0f6e-4d88-adb6-d9f654c74b42", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:08 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..ba464dc252b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7a5c5c59-d48a-467b-9414-097a93c923ae", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..57967a5e57e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "cb26ba43-cfc6-466b-8bde-5e63d58728e0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..6f500939bb7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1005f435-3e86-461f-a96c-a4f45c32c795", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..55bbb3116e8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "edac5b19-14be-4b2d-ab47-a2279de47d40", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..a69976b5566 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "07ee7fe5-c16a-4940-b099-3cd39aa9c2c8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..b1254a9ff9a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7f34b516-b810-4a2b-8e9c-2e4ac5ea32f2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:07:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..97128118379 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3f0d6abf-421a-4e56-9f19-a95c4639cbe6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:07:18 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..71ccc5f0bfb --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8174eae1-ae94-492c-b8d3-369a912dc994", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:07:34 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..7fba5fbca67 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ab76cd4e-9a69-48f4-8fa6-7b1ea9710f2d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:07:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..e98f0cead5f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9e552112-f325-4d3e-bb3d-0698b69a9074", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:08:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..9f3c01830c7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1c10aa65-e78f-41e5-bb24-7902b7974bff", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:08:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..863aa6350ce --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 47, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1963dfb1-564a-4a0c-932c-ecddcdb39d41", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:08:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json new file mode 100644 index 00000000000..32afe4c15d7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8738f361-b294-47d7-a6d7-82d289db5e5f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:06:44 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..0e22d719b02 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9c06e289", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d94359a8-8a4f-4087-b848-27de6253ff6c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..0d225110b26 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e780e8ce-5417-4a33-a39e-dd78a18b69a5", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..548dcfe963a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,115 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "35740449-70e9-4723-b5c4-8c82dc5ec5e6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "3673", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..584a6216a2a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2d618f80-4045-4951-8d2e-c8d33395a141", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:42 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..f328bac1ba8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c9e48b82-1edc-4aa7-ac4d-c45c7bd4ae19", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:42 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..4137627685e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b346f588-dc55-4be6-95c8-e4708609a4e2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..b8a3a18fa79 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,162 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a5650999-a5ad-4eea-b407-6d9913738f24", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:06:43 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..56db26d9b81 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5e8c0572-8f87-4708-9aca-997ea3736bc4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..84a774dd80d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,76 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "134576b2-43ed-40ac-aefb-c4770a81f587", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6407", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..e2bdf29eeeb --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,76 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 28, + "minute": 6, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5daf9a13-6835-4e6d-be9f-040405da8dff", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6407", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000000..4f365045384 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,40 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "561b039d-ffee-42dc-a390-6dde1ae4fcfe", + "HTTPHeaders": { + "content-length": "990", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..ebd539e3a5c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "29d88495-a6b4-4f53-9ec7-32ac21fd80c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..9b004c2a971 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a647316d-7079-4a0a-8ad3-91a0a36dc124", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:51 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..9cf6f0ffc36 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f913c208-ac39-4b8e-aba5-1410f2e4d6cf", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:05:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..88eeadf41a5 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "260f7ff4-ec3b-452e-90f3-9ffb3d5f6895", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:05:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..860dcfd3312 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fb308284-ea47-44f9-af61-3c0271809839", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:05:39 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..d71b6108ec2 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5e0c4efb-8f23-4ce1-b1fe-c5bccac45063", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:05:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..6ca0be0346b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "be516d5b-d999-4de7-bd3e-9c0cb5de857c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:09 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..633be4130cd --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_tags/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.163.112.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n HxHFvA2bBdWo_sBRDHLiRCDviolMhaMR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.42\n 255.255.255.252\n 30\n \n \n \n \n 54.148.246.46\n \n \n 169.254.15.41\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n YANkpCz981zsiW_QkZCFrjN1QAiKm73G\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.112.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 36, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.148.246.46", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 57, + "minute": 5, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "007948c6-bac8-4f43-8b80-5e7c32f2d1e8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:06:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..c7f4a8a970d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9006e285", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e312dbd3-7956-4b0e-bb66-29a85e65e477", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5233", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..933d9868223 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fd2ddf0e-f378-46d7-92e7-1b6008d98b04", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..4c2a4f72bc4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bcdba325-fd96-4c4b-bb15-dc9a88c456ae", + "HTTPHeaders": { + "content-length": "1917", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..25f9a24c45a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ee75ebe8-0587-49b5-a231-0d31f713e3be", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:55:39 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..fde1cd4c02e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5cbe30a2-8771-4116-ba7d-78c32a06546e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:55:55 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..3c37b32a2bb --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 56, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3d3d8178-0359-4c80-85c7-410411a532f4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..e13b27d041c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 56, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "67e4f285-2875-4615-ba4e-a36105d24dd7", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..beaa98a1c0a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 56, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a31cc536-1f4b-46d7-a91d-c8d0909eb897", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..cf88d5b8d0f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0cf4c8bf-4f69-4f9f-b6ae-aecbbcb60081", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:12 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..4803740289d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "07019e0f-0012-47dc-8f86-950bb2b36e52", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..5e69b0584df --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8174c5d9-d54a-4173-aef3-5e9c3e86bac6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..47ad906096b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "46432541-20bd-444f-ab0a-38db7c36aab5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:54:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..f7137760d33 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "84598175-301b-40e4-884d-4e4777267375", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:54:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..69249db308c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "092fbf9c-c529-4f71-855e-20b4289dc6f4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:54:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..da6185154f4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6d1bb01f-6afe-418c-94c2-7d83c4f94a4d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:54:52 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..284e8b5492f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "830ae224-6cdf-46e2-817b-92bcd5fa86ec", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:55:08 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..3f1a6a680f2 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 52.24.101.167\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n ZqeYNh0tOtKAbA2GjOnfP1ckplrsKR0I\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.58\n 255.255.255.252\n 30\n \n \n \n \n 52.40.126.9\n \n \n 169.254.14.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 2hNRbfughR8JKpllR1mEg0uPRckXd0bR\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.24.101.167", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 10, + "minute": 55, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.126.9", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 34, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "51ec304a-3c90-4bbe-86dc-56d87d693ef6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:55:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..45abc721826 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9306e286", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "541d2997-d79d-42b4-af0a-7d49754a99a0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5235", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:14 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..46c92879a6f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e9b91aeb-4237-44ba-9367-b9d240b3d8ba", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..5a1e79ea42e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,79 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fc165fe7-372e-4517-a256-5e12138aa890", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "2356", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:14 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..06d4d8371d6 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9e46eaa5-4f5b-42ff-ada0-d90504c0bd9c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:58:20 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..fc46769aff2 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a3d938cd-ea4f-4739-87df-956db661c1a3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:58:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..0a7045f11ed --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c49c942f-0408-4d6d-b04a-1778dc3a3c43", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:58:52 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..385a832a5e4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "18debff6-05c3-44ad-8106-1c1099fba0e0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..cb313c523ce --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6fb7285e-c4ff-4f11-bdbc-464efbb66f15", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..4749c57d5dc --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "cffd1787-58a7-4506-b14b-0bab509b8a1a", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..de15a8f21dc --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "cb19e2ba-a42a-47d3-a20f-9ea9521978f4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:23 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000000..33283151024 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,126 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "de97618e-a5a7-4efd-925c-6ca24b2603c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:59:24 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000000..505d1a36a5b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "aa76261f-ab0e-4bd4-a412-a59e7fdfb6db", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000000..caac14d220a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 58, + "minute": 58, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 0, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9885231e-ee67-49cb-ada6-e8eb3c772e6b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..7e870bbe37f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ca30a295-dfce-49f8-a1d1-f5af0dffd1c2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:14 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000000..0f39c5aa638 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "204f247b-ad5a-4917-bc3e-a793bf09bd48", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..1af37e30570 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a8ebc328-fea9-430d-a546-c5e24d447cef", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..e8ab98030aa --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "edf29e1c-30a1-4d11-9e5a-feddd7f082ab", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:56:46 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..5e8203fec88 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "51c5182c-f83e-496b-ba45-e4972064d690", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:57:01 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..cf06e0ad472 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b9255f48-f509-42a9-8c0f-6626a492b46e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:57:17 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..e7965bd025f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bab0deee-150b-4952-b949-4acefe6ebafe", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:57:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..e7c600455d1 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c90d25a2-7e6c-42cc-8f5a-17ab0c58e720", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:57:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..17bd7e73954 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/create_connection_that_exists/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.146\n 255.255.255.252\n 30\n \n \n \n \n 34.213.145.113\n \n \n 169.254.15.145\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n iNsKYUCSTSepYCf0igJVeirisatbjYiw\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.86\n 255.255.255.252\n 30\n \n \n \n \n 52.40.202.36\n \n \n 169.254.14.85\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n KZpfPULAV7ahI1aUspYf9oy4412BFNoP\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.213.145.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.202.36", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 15, + "minute": 56, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b1da658d-a66a-4def-873f-193ede827765", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:58:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..21408b7a6da --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9d06e288", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6b76950f-28f0-4e74-9b61-14780c62ced9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..a27bc82cf9f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e0e829b9-86e9-4b26-aa01-ccacf0a77edc", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..fc618a3241d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,103 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "149f4f23-9fec-4995-acc5-0db46d4d698f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "3234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..958e8a9821a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5bb89e85-8f96-43b1-96e3-0fd6c00f9b14", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:03:58 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..265a34962da --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "40ebbb4a-0a18-494e-9666-3481637027fc", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:14 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..71caefcf584 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 19, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a86ec01a-5ea5-4fba-8123-5567a04a3596", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..037ba1a1d95 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 19, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6c96cc41-2657-47a0-b437-a79b0631bbd8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..7e74e95fbe4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 19, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1f605613-e582-4b3b-8838-e9fcf0c58e67", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..5bbb025be0a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,150 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 19, + "minute": 4, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9e38c8b0-f339-463a-b92f-aa90fd3315e8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:04:31 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..786f224ead0 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0d2390b1-83fb-40f6-ab75-adf605a9a3fc", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..7abf137d37f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e29c19bc-d875-4b6b-83b2-bc2fdfb87bf0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..e7dc1a4a4f2 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "686ef8bb-a95e-4b86-b814-f272c54c8ea5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:02:09 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..3e3f889f906 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c0583208-1fa5-4c6e-8970-8dd2f3ecd62d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:02:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..59d520d1c43 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b10cdcbf-b16e-43c0-99b1-2fe2ad8db09b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:02:40 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..06ce44a44db --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "93d3176a-6d6a-44de-8a20-91bd4a64b3a3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:02:56 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..e15dc61ebf8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "329c10c9-0ee8-48d3-acb2-b48668ddbab6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:03:12 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..806c717d2f4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bf983aa1-224e-470a-b0a1-add5bda488b5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:03:27 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..8e7c3eccfb9 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_connection/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.166.247.180\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n vMOOPmaOf_RaI5CYB1HP1LSN7fKVajOB\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.126\n 255.255.255.252\n 30\n \n \n \n \n 35.167.45.7\n \n \n 169.254.12.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n DP5uNzsBDGM2M79qOw0w4uttdQvvTmuE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.166.247.180", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 54, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.167.45.7", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 29, + "minute": 3, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4857fe1d-dc96-4168-a7e1-9fbb73282ab2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:03:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..eebfb3a70bf --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/delete_nonexistent_connection/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "VpnConnections": [], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8218208e-030d-4aea-9ae5-6e8534efe1ef", + "HTTPHeaders": { + "content-length": "243", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:04:32 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json new file mode 100644 index 00000000000..9f4209eea08 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ccf8e327-eeee-4db8-9ae6-006a8fe5628c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:48:04 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json new file mode 100644 index 00000000000..062840fc216 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateTags_2.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0e1859bf-b896-4a30-ab94-849441b914f9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:48:05 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..c81bb5f509e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-6a06e27f", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5db2e287-2d09-4a50-aaa1-a4615ece9bd6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5235", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json new file mode 100644 index 00000000000..69c39a89a83 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.CreateVpnConnection_2.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-9e13c880", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9506e280", + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7533469a-5979-42fd-94de-c33a66d34065", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..cc17b12afc6 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5670f275-006d-48db-91e0-72058d9d881f", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json new file mode 100644 index 00000000000..d2fd5524e8f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DeleteVpnConnection_2.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "35514550-20a7-4f91-b175-d21182ad8bdd", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..d9d2f28724b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "edae433c-c2f8-475a-95f9-5c3c00d0b54b", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..aeb3224679e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a30a934b-5716-4d4d-958a-7e780e333a24", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:08 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..3132117c7cd --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "99b8bb83-e3f0-4b87-9121-5d862e2627f0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..89a6fd077d6 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c6d1bf65-4f3e-4f7f-9274-281ebf433b2b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..6c50e6b66c8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "28733dff-592e-4c48-94f9-b4d56bbc246a", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..c8ad595dcb8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d38f939c-ded7-416b-a563-88161b71be1c", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..06fd99e110b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "af7c54ed-ca7f-4013-adee-16133b822d53", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:26 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..ef0845944ac --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "24133f7b-2620-4f2b-98b5-427aaa5d04bd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:41 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000000..1a5bc6e7858 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5ac6d438-cae6-40cc-9c63-81073def54be", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:45:57 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000000..77dbba5bba1 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "968a8ebd-ed59-4a8d-a314-83a6430bebd3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:46:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000000..6c01e2c67f6 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "07f96ac8-f5ec-43e4-ab7d-6b989e071808", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:46:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..2f51af37102 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b1b10bb7-e85c-44ca-b74e-85352550db52", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000000..30ecbe4b4e2 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0750711f-fafd-4323-a685-65329a0a9302", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:46:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json new file mode 100644 index 00000000000..844fdab041c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_21.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ec319bcc-2a61-43d3-a69c-9d94235aeb56", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:46:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json new file mode 100644 index 00000000000..be8c4aa55b3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_22.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6fe5a339-9436-4077-a201-dab2b7b95039", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:47:16 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json new file mode 100644 index 00000000000..0a98ebdf353 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_23.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7897be6a-fc15-4608-bac0-c3cf7bba28c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:47:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json new file mode 100644 index 00000000000..d304915288f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_24.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 26, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "898cc57f-ab56-47d7-920e-995814f532a4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:47:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json new file mode 100644 index 00000000000..79b0739f098 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_25.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "134c741c-757b-4a87-9a34-c8f1848ef33e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json new file mode 100644 index 00000000000..49b4c09ab6d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_26.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8009af6c-6d35-45fa-a94d-5384d3b92573", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json new file mode 100644 index 00000000000..059a154eebd --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_27.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7ef9e804-1eb9-4486-9285-584204a824a3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json new file mode 100644 index 00000000000..76ad9ba8ec6 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_28.json @@ -0,0 +1,78 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "05c178e1-3f1f-4e0f-bb43-027d2b41f56c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6561", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json new file mode 100644 index 00000000000..0b2918289ea --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_29.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "92db5b5e-d7e6-4cfd-9d62-abdda5a6083c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..9f85a23b561 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2a3a4fd7-189b-43b0-8a44-82ebd52dba01", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:19 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json new file mode 100644 index 00000000000..cad1188b977 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_30.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 6, + "minute": 45, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ffa7e24d-e004-4b4e-9317-80b97dc89cc8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6288", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json new file mode 100644 index 00000000000..94f87c7d060 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_31.json @@ -0,0 +1,78 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0cebf278-197b-4bdd-b8d9-c44250637154", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6559", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json new file mode 100644 index 00000000000..bba62063290 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_32.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4bc3a17b-6896-4f8a-b3bc-07cbbf88e9e2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:05 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json new file mode 100644 index 00000000000..630ea016d7f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_33.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7371d436-849d-4717-a284-e33389f8982d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6288", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json new file mode 100644 index 00000000000..a294fb7421c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_34.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.15.138\n 255.255.255.252\n 30\n \n \n \n \n 35.164.115.77\n \n \n 169.254.15.137\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n LOIUEOybh.7onRDbkA0jIjVgwAanpstb\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.13.14\n 255.255.255.252\n 30\n \n \n \n \n 52.32.43.175\n \n \n 169.254.13.13\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n gVdPYm2D00u04GU8PlcRg8NayCIB.8hu\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.164.115.77", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.32.43.175", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 49, + "minute": 47, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b645a20e-3689-4a13-8af1-2dcc38f70a9b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6288", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json new file mode 100644 index 00000000000..42ea2ec0db8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_35.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6e80e598-aeb2-4ae1-bfe3-2383505379cc", + "HTTPHeaders": { + "content-length": "871", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json new file mode 100644 index 00000000000..9a97df1f0eb --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_36.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f4072f73-ff8c-49ed-89a7-eaed0389b11a", + "HTTPHeaders": { + "content-length": "873", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:08 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..ad74fa0620f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ed467717-f22a-4c33-a9e7-0f871d1b35b2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..9f2bb01f3fa --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "49f28398-4458-4c9d-9c04-598c9d8e76bd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:50 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..58c773d2c01 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bebb46be-76a1-486b-a9d0-7f0e33f68294", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:44:06 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..a15fd0e3264 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "090f369a-71f4-4e60-b860-c1f5cc52a5ab", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:44:21 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..2765a9f26f7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f98ad6e5-e3c6-48ae-b6c1-d9ed9824ea88", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:44:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..9b6e2ada236 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_filters/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.194\n 255.255.255.252\n 30\n \n \n \n \n 35.163.160.156\n \n \n 169.254.14.193\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oC1SMX2FbEbY71f2sWq3DPOQELqt4h0p\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.13.90\n 255.255.255.252\n 30\n \n \n \n \n 52.33.241.73\n \n \n 169.254.13.89\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n oNaPmhtWjtzz4Wy3TolB1e5C1UK6_6t9\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.160.156", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 4, + "minute": 43, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.33.241.73", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 53, + "minute": 44, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ef918599-de1c-40e5-95ab-2a4b16356455", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:44:52 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json new file mode 100644 index 00000000000..52ca9673111 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f39595f7-c4f7-4e7c-9681-83e5619e0d84", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:50:34 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json new file mode 100644 index 00000000000..3aeb21cf6fe --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateTags_2.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "61647610-452d-4a99-abce-d8e61a6ada95", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:53:28 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..17aca9388e3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9706e282", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "080cc661-516b-4d6c-806b-64f54b232f57", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5235", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json new file mode 100644 index 00000000000..0080abe9dc4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.CreateVpnConnection_2.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-9e13c880", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9606e283", + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d49ec118-3438-40cb-bcb5-8e98d9676688", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5236", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..ddce99bb1ed --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "995f99a1-42d4-4d0f-b216-5e54c7052a71", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json new file mode 100644 index 00000000000..65af7a36663 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DeleteVpnConnection_2.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "701a2c53-ef2e-4b77-bb0c-b0e4904dc714", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..59bbeec791c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,48 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "22e251ed-4e2b-49a4-8747-fcc9c39ad99e", + "HTTPHeaders": { + "content-length": "1310", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:12 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..334a32fc447 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "66c5b212-f514-4075-ab41-6c70424d13ef", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:17 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..27cf0e60f48 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4fa0db43-456e-491d-a6f6-2a2a262bc068", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..12afe81e0da --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "521f0a1b-e935-40c2-b896-b13b5b6f2d1a", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:34 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..0c5d8ca7849 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "da5b58d2-4042-4ed5-8faf-daceb3d706c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6290", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..861ebd74b53 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,48 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d4e21661-391e-48b9-80f8-6c04a13a653e", + "HTTPHeaders": { + "content-length": "1312", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:35 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..d54c65027c0 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3b4a1671-80a6-45a7-b620-885f88f5fd77", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..41fc9a238f3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "55115858-ebfd-4329-85e8-5bd15b31e62d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:51 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000000..1d82c71110a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "241b82e1-4611-495a-952d-21fce8354e6e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:51:07 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000000..0b0861b6896 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "898fcbc8-4c89-49cd-943f-7c2f0e3a73b7", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:51:22 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000000..c054486c7a3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2f8be95a-d488-412c-9bc3-bca1c66c3ccf", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:51:38 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..9900b9b0a8b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bd0e67d4-f5a5-4e98-a388-e80af982bebf", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000000..39ddd25ed78 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "66fe299d-2a18-4693-bdc3-00475c529a7f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:51:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json new file mode 100644 index 00000000000..cd711acfe3f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_21.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b5ebc50e-0f1d-4d96-87c1-bf222c186911", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:52:09 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json new file mode 100644 index 00000000000..490f336b65d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_22.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4f123753-f797-4aff-83f2-edfdb31b679f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:52:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json new file mode 100644 index 00000000000..78223c6e995 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_23.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ff8ad5d4-4798-44f2-b89a-100387a1e1bc", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:52:40 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json new file mode 100644 index 00000000000..2a98e206985 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_24.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c69b6d28-6925-4b09-9a23-c58bd23a952d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:52:56 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json new file mode 100644 index 00000000000..069b679c245 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_25.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 36, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "30239673-06bd-4122-8187-834e098e3035", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:12 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json new file mode 100644 index 00000000000..95f632a8339 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_26.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 14, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a35493d8-79cf-44ce-a5d9-a322984952bb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:27 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json new file mode 100644 index 00000000000..f3e3744186d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_27.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 14, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a0d807f4-6947-474e-86bc-f1d978a1e6c6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:27 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json new file mode 100644 index 00000000000..0eb348b26b7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_28.json @@ -0,0 +1,72 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 14, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "123f065b-f06a-4464-93e9-f0c9224825dc", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6290", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json new file mode 100644 index 00000000000..15182c9cab1 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_29.json @@ -0,0 +1,143 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.142\n 255.255.255.252\n 30\n \n \n \n \n 34.215.4.190\n \n \n 169.254.12.141\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n l9lo.f40_7mQk6G.Xe1tZ3HnYaGrqeis\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.12.214\n 255.255.255.252\n 30\n \n \n \n \n 35.163.123.41\n \n \n 169.254.12.213\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n By_kbJfKdll6PTY4W.pMr7CC0gqeP5U2\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.215.4.190", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 41, + "minute": 52, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.163.123.41", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 14, + "minute": 53, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 9, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "State": "available" + }, + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c6c78a9a-e004-4766-8ef6-16c52b25475d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 12:53:28 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..fb9619cdcd6 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2b96bd10-97eb-44b0-9ab9-548b0ddf03b9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json new file mode 100644 index 00000000000..4dd608bc648 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_30.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1b613de0-c6e1-48d3-9c9d-b94de070ccda", + "HTTPHeaders": { + "content-length": "873", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json new file mode 100644 index 00000000000..6e537944b51 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_31.json @@ -0,0 +1,36 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0e36b69f-39b7-40ac-8273-8003211fc5f5", + "HTTPHeaders": { + "content-length": "873", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..4a13f61e8c3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ace0b6a9-e76f-4198-a077-1e2dffbc6c2e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:43 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..3695e62250f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "434a478c-99ab-4da1-9446-0190d615553f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:48:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..337959a7984 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "406c570c-4ca9-4657-aab6-c3aec6943a24", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:49:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..171cce65798 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bc262f2c-187c-45ff-bd0e-b8287760d26e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:49:31 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..9b63c6f5f0c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "99bc2889-52c9-4933-ba37-9fc2524a6ec1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:49:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..a6472849102 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_insufficient_filters/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.26\n 255.255.255.252\n 30\n \n \n \n \n 34.214.254.212\n \n \n 169.254.14.25\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n AwW2EGlLGc4apzToCgrKQ2e4RexOSfj8\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.174\n 255.255.255.252\n 30\n \n \n \n \n 52.38.34.113\n \n \n 169.254.14.173\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n 5Slu8XDI5h2_TGXkCw_E2wAiRzyz3yIn\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "34.214.254.212", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 1, + "minute": 50, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.38.34.113", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 48, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "26fd3e6c-8c41-4e3b-8bda-47ee9b1ef167", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:50:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..288d2313bc4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_nonexistent/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,73 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9606e283", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-9506e280", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "79832782-f6e3-483a-b848-306c43731940", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "2087", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:53:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..90b1f2dd202 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-6f06e27a", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ef16cc59-db82-49e8-b39f-5ed5035a6fba", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5236", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json new file mode 100644 index 00000000000..dbb692fb60b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.CreateVpnConnection_2.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-9e13c880", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-6906e27c", + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7311c482-6425-4bf5-b764-06652c9ea4b8", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5232", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..7d346168ad3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "73286a1c-f428-4617-9b23-b0af8e8e2657", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json new file mode 100644 index 00000000000..cde1d023770 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DeleteVpnConnection_2.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6ff1e7ac-f41b-45f8-a925-99f12f15df72", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..079fe193fc1 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "VpnConnections": [], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "784ab580-8495-4cff-b8a9-a70474686d99", + "HTTPHeaders": { + "content-length": "243", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..5a14e8385b3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "45a3a55f-4577-4292-9c88-6b20c8968bdb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:39:18 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..d70a4c405e4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "dea0cb15-a87a-4340-836d-6cd460b2243e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:39:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..731805d6b95 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c9f63be4-079d-4dcd-adb8-ab18f8787a9c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:39:48 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..b7406b64cb7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "75e6bdc7-dab7-428c-900b-f8566fcdd8b4", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:04 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..a5f05224ef3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "02cad910-6d43-4d55-a031-4055a30bf411", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:20 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..f663512223e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 25, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "18e05aff-5c66-4e73-97bd-a63061019ed2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..53623b87b39 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 25, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "6df83c0e-40bd-41ed-8149-960375e0b0cf", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json new file mode 100644 index 00000000000..62f01fc341b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_17.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 25, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a6f596eb-c6a8-4e31-8e1a-bc1ae80443c5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:36 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json new file mode 100644 index 00000000000..2336ab51cb7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_18.json @@ -0,0 +1,17 @@ +{ + "data": { + "VpnConnections": [], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "dde896f2-98ea-45d2-8208-b71b46a88cd7", + "HTTPHeaders": { + "content-length": "243", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:37 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json new file mode 100644 index 00000000000..3741da6497e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_19.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "22bd50ce-bac1-4b63-bef5-d91e10a27cb6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:38 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..7552a17aae8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "acad86c4-655b-488f-a552-f04c60502dcb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json new file mode 100644 index 00000000000..448959205db --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_20.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4df8324c-5d9f-436e-b9c8-31d123170bcd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:40:53 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json new file mode 100644 index 00000000000..fcfe29941d3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_21.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "b2fddbbe-070c-40c4-b3ff-31b4ab039a93", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:41:09 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json new file mode 100644 index 00000000000..819d4fb183c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_22.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e4575384-f0ae-4ddb-a6f0-60bf09ae3431", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:41:24 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json new file mode 100644 index 00000000000..f7b5de10de3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_23.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3c2df2d8-21ff-435b-a25e-309708e5d728", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:41:40 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json new file mode 100644 index 00000000000..d2b789983e0 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_24.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "47bedfce-6c4f-40e5-8d3c-2f7618670665", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:41:55 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json new file mode 100644 index 00000000000..bf69c4d5798 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_25.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "25fb78ea-cc25-427c-a1bb-c9bc06a0fcf0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:11 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json new file mode 100644 index 00000000000..005ca53be1a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_26.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "dfd25f0b-3331-46b0-9594-739e54b3633b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:27 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json new file mode 100644 index 00000000000..a8dc687f131 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_27.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 31, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 37, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e0ce84a4-b7fa-4c51-89c5-f689f5ab05e7", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6116", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:42 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json new file mode 100644 index 00000000000..207caacdcff --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_28.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 31, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 46, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fbb5d0bf-db4a-4865-b74a-15c9d5dc9acb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:58 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json new file mode 100644 index 00000000000..397ea49ca36 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_29.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 31, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 46, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "06310935-6410-44da-ab8a-0a3a77b2ed02", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..6c2a473a761 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bc0abc0d-3217-4a9c-91b7-4cf7d1612270", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:29 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json new file mode 100644 index 00000000000..86a37a4779e --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_30.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-9e13c880\n vgw-32d70c2c\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 5.4.3.2\n \n \n 169.254.12.78\n 255.255.255.252\n 30\n \n \n \n \n 52.40.19.84\n \n \n 169.254.12.77\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n uckHBwcFkdkno4gf5nZHDLCNIM7WXFaW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 5.4.3.2\n \n \n 169.254.15.46\n 255.255.255.252\n 30\n \n \n \n \n 54.149.194.122\n \n \n 169.254.15.45\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hyFjiPPXAKg6WDjLQkfT7be6lPSK1.TE\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.40.19.84", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 31, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.149.194.122", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 46, + "minute": 42, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-32d70c2c", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5ce492e4-a36b-4148-9db4-1cd1390f4d94", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:42:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json new file mode 100644 index 00000000000..c5d67fffc90 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_31.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 25, + "minute": 40, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 39, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fab3e62a-b821-40cc-ac9d-3b589ddd7be9", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6124", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json new file mode 100644 index 00000000000..66db65f6bf7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_32.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c45356e9-b255-4886-bdeb-a200225b3066", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json new file mode 100644 index 00000000000..0abc8171746 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_33.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-9e13c880", + "VpnConnectionId": "vpn-6906e27c", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-32d70c2c", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "39d1181a-5c5b-4d7e-97cd-dcd5b83bc0b3", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:43:00 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..2c4135812dd --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ed7c7fbb-b31b-4244-b588-e90821e65bff", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:45 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..6434571b265 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "096fa68d-3ed3-4483-b323-4b03cc2c1ebd", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:37:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..5e30b888c19 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e18b7cde-2baa-466e-a5ac-ac5cd94db089", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:38:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..c84d4c084d3 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5845f7f3-a0ea-4948-b3ee-d9ee3fc0f303", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:38:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..3b729eccb5d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4a29bfaa-c800-4ed7-858c-9ea4fc8de167", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:38:47 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..87dd4df8e48 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/find_connection_vpc_conn_id/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.14.34\n 255.255.255.252\n 30\n \n \n \n \n 35.161.239.138\n \n \n 169.254.14.33\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n XGAHy.QMOtIujnLKHvwNdGivflNQGbxc\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.12.230\n 255.255.255.252\n 30\n \n \n \n \n 52.26.108.105\n \n \n 169.254.12.229\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n hk9hgD21aBIIJSz4809scBxMT3dsX_0h\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.161.239.138", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.108.105", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 13, + "minute": 37, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "8c873704-b869-4dc2-890d-ebc7d62d7963", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:39:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..1262491d43b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9206e287", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "686913e8-485a-4de0-880d-60a0c2444f65", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5235", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..2f8b7802e67 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ba0807f4-446e-471b-ad25-dc627d0917ff", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..3fe09832d7f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,91 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e85e108f-c5c6-4627-a409-ae5e57519e68", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "2795", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..5726948840b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 32, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "fe0912ad-2a87-4f24-a2e9-ecce88edd3a6", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:33 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..c1593d62e4b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 32, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "3d9c0acf-a5e7-41cf-a929-17a804c23cf1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..f1d5f5b426f --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 32, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c59001df-f7a6-413d-8ba2-a3a3e1f3a08c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..686dfef8424 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 32, + "minute": 1, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f9a5a6a9-a952-4183-8600-f0d709ca5902", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:49 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..5a65e1dcb4d --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ad7f2a01-f5a2-41cb-b572-e55cfff6f0fd", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:50 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..b2bbc32a63b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "ffd0c558-1fb0-4e47-8a78-ad93241a8909", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:50 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..4ce279f36de --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "aefdae0c-715c-468d-b209-df744593d702", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..a2d6c448ba0 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5e7d2b85-1951-4fa5-8003-dcae818ab111", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..9075e75e642 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "648be063-6a5d-4871-8ccf-047275662818", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 12:59:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..ba6c47c51ac --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "e5f1a740-ef05-454b-a8ce-26c6c96d6822", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:00:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..089a0a16973 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "240aa4a8-495f-4e22-973a-d1b8ca85a7b7", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:00:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..a93c555c8b2 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "71e9943b-886d-442f-bd0d-eb50d92522e2", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:00:46 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..ca810951ba1 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "518172bc-6355-4988-8a92-14c589fbfc6f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..2af22bb65b8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/modify_deleted_connection/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.13.206\n 255.255.255.252\n 30\n \n \n \n \n 52.26.213.112\n \n \n 169.254.13.205\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n PyWmFHtlfQSgohtXYC1MXVSE9i80QMOK\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.226\n 255.255.255.252\n 30\n \n \n \n \n 52.36.80.33\n \n \n 169.254.14.225\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n K_tnJM.Z5LxS.Y6vpeXIaCLdetEZik__\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.26.213.112", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.36.80.33", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 12, + "second": 28, + "minute": 59, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4679b3c8-f187-4207-81fc-79982e721cb0", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6118", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:01:18 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json new file mode 100644 index 00000000000..f278854b925 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.CreateVpnConnection_1.json @@ -0,0 +1,29 @@ +{ + "data": { + "VpnConnection": { + "CustomerGatewayId": "cgw-6113c87f", + "Options": { + "StaticRoutesOnly": true + }, + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "VpnConnectionId": "vpn-9806e28d", + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + }, + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f5a54fbe-aabf-4b5e-82f6-0fc9cd13e50c", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5234", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json new file mode 100644 index 00000000000..bf0afd35e49 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteTags_1.json @@ -0,0 +1,17 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "2714ec51-d05e-4034-8401-2c99f5247755", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:15:02 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json new file mode 100644 index 00000000000..5cdff416eb9 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DeleteVpnConnection_1.json @@ -0,0 +1,16 @@ +{ + "data": { + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d635286c-b0e0-4048-9edd-5370c643aab4", + "HTTPHeaders": { + "content-length": "239", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json new file mode 100644 index 00000000000..0e552275c2c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_1.json @@ -0,0 +1,167 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "0a7676c6-68de-4301-b107-5ef0fcf5136e", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "5448", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json new file mode 100644 index 00000000000..f5afd3ed161 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_10.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "68efe4ef-9c50-414b-bd65-cbf418c25f72", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:14:30 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json new file mode 100644 index 00000000000..56c742fafed --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_11.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7b7f58cb-4e94-4cb2-9d93-ad6e82949476", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:14:46 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json new file mode 100644 index 00000000000..fd2890b7efe --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_12.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "1d06bb9d-234a-43b4-9465-0f0d6769e7cb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:01 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json new file mode 100644 index 00000000000..18c7b173fe7 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_13.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d967fe54-4131-4d3c-8bec-ca51039d51f5", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:01 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json new file mode 100644 index 00000000000..3373af1da70 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_14.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "9bdf35c6-373f-4a9f-a86a-4f01cd15f742", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6122", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:02 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json new file mode 100644 index 00000000000..bfe18c03743 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_15.json @@ -0,0 +1,214 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 38, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 16, + "minute": 14, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "available" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9e06e28b", + "Category": "VPN", + "Tags": [ + { + "Key": "Ansible-Test", + "Value": "VPN" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9c06e289", + "Category": "VPN", + "Tags": [ + { + "Key": "One", + "Value": "one" + }, + { + "Key": "Two", + "Value": "two" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9d06e288", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9206e287", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9306e286", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9006e285", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9706e282", + "Category": "VPN", + "Tags": [ + { + "Key": "Correct", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6a06e27f", + "Category": "VPN", + "Tags": [ + { + "Key": "Wrong", + "Value": "Tag" + } + ], + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + }, + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-6f06e27a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "bcdce0f0-10da-4e78-8fbe-ac147d62013b", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-type": "text/xml;charset=UTF-8", + "server": "AmazonEC2", + "date": "Mon, 16 Apr 2018 13:15:02 GMT", + "transfer-encoding": "chunked" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..1e44c3c514b --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "4d572583-1b0c-431f-a9f9-7acd45d588e8", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:15:03 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json new file mode 100644 index 00000000000..d337c7f6938 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_2.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "c8f872e5-ef0e-4517-8ab8-9ef0788a04bc", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:26 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json new file mode 100644 index 00000000000..1d65fb2c689 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_3.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "d99d51ce-6b82-4f53-ade0-d4967b769c93", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:41 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json new file mode 100644 index 00000000000..3c63747c06c --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_4.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f43f34f0-e4d7-4888-9037-2d3f99a30f8f", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:12:57 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json new file mode 100644 index 00000000000..4b1ed8e7fd5 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_5.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "5b03354b-e15d-4cb7-92e3-b359870a99a3", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:13:13 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json new file mode 100644 index 00000000000..f10651beffd --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_6.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "a022a838-4264-4f08-b309-bea8058706ae", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:13:28 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json new file mode 100644 index 00000000000..6f5406b365a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_7.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "f9ae9cd9-ce79-4245-863b-79fd5b39cdc1", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:13:44 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json new file mode 100644 index 00000000000..25e0713fdb4 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_8.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "57806378-a669-45b1-96ec-ab29ae8a47bb", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:13:59 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json new file mode 100644 index 00000000000..98f25682a2a --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/remove_tags/ec2.DescribeVpnConnections_9.json @@ -0,0 +1,66 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9806e28d", + "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.12.22\n 255.255.255.252\n 30\n \n \n \n \n 35.165.156.252\n \n \n 169.254.12.21\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n z2x1x6uE.UaqsFoLbfNuGIzp0rZTLiT.\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.15.58\n 255.255.255.252\n 30\n \n \n \n \n 52.39.145.205\n \n \n 169.254.15.57\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n dsNLWo6G.KUBY99TYvBnEMohghrqm6.k\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "35.165.156.252", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.39.145.205", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 12, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], + "VpnGatewayId": "vgw-35d70c2b", + "State": "pending" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "7efaeb2a-f071-4178-af9c-1bcdbb383d0d", + "HTTPHeaders": { + "vary": "Accept-Encoding", + "content-length": "6120", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:14:15 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py new file mode 100644 index 00000000000..1e50d42906a --- /dev/null +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -0,0 +1,352 @@ +# (c) 2017 Red Hat Inc. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import pytest +import os +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify, maybe_sleep +from ansible_collections.community.aws.plugins.modules import ec2_vpc_vpn +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info, boto3_conn, boto3_tag_list_to_ansible_dict + + +class FakeModule(object): + def __init__(self, **kwargs): + self.params = kwargs + + def fail_json(self, *args, **kwargs): + self.exit_args = args + self.exit_kwargs = kwargs + raise Exception('FAIL') + + def exit_json(self, *args, **kwargs): + self.exit_args = args + self.exit_kwargs = kwargs + + +def get_vgw(connection): + # see if two vgw exist and return them if so + vgw = connection.describe_vpn_gateways(Filters=[{'Name': 'tag:Ansible_VPN', 'Values': ['Test']}]) + if len(vgw['VpnGateways']) >= 2: + return [vgw['VpnGateways'][0]['VpnGatewayId'], vgw['VpnGateways'][1]['VpnGatewayId']] + # otherwise create two and return them + vgw_1 = connection.create_vpn_gateway(Type='ipsec.1') + vgw_2 = connection.create_vpn_gateway(Type='ipsec.1') + for resource in (vgw_1, vgw_2): + connection.create_tags(Resources=[resource['VpnGateway']['VpnGatewayId']], Tags=[{'Key': 'Ansible_VPN', 'Value': 'Test'}]) + return [vgw_1['VpnGateway']['VpnGatewayId'], vgw_2['VpnGateway']['VpnGatewayId']] + + +def get_cgw(connection): + # see if two cgw exist and return them if so + cgw = connection.describe_customer_gateways(DryRun=False, Filters=[{'Name': 'state', 'Values': ['available']}, + {'Name': 'tag:Name', 'Values': ['Ansible-CGW']}]) + if len(cgw['CustomerGateways']) >= 2: + return [cgw['CustomerGateways'][0]['CustomerGatewayId'], cgw['CustomerGateways'][1]['CustomerGatewayId']] + # otherwise create and return them + cgw_1 = connection.create_customer_gateway(DryRun=False, Type='ipsec.1', PublicIp='9.8.7.6', BgpAsn=65000) + cgw_2 = connection.create_customer_gateway(DryRun=False, Type='ipsec.1', PublicIp='5.4.3.2', BgpAsn=65000) + for resource in (cgw_1, cgw_2): + connection.create_tags(Resources=[resource['CustomerGateway']['CustomerGatewayId']], Tags=[{'Key': 'Ansible-CGW', 'Value': 'Test'}]) + return [cgw_1['CustomerGateway']['CustomerGatewayId'], cgw_2['CustomerGateway']['CustomerGatewayId']] + + +def get_dependencies(): + if os.getenv('PLACEBO_RECORD'): + module = FakeModule(**{}) + region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True) + connection = boto3_conn(module, conn_type='client', resource='ec2', region=region, endpoint=ec2_url, **aws_connect_kwargs) + vgw = get_vgw(connection) + cgw = get_cgw(connection) + else: + vgw = ["vgw-35d70c2b", "vgw-32d70c2c"] + cgw = ["cgw-6113c87f", "cgw-9e13c880"] + + return cgw, vgw + + +def setup_mod_conn(placeboify, params): + conn = placeboify.client('ec2') + m = FakeModule(**params) + return m, conn + + +def make_params(cgw, vgw, tags=None, filters=None, routes=None): + tags = {} if tags is None else tags + filters = {} if filters is None else filters + routes = [] if routes is None else routes + + return {'customer_gateway_id': cgw, + 'static_only': True, + 'vpn_gateway_id': vgw, + 'connection_type': 'ipsec.1', + 'purge_tags': True, + 'tags': tags, + 'filters': filters, + 'routes': routes, + 'delay': 15, + 'wait_timeout': 600} + + +def make_conn(placeboify, module, connection): + customer_gateway_id = module.params['customer_gateway_id'] + static_only = module.params['static_only'] + vpn_gateway_id = module.params['vpn_gateway_id'] + connection_type = module.params['connection_type'] + check_mode = module.params['check_mode'] + changed = True + vpn = ec2_vpc_vpn.create_connection(connection, customer_gateway_id, static_only, vpn_gateway_id, connection_type) + return changed, vpn + + +def tear_down_conn(placeboify, connection, vpn_connection_id): + ec2_vpc_vpn.delete_connection(connection, vpn_connection_id, delay=15, max_attempts=40) + + +def test_find_connection_vpc_conn_id(placeboify, maybe_sleep): + # setup dependencies for 2 vpn connections + dependencies = setup_req(placeboify, 2) + dep1, dep2 = dependencies[0], dependencies[1] + params1, vpn1, m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] + params2, vpn2, m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] + + # find the connection with a vpn_connection_id and assert it is the expected one + assert vpn1['VpnConnectionId'] == ec2_vpc_vpn.find_connection(conn1, params1, vpn1['VpnConnectionId'])['VpnConnectionId'] + + tear_down_conn(placeboify, conn1, vpn1['VpnConnectionId']) + tear_down_conn(placeboify, conn2, vpn2['VpnConnectionId']) + + +def test_find_connection_filters(placeboify, maybe_sleep): + # setup dependencies for 2 vpn connections + dependencies = setup_req(placeboify, 2) + dep1, dep2 = dependencies[0], dependencies[1] + params1, vpn1, m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] + params2, vpn2, m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] + + # update to different tags + params1.update(tags={'Wrong': 'Tag'}) + params2.update(tags={'Correct': 'Tag'}) + ec2_vpc_vpn.ensure_present(conn1, params1) + ec2_vpc_vpn.ensure_present(conn2, params2) + + # create some new parameters for a filter + params = {'filters': {'tags': {'Correct': 'Tag'}}} + + # find the connection that has the parameters above + found = ec2_vpc_vpn.find_connection(conn1, params) + + # assert the correct connection was found + assert found['VpnConnectionId'] == vpn2['VpnConnectionId'] + + # delete the connections + tear_down_conn(placeboify, conn1, vpn1['VpnConnectionId']) + tear_down_conn(placeboify, conn2, vpn2['VpnConnectionId']) + + +def test_find_connection_insufficient_filters(placeboify, maybe_sleep): + # get list of customer gateways and virtual private gateways + cgw, vgw = get_dependencies() + + # create two connections with the same tags + params = make_params(cgw[0], vgw[0], tags={'Correct': 'Tag'}) + params2 = make_params(cgw[1], vgw[1], tags={'Correct': 'Tag'}) + m, conn = setup_mod_conn(placeboify, params) + m2, conn2 = setup_mod_conn(placeboify, params2) + vpn1 = ec2_vpc_vpn.ensure_present(conn, m.params)[1] + vpn2 = ec2_vpc_vpn.ensure_present(conn2, m2.params)[1] + + # reset the parameters so only filtering by tags will occur + m.params = {'filters': {'tags': {'Correct': 'Tag'}}} + + # assert that multiple matching connections have been found + with pytest.raises(Exception) as error_message: + ec2_vpc_vpn.find_connection(conn, m.params) + assert error_message == "More than one matching VPN connection was found.To modify or delete a VPN please specify vpn_connection_id or add filters." + + # delete the connections + tear_down_conn(placeboify, conn, vpn1['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn2['VpnConnectionId']) + + +def test_find_connection_nonexistent(placeboify, maybe_sleep): + # create parameters but don't create a connection with them + params = {'filters': {'tags': {'Correct': 'Tag'}}} + m, conn = setup_mod_conn(placeboify, params) + + # try to find a connection with matching parameters and assert None are found + assert ec2_vpc_vpn.find_connection(conn, m.params) is None + + +def test_create_connection(placeboify, maybe_sleep): + # get list of customer gateways and virtual private gateways + cgw, vgw = get_dependencies() + + # create a connection + params = make_params(cgw[0], vgw[0]) + m, conn = setup_mod_conn(placeboify, params) + changed, vpn = ec2_vpc_vpn.ensure_present(conn, m.params) + + # assert that changed is true and that there is a connection id + assert changed is True + assert 'VpnConnectionId' in vpn + + # delete connection + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + +def test_create_connection_that_exists(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + + # try to recreate the same connection + changed, vpn2 = ec2_vpc_vpn.ensure_present(conn, params) + + # nothing should have changed + assert changed is False + assert vpn['VpnConnectionId'] == vpn2['VpnConnectionId'] + + # delete connection + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + +def test_modify_deleted_connection(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + + # delete it + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + # try to update the deleted connection + m.params.update(vpn_connection_id=vpn['VpnConnectionId']) + with pytest.raises(Exception) as error_message: + ec2_vpc_vpn.ensure_present(conn, m.params) + assert error_message == "There is no VPN connection available or pending with that id. Did you delete it?" + + +def test_delete_connection(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + + # delete it + changed, vpn = ec2_vpc_vpn.ensure_absent(conn, m.params) + + assert changed is True + assert vpn == {} + + +def test_delete_nonexistent_connection(placeboify, maybe_sleep): + # create parameters and ensure any connection matching (None) is deleted + params = {'filters': {'tags': {'ThisConnection': 'DoesntExist'}}, 'delay': 15, 'wait_timeout': 600} + m, conn = setup_mod_conn(placeboify, params) + changed, vpn = ec2_vpc_vpn.ensure_absent(conn, m.params) + + assert changed is False + assert vpn == {} + + +def test_check_for_update_tags(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + + # add and remove a number of tags + m.params['tags'] = {'One': 'one', 'Two': 'two'} + ec2_vpc_vpn.ensure_present(conn, m.params) + m.params['tags'] = {'Two': 'two', 'Three': 'three', 'Four': 'four'} + changes = ec2_vpc_vpn.check_for_update(conn, m.params, vpn['VpnConnectionId']) + + flat_dict_changes = boto3_tag_list_to_ansible_dict(changes['tags_to_add']) + correct_changes = boto3_tag_list_to_ansible_dict([{'Key': 'Three', 'Value': 'three'}, {'Key': 'Four', 'Value': 'four'}]) + assert flat_dict_changes == correct_changes + assert changes['tags_to_remove'] == ['One'] + + # delete connection + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + +def test_check_for_update_nonmodifiable_attr(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + current_vgw = params['vpn_gateway_id'] + + # update a parameter that isn't modifiable + m.params.update(vpn_gateway_id="invalidchange") + + err = 'You cannot modify vpn_gateway_id, the current value of which is {0}. Modifiable VPN connection attributes are tags.'.format(current_vgw) + with pytest.raises(Exception) as error_message: + ec2_vpc_vpn.check_for_update(m, conn, vpn['VpnConnectionId']) + assert error_message == err + + # delete connection + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + +def test_add_tags(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + + # add a tag to the connection + ec2_vpc_vpn.add_tags(conn, vpn['VpnConnectionId'], add=[{'Key': 'Ansible-Test', 'Value': 'VPN'}]) + + # assert tag is there + current_vpn = ec2_vpc_vpn.find_connection(conn, params) + assert current_vpn['Tags'] == [{'Key': 'Ansible-Test', 'Value': 'VPN'}] + + # delete connection + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + +def test_remove_tags(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + + # remove a tag from the connection + ec2_vpc_vpn.remove_tags(conn, vpn['VpnConnectionId'], remove=['Ansible-Test']) + + # assert the tag is gone + current_vpn = ec2_vpc_vpn.find_connection(conn, params) + assert 'Tags' not in current_vpn + + # delete connection + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + +def test_add_routes(placeboify, maybe_sleep): + # setup dependencies for 1 vpn connection + dependencies = setup_req(placeboify, 1) + params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + + # create connection with a route + ec2_vpc_vpn.add_routes(conn, vpn['VpnConnectionId'], ['195.168.2.0/24', '196.168.2.0/24']) + + # assert both routes are there + current_vpn = ec2_vpc_vpn.find_connection(conn, params) + assert set(each['DestinationCidrBlock'] for each in current_vpn['Routes']) == set(['195.168.2.0/24', '196.168.2.0/24']) + + # delete connection + tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + + +def setup_req(placeboify, number_of_results=1): + ''' returns dependencies for VPN connections ''' + assert number_of_results in (1, 2) + results = [] + cgw, vgw = get_dependencies() + for each in range(0, number_of_results): + params = make_params(cgw[each], vgw[each]) + m, conn = setup_mod_conn(placeboify, params) + vpn = ec2_vpc_vpn.ensure_present(conn, params)[1] + + results.append({'module': m, 'connection': conn, 'vpn': vpn, 'params': params}) + if number_of_results == 1: + return results[0] + else: + return results[0], results[1] From 47fd10b55dea29c64755111ef2128f23855c309e Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 15 Mar 2021 17:29:27 +0100 Subject: [PATCH 13/38] Attempt to improve the stability of ec2_vpc_vgw and ec2_vpc_vpn (#162) * Add a custom Retry so we can retry when we receive 'The maximum number of mutating objects has been reached' * Update ec2_vpc_vpn unit test to use a connection with an AWSRetry decorator * changelog This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/79e09283aae7996a271ba9251c2768d7467be9bd --- plugins/modules/ec2_vpc_vpn.py | 57 ++++++++++++++----- .../unit/plugins/modules/test_ec2_vpc_vpn.py | 20 ++++++- 2 files changed, 59 insertions(+), 18 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 6e18e724258..56bb4e9b8fd 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -298,14 +298,13 @@ vpn_connection_id: vpn-781e0e19 """ -from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule from ansible.module_utils._text import to_text -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ( - camel_dict_to_snake_dict, - boto3_tag_list_to_ansible_dict, - compare_aws_tags, - ansible_dict_to_boto3_tag_list, -) +from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ansible_dict_to_boto3_tag_list +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_tag_list_to_ansible_dict +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import camel_dict_to_snake_dict +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import compare_aws_tags try: from botocore.exceptions import BotoCoreError, ClientError, WaiterError @@ -319,6 +318,29 @@ def __init__(self, msg, exception=None): self.exception = exception +# AWS uses VpnGatewayLimitExceeded for both 'Too many VGWs' and 'Too many concurrent changes' +# we need to look at the mesage to tell the difference. +class VPNRetry(AWSRetry): + @staticmethod + def status_code_from_exception(error): + return (error.response['Error']['Code'], error.response['Error']['Message'],) + + @staticmethod + def found(response_codes, catch_extra_error_codes=None): + retry_on = ['The maximum number of mutating objects has been reached.'] + + if catch_extra_error_codes: + retry_on.extend(catch_extra_error_codes) + if not isinstance(response_codes, tuple): + response_codes = (response_codes,) + + for code in response_codes: + if super().found(response_codes, catch_extra_error_codes): + return True + + return False + + def find_connection(connection, module_params, vpn_connection_id=None): ''' Looks for a unique VPN connection. Uses find_connection_response() to return the connection found, None, or raise an error if there were multiple viable connections. ''' @@ -342,10 +364,11 @@ def find_connection(connection, module_params, vpn_connection_id=None): # see if there is a unique matching connection try: if vpn_connection_id: - existing_conn = connection.describe_vpn_connections(VpnConnectionIds=vpn_connection_id, + existing_conn = connection.describe_vpn_connections(aws_retry=True, + VpnConnectionIds=vpn_connection_id, Filters=formatted_filter) else: - existing_conn = connection.describe_vpn_connections(Filters=formatted_filter) + existing_conn = connection.describe_vpn_connections(aws_retry=True, Filters=formatted_filter) except (BotoCoreError, ClientError) as e: raise VPNConnectionException(msg="Failed while describing VPN connection.", exception=e) @@ -356,7 +379,8 @@ def find_connection(connection, module_params, vpn_connection_id=None): def add_routes(connection, vpn_connection_id, routes_to_add): for route in routes_to_add: try: - connection.create_vpn_connection_route(VpnConnectionId=vpn_connection_id, + connection.create_vpn_connection_route(aws_retry=True, + VpnConnectionId=vpn_connection_id, DestinationCidrBlock=route) except (BotoCoreError, ClientError) as e: raise VPNConnectionException(msg="Failed while adding route {0} to the VPN connection {1}.".format(route, vpn_connection_id), @@ -366,7 +390,8 @@ def add_routes(connection, vpn_connection_id, routes_to_add): def remove_routes(connection, vpn_connection_id, routes_to_remove): for route in routes_to_remove: try: - connection.delete_vpn_connection_route(VpnConnectionId=vpn_connection_id, + connection.delete_vpn_connection_route(aws_retry=True, + VpnConnectionId=vpn_connection_id, DestinationCidrBlock=route) except (BotoCoreError, ClientError) as e: raise VPNConnectionException(msg="Failed to remove route {0} from the VPN connection {1}.".format(route, vpn_connection_id), @@ -504,7 +529,7 @@ def create_connection(connection, customer_gateway_id, static_only, vpn_gateway_ def delete_connection(connection, vpn_connection_id, delay, max_attempts): """ Deletes a VPN connection """ try: - connection.delete_vpn_connection(VpnConnectionId=vpn_connection_id) + connection.delete_vpn_connection(aws_retry=True, VpnConnectionId=vpn_connection_id) connection.get_waiter('vpn_connection_deleted').wait( VpnConnectionIds=[vpn_connection_id], WaiterConfig={'Delay': delay, 'MaxAttempts': max_attempts} @@ -519,7 +544,8 @@ def delete_connection(connection, vpn_connection_id, delay, max_attempts): def add_tags(connection, vpn_connection_id, add): try: - connection.create_tags(Resources=[vpn_connection_id], + connection.create_tags(aws_retry=True, + Resources=[vpn_connection_id], Tags=add) except (BotoCoreError, ClientError) as e: raise VPNConnectionException(msg="Failed to add the tags: {0}.".format(add), @@ -530,7 +556,8 @@ def remove_tags(connection, vpn_connection_id, remove): # format tags since they are a list in the format ['tag1', 'tag2', 'tag3'] key_dict_list = [{'Key': tag} for tag in remove] try: - connection.delete_tags(Resources=[vpn_connection_id], + connection.delete_tags(aws_retry=True, + Resources=[vpn_connection_id], Tags=key_dict_list) except (BotoCoreError, ClientError) as e: raise VPNConnectionException(msg="Failed to remove the tags: {0}.".format(remove), @@ -755,7 +782,7 @@ def main(): ) module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True) - connection = module.client('ec2') + connection = module.client('ec2', retry_decorator=VPNRetry.jittered_backoff(retries=10)) state = module.params.get('state') parameters = dict(module.params) diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 1e50d42906a..ee8f284a1f6 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -6,15 +6,27 @@ import pytest import os -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify, maybe_sleep +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep + +import ansible_collections.amazon.aws.plugins.module_utils.core as aws_core +import ansible_collections.amazon.aws.plugins.module_utils.ec2 as aws_ec2 +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_conn +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_tag_list_to_ansible_dict + from ansible_collections.community.aws.plugins.modules import ec2_vpc_vpn -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info, boto3_conn, boto3_tag_list_to_ansible_dict class FakeModule(object): def __init__(self, **kwargs): self.params = kwargs + def fail_json_aws(self, *args, **kwargs): + self.exit_args = args + self.exit_kwargs = kwargs + raise Exception('FAIL') + def fail_json(self, *args, **kwargs): self.exit_args = args self.exit_kwargs = kwargs @@ -68,8 +80,10 @@ def get_dependencies(): def setup_mod_conn(placeboify, params): conn = placeboify.client('ec2') + retry_decorator = aws_ec2.AWSRetry.jittered_backoff() + wrapped_conn = aws_core._RetryingBotoClientWrapper(conn, retry_decorator) m = FakeModule(**params) - return m, conn + return m, wrapped_conn def make_params(cgw, vgw, tags=None, filters=None, routes=None): From 06a1a51b07ef4cb8a51c180ff2e5cc647948263f Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 6 May 2021 21:01:46 +0200 Subject: [PATCH 14/38] Update the default module requirements from python 2.6/boto to python 3.6/boto3 This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/c097c55293be0834a2b9d394733ec28965d142d7 --- plugins/modules/ec2_vpc_vpn.py | 2 -- plugins/modules/ec2_vpc_vpn_info.py | 1 - 2 files changed, 3 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 56bb4e9b8fd..e69d3f55e82 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -17,8 +17,6 @@ extends_documentation_fragment: - amazon.aws.ec2 - amazon.aws.aws - -requirements: ['boto3', 'botocore'] author: "Sloane Hertel (@s-hertel)" options: state: diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index e96583f669e..31fe02621b4 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -14,7 +14,6 @@ description: - Gather information about VPN Connections in AWS. - This module was called C(ec2_vpc_vpn_facts) before Ansible 2.9. The usage did not change. -requirements: [ boto3 ] author: Madhura Naniwadekar (@Madhura-CSI) options: filters: From 6de2a9c2817d7da943f0d4dfd92cb8b02f202811 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 9 Jul 2021 10:01:23 +0200 Subject: [PATCH 15/38] ignore unused placeboify/maybe_sleep imports There's some unittest magic involved This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/b857bf4cb9f8ce539b9ef37cbf57c31390e187d2 --- tests/unit/plugins/modules/test_ec2_vpc_vpn.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index ee8f284a1f6..9ee706286b3 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -6,8 +6,10 @@ import pytest import os -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep + +# Magic... Incorrectly identified by pylint as unused +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep # pylint: disable=unused-import import ansible_collections.amazon.aws.plugins.module_utils.core as aws_core import ansible_collections.amazon.aws.plugins.module_utils.ec2 as aws_ec2 From b79bd284713b18b8f4ea31b86c7b30e73cbddafb Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 9 Jul 2021 10:22:26 +0200 Subject: [PATCH 16/38] Reorder imports based on PEP8 import recommendations This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/fe960aceacd6b0d20f23f3d350ab66964422f1fe --- tests/unit/plugins/modules/test_ec2_vpc_vpn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 9ee706286b3..49ef596a5b1 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -4,8 +4,8 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type -import pytest import os +import pytest # Magic... Incorrectly identified by pylint as unused from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import From e027f77ebcc9e74c3ceca1c05b4afa6e19308759 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 12 Aug 2021 09:55:55 +0200 Subject: [PATCH 17/38] Fix pylint test errors "arguments-renamed" This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/b73054925b65cb158a037c9ede62641c998596db --- plugins/modules/ec2_vpc_vpn.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index e69d3f55e82..df060eaa4c8 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -324,16 +324,16 @@ def status_code_from_exception(error): return (error.response['Error']['Code'], error.response['Error']['Message'],) @staticmethod - def found(response_codes, catch_extra_error_codes=None): + def found(response_code, catch_extra_error_codes=None): retry_on = ['The maximum number of mutating objects has been reached.'] if catch_extra_error_codes: retry_on.extend(catch_extra_error_codes) - if not isinstance(response_codes, tuple): - response_codes = (response_codes,) + if not isinstance(response_code, tuple): + response_code = (response_code,) - for code in response_codes: - if super().found(response_codes, catch_extra_error_codes): + for code in response_code: + if super().found(response_code, catch_extra_error_codes): return True return False From 60a6ed5bd23811106c1e2d0ca772c979b8a49f48 Mon Sep 17 00:00:00 2001 From: Jill R <4121322+jillr@users.noreply.github.com> Date: Thu, 2 Dec 2021 02:58:06 -0700 Subject: [PATCH 18/38] Remove deprecated "facts" aliases (#814) Remove deprecated "facts" aliases SUMMARY Modules named "facts.py" that do not return ansible_facts were renamed to "info.py" in 2.9. Remove these aliases now that the deprecation period is over. This PR should be included in 3.0.0 of the collection. ISSUE TYPE Bugfix Pull Request COMPONENT NAME *_facts.py Reviewed-by: Mark Chappell Reviewed-by: Jill R Reviewed-by: None This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/68aaa7057be46a3ab36f572fd0013d64653af909 --- plugins/modules/ec2_vpc_vpn_info.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 31fe02621b4..57ebb17e852 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -13,7 +13,6 @@ short_description: Gather information about VPN Connections in AWS. description: - Gather information about VPN Connections in AWS. - - This module was called C(ec2_vpc_vpn_facts) before Ansible 2.9. The usage did not change. author: Madhura Naniwadekar (@Madhura-CSI) options: filters: @@ -204,8 +203,6 @@ def main(): module = AnsibleAWSModule(argument_spec=argument_spec, mutually_exclusive=[['vpn_connection_ids', 'filters']], supports_check_mode=True) - if module._module._name == 'ec2_vpc_vpn_facts': - module._module.deprecate("The 'ec2_vpc_vpn_facts' module has been renamed to 'ec2_vpc_vpn_info'", date='2021-12-01', collection_name='community.aws') connection = module.client('ec2') From c5b575d7155ca73993ab224d2cf8409d5a1a2b9a Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Tue, 1 Feb 2022 23:06:06 +0100 Subject: [PATCH 19/38] Fix unit tests which broke due to things being moved about in amazon.aws (#914) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix unit tests which broke due to things being moved about in amazon.aws Depends-On: ansible/ansible-zuul-jobs#1324 SUMMARY ansible-collections/amazon.aws#649 moved a few things around, including a "private" wrapper class. The shuffles broke part of the monkey patching in some unit tests, and the private wrapper class wasn't made available in the old location (it's private, using it might result in things breaking) ISSUE TYPE Bugfix Pull Request COMPONENT NAME tests/unit/plugins/modules/test_aws_api_gateway.py tests/unit/plugins/modules/test_ec2_vpc_vpn.py ADDITIONAL INFORMATION CC @marknet15 Reviewed-by: Gonéri Le Bouder This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/3e30e37d7188e75a3ef19173e6a476742ce21e8e --- tests/unit/plugins/modules/test_ec2_vpc_vpn.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 49ef596a5b1..19fce6a4da8 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -11,8 +11,8 @@ from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep # pylint: disable=unused-import -import ansible_collections.amazon.aws.plugins.module_utils.core as aws_core -import ansible_collections.amazon.aws.plugins.module_utils.ec2 as aws_ec2 +import ansible_collections.amazon.aws.plugins.module_utils.modules as aws_modules +import ansible_collections.amazon.aws.plugins.module_utils.retries as aws_retries from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_conn from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_tag_list_to_ansible_dict @@ -82,8 +82,8 @@ def get_dependencies(): def setup_mod_conn(placeboify, params): conn = placeboify.client('ec2') - retry_decorator = aws_ec2.AWSRetry.jittered_backoff() - wrapped_conn = aws_core._RetryingBotoClientWrapper(conn, retry_decorator) + retry_decorator = aws_retries.AWSRetry.jittered_backoff() + wrapped_conn = aws_modules._RetryingBotoClientWrapper(conn, retry_decorator) m = FakeModule(**params) return m, wrapped_conn From ddaf1a7000e094ecf7d7a098a40f4daad468fbac Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Tue, 31 May 2022 21:16:43 +0200 Subject: [PATCH 20/38] Tagging - remove default empty dict where purge_tags default is False (#1186) Tagging - remove default empty dict where purge_tags default is False Depends-On: ansible-collections/amazon.aws#844 SUMMARY Deprecate purge_tags=False Remove default of empty dict for tags ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/aws_kms.py plugins/modules/cloudfront_distribution.py plugins/modules/ec2_vpc_vpn.py plugins/modules/rds_param_group.py ADDITIONAL INFORMATION Reviewed-by: Markus Bergholz Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/374bcfd2a3885b86f6d8849431d4bacb11cab715 --- plugins/modules/ec2_vpc_vpn.py | 39 +++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index df060eaa4c8..a1877326d33 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -10,14 +10,16 @@ --- module: ec2_vpc_vpn version_added: 1.0.0 -short_description: Create, modify, and delete EC2 VPN connections. +short_description: Create, modify, and delete EC2 VPN connections description: - This module creates, modifies, and deletes VPN connections. Idempotence is achieved by using the filters option or specifying the VPN connection identifier. extends_documentation_fragment: -- amazon.aws.ec2 -- amazon.aws.aws -author: "Sloane Hertel (@s-hertel)" + - amazon.aws.ec2 + - amazon.aws.aws + - amazon.aws.tags.deprecated_purge +author: + - "Sloane Hertel (@s-hertel)" options: state: description: @@ -44,15 +46,6 @@ description: - The ID of the VPN connection. Required to modify or delete a connection if the filters option does not provide a unique match. type: str - tags: - description: - - Tags to attach to the VPN connection. - type: dict - purge_tags: - description: - - Whether or not to delete VPN connections tags that are associated with the connection but not specified in the task. - type: bool - default: false static_only: description: - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP. @@ -580,8 +573,12 @@ def check_for_update(connection, module_params, vpn_connection_id): # Get changes to tags current_tags = boto3_tag_list_to_ansible_dict(current_attrs.get('tags', []), u'key', u'value') - tags_to_add, changes['tags_to_remove'] = compare_aws_tags(current_tags, tags, purge_tags) - changes['tags_to_add'] = ansible_dict_to_boto3_tag_list(tags_to_add) + if tags is None: + changes['tags_to_remove'] = [] + changes['tags_to_add'] = [] + else: + tags_to_add, changes['tags_to_remove'] = compare_aws_tags(current_tags, tags, purge_tags) + changes['tags_to_add'] = ansible_dict_to_boto3_tag_list(tags_to_add) # Get changes to routes if 'Routes' in vpn_connection: current_routes = [route['DestinationCidrBlock'] for route in vpn_connection['Routes']] @@ -766,13 +763,13 @@ def main(): state=dict(type='str', default='present', choices=['present', 'absent']), filters=dict(type='dict', default={}), vpn_gateway_id=dict(type='str'), - tags=dict(default={}, type='dict'), + tags=dict(type='dict', aliases=['resource_tags']), connection_type=dict(default='ipsec.1', type='str'), tunnel_options=dict(no_log=True, type='list', default=[], elements='dict'), static_only=dict(default=False, type='bool'), customer_gateway_id=dict(type='str'), vpn_connection_id=dict(type='str'), - purge_tags=dict(type='bool', default=False), + purge_tags=dict(type='bool'), routes=dict(type='list', default=[], elements='str'), purge_routes=dict(type='bool', default=False), wait_timeout=dict(type='int', default=600), @@ -782,6 +779,14 @@ def main(): supports_check_mode=True) connection = module.client('ec2', retry_decorator=VPNRetry.jittered_backoff(retries=10)) + if module.params.get('purge_tags') is None: + module.deprecate( + 'The purge_tags parameter currently defaults to False.' + ' For consistency across the collection, this default value' + ' will change to True in release 5.0.0.', + version='5.0.0', collection_name='community.aws') + module.params['purge_tags'] = False + state = module.params.get('state') parameters = dict(module.params) From 10d42d17d2ee3fa3528715d684662d51b31ba659 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 20 Jun 2022 11:18:41 +0200 Subject: [PATCH 21/38] ec2_vpc_vpn - fix exception when running in check mode without tags set (#1242) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ec2_vpc_vpn - fix exception when running in check mode without tags set SUMMARY Rename ec2_vpc_vpn_info tests to ec2_vpc_vpn so we have baseline testing for VPNs (keep ec2_vpc_vpn_info as an alias) fix exception when run in check mode without tags set. ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_vpc_vpn ADDITIONAL INFORMATION TASK [ec2_vpc_vpn : (check) No change to tags without setting tags] ************ task path: /root/ansible_collections/community/aws/tests/output/.tmp/integration/ec2_vpc_vpn-oywt620e-ÅÑŚÌβŁÈ/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml:248 Using module file /root/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py Pipelining is enabled. ESTABLISH LOCAL CONNECTION FOR USER: root EXEC /bin/sh -c 'ANSIBLE_DEBUG_BOTOCORE_LOGS=True /usr/bin/python3.10 && sleep 0' The full traceback is: Traceback (most recent call last): File "", line 121, in File "", line 113, in _ansiballz_main File "", line 61, in invoke_module File "/usr/lib/python3.10/runpy.py", line 209, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 808, in File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 795, in main File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 714, in ensure_present File "/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py", line 661, in get_check_mode_results AttributeError: 'NoneType' object has no attribute 'keys' fatal: [testhost]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"\", line 121, in \n File \"\", line 113, in _ansiballz_main\n File \"\", line 61, in invoke_module\n File \"/usr/lib/python3.10/runpy.py\", line 209, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.10/runpy.py\", line 96, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.10/runpy.py\", line 86, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 808, in \n File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 795, in main\n File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 714, in ensure_present\n File \"/tmp/ansible_ec2_vpc_vpn_payload_0zo_xg79/ansible_ec2_vpc_vpn_payload.zip/ansible_collections/community/aws/plugins/modules/ec2_vpc_vpn.py\", line 661, in get_check_mode_results\nAttributeError: 'NoneType' object has no attribute 'keys'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/34336400a7a1902ea37a351667a46ecf6e2aa0fb --- plugins/modules/ec2_vpc_vpn.py | 18 +- tests/integration/targets/ec2_vpc_vpn/aliases | 3 + .../targets/ec2_vpc_vpn/meta/main.yml | 1 + .../targets/ec2_vpc_vpn/tasks/main.yml | 165 +++++++++ .../targets/ec2_vpc_vpn/tasks/tags.yml | 338 ++++++++++++++++++ 5 files changed, 515 insertions(+), 10 deletions(-) create mode 100644 tests/integration/targets/ec2_vpc_vpn/aliases create mode 100644 tests/integration/targets/ec2_vpc_vpn/meta/main.yml create mode 100644 tests/integration/targets/ec2_vpc_vpn/tasks/main.yml create mode 100644 tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index a1877326d33..8e22b973c2e 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -652,18 +652,16 @@ def get_check_mode_results(connection, module_params, vpn_connection_id=None, cu # get combined current tags and tags to set present_tags = module_params.get('tags') - if current_state and 'Tags' in current_state: + if present_tags is None: + pass + elif current_state and 'Tags' in current_state: current_tags = boto3_tag_list_to_ansible_dict(current_state['Tags']) + tags_to_add, tags_to_remove = compare_aws_tags(current_tags, present_tags, module_params.get('purge_tags')) + changed |= bool(tags_to_remove) or bool(tags_to_add) if module_params.get('purge_tags'): - if current_tags != present_tags: - changed = True - elif current_tags != present_tags: - if not set(present_tags.keys()) < set(current_tags.keys()): - changed = True - # add preexisting tags that new tags didn't overwrite - present_tags.update((tag, current_tags[tag]) for tag in current_tags if tag not in present_tags) - elif current_tags.keys() == present_tags.keys() and set(present_tags.values()) != set(current_tags.values()): - changed = True + current_tags = {} + current_tags.update(present_tags) + results['tags'] = current_tags elif module_params.get('tags'): changed = True if present_tags: diff --git a/tests/integration/targets/ec2_vpc_vpn/aliases b/tests/integration/targets/ec2_vpc_vpn/aliases new file mode 100644 index 00000000000..28e84af91be --- /dev/null +++ b/tests/integration/targets/ec2_vpc_vpn/aliases @@ -0,0 +1,3 @@ +cloud/aws + +ec2_vpc_vpn_info diff --git a/tests/integration/targets/ec2_vpc_vpn/meta/main.yml b/tests/integration/targets/ec2_vpc_vpn/meta/main.yml new file mode 100644 index 00000000000..32cf5dda7ed --- /dev/null +++ b/tests/integration/targets/ec2_vpc_vpn/meta/main.yml @@ -0,0 +1 @@ +dependencies: [] diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml new file mode 100644 index 00000000000..a4c740887e8 --- /dev/null +++ b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml @@ -0,0 +1,165 @@ +--- +- name: 'ec2_vpc_vpn_info integration tests' + collections: + - amazon.aws + module_defaults: + group/aws: + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' + block: + + # ============================================================ + - name: create a VPC + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: present + cidr_block: "10.0.0.0/26" + tags: + Name: "{{ resource_prefix }}-vpc" + Description: "Created by ansible-test" + register: vpc_result + + - name: create vpn gateway and attach it to vpc + ec2_vpc_vgw: + state: present + vpc_id: '{{ vpc_result.vpc.id }}' + name: "{{ resource_prefix }}-vgw" + register: vgw + + - name: create customer gateway + ec2_customer_gateway: + bgp_asn: 12345 + ip_address: 1.2.3.4 + name: testcgw + register: cgw + + - name: create vpn connection, with customer gateway + ec2_vpc_vpn: + customer_gateway_id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' + vpn_gateway_id: '{{ vgw.vgw.id }}' + state: present + register: vpn + + - name: Store ID of VPN + set_fact: + vpn_id: '{{ vpn.vpn_connection_id }}' + + # ============================================================ + - name: test success with no parameters + ec2_vpc_vpn_info: + register: result + + - name: assert success with no parameters + assert: + that: + - 'result.changed == false' + - 'result.vpn_connections != []' + + - name: test success with customer gateway id as a filter + ec2_vpc_vpn_info: + filters: + customer-gateway-id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' + vpn-connection-id: '{{ vpn.vpn_connection_id }}' + register: result + + - name: assert success with customer gateway id as filter + assert: + that: + - 'result.changed == false' + - 'result.vpn_connections != []' + + # ============================================================ + + - include_tasks: 'tags.yml' + + # ============================================================ + + - name: delete vpn connection (check) + ec2_vpc_vpn: + state: absent + vpn_connection_id: '{{ vpn_id }}' + register: result + check_mode: True + + - assert: + that: + - result is changed + + - name: delete vpn connection + ec2_vpc_vpn: + state: absent + vpn_connection_id: '{{ vpn_id }}' + register: result + + - assert: + that: + - result is changed + + - name: delete vpn connection - idempotency (check) + ec2_vpc_vpn: + state: absent + vpn_connection_id: '{{ vpn_id }}' + register: result + check_mode: True + + - assert: + that: + - result is not changed + + - name: delete vpn connection - idempotency + ec2_vpc_vpn: + state: absent + vpn_connection_id: '{{ vpn_id }}' + register: result + + - assert: + that: + - result is not changed + + # ============================================================ + always: + + - name: delete vpn connection + ec2_vpc_vpn: + state: absent + vpn_connection_id: '{{ vpn.vpn_connection_id }}' + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true + + - name: delete customer gateway + ec2_customer_gateway: + state: absent + ip_address: 1.2.3.4 + name: testcgw + bgp_asn: 12345 + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true + + - name: delete vpn gateway + ec2_vpc_vgw: + state: absent + vpn_gateway_id: '{{ vgw.vgw.id }}' + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true + + - name: delete vpc + ec2_vpc_net: + name: "{{ resource_prefix }}-vpc" + state: absent + cidr_block: "10.0.0.0/26" + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml new file mode 100644 index 00000000000..fb97f01faab --- /dev/null +++ b/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml @@ -0,0 +1,338 @@ +- vars: + first_tags: + 'Key with Spaces': Value with spaces + CamelCaseKey: CamelCaseValue + pascalCaseKey: pascalCaseValue + snake_case_key: snake_case_value + second_tags: + 'New Key with Spaces': Value with spaces + NewCamelCaseKey: CamelCaseValue + newPascalCaseKey: pascalCaseValue + new_snake_case_key: snake_case_value + third_tags: + 'Key with Spaces': Value with spaces + CamelCaseKey: CamelCaseValue + pascalCaseKey: pascalCaseValue + snake_case_key: snake_case_value + 'New Key with Spaces': Updated Value with spaces + final_tags: + 'Key with Spaces': Value with spaces + CamelCaseKey: CamelCaseValue + pascalCaseKey: pascalCaseValue + snake_case_key: snake_case_value + 'New Key with Spaces': Updated Value with spaces + NewCamelCaseKey: CamelCaseValue + newPascalCaseKey: pascalCaseValue + new_snake_case_key: snake_case_value + module_defaults: + ec2_vpc_vpn: + vpn_connection_id: '{{ vpn_id }}' + ec2_vpc_vpn_info: + filters: + vpn-connection-id: '{{ vpn_id }}' + block: + + # ============================================================ + + - name: (check) add tags + ec2_vpc_vpn: + tags: '{{ first_tags }}' + state: 'present' + register: tag_vpn + check_mode: True + + - name: assert would change + assert: + that: + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: add tags + ec2_vpc_vpn: + tags: '{{ first_tags }}' + state: 'present' + register: tag_vpn + + - name: get VPC VPN facts + ec2_vpc_vpn_info: {} + register: tag_vpn_info + + - name: verify the tags were added + assert: + that: + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == first_tags + + - name: (check) add tags - IDEMPOTENCY + ec2_vpc_vpn: + tags: '{{ first_tags }}' + state: 'present' + register: tag_vpn + check_mode: True + + - name: assert would not change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: add tags - IDEMPOTENCY + ec2_vpc_vpn: + tags: '{{ first_tags }}' + state: 'present' + register: tag_vpn + - name: get VPC VPN facts + ec2_vpc_vpn_info: {} + register: tag_vpn_info + + - name: verify no change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == first_tags + + # ============================================================ + +# - name: get VPC VPN facts by filter +# ec2_vpc_vpn_info: +# filters: +# 'tag:Name': '{{ vgw_name }}' +# vpn_connection_ids: '{{ omit }}' +# register: tag_vpn_info +# +# - name: assert the facts are the same as before +# assert: +# that: +# - tag_vpn_info.vpn_connections | length == 1 +# - tag_vpn.vpn_connection_id == vpn_id +# - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + + # ============================================================ + + - name: (check) modify tags with purge + ec2_vpc_vpn: + tags: '{{ second_tags }}' + state: 'present' + purge_tags: true + register: tag_vpn + check_mode: True + + - name: assert would change + assert: + that: + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: modify tags with purge + ec2_vpc_vpn: + tags: '{{ second_tags }}' + state: 'present' + purge_tags: true + register: tag_vpn + - name: get VPC VPN facts + ec2_vpc_vpn_info: + register: tag_vpn_info + + - name: verify the tags were added + assert: + that: + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == second_tags + + - name: (check) modify tags with purge - IDEMPOTENCY + ec2_vpc_vpn: + tags: '{{ second_tags }}' + state: 'present' + purge_tags: true + register: tag_vpn + check_mode: True + + - name: assert would not change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: modify tags with purge - IDEMPOTENCY + ec2_vpc_vpn: + tags: '{{ second_tags }}' + state: 'present' + purge_tags: true + register: tag_vpn + - name: get VPC VPN facts + ec2_vpc_vpn_info: + register: tag_vpn_info + + - name: verify no change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == second_tags + + # ============================================================ + + - name: (check) modify tags without purge + ec2_vpc_vpn: + tags: '{{ third_tags }}' + state: 'present' + purge_tags: False + register: tag_vpn + check_mode: True + + - name: assert would change + assert: + that: + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: modify tags without purge + ec2_vpc_vpn: + tags: '{{ third_tags }}' + state: 'present' + purge_tags: False + register: tag_vpn + - name: get VPC VPN facts + ec2_vpc_vpn_info: + register: tag_vpn_info + + - name: verify the tags were added + assert: + that: + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == final_tags + + - name: (check) modify tags without purge - IDEMPOTENCY + ec2_vpc_vpn: + tags: '{{ third_tags }}' + state: 'present' + purge_tags: False + register: tag_vpn + check_mode: True + + - name: assert would not change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: modify tags without purge - IDEMPOTENCY + ec2_vpc_vpn: + tags: '{{ third_tags }}' + state: 'present' + purge_tags: False + register: tag_vpn + - name: get VPC VPN facts + ec2_vpc_vpn_info: + register: tag_vpn_info + + - name: verify no change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == final_tags + + # ============================================================ + + - name: (check) No change to tags without setting tags + ec2_vpc_vpn: + state: 'present' + register: tag_vpn + check_mode: True + + - name: assert would change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: No change to tags without setting tags + ec2_vpc_vpn: + state: 'present' + register: tag_vpn + - name: get VPC VPN facts + ec2_vpc_vpn_info: + register: tag_vpn_info + + - name: verify no tags were added + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == final_tags + + # ============================================================ + + - name: (check) remove tags + ec2_vpc_vpn: + tags: {} + state: 'present' + purge_tags: True + register: tag_vpn + check_mode: True + + - name: assert would change + assert: + that: + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: remove tags + ec2_vpc_vpn: + tags: {} + state: 'present' + purge_tags: True + register: tag_vpn + - name: get VPC VPN facts + ec2_vpc_vpn_info: + register: tag_vpn_info + + - name: verify the tags were removed + assert: + that: + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + + - name: (check) remove tags - IDEMPOTENCY + ec2_vpc_vpn: + tags: {} + state: 'present' + purge_tags: True + register: tag_vpn + check_mode: True + + - name: assert would not change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + + - name: remove tags - IDEMPOTENCY + ec2_vpc_vpn: + tags: {} + state: 'present' + purge_tags: True + register: tag_vpn + - name: get VPC VPN facts + ec2_vpc_vpn_info: + register: tag_vpn_info + + - name: verify no change + assert: + that: + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id From d5357621c3d460cd9092745795894bf86817ac31 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 11 Jul 2022 14:42:21 +0200 Subject: [PATCH 22/38] Update default value of purge_tags to True (#1343) Update default value of purge_tags to True SUMMARY Complete the deprecation cycle and update purge_tags default value to True ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/acm_certificate.py plugins/modules/cloudfront_distribution.py plugins/modules/ec2_vpc_vpn.py plugins/modules/kms_key.py plugins/modules/rds_param_group.py plugins/modules/route53_health_check.py plugins/modules/route53_zone.py plugins/modules/sqs_queue.py ADDITIONAL INFORMATION Reviewed-by: Markus Bergholz Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/b56f3c6302db8ebb076fcf83eedc5b73aca31f8f --- plugins/modules/ec2_vpc_vpn.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 8e22b973c2e..9034dbbe713 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -17,7 +17,7 @@ extends_documentation_fragment: - amazon.aws.ec2 - amazon.aws.aws - - amazon.aws.tags.deprecated_purge + - amazon.aws.tags author: - "Sloane Hertel (@s-hertel)" options: @@ -767,7 +767,7 @@ def main(): static_only=dict(default=False, type='bool'), customer_gateway_id=dict(type='str'), vpn_connection_id=dict(type='str'), - purge_tags=dict(type='bool'), + purge_tags=dict(type='bool', default=True), routes=dict(type='list', default=[], elements='str'), purge_routes=dict(type='bool', default=False), wait_timeout=dict(type='int', default=600), @@ -777,14 +777,6 @@ def main(): supports_check_mode=True) connection = module.client('ec2', retry_decorator=VPNRetry.jittered_backoff(retries=10)) - if module.params.get('purge_tags') is None: - module.deprecate( - 'The purge_tags parameter currently defaults to False.' - ' For consistency across the collection, this default value' - ' will change to True in release 5.0.0.', - version='5.0.0', collection_name='community.aws') - module.params['purge_tags'] = False - state = module.params.get('state') parameters = dict(module.params) From e96c15884d1ea43743fba0a679e53711828a18eb Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 17 Aug 2022 20:57:54 +0200 Subject: [PATCH 23/38] Minor linting fixups - 2022-08-12 (#1408) Minor linting fixups - 2022-08-12 SUMMARY Various linting and unit test fixups unused variables overly broad Exception catching (highlighted some broken tests) removes direct use of unittest in favour of pytest (see also ansible-collections/amazon.aws#961) cleans up skipping of tests when botocore/boto3 aren't installed passes error message from VPNConnectionException into its super to make testing easier, should never be directly exposed to the user Removes tests for 3 modules which now have integration tests, they're either recording based (fragile)or test things which are separately tested in the integration tests. lambda s3_bucket_notifications route53_zone ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/ec2_vpc_vpn.py tests/unit ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/8b4afa93b78ea293e3c5c68fc43bb0fc301ed183 --- plugins/modules/ec2_vpc_vpn.py | 1 + .../ec2.DescribeVpnConnections_15.json | 44 +++++++++- .../ec2.DescribeVpnConnections_16.json | 30 +++++++ .../unit/plugins/modules/test_ec2_vpc_vpn.py | 80 ++++++++++--------- 4 files changed, 112 insertions(+), 43 deletions(-) create mode 100644 tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_16.json diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 9034dbbe713..4d19a8327d3 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -305,6 +305,7 @@ class VPNConnectionException(Exception): def __init__(self, msg, exception=None): + super(VPNConnectionException, self).__init__(msg) self.msg = msg self.exception = exception diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json index 55bbb3116e8..6f500939bb7 100644 --- a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_15.json @@ -5,23 +5,59 @@ "CustomerGatewayId": "cgw-6113c87f", "VpnConnectionId": "vpn-9f06e28a", "Category": "VPN", + "CustomerGatewayConfiguration": "\n\n cgw-6113c87f\n vgw-35d70c2b\n ipsec.1\n NoBGPVPNConnection\n \n \n \n 9.8.7.6\n \n \n 169.254.15.114\n 255.255.255.252\n 30\n \n \n \n \n 52.43.202.248\n \n \n 169.254.15.113\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n spNJGPBQfzbK8hNvpHNOaaml_paRZNKs\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n \n \n \n 9.8.7.6\n \n \n 169.254.14.126\n 255.255.255.252\n 30\n \n \n \n \n 54.70.185.193\n \n \n 169.254.14.125\n 255.255.255.252\n 30\n \n \n \n sha1\n aes-128-cbc\n 28800\n group2\n main\n yE7hnuavW4SzersgnMyKIoKbd0rE8giW\n \n \n esp\n hmac-sha1-96\n aes-128-cbc\n 3600\n group2\n tunnel\n true\n true\n 1379\n \n 10\n 3\n \n \n \n", "Routes": [], "Options": { "StaticRoutesOnly": true }, "Type": "ipsec.1", + "VgwTelemetry": [ + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "52.43.202.248", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 3, + "minute": 9, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + }, + { + "StatusMessage": "", + "Status": "DOWN", + "OutsideIpAddress": "54.70.185.193", + "AcceptedRouteCount": 0, + "LastStatusChange": { + "year": 2018, + "hour": 13, + "second": 26, + "minute": 8, + "__class__": "datetime", + "day": 16, + "month": 4, + "microsecond": 0 + } + } + ], "VpnGatewayId": "vgw-35d70c2b", - "State": "deleted" + "State": "available" } ], "ResponseMetadata": { "HTTPStatusCode": 200, - "RequestId": "edac5b19-14be-4b2d-ab47-a2279de47d40", + "RequestId": "1005f435-3e86-461f-a96c-a4f45c32c795", "HTTPHeaders": { - "content-length": "705", + "vary": "Accept-Encoding", + "content-length": "6124", "server": "AmazonEC2", "content-type": "text/xml;charset=UTF-8", - "date": "Mon, 16 Apr 2018 13:09:25 GMT" + "date": "Mon, 16 Apr 2018 13:09:24 GMT" }, "RetryAttempts": 0 } diff --git a/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_16.json b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_16.json new file mode 100644 index 00000000000..55bbb3116e8 --- /dev/null +++ b/tests/unit/plugins/modules/placebo_recordings/ec2_vpc_vpn/check_for_update_nonmodifiable_attr/ec2.DescribeVpnConnections_16.json @@ -0,0 +1,30 @@ +{ + "data": { + "VpnConnections": [ + { + "CustomerGatewayId": "cgw-6113c87f", + "VpnConnectionId": "vpn-9f06e28a", + "Category": "VPN", + "Routes": [], + "Options": { + "StaticRoutesOnly": true + }, + "Type": "ipsec.1", + "VpnGatewayId": "vgw-35d70c2b", + "State": "deleted" + } + ], + "ResponseMetadata": { + "HTTPStatusCode": 200, + "RequestId": "edac5b19-14be-4b2d-ab47-a2279de47d40", + "HTTPHeaders": { + "content-length": "705", + "server": "AmazonEC2", + "content-type": "text/xml;charset=UTF-8", + "date": "Mon, 16 Apr 2018 13:09:25 GMT" + }, + "RetryAttempts": 0 + } + }, + "status_code": 200 +} \ No newline at end of file diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 19fce6a4da8..88a1aea8383 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -20,6 +20,10 @@ from ansible_collections.community.aws.plugins.modules import ec2_vpc_vpn +class FailException(Exception): + pass + + class FakeModule(object): def __init__(self, **kwargs): self.params = kwargs @@ -27,12 +31,12 @@ def __init__(self, **kwargs): def fail_json_aws(self, *args, **kwargs): self.exit_args = args self.exit_kwargs = kwargs - raise Exception('FAIL') + raise FailException('FAIL') def fail_json(self, *args, **kwargs): self.exit_args = args self.exit_kwargs = kwargs - raise Exception('FAIL') + raise FailException('FAIL') def exit_json(self, *args, **kwargs): self.exit_args = args @@ -110,7 +114,6 @@ def make_conn(placeboify, module, connection): static_only = module.params['static_only'] vpn_gateway_id = module.params['vpn_gateway_id'] connection_type = module.params['connection_type'] - check_mode = module.params['check_mode'] changed = True vpn = ec2_vpc_vpn.create_connection(connection, customer_gateway_id, static_only, vpn_gateway_id, connection_type) return changed, vpn @@ -120,12 +123,29 @@ def tear_down_conn(placeboify, connection, vpn_connection_id): ec2_vpc_vpn.delete_connection(connection, vpn_connection_id, delay=15, max_attempts=40) +def setup_req(placeboify, number_of_results=1): + ''' returns dependencies for VPN connections ''' + assert number_of_results in (1, 2) + results = [] + cgw, vgw = get_dependencies() + for each in range(0, number_of_results): + params = make_params(cgw[each], vgw[each]) + m, conn = setup_mod_conn(placeboify, params) + vpn = ec2_vpc_vpn.ensure_present(conn, params)[1] + + results.append({'module': m, 'connection': conn, 'vpn': vpn, 'params': params}) + if number_of_results == 1: + return results[0] + else: + return results[0], results[1] + + def test_find_connection_vpc_conn_id(placeboify, maybe_sleep): # setup dependencies for 2 vpn connections dependencies = setup_req(placeboify, 2) dep1, dep2 = dependencies[0], dependencies[1] - params1, vpn1, m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] - params2, vpn2, m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] + params1, vpn1, _m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] + _params2, vpn2, _m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] # find the connection with a vpn_connection_id and assert it is the expected one assert vpn1['VpnConnectionId'] == ec2_vpc_vpn.find_connection(conn1, params1, vpn1['VpnConnectionId'])['VpnConnectionId'] @@ -138,8 +158,8 @@ def test_find_connection_filters(placeboify, maybe_sleep): # setup dependencies for 2 vpn connections dependencies = setup_req(placeboify, 2) dep1, dep2 = dependencies[0], dependencies[1] - params1, vpn1, m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] - params2, vpn2, m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] + params1, vpn1, _m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] + params2, vpn2, _m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] # update to different tags params1.update(tags={'Wrong': 'Tag'}) @@ -176,10 +196,10 @@ def test_find_connection_insufficient_filters(placeboify, maybe_sleep): # reset the parameters so only filtering by tags will occur m.params = {'filters': {'tags': {'Correct': 'Tag'}}} + expected_message = "More than one matching VPN connection was found" # assert that multiple matching connections have been found - with pytest.raises(Exception) as error_message: + with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): ec2_vpc_vpn.find_connection(conn, m.params) - assert error_message == "More than one matching VPN connection was found.To modify or delete a VPN please specify vpn_connection_id or add filters." # delete the connections tear_down_conn(placeboify, conn, vpn1['VpnConnectionId']) @@ -215,7 +235,7 @@ def test_create_connection(placeboify, maybe_sleep): def test_create_connection_that_exists(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + params, vpn, _m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] # try to recreate the same connection changed, vpn2 = ec2_vpc_vpn.ensure_present(conn, params) @@ -231,22 +251,22 @@ def test_create_connection_that_exists(placeboify, maybe_sleep): def test_modify_deleted_connection(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + _params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] # delete it tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) # try to update the deleted connection m.params.update(vpn_connection_id=vpn['VpnConnectionId']) - with pytest.raises(Exception) as error_message: + expected_message = "no VPN connection available or pending with that id" + with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): ec2_vpc_vpn.ensure_present(conn, m.params) - assert error_message == "There is no VPN connection available or pending with that id. Did you delete it?" def test_delete_connection(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + _params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] # delete it changed, vpn = ec2_vpc_vpn.ensure_absent(conn, m.params) @@ -268,7 +288,7 @@ def test_delete_nonexistent_connection(placeboify, maybe_sleep): def test_check_for_update_tags(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + _params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] # add and remove a number of tags m.params['tags'] = {'One': 'one', 'Two': 'two'} @@ -294,10 +314,9 @@ def test_check_for_update_nonmodifiable_attr(placeboify, maybe_sleep): # update a parameter that isn't modifiable m.params.update(vpn_gateway_id="invalidchange") - err = 'You cannot modify vpn_gateway_id, the current value of which is {0}. Modifiable VPN connection attributes are tags.'.format(current_vgw) - with pytest.raises(Exception) as error_message: - ec2_vpc_vpn.check_for_update(m, conn, vpn['VpnConnectionId']) - assert error_message == err + expected_message = 'You cannot modify vpn_gateway_id, the current value of which is {0}. Modifiable VPN connection attributes are'.format(current_vgw) + with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): + ec2_vpc_vpn.check_for_update(conn, m.params, vpn['VpnConnectionId']) # delete connection tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) @@ -306,7 +325,7 @@ def test_check_for_update_nonmodifiable_attr(placeboify, maybe_sleep): def test_add_tags(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + params, vpn, _m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] # add a tag to the connection ec2_vpc_vpn.add_tags(conn, vpn['VpnConnectionId'], add=[{'Key': 'Ansible-Test', 'Value': 'VPN'}]) @@ -322,7 +341,7 @@ def test_add_tags(placeboify, maybe_sleep): def test_remove_tags(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + params, vpn, _m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] # remove a tag from the connection ec2_vpc_vpn.remove_tags(conn, vpn['VpnConnectionId'], remove=['Ansible-Test']) @@ -338,7 +357,7 @@ def test_remove_tags(placeboify, maybe_sleep): def test_add_routes(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + params, vpn, _m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] # create connection with a route ec2_vpc_vpn.add_routes(conn, vpn['VpnConnectionId'], ['195.168.2.0/24', '196.168.2.0/24']) @@ -349,20 +368,3 @@ def test_add_routes(placeboify, maybe_sleep): # delete connection tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) - - -def setup_req(placeboify, number_of_results=1): - ''' returns dependencies for VPN connections ''' - assert number_of_results in (1, 2) - results = [] - cgw, vgw = get_dependencies() - for each in range(0, number_of_results): - params = make_params(cgw[each], vgw[each]) - m, conn = setup_mod_conn(placeboify, params) - vpn = ec2_vpc_vpn.ensure_present(conn, params)[1] - - results.append({'module': m, 'connection': conn, 'vpn': vpn, 'params': params}) - if number_of_results == 1: - return results[0] - else: - return results[0], results[1] From 412d23ebdfb83eac6cf490a5a50d1fc75e2833a5 Mon Sep 17 00:00:00 2001 From: Markus Bergholz Date: Fri, 26 Aug 2022 12:14:21 +0200 Subject: [PATCH 24/38] adjust booleans (#1420) adjust booleans: use true/false Depends-On: #1423 SUMMARY ansible-community/community-topics#116 ISSUE TYPE Docs Pull Request Reviewed-by: Mark Chappell Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/cb9716e14d44357aaadd2be733bbaa0dd8a522bc --- plugins/modules/ec2_vpc_vpn.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 4d19a8327d3..039796701f1 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -26,7 +26,7 @@ - The desired state of the VPN connection. choices: ['present', 'absent'] default: present - required: no + required: false type: str customer_gateway_id: description: @@ -51,13 +51,13 @@ - Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP. default: False type: bool - required: no + required: false tunnel_options: description: - An optional list object containing no more than two dict members, each of which may contain I(TunnelInsideCidr) and/or I(PreSharedKey) keys with appropriate string values. AWS defaults will apply in absence of either of the aforementioned keys. - required: no + required: false type: list elements: dict suboptions: From fb31a8b0bc9146680c3c70740cc17db62443e153 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 28 Sep 2022 13:40:43 +0200 Subject: [PATCH 25/38] Make example AWS UUIDS follow a specific pattern (#1539) Make example AWS UUIDS follow a specific pattern SUMMARY Various AWS IAM resources have UUID which follow a specific pattern. Similarly AWS accounts are all 12 digit numbers (text aliases in a couple of cases). To minimize the risk of accidental data leaks use a consistent Account ID in examples (123456789012), and a specific format for the UUIDS: (AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)12345EXAMPLE54321 While this does nothing about historic data, having consistency makes it easier to prevent future leaks. Note: We should follow this up with an update to the developer docs, however I'd like to get this in prior to 5.0.0 ISSUE TYPE Docs Pull Request COMPONENT NAME plugins/modules/acm_certificate_info.py plugins/modules/application_autoscaling_policy.py plugins/modules/autoscaling_launch_config.py plugins/modules/autoscaling_launch_config_info.py plugins/modules/codecommit_repository.py plugins/modules/directconnect_link_aggregation_group.py plugins/modules/dms_endpoint.py plugins/modules/dynamodb_table.py plugins/modules/ec2_transit_gateway_info.py plugins/modules/ec2_transit_gateway_vpc_attachment.py plugins/modules/ec2_transit_gateway_vpc_attachment_info.py plugins/modules/ec2_vpc_peer.py plugins/modules/ec2_vpc_peering_info.py plugins/modules/ec2_vpc_vpn_info.py plugins/modules/ecs_cluster.py plugins/modules/ecs_ecr.py plugins/modules/ecs_service.py plugins/modules/ecs_service_info.py plugins/modules/ecs_task.py plugins/modules/efs.py plugins/modules/efs_info.py plugins/modules/eks_cluster.py plugins/modules/elasticache_subnet_group.py plugins/modules/elb_network_lb.py plugins/modules/elb_target_group.py plugins/modules/elb_target_group_info.py plugins/modules/elb_target_info.py plugins/modules/iam_group.py plugins/modules/iam_managed_policy.py plugins/modules/iam_mfa_device_info.py plugins/modules/iam_server_certificate_info.py plugins/modules/lightsail.py plugins/modules/lightsail_static_ip.py plugins/modules/msk_cluster.py plugins/modules/s3_bucket_notification.py plugins/modules/sns_topic.py plugins/modules/sns_topic_info.py plugins/modules/sqs_queue.py plugins/modules/stepfunctions_state_machine.py plugins/modules/stepfunctions_state_machine_execution.py plugins/modules/storagegateway_info.py plugins/modules/wafv2_web_acl.py ADDITIONAL INFORMATION While the 'secret' nature of these UUIDs is debatable (they're closer to user names than passwords), deliberately mangling them makes it easier for InfoSec teams to spot when their secret counterparts may have been leaked in combination with a real 'public' part. This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/94764225332c869eefa574a8948da680bb668407 --- plugins/modules/ec2_vpc_vpn_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 57ebb17e852..b1d2bbee43e 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -144,7 +144,7 @@ description: The Amazon Resource Name of the virtual private gateway tunnel endpoint certificate. returned: when a private certificate is used for authentication type: str - sample: "arn:aws:acm:us-east-1:123456789101:certificate/c544d8ce-20b8-4fff-98b0-example" + sample: "arn:aws:acm:us-east-1:123456789012:certificate/c544d8ce-20b8-4fff-98b0-example" vpn_connection_id: description: The ID of the VPN connection. returned: always From 05d0ea815e1804a630a6e7be3b6e4675b9b367f7 Mon Sep 17 00:00:00 2001 From: Alina Buzachis Date: Wed, 5 Oct 2022 17:04:40 +0200 Subject: [PATCH 26/38] Update extends_documentation_fragment with amazon.aws.boto3 (#1459) Update extends_documentation_fragment with amazon.aws.boto3 Depends-On: ansible/ansible-zuul-jobs#1654 SUMMARY As per ansible-collections/amazon.aws#985 add amazon.aws.boto3. ISSUE TYPE Docs Pull Request COMPONENT NAME several Reviewed-by: Jill R Reviewed-by: Mark Chappell Reviewed-by: Markus Bergholz This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/bd3c03fcba0848f593b86309740fa73e986a9646 --- plugins/modules/ec2_vpc_vpn.py | 1 + plugins/modules/ec2_vpc_vpn_info.py | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 039796701f1..462c662e51a 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -17,6 +17,7 @@ extends_documentation_fragment: - amazon.aws.ec2 - amazon.aws.aws + - amazon.aws.boto3 - amazon.aws.tags author: - "Sloane Hertel (@s-hertel)" diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index b1d2bbee43e..94a6dcc9a91 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -30,6 +30,7 @@ extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 +- amazon.aws.boto3 ''' From d2af423211bc6132971b98a443b5a38fea2a6503 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 2 Nov 2022 11:49:57 +0100 Subject: [PATCH 27/38] Fix non-matching defaults in docs (#1576) Fix non-matching defaults in docs Depends-On: #1579 SUMMARY Fix various non-matching default values exposed by ansible/ansible#79267. ISSUE TYPE Docs Pull Request COMPONENT NAME various Reviewed-by: Markus Bergholz This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/15568f01dc839983dc5c79b78f26b53a93fa72ee --- plugins/modules/ec2_vpc_vpn.py | 3 +++ plugins/modules/ec2_vpc_vpn_info.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 462c662e51a..77a994aaab1 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -61,6 +61,7 @@ required: false type: list elements: dict + default: [] suboptions: TunnelInsideCidr: type: str @@ -110,11 +111,13 @@ description: - The customer gateway id as a string or a list of those strings. type: dict + default: {} routes: description: - Routes to add to the connection. type: list elements: str + default: [] purge_routes: description: - Whether or not to delete VPN connections routes that are not specified in the task. diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 94a6dcc9a91..c7a71f15451 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -21,12 +21,14 @@ See U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpnConnections.html) for possible filters. required: false type: dict + default: {} vpn_connection_ids: description: - Get details of a specific VPN connections using vpn connection ID/IDs. This value should be provided as a list. required: false type: list elements: str + default: [] extends_documentation_fragment: - amazon.aws.aws - amazon.aws.ec2 From bc3528b7c0f252253916daef106649ccf3b3eab0 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 3 Nov 2022 16:09:55 +0100 Subject: [PATCH 28/38] autoscaling_scheduled_action - bump date for scheduled action in integration tests (#1585) autoscaling_scheduled_action - bump date for scheduled action in integration tests SUMMARY 2022-10-25 has now passed, so the integration tests are failing. ISSUE TYPE Bugfix Pull Request COMPONENT NAME tests/integration ADDITIONAL INFORMATION This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/2de48d33d8ff956fc36a8ca2dd6a8c0082e7bd7b --- tests/unit/plugins/modules/test_ec2_vpc_vpn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 88a1aea8383..ef7c92cf3a1 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -87,7 +87,7 @@ def get_dependencies(): def setup_mod_conn(placeboify, params): conn = placeboify.client('ec2') retry_decorator = aws_retries.AWSRetry.jittered_backoff() - wrapped_conn = aws_modules._RetryingBotoClientWrapper(conn, retry_decorator) + wrapped_conn = aws_retries.RetryingBotoClientWrapper(conn, retry_decorator) m = FakeModule(**params) return m, wrapped_conn From 051c48b350e65defec0998b1f15ba92ebc5c9523 Mon Sep 17 00:00:00 2001 From: Bikouo Aubin <79859644+abikouo@users.noreply.github.com> Date: Tue, 10 Jan 2023 19:22:13 +0100 Subject: [PATCH 29/38] Ansible User-Agent identification for community.aws (#1632) Ansible User-Agent identification for community.aws SUMMARY The value will be similar to this APN/1.0 Ansible/2.14.1 community.aws/6.0.0-dev0 ISSUE TYPE Feature Pull Request Reviewed-by: Mark Chappell Reviewed-by: Bikouo Aubin Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/a8cbce24071bcc62fe4594c38aff1baf18bd2862 --- plugins/modules/ec2_vpc_vpn.py | 2 +- plugins/modules/ec2_vpc_vpn_info.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 77a994aaab1..d543cde00e7 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -294,7 +294,7 @@ """ from ansible.module_utils._text import to_text -from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule +from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ansible_dict_to_boto3_tag_list from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_tag_list_to_ansible_dict diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index c7a71f15451..ac9be556e23 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -166,7 +166,7 @@ except ImportError: pass # caught by AnsibleAWSModule -from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule +from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule from ansible_collections.amazon.aws.plugins.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, boto3_tag_list_to_ansible_dict, camel_dict_to_snake_dict, From d01f5419fddf801983413b648afe378fb0fd0145 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Sat, 4 Feb 2023 18:32:48 +0100 Subject: [PATCH 30/38] Various lint fixups (#1707) Various lint fixups SUMMARY minor linting fixups ISSUE TYPE Feature Pull Request COMPONENT NAME aws_ssm batch_job_definition inspector_target ADDITIONAL INFORMATION See Also: ansible-collections/news-for-maintainers#34 Reviewed-by: Felix Fontein This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/549ca71c638fafe6eac30fac16f4e7eb4f8ef7b5 --- tests/unit/plugins/modules/test_ec2_vpc_vpn.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index ef7c92cf3a1..5bdd6f25c35 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -11,7 +11,6 @@ from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep # pylint: disable=unused-import -import ansible_collections.amazon.aws.plugins.module_utils.modules as aws_modules import ansible_collections.amazon.aws.plugins.module_utils.retries as aws_retries from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_conn From 593a496e7f46161109fe9e07f23480b178019ee3 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 8 Mar 2023 12:07:26 +0100 Subject: [PATCH 31/38] Cleanup headers and imports (#1738) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleanup headers and imports SUMMARY Mass update of imports, docs fragments and file headers Many of the amazon.aws module_utils and docs fragments got moved about, update community.aws to reflect this. Consistently apply the comment headers as documented at https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#python-shebang-utf-8-coding ISSUE TYPE Docs Pull Request Feature Pull Request COMPONENT NAME ADDITIONAL INFORMATION Header cleanup based upon: https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#python-shebang-utf-8-coding Begin your Ansible module with #!/usr/bin/python - this “shebang” allows ansible_python_interpreter to work. Follow the shebang immediately with # -*- coding: utf-8 -*- to clarify that the file is UTF-8 encoded. and https://docs.ansible.com/ansible/devel/dev_guide/developing_modules_documenting.html#copyright-and-license After the shebang and UTF-8 coding, add a copyright line with the original copyright holder and a license declaration. The license declaration should be ONLY one line, not the full GPL prefix. ... Additions to the module (for instance, rewrites) are not permitted to add additional copyright lines other than the default copyright statement if missing: Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/a4f20bf114bfab19b1c84c4ecf42efd5614ab80c --- plugins/modules/ec2_vpc_vpn.py | 42 ++++++++++++++-------------- plugins/modules/ec2_vpc_vpn_info.py | 43 +++++++++++++++-------------- 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index d543cde00e7..b7e997fade0 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -1,12 +1,10 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- + # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - - -DOCUMENTATION = r''' +DOCUMENTATION = r""" --- module: ec2_vpc_vpn version_added: 1.0.0 @@ -14,11 +12,6 @@ description: - This module creates, modifies, and deletes VPN connections. Idempotence is achieved by using the filters option or specifying the VPN connection identifier. -extends_documentation_fragment: - - amazon.aws.ec2 - - amazon.aws.aws - - amazon.aws.boto3 - - amazon.aws.tags author: - "Sloane Hertel (@s-hertel)" options: @@ -135,7 +128,12 @@ required: false type: int default: 15 -''' +extends_documentation_fragment: + - amazon.aws.region.modules + - amazon.aws.common.modules + - amazon.aws.tags + - amazon.aws.boto3 +""" EXAMPLES = r""" # Note: None of these examples set aws_access_key, aws_secret_key, or region. @@ -293,19 +291,23 @@ vpn_connection_id: vpn-781e0e19 """ -from ansible.module_utils._text import to_text -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ansible_dict_to_boto3_tag_list -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_tag_list_to_ansible_dict -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import camel_dict_to_snake_dict -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import compare_aws_tags - try: - from botocore.exceptions import BotoCoreError, ClientError, WaiterError + from botocore.exceptions import BotoCoreError + from botocore.exceptions import ClientError + from botocore.exceptions import WaiterError except ImportError: pass # Handled by AnsibleAWSModule +from ansible.module_utils._text import to_text +from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict + +from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry +from ansible_collections.amazon.aws.plugins.module_utils.tagging import ansible_dict_to_boto3_tag_list +from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict +from ansible_collections.amazon.aws.plugins.module_utils.tagging import compare_aws_tags + +from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule + class VPNConnectionException(Exception): def __init__(self, msg, exception=None): diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index ac9be556e23..5070af22266 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -1,19 +1,18 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- + # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - - -DOCUMENTATION = r''' +DOCUMENTATION = r""" --- module: ec2_vpc_vpn_info version_added: 1.0.0 short_description: Gather information about VPN Connections in AWS. description: - - Gather information about VPN Connections in AWS. -author: Madhura Naniwadekar (@Madhura-CSI) + - Gather information about VPN Connections in AWS. +author: + - Madhura Naniwadekar (@Madhura-CSI) options: filters: description: @@ -30,13 +29,12 @@ elements: str default: [] extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 -- amazon.aws.boto3 - -''' + - amazon.aws.common.modules + - amazon.aws.region.modules + - amazon.aws.boto3 +""" -EXAMPLES = r''' +EXAMPLES = r""" # # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Gather information about all vpn connections community.aws.ec2_vpc_vpn_info: @@ -52,9 +50,9 @@ filters: vpn-gateway-id: vgw-cbe66beb register: vpn_conn_info -''' +""" -RETURN = r''' +RETURN = r""" vpn_connections: description: List of one or more VPN Connections. returned: always @@ -158,19 +156,22 @@ returned: always type: str sample: vgw-cbe56bfb -''' +""" import json + try: - from botocore.exceptions import ClientError, BotoCoreError + from botocore.exceptions import BotoCoreError + from botocore.exceptions import ClientError except ImportError: pass # caught by AnsibleAWSModule +from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict + +from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list +from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict + from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, - boto3_tag_list_to_ansible_dict, - camel_dict_to_snake_dict, - ) def date_handler(obj): From 9770a49f49d902792c2c67407502f17b0ccc9444 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 26 Apr 2023 19:26:07 +0200 Subject: [PATCH 32/38] Big Black PR (#1784) * Black prep * Black * changelog * Fix pylint unused-import in tests * Split SSM connection plugin changes * disable glue tests - bucket's missing * Disable s3_logging and s3_sync tests This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/2c4575c248776c65d66b06cd60fa09b0dae1cd6f --- plugins/modules/ec2_vpc_vpn.py | 417 +++++++++--------- plugins/modules/ec2_vpc_vpn_info.py | 27 +- .../unit/plugins/modules/test_ec2_vpc_vpn.py | 249 +++++++---- 3 files changed, 390 insertions(+), 303 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index b7e997fade0..8d8dc1467e1 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -321,11 +321,14 @@ def __init__(self, msg, exception=None): class VPNRetry(AWSRetry): @staticmethod def status_code_from_exception(error): - return (error.response['Error']['Code'], error.response['Error']['Message'],) + return ( + error.response["Error"]["Code"], + error.response["Error"]["Message"], + ) @staticmethod def found(response_code, catch_extra_error_codes=None): - retry_on = ['The maximum number of mutating objects has been reached.'] + retry_on = ["The maximum number of mutating objects has been reached."] if catch_extra_error_codes: retry_on.extend(catch_extra_error_codes) @@ -340,14 +343,14 @@ def found(response_code, catch_extra_error_codes=None): def find_connection(connection, module_params, vpn_connection_id=None): - ''' Looks for a unique VPN connection. Uses find_connection_response() to return the connection found, None, - or raise an error if there were multiple viable connections. ''' + """Looks for a unique VPN connection. Uses find_connection_response() to return the connection found, None, + or raise an error if there were multiple viable connections.""" - filters = module_params.get('filters') + filters = module_params.get("filters") # vpn_connection_id may be provided via module option; takes precedence over any filter values - if not vpn_connection_id and module_params.get('vpn_connection_id'): - vpn_connection_id = module_params.get('vpn_connection_id') + if not vpn_connection_id and module_params.get("vpn_connection_id"): + vpn_connection_id = module_params.get("vpn_connection_id") if not isinstance(vpn_connection_id, list) and vpn_connection_id: vpn_connection_id = [to_text(vpn_connection_id)] @@ -362,14 +365,13 @@ def find_connection(connection, module_params, vpn_connection_id=None): # see if there is a unique matching connection try: if vpn_connection_id: - existing_conn = connection.describe_vpn_connections(aws_retry=True, - VpnConnectionIds=vpn_connection_id, - Filters=formatted_filter) + existing_conn = connection.describe_vpn_connections( + aws_retry=True, VpnConnectionIds=vpn_connection_id, Filters=formatted_filter + ) else: existing_conn = connection.describe_vpn_connections(aws_retry=True, Filters=formatted_filter) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed while describing VPN connection.", - exception=e) + raise VPNConnectionException(msg="Failed while describing VPN connection.", exception=e) return find_connection_response(connections=existing_conn) @@ -377,48 +379,55 @@ def find_connection(connection, module_params, vpn_connection_id=None): def add_routes(connection, vpn_connection_id, routes_to_add): for route in routes_to_add: try: - connection.create_vpn_connection_route(aws_retry=True, - VpnConnectionId=vpn_connection_id, - DestinationCidrBlock=route) + connection.create_vpn_connection_route( + aws_retry=True, VpnConnectionId=vpn_connection_id, DestinationCidrBlock=route + ) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed while adding route {0} to the VPN connection {1}.".format(route, vpn_connection_id), - exception=e) + raise VPNConnectionException( + msg="Failed while adding route {0} to the VPN connection {1}.".format(route, vpn_connection_id), + exception=e, + ) def remove_routes(connection, vpn_connection_id, routes_to_remove): for route in routes_to_remove: try: - connection.delete_vpn_connection_route(aws_retry=True, - VpnConnectionId=vpn_connection_id, - DestinationCidrBlock=route) + connection.delete_vpn_connection_route( + aws_retry=True, VpnConnectionId=vpn_connection_id, DestinationCidrBlock=route + ) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed to remove route {0} from the VPN connection {1}.".format(route, vpn_connection_id), - exception=e) + raise VPNConnectionException( + msg="Failed to remove route {0} from the VPN connection {1}.".format(route, vpn_connection_id), + exception=e, + ) def create_filter(module_params, provided_filters): - """ Creates a filter using the user-specified parameters and unmodifiable options that may have been specified in the task """ - boto3ify_filter = {'cgw-config': 'customer-gateway-configuration', - 'static-routes-only': 'option.static-routes-only', - 'cidr': 'route.destination-cidr-block', - 'bgp': 'bgp-asn', - 'vpn': 'vpn-connection-id', - 'vgw': 'vpn-gateway-id', - 'tag-keys': 'tag-key', - 'tag-values': 'tag-value', - 'tags': 'tag', - 'cgw': 'customer-gateway-id'} + """Creates a filter using the user-specified parameters and unmodifiable options that may have been specified in the task""" + boto3ify_filter = { + "cgw-config": "customer-gateway-configuration", + "static-routes-only": "option.static-routes-only", + "cidr": "route.destination-cidr-block", + "bgp": "bgp-asn", + "vpn": "vpn-connection-id", + "vgw": "vpn-gateway-id", + "tag-keys": "tag-key", + "tag-values": "tag-value", + "tags": "tag", + "cgw": "customer-gateway-id", + } # unmodifiable options and their filter name counterpart - param_to_filter = {"customer_gateway_id": "customer-gateway-id", - "vpn_gateway_id": "vpn-gateway-id", - "vpn_connection_id": "vpn-connection-id"} + param_to_filter = { + "customer_gateway_id": "customer-gateway-id", + "vpn_gateway_id": "vpn-gateway-id", + "vpn_connection_id": "vpn-connection-id", + } flat_filter_dict = {} formatted_filter = [] for raw_param in dict(provided_filters): - # fix filter names to be recognized by boto3 if raw_param in boto3ify_filter: param = boto3ify_filter[raw_param] @@ -429,14 +438,14 @@ def create_filter(module_params, provided_filters): raise VPNConnectionException(msg="{0} is not a valid filter.".format(raw_param)) # reformat filters with special formats - if param == 'tag': + if param == "tag": for key in provided_filters[param]: - formatted_key = 'tag:' + key + formatted_key = "tag:" + key if isinstance(provided_filters[param][key], list): flat_filter_dict[formatted_key] = str(provided_filters[param][key]) else: flat_filter_dict[formatted_key] = [str(provided_filters[param][key])] - elif param == 'option.static-routes-only': + elif param == "option.static-routes-only": flat_filter_dict[param] = [str(provided_filters[param]).lower()] else: if isinstance(provided_filters[param], list): @@ -450,25 +459,25 @@ def create_filter(module_params, provided_filters): flat_filter_dict[param_to_filter[param]] = [module_params.get(param)] # change the flat dict into something boto3 will understand - formatted_filter = [{'Name': key, 'Values': value} for key, value in flat_filter_dict.items()] + formatted_filter = [{"Name": key, "Values": value} for key, value in flat_filter_dict.items()] return formatted_filter def find_connection_response(connections=None): - """ Determine if there is a viable unique match in the connections described. Returns the unique VPN connection if one is found, - returns None if the connection does not exist, raise an error if multiple matches are found. """ + """Determine if there is a viable unique match in the connections described. Returns the unique VPN connection if one is found, + returns None if the connection does not exist, raise an error if multiple matches are found.""" # Found no connections - if not connections or 'VpnConnections' not in connections: + if not connections or "VpnConnections" not in connections: return None # Too many results - elif connections and len(connections['VpnConnections']) > 1: + elif connections and len(connections["VpnConnections"]) > 1: viable = [] - for each in connections['VpnConnections']: + for each in connections["VpnConnections"]: # deleted connections are not modifiable - if each['State'] not in ("deleted", "deleting"): + if each["State"] not in ("deleted", "deleting"): viable.append(each) if len(viable) == 1: # Found one viable result; return unique match @@ -477,20 +486,31 @@ def find_connection_response(connections=None): # Found a result but it was deleted already; since there was only one viable result create a new one return None else: - raise VPNConnectionException(msg="More than one matching VPN connection was found. " - "To modify or delete a VPN please specify vpn_connection_id or add filters.") + raise VPNConnectionException( + msg="More than one matching VPN connection was found. " + "To modify or delete a VPN please specify vpn_connection_id or add filters." + ) # Found unique match - elif connections and len(connections['VpnConnections']) == 1: + elif connections and len(connections["VpnConnections"]) == 1: # deleted connections are not modifiable - if connections['VpnConnections'][0]['State'] not in ("deleted", "deleting"): - return connections['VpnConnections'][0] - - -def create_connection(connection, customer_gateway_id, static_only, vpn_gateway_id, connection_type, max_attempts, delay, tunnel_options=None): - """ Creates a VPN connection """ - - options = {'StaticRoutesOnly': static_only} + if connections["VpnConnections"][0]["State"] not in ("deleted", "deleting"): + return connections["VpnConnections"][0] + + +def create_connection( + connection, + customer_gateway_id, + static_only, + vpn_gateway_id, + connection_type, + max_attempts, + delay, + tunnel_options=None, +): + """Creates a VPN connection""" + + options = {"StaticRoutesOnly": static_only} if tunnel_options and len(tunnel_options) <= 2: t_opt = [] for m in tunnel_options: @@ -500,108 +520,102 @@ def create_connection(connection, customer_gateway_id, static_only, vpn_gateway_ raise TypeError("non-dict list member") t_opt.append(m) if t_opt: - options['TunnelOptions'] = t_opt + options["TunnelOptions"] = t_opt if not (customer_gateway_id and vpn_gateway_id): - raise VPNConnectionException(msg="No matching connection was found. To create a new connection you must provide " - "both vpn_gateway_id and customer_gateway_id.") + raise VPNConnectionException( + msg="No matching connection was found. To create a new connection you must provide " + "both vpn_gateway_id and customer_gateway_id." + ) try: - vpn = connection.create_vpn_connection(Type=connection_type, - CustomerGatewayId=customer_gateway_id, - VpnGatewayId=vpn_gateway_id, - Options=options) - connection.get_waiter('vpn_connection_available').wait( - VpnConnectionIds=[vpn['VpnConnection']['VpnConnectionId']], - WaiterConfig={'Delay': delay, 'MaxAttempts': max_attempts} + vpn = connection.create_vpn_connection( + Type=connection_type, CustomerGatewayId=customer_gateway_id, VpnGatewayId=vpn_gateway_id, Options=options + ) + connection.get_waiter("vpn_connection_available").wait( + VpnConnectionIds=[vpn["VpnConnection"]["VpnConnectionId"]], + WaiterConfig={"Delay": delay, "MaxAttempts": max_attempts}, ) except WaiterError as e: - raise VPNConnectionException(msg="Failed to wait for VPN connection {0} to be available".format(vpn['VpnConnection']['VpnConnectionId']), - exception=e) + raise VPNConnectionException( + msg="Failed to wait for VPN connection {0} to be available".format(vpn["VpnConnection"]["VpnConnectionId"]), + exception=e, + ) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed to create VPN connection", - exception=e) + raise VPNConnectionException(msg="Failed to create VPN connection", exception=e) - return vpn['VpnConnection'] + return vpn["VpnConnection"] def delete_connection(connection, vpn_connection_id, delay, max_attempts): - """ Deletes a VPN connection """ + """Deletes a VPN connection""" try: connection.delete_vpn_connection(aws_retry=True, VpnConnectionId=vpn_connection_id) - connection.get_waiter('vpn_connection_deleted').wait( - VpnConnectionIds=[vpn_connection_id], - WaiterConfig={'Delay': delay, 'MaxAttempts': max_attempts} + connection.get_waiter("vpn_connection_deleted").wait( + VpnConnectionIds=[vpn_connection_id], WaiterConfig={"Delay": delay, "MaxAttempts": max_attempts} ) except WaiterError as e: - raise VPNConnectionException(msg="Failed to wait for VPN connection {0} to be removed".format(vpn_connection_id), - exception=e) + raise VPNConnectionException( + msg="Failed to wait for VPN connection {0} to be removed".format(vpn_connection_id), exception=e + ) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed to delete the VPN connection: {0}".format(vpn_connection_id), - exception=e) + raise VPNConnectionException( + msg="Failed to delete the VPN connection: {0}".format(vpn_connection_id), exception=e + ) def add_tags(connection, vpn_connection_id, add): try: - connection.create_tags(aws_retry=True, - Resources=[vpn_connection_id], - Tags=add) + connection.create_tags(aws_retry=True, Resources=[vpn_connection_id], Tags=add) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed to add the tags: {0}.".format(add), - exception=e) + raise VPNConnectionException(msg="Failed to add the tags: {0}.".format(add), exception=e) def remove_tags(connection, vpn_connection_id, remove): # format tags since they are a list in the format ['tag1', 'tag2', 'tag3'] - key_dict_list = [{'Key': tag} for tag in remove] + key_dict_list = [{"Key": tag} for tag in remove] try: - connection.delete_tags(aws_retry=True, - Resources=[vpn_connection_id], - Tags=key_dict_list) + connection.delete_tags(aws_retry=True, Resources=[vpn_connection_id], Tags=key_dict_list) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed to remove the tags: {0}.".format(remove), - exception=e) + raise VPNConnectionException(msg="Failed to remove the tags: {0}.".format(remove), exception=e) def check_for_update(connection, module_params, vpn_connection_id): - """ Determines if there are any tags or routes that need to be updated. Ensures non-modifiable attributes aren't expected to change. """ - tags = module_params.get('tags') - routes = module_params.get('routes') - purge_tags = module_params.get('purge_tags') - purge_routes = module_params.get('purge_routes') + """Determines if there are any tags or routes that need to be updated. Ensures non-modifiable attributes aren't expected to change.""" + tags = module_params.get("tags") + routes = module_params.get("routes") + purge_tags = module_params.get("purge_tags") + purge_routes = module_params.get("purge_routes") vpn_connection = find_connection(connection, module_params, vpn_connection_id=vpn_connection_id) current_attrs = camel_dict_to_snake_dict(vpn_connection) # Initialize changes dict - changes = {'tags_to_add': [], - 'tags_to_remove': [], - 'routes_to_add': [], - 'routes_to_remove': []} + changes = {"tags_to_add": [], "tags_to_remove": [], "routes_to_add": [], "routes_to_remove": []} # Get changes to tags - current_tags = boto3_tag_list_to_ansible_dict(current_attrs.get('tags', []), u'key', u'value') + current_tags = boto3_tag_list_to_ansible_dict(current_attrs.get("tags", []), "key", "value") if tags is None: - changes['tags_to_remove'] = [] - changes['tags_to_add'] = [] + changes["tags_to_remove"] = [] + changes["tags_to_add"] = [] else: - tags_to_add, changes['tags_to_remove'] = compare_aws_tags(current_tags, tags, purge_tags) - changes['tags_to_add'] = ansible_dict_to_boto3_tag_list(tags_to_add) + tags_to_add, changes["tags_to_remove"] = compare_aws_tags(current_tags, tags, purge_tags) + changes["tags_to_add"] = ansible_dict_to_boto3_tag_list(tags_to_add) # Get changes to routes - if 'Routes' in vpn_connection: - current_routes = [route['DestinationCidrBlock'] for route in vpn_connection['Routes']] + if "Routes" in vpn_connection: + current_routes = [route["DestinationCidrBlock"] for route in vpn_connection["Routes"]] if purge_routes: - changes['routes_to_remove'] = [old_route for old_route in current_routes if old_route not in routes] - changes['routes_to_add'] = [new_route for new_route in routes if new_route not in current_routes] + changes["routes_to_remove"] = [old_route for old_route in current_routes if old_route not in routes] + changes["routes_to_add"] = [new_route for new_route in routes if new_route not in current_routes] # Check if nonmodifiable attributes are attempted to be modified for attribute in current_attrs: if attribute in ("tags", "routes", "state"): continue - elif attribute == 'options': - will_be = module_params.get('static_only', None) - is_now = bool(current_attrs[attribute]['static_routes_only']) - attribute = 'static_only' - elif attribute == 'type': + elif attribute == "options": + will_be = module_params.get("static_only", None) + is_now = bool(current_attrs[attribute]["static_routes_only"]) + attribute = "static_only" + elif attribute == "type": will_be = module_params.get("connection_type", None) is_now = current_attrs[attribute] else: @@ -609,110 +623,116 @@ def check_for_update(connection, module_params, vpn_connection_id): will_be = module_params.get(attribute, None) if will_be is not None and to_text(will_be) != to_text(is_now): - raise VPNConnectionException(msg="You cannot modify {0}, the current value of which is {1}. Modifiable VPN " - "connection attributes are tags and routes. The value you tried to change it to " - "is {2}.".format(attribute, is_now, will_be)) + raise VPNConnectionException( + msg="You cannot modify {0}, the current value of which is {1}. Modifiable VPN " + "connection attributes are tags and routes. The value you tried to change it to " + "is {2}.".format(attribute, is_now, will_be) + ) return changes def make_changes(connection, vpn_connection_id, changes): - """ changes is a dict with the keys 'tags_to_add', 'tags_to_remove', 'routes_to_add', 'routes_to_remove', - the values of which are lists (generated by check_for_update()). + """changes is a dict with the keys 'tags_to_add', 'tags_to_remove', 'routes_to_add', 'routes_to_remove', + the values of which are lists (generated by check_for_update()). """ changed = False - if changes['tags_to_add']: + if changes["tags_to_add"]: changed = True - add_tags(connection, vpn_connection_id, changes['tags_to_add']) + add_tags(connection, vpn_connection_id, changes["tags_to_add"]) - if changes['tags_to_remove']: + if changes["tags_to_remove"]: changed = True - remove_tags(connection, vpn_connection_id, changes['tags_to_remove']) + remove_tags(connection, vpn_connection_id, changes["tags_to_remove"]) - if changes['routes_to_add']: + if changes["routes_to_add"]: changed = True - add_routes(connection, vpn_connection_id, changes['routes_to_add']) + add_routes(connection, vpn_connection_id, changes["routes_to_add"]) - if changes['routes_to_remove']: + if changes["routes_to_remove"]: changed = True - remove_routes(connection, vpn_connection_id, changes['routes_to_remove']) + remove_routes(connection, vpn_connection_id, changes["routes_to_remove"]) return changed def get_check_mode_results(connection, module_params, vpn_connection_id=None, current_state=None): - """ Returns the changes that would be made to a VPN Connection """ - state = module_params.get('state') - if state == 'absent': + """Returns the changes that would be made to a VPN Connection""" + state = module_params.get("state") + if state == "absent": if vpn_connection_id: return True, {} else: return False, {} changed = False - results = {'customer_gateway_configuration': '', - 'customer_gateway_id': module_params.get('customer_gateway_id'), - 'vpn_gateway_id': module_params.get('vpn_gateway_id'), - 'options': {'static_routes_only': module_params.get('static_only')}, - 'routes': [module_params.get('routes')]} + results = { + "customer_gateway_configuration": "", + "customer_gateway_id": module_params.get("customer_gateway_id"), + "vpn_gateway_id": module_params.get("vpn_gateway_id"), + "options": {"static_routes_only": module_params.get("static_only")}, + "routes": [module_params.get("routes")], + } # get combined current tags and tags to set - present_tags = module_params.get('tags') + present_tags = module_params.get("tags") if present_tags is None: pass - elif current_state and 'Tags' in current_state: - current_tags = boto3_tag_list_to_ansible_dict(current_state['Tags']) - tags_to_add, tags_to_remove = compare_aws_tags(current_tags, present_tags, module_params.get('purge_tags')) + elif current_state and "Tags" in current_state: + current_tags = boto3_tag_list_to_ansible_dict(current_state["Tags"]) + tags_to_add, tags_to_remove = compare_aws_tags(current_tags, present_tags, module_params.get("purge_tags")) changed |= bool(tags_to_remove) or bool(tags_to_add) - if module_params.get('purge_tags'): + if module_params.get("purge_tags"): current_tags = {} current_tags.update(present_tags) - results['tags'] = current_tags - elif module_params.get('tags'): + results["tags"] = current_tags + elif module_params.get("tags"): changed = True if present_tags: - results['tags'] = present_tags + results["tags"] = present_tags # get combined current routes and routes to add - present_routes = module_params.get('routes') - if current_state and 'Routes' in current_state: - current_routes = [route['DestinationCidrBlock'] for route in current_state['Routes']] - if module_params.get('purge_routes'): + present_routes = module_params.get("routes") + if current_state and "Routes" in current_state: + current_routes = [route["DestinationCidrBlock"] for route in current_state["Routes"]] + if module_params.get("purge_routes"): if set(current_routes) != set(present_routes): changed = True elif set(present_routes) != set(current_routes): if not set(present_routes) < set(current_routes): changed = True present_routes.extend([route for route in current_routes if route not in present_routes]) - elif module_params.get('routes'): + elif module_params.get("routes"): changed = True - results['routes'] = [{"destination_cidr_block": cidr, "state": "available"} for cidr in present_routes] + results["routes"] = [{"destination_cidr_block": cidr, "state": "available"} for cidr in present_routes] # return the vpn_connection_id if it's known if vpn_connection_id: - results['vpn_connection_id'] = vpn_connection_id + results["vpn_connection_id"] = vpn_connection_id else: changed = True - results['vpn_connection_id'] = 'vpn-XXXXXXXX' + results["vpn_connection_id"] = "vpn-XXXXXXXX" return changed, results def ensure_present(connection, module_params, check_mode=False): - """ Creates and adds tags to a VPN connection. If the connection already exists update tags. """ + """Creates and adds tags to a VPN connection. If the connection already exists update tags.""" vpn_connection = find_connection(connection, module_params) changed = False - delay = module_params.get('delay') - max_attempts = module_params.get('wait_timeout') // delay + delay = module_params.get("delay") + max_attempts = module_params.get("wait_timeout") // delay # No match but vpn_connection_id was specified. - if not vpn_connection and module_params.get('vpn_connection_id'): - raise VPNConnectionException(msg="There is no VPN connection available or pending with that id. Did you delete it?") + if not vpn_connection and module_params.get("vpn_connection_id"): + raise VPNConnectionException( + msg="There is no VPN connection available or pending with that id. Did you delete it?" + ) # Unique match was found. Check if attributes provided differ. elif vpn_connection: - vpn_connection_id = vpn_connection['VpnConnectionId'] + vpn_connection_id = vpn_connection["VpnConnectionId"] # check_for_update returns a dict with the keys tags_to_add, tags_to_remove, routes_to_add, routes_to_remove changes = check_for_update(connection, module_params, vpn_connection_id) if check_mode: @@ -724,38 +744,42 @@ def ensure_present(connection, module_params, check_mode=False): changed = True if check_mode: return get_check_mode_results(connection, module_params) - vpn_connection = create_connection(connection, - customer_gateway_id=module_params.get('customer_gateway_id'), - static_only=module_params.get('static_only'), - vpn_gateway_id=module_params.get('vpn_gateway_id'), - connection_type=module_params.get('connection_type'), - tunnel_options=module_params.get('tunnel_options'), - max_attempts=max_attempts, - delay=delay) - changes = check_for_update(connection, module_params, vpn_connection['VpnConnectionId']) - make_changes(connection, vpn_connection['VpnConnectionId'], changes) + vpn_connection = create_connection( + connection, + customer_gateway_id=module_params.get("customer_gateway_id"), + static_only=module_params.get("static_only"), + vpn_gateway_id=module_params.get("vpn_gateway_id"), + connection_type=module_params.get("connection_type"), + tunnel_options=module_params.get("tunnel_options"), + max_attempts=max_attempts, + delay=delay, + ) + changes = check_for_update(connection, module_params, vpn_connection["VpnConnectionId"]) + make_changes(connection, vpn_connection["VpnConnectionId"], changes) # get latest version if a change has been made and make tags output nice before returning it if vpn_connection: - vpn_connection = find_connection(connection, module_params, vpn_connection['VpnConnectionId']) - if 'Tags' in vpn_connection: - vpn_connection['Tags'] = boto3_tag_list_to_ansible_dict(vpn_connection['Tags']) + vpn_connection = find_connection(connection, module_params, vpn_connection["VpnConnectionId"]) + if "Tags" in vpn_connection: + vpn_connection["Tags"] = boto3_tag_list_to_ansible_dict(vpn_connection["Tags"]) return changed, vpn_connection def ensure_absent(connection, module_params, check_mode=False): - """ Deletes a VPN connection if it exists. """ + """Deletes a VPN connection if it exists.""" vpn_connection = find_connection(connection, module_params) if check_mode: - return get_check_mode_results(connection, module_params, vpn_connection['VpnConnectionId'] if vpn_connection else None) + return get_check_mode_results( + connection, module_params, vpn_connection["VpnConnectionId"] if vpn_connection else None + ) - delay = module_params.get('delay') - max_attempts = module_params.get('wait_timeout') // delay + delay = module_params.get("delay") + max_attempts = module_params.get("wait_timeout") // delay if vpn_connection: - delete_connection(connection, vpn_connection['VpnConnectionId'], delay=delay, max_attempts=max_attempts) + delete_connection(connection, vpn_connection["VpnConnectionId"], delay=delay, max_attempts=max_attempts) changed = True else: changed = False @@ -765,32 +789,31 @@ def ensure_absent(connection, module_params, check_mode=False): def main(): argument_spec = dict( - state=dict(type='str', default='present', choices=['present', 'absent']), - filters=dict(type='dict', default={}), - vpn_gateway_id=dict(type='str'), - tags=dict(type='dict', aliases=['resource_tags']), - connection_type=dict(default='ipsec.1', type='str'), - tunnel_options=dict(no_log=True, type='list', default=[], elements='dict'), - static_only=dict(default=False, type='bool'), - customer_gateway_id=dict(type='str'), - vpn_connection_id=dict(type='str'), - purge_tags=dict(type='bool', default=True), - routes=dict(type='list', default=[], elements='str'), - purge_routes=dict(type='bool', default=False), - wait_timeout=dict(type='int', default=600), - delay=dict(type='int', default=15), + state=dict(type="str", default="present", choices=["present", "absent"]), + filters=dict(type="dict", default={}), + vpn_gateway_id=dict(type="str"), + tags=dict(type="dict", aliases=["resource_tags"]), + connection_type=dict(default="ipsec.1", type="str"), + tunnel_options=dict(no_log=True, type="list", default=[], elements="dict"), + static_only=dict(default=False, type="bool"), + customer_gateway_id=dict(type="str"), + vpn_connection_id=dict(type="str"), + purge_tags=dict(type="bool", default=True), + routes=dict(type="list", default=[], elements="str"), + purge_routes=dict(type="bool", default=False), + wait_timeout=dict(type="int", default=600), + delay=dict(type="int", default=15), ) - module = AnsibleAWSModule(argument_spec=argument_spec, - supports_check_mode=True) - connection = module.client('ec2', retry_decorator=VPNRetry.jittered_backoff(retries=10)) + module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True) + connection = module.client("ec2", retry_decorator=VPNRetry.jittered_backoff(retries=10)) - state = module.params.get('state') + state = module.params.get("state") parameters = dict(module.params) try: - if state == 'present': + if state == "present": changed, response = ensure_present(connection, parameters, module.check_mode) - elif state == 'absent': + elif state == "absent": changed, response = ensure_absent(connection, parameters, module.check_mode) except VPNConnectionException as e: if e.exception: @@ -801,5 +824,5 @@ def main(): module.exit_json(changed=changed, **camel_dict_to_snake_dict(response)) -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 5070af22266..95d8a8ca7e5 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -175,14 +175,14 @@ def date_handler(obj): - return obj.isoformat() if hasattr(obj, 'isoformat') else obj + return obj.isoformat() if hasattr(obj, "isoformat") else obj def list_vpn_connections(connection, module): params = dict() - params['Filters'] = ansible_dict_to_boto3_filter_list(module.params.get('filters')) - params['VpnConnectionIds'] = module.params.get('vpn_connection_ids') + params["Filters"] = ansible_dict_to_boto3_filter_list(module.params.get("filters")) + params["VpnConnectionIds"] = module.params.get("vpn_connection_ids") try: result = json.loads(json.dumps(connection.describe_vpn_connections(**params), default=date_handler)) @@ -190,28 +190,29 @@ def list_vpn_connections(connection, module): module.fail_json_aws(e, msg="Cannot validate JSON data") except (ClientError, BotoCoreError) as e: module.fail_json_aws(e, msg="Could not describe customer gateways") - snaked_vpn_connections = [camel_dict_to_snake_dict(vpn_connection) for vpn_connection in result['VpnConnections']] + snaked_vpn_connections = [camel_dict_to_snake_dict(vpn_connection) for vpn_connection in result["VpnConnections"]] if snaked_vpn_connections: for vpn_connection in snaked_vpn_connections: - vpn_connection['tags'] = boto3_tag_list_to_ansible_dict(vpn_connection.get('tags', [])) + vpn_connection["tags"] = boto3_tag_list_to_ansible_dict(vpn_connection.get("tags", [])) module.exit_json(changed=False, vpn_connections=snaked_vpn_connections) def main(): - argument_spec = dict( - vpn_connection_ids=dict(default=[], type='list', elements='str'), - filters=dict(default={}, type='dict') + vpn_connection_ids=dict(default=[], type="list", elements="str"), + filters=dict(default={}, type="dict"), ) - module = AnsibleAWSModule(argument_spec=argument_spec, - mutually_exclusive=[['vpn_connection_ids', 'filters']], - supports_check_mode=True) + module = AnsibleAWSModule( + argument_spec=argument_spec, + mutually_exclusive=[["vpn_connection_ids", "filters"]], + supports_check_mode=True, + ) - connection = module.client('ec2') + connection = module.client("ec2") list_vpn_connections(connection, module) -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 5bdd6f25c35..6d6f7799b6d 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -1,15 +1,19 @@ # (c) 2017 Red Hat Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import (absolute_import, division, print_function) +from __future__ import absolute_import, division, print_function + __metaclass__ = type import os import pytest # Magic... Incorrectly identified by pylint as unused -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify # pylint: disable=unused-import -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep # pylint: disable=unused-import +# pylint: disable-next=unused-import +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify + +# pylint: disable-next=unused-import +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep import ansible_collections.amazon.aws.plugins.module_utils.retries as aws_retries from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info @@ -30,12 +34,12 @@ def __init__(self, **kwargs): def fail_json_aws(self, *args, **kwargs): self.exit_args = args self.exit_kwargs = kwargs - raise FailException('FAIL') + raise FailException("FAIL") def fail_json(self, *args, **kwargs): self.exit_args = args self.exit_kwargs = kwargs - raise FailException('FAIL') + raise FailException("FAIL") def exit_json(self, *args, **kwargs): self.exit_args = args @@ -44,36 +48,44 @@ def exit_json(self, *args, **kwargs): def get_vgw(connection): # see if two vgw exist and return them if so - vgw = connection.describe_vpn_gateways(Filters=[{'Name': 'tag:Ansible_VPN', 'Values': ['Test']}]) - if len(vgw['VpnGateways']) >= 2: - return [vgw['VpnGateways'][0]['VpnGatewayId'], vgw['VpnGateways'][1]['VpnGatewayId']] + vgw = connection.describe_vpn_gateways(Filters=[{"Name": "tag:Ansible_VPN", "Values": ["Test"]}]) + if len(vgw["VpnGateways"]) >= 2: + return [vgw["VpnGateways"][0]["VpnGatewayId"], vgw["VpnGateways"][1]["VpnGatewayId"]] # otherwise create two and return them - vgw_1 = connection.create_vpn_gateway(Type='ipsec.1') - vgw_2 = connection.create_vpn_gateway(Type='ipsec.1') + vgw_1 = connection.create_vpn_gateway(Type="ipsec.1") + vgw_2 = connection.create_vpn_gateway(Type="ipsec.1") for resource in (vgw_1, vgw_2): - connection.create_tags(Resources=[resource['VpnGateway']['VpnGatewayId']], Tags=[{'Key': 'Ansible_VPN', 'Value': 'Test'}]) - return [vgw_1['VpnGateway']['VpnGatewayId'], vgw_2['VpnGateway']['VpnGatewayId']] + connection.create_tags( + Resources=[resource["VpnGateway"]["VpnGatewayId"]], Tags=[{"Key": "Ansible_VPN", "Value": "Test"}] + ) + return [vgw_1["VpnGateway"]["VpnGatewayId"], vgw_2["VpnGateway"]["VpnGatewayId"]] def get_cgw(connection): # see if two cgw exist and return them if so - cgw = connection.describe_customer_gateways(DryRun=False, Filters=[{'Name': 'state', 'Values': ['available']}, - {'Name': 'tag:Name', 'Values': ['Ansible-CGW']}]) - if len(cgw['CustomerGateways']) >= 2: - return [cgw['CustomerGateways'][0]['CustomerGatewayId'], cgw['CustomerGateways'][1]['CustomerGatewayId']] + cgw = connection.describe_customer_gateways( + DryRun=False, + Filters=[{"Name": "state", "Values": ["available"]}, {"Name": "tag:Name", "Values": ["Ansible-CGW"]}], + ) + if len(cgw["CustomerGateways"]) >= 2: + return [cgw["CustomerGateways"][0]["CustomerGatewayId"], cgw["CustomerGateways"][1]["CustomerGatewayId"]] # otherwise create and return them - cgw_1 = connection.create_customer_gateway(DryRun=False, Type='ipsec.1', PublicIp='9.8.7.6', BgpAsn=65000) - cgw_2 = connection.create_customer_gateway(DryRun=False, Type='ipsec.1', PublicIp='5.4.3.2', BgpAsn=65000) + cgw_1 = connection.create_customer_gateway(DryRun=False, Type="ipsec.1", PublicIp="9.8.7.6", BgpAsn=65000) + cgw_2 = connection.create_customer_gateway(DryRun=False, Type="ipsec.1", PublicIp="5.4.3.2", BgpAsn=65000) for resource in (cgw_1, cgw_2): - connection.create_tags(Resources=[resource['CustomerGateway']['CustomerGatewayId']], Tags=[{'Key': 'Ansible-CGW', 'Value': 'Test'}]) - return [cgw_1['CustomerGateway']['CustomerGatewayId'], cgw_2['CustomerGateway']['CustomerGatewayId']] + connection.create_tags( + Resources=[resource["CustomerGateway"]["CustomerGatewayId"]], Tags=[{"Key": "Ansible-CGW", "Value": "Test"}] + ) + return [cgw_1["CustomerGateway"]["CustomerGatewayId"], cgw_2["CustomerGateway"]["CustomerGatewayId"]] def get_dependencies(): - if os.getenv('PLACEBO_RECORD'): + if os.getenv("PLACEBO_RECORD"): module = FakeModule(**{}) region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True) - connection = boto3_conn(module, conn_type='client', resource='ec2', region=region, endpoint=ec2_url, **aws_connect_kwargs) + connection = boto3_conn( + module, conn_type="client", resource="ec2", region=region, endpoint=ec2_url, **aws_connect_kwargs + ) vgw = get_vgw(connection) cgw = get_cgw(connection) else: @@ -84,7 +96,7 @@ def get_dependencies(): def setup_mod_conn(placeboify, params): - conn = placeboify.client('ec2') + conn = placeboify.client("ec2") retry_decorator = aws_retries.AWSRetry.jittered_backoff() wrapped_conn = aws_retries.RetryingBotoClientWrapper(conn, retry_decorator) m = FakeModule(**params) @@ -96,23 +108,25 @@ def make_params(cgw, vgw, tags=None, filters=None, routes=None): filters = {} if filters is None else filters routes = [] if routes is None else routes - return {'customer_gateway_id': cgw, - 'static_only': True, - 'vpn_gateway_id': vgw, - 'connection_type': 'ipsec.1', - 'purge_tags': True, - 'tags': tags, - 'filters': filters, - 'routes': routes, - 'delay': 15, - 'wait_timeout': 600} + return { + "customer_gateway_id": cgw, + "static_only": True, + "vpn_gateway_id": vgw, + "connection_type": "ipsec.1", + "purge_tags": True, + "tags": tags, + "filters": filters, + "routes": routes, + "delay": 15, + "wait_timeout": 600, + } def make_conn(placeboify, module, connection): - customer_gateway_id = module.params['customer_gateway_id'] - static_only = module.params['static_only'] - vpn_gateway_id = module.params['vpn_gateway_id'] - connection_type = module.params['connection_type'] + customer_gateway_id = module.params["customer_gateway_id"] + static_only = module.params["static_only"] + vpn_gateway_id = module.params["vpn_gateway_id"] + connection_type = module.params["connection_type"] changed = True vpn = ec2_vpc_vpn.create_connection(connection, customer_gateway_id, static_only, vpn_gateway_id, connection_type) return changed, vpn @@ -123,7 +137,7 @@ def tear_down_conn(placeboify, connection, vpn_connection_id): def setup_req(placeboify, number_of_results=1): - ''' returns dependencies for VPN connections ''' + """returns dependencies for VPN connections""" assert number_of_results in (1, 2) results = [] cgw, vgw = get_dependencies() @@ -132,7 +146,7 @@ def setup_req(placeboify, number_of_results=1): m, conn = setup_mod_conn(placeboify, params) vpn = ec2_vpc_vpn.ensure_present(conn, params)[1] - results.append({'module': m, 'connection': conn, 'vpn': vpn, 'params': params}) + results.append({"module": m, "connection": conn, "vpn": vpn, "params": params}) if number_of_results == 1: return results[0] else: @@ -143,41 +157,44 @@ def test_find_connection_vpc_conn_id(placeboify, maybe_sleep): # setup dependencies for 2 vpn connections dependencies = setup_req(placeboify, 2) dep1, dep2 = dependencies[0], dependencies[1] - params1, vpn1, _m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] - _params2, vpn2, _m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] + params1, vpn1, _m1, conn1 = dep1["params"], dep1["vpn"], dep1["module"], dep1["connection"] + _params2, vpn2, _m2, conn2 = dep2["params"], dep2["vpn"], dep2["module"], dep2["connection"] # find the connection with a vpn_connection_id and assert it is the expected one - assert vpn1['VpnConnectionId'] == ec2_vpc_vpn.find_connection(conn1, params1, vpn1['VpnConnectionId'])['VpnConnectionId'] + assert ( + vpn1["VpnConnectionId"] + == ec2_vpc_vpn.find_connection(conn1, params1, vpn1["VpnConnectionId"])["VpnConnectionId"] + ) - tear_down_conn(placeboify, conn1, vpn1['VpnConnectionId']) - tear_down_conn(placeboify, conn2, vpn2['VpnConnectionId']) + tear_down_conn(placeboify, conn1, vpn1["VpnConnectionId"]) + tear_down_conn(placeboify, conn2, vpn2["VpnConnectionId"]) def test_find_connection_filters(placeboify, maybe_sleep): # setup dependencies for 2 vpn connections dependencies = setup_req(placeboify, 2) dep1, dep2 = dependencies[0], dependencies[1] - params1, vpn1, _m1, conn1 = dep1['params'], dep1['vpn'], dep1['module'], dep1['connection'] - params2, vpn2, _m2, conn2 = dep2['params'], dep2['vpn'], dep2['module'], dep2['connection'] + params1, vpn1, _m1, conn1 = dep1["params"], dep1["vpn"], dep1["module"], dep1["connection"] + params2, vpn2, _m2, conn2 = dep2["params"], dep2["vpn"], dep2["module"], dep2["connection"] # update to different tags - params1.update(tags={'Wrong': 'Tag'}) - params2.update(tags={'Correct': 'Tag'}) + params1.update(tags={"Wrong": "Tag"}) + params2.update(tags={"Correct": "Tag"}) ec2_vpc_vpn.ensure_present(conn1, params1) ec2_vpc_vpn.ensure_present(conn2, params2) # create some new parameters for a filter - params = {'filters': {'tags': {'Correct': 'Tag'}}} + params = {"filters": {"tags": {"Correct": "Tag"}}} # find the connection that has the parameters above found = ec2_vpc_vpn.find_connection(conn1, params) # assert the correct connection was found - assert found['VpnConnectionId'] == vpn2['VpnConnectionId'] + assert found["VpnConnectionId"] == vpn2["VpnConnectionId"] # delete the connections - tear_down_conn(placeboify, conn1, vpn1['VpnConnectionId']) - tear_down_conn(placeboify, conn2, vpn2['VpnConnectionId']) + tear_down_conn(placeboify, conn1, vpn1["VpnConnectionId"]) + tear_down_conn(placeboify, conn2, vpn2["VpnConnectionId"]) def test_find_connection_insufficient_filters(placeboify, maybe_sleep): @@ -185,15 +202,15 @@ def test_find_connection_insufficient_filters(placeboify, maybe_sleep): cgw, vgw = get_dependencies() # create two connections with the same tags - params = make_params(cgw[0], vgw[0], tags={'Correct': 'Tag'}) - params2 = make_params(cgw[1], vgw[1], tags={'Correct': 'Tag'}) + params = make_params(cgw[0], vgw[0], tags={"Correct": "Tag"}) + params2 = make_params(cgw[1], vgw[1], tags={"Correct": "Tag"}) m, conn = setup_mod_conn(placeboify, params) m2, conn2 = setup_mod_conn(placeboify, params2) vpn1 = ec2_vpc_vpn.ensure_present(conn, m.params)[1] vpn2 = ec2_vpc_vpn.ensure_present(conn2, m2.params)[1] # reset the parameters so only filtering by tags will occur - m.params = {'filters': {'tags': {'Correct': 'Tag'}}} + m.params = {"filters": {"tags": {"Correct": "Tag"}}} expected_message = "More than one matching VPN connection was found" # assert that multiple matching connections have been found @@ -201,13 +218,13 @@ def test_find_connection_insufficient_filters(placeboify, maybe_sleep): ec2_vpc_vpn.find_connection(conn, m.params) # delete the connections - tear_down_conn(placeboify, conn, vpn1['VpnConnectionId']) - tear_down_conn(placeboify, conn, vpn2['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn1["VpnConnectionId"]) + tear_down_conn(placeboify, conn, vpn2["VpnConnectionId"]) def test_find_connection_nonexistent(placeboify, maybe_sleep): # create parameters but don't create a connection with them - params = {'filters': {'tags': {'Correct': 'Tag'}}} + params = {"filters": {"tags": {"Correct": "Tag"}}} m, conn = setup_mod_conn(placeboify, params) # try to find a connection with matching parameters and assert None are found @@ -225,38 +242,48 @@ def test_create_connection(placeboify, maybe_sleep): # assert that changed is true and that there is a connection id assert changed is True - assert 'VpnConnectionId' in vpn + assert "VpnConnectionId" in vpn # delete connection - tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) def test_create_connection_that_exists(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, _m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + params, vpn, _m, conn = ( + dependencies["params"], + dependencies["vpn"], + dependencies["module"], + dependencies["connection"], + ) # try to recreate the same connection changed, vpn2 = ec2_vpc_vpn.ensure_present(conn, params) # nothing should have changed assert changed is False - assert vpn['VpnConnectionId'] == vpn2['VpnConnectionId'] + assert vpn["VpnConnectionId"] == vpn2["VpnConnectionId"] # delete connection - tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) def test_modify_deleted_connection(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - _params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + _params, vpn, m, conn = ( + dependencies["params"], + dependencies["vpn"], + dependencies["module"], + dependencies["connection"], + ) # delete it - tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) # try to update the deleted connection - m.params.update(vpn_connection_id=vpn['VpnConnectionId']) + m.params.update(vpn_connection_id=vpn["VpnConnectionId"]) expected_message = "no VPN connection available or pending with that id" with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): ec2_vpc_vpn.ensure_present(conn, m.params) @@ -265,7 +292,12 @@ def test_modify_deleted_connection(placeboify, maybe_sleep): def test_delete_connection(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - _params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + _params, vpn, m, conn = ( + dependencies["params"], + dependencies["vpn"], + dependencies["module"], + dependencies["connection"], + ) # delete it changed, vpn = ec2_vpc_vpn.ensure_absent(conn, m.params) @@ -276,7 +308,7 @@ def test_delete_connection(placeboify, maybe_sleep): def test_delete_nonexistent_connection(placeboify, maybe_sleep): # create parameters and ensure any connection matching (None) is deleted - params = {'filters': {'tags': {'ThisConnection': 'DoesntExist'}}, 'delay': 15, 'wait_timeout': 600} + params = {"filters": {"tags": {"ThisConnection": "DoesntExist"}}, "delay": 15, "wait_timeout": 600} m, conn = setup_mod_conn(placeboify, params) changed, vpn = ec2_vpc_vpn.ensure_absent(conn, m.params) @@ -287,83 +319,114 @@ def test_delete_nonexistent_connection(placeboify, maybe_sleep): def test_check_for_update_tags(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - _params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + _params, vpn, m, conn = ( + dependencies["params"], + dependencies["vpn"], + dependencies["module"], + dependencies["connection"], + ) # add and remove a number of tags - m.params['tags'] = {'One': 'one', 'Two': 'two'} + m.params["tags"] = {"One": "one", "Two": "two"} ec2_vpc_vpn.ensure_present(conn, m.params) - m.params['tags'] = {'Two': 'two', 'Three': 'three', 'Four': 'four'} - changes = ec2_vpc_vpn.check_for_update(conn, m.params, vpn['VpnConnectionId']) + m.params["tags"] = {"Two": "two", "Three": "three", "Four": "four"} + changes = ec2_vpc_vpn.check_for_update(conn, m.params, vpn["VpnConnectionId"]) - flat_dict_changes = boto3_tag_list_to_ansible_dict(changes['tags_to_add']) - correct_changes = boto3_tag_list_to_ansible_dict([{'Key': 'Three', 'Value': 'three'}, {'Key': 'Four', 'Value': 'four'}]) + flat_dict_changes = boto3_tag_list_to_ansible_dict(changes["tags_to_add"]) + correct_changes = boto3_tag_list_to_ansible_dict( + [{"Key": "Three", "Value": "three"}, {"Key": "Four", "Value": "four"}] + ) assert flat_dict_changes == correct_changes - assert changes['tags_to_remove'] == ['One'] + assert changes["tags_to_remove"] == ["One"] # delete connection - tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) def test_check_for_update_nonmodifiable_attr(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] - current_vgw = params['vpn_gateway_id'] + params, vpn, m, conn = ( + dependencies["params"], + dependencies["vpn"], + dependencies["module"], + dependencies["connection"], + ) + current_vgw = params["vpn_gateway_id"] # update a parameter that isn't modifiable m.params.update(vpn_gateway_id="invalidchange") - expected_message = 'You cannot modify vpn_gateway_id, the current value of which is {0}. Modifiable VPN connection attributes are'.format(current_vgw) + expected_message = "You cannot modify vpn_gateway_id, the current value of which is {0}. Modifiable VPN connection attributes are".format( + current_vgw + ) with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): - ec2_vpc_vpn.check_for_update(conn, m.params, vpn['VpnConnectionId']) + ec2_vpc_vpn.check_for_update(conn, m.params, vpn["VpnConnectionId"]) # delete connection - tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) def test_add_tags(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, _m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + params, vpn, _m, conn = ( + dependencies["params"], + dependencies["vpn"], + dependencies["module"], + dependencies["connection"], + ) # add a tag to the connection - ec2_vpc_vpn.add_tags(conn, vpn['VpnConnectionId'], add=[{'Key': 'Ansible-Test', 'Value': 'VPN'}]) + ec2_vpc_vpn.add_tags(conn, vpn["VpnConnectionId"], add=[{"Key": "Ansible-Test", "Value": "VPN"}]) # assert tag is there current_vpn = ec2_vpc_vpn.find_connection(conn, params) - assert current_vpn['Tags'] == [{'Key': 'Ansible-Test', 'Value': 'VPN'}] + assert current_vpn["Tags"] == [{"Key": "Ansible-Test", "Value": "VPN"}] # delete connection - tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) def test_remove_tags(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, _m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + params, vpn, _m, conn = ( + dependencies["params"], + dependencies["vpn"], + dependencies["module"], + dependencies["connection"], + ) # remove a tag from the connection - ec2_vpc_vpn.remove_tags(conn, vpn['VpnConnectionId'], remove=['Ansible-Test']) + ec2_vpc_vpn.remove_tags(conn, vpn["VpnConnectionId"], remove=["Ansible-Test"]) # assert the tag is gone current_vpn = ec2_vpc_vpn.find_connection(conn, params) - assert 'Tags' not in current_vpn + assert "Tags" not in current_vpn # delete connection - tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) def test_add_routes(placeboify, maybe_sleep): # setup dependencies for 1 vpn connection dependencies = setup_req(placeboify, 1) - params, vpn, _m, conn = dependencies['params'], dependencies['vpn'], dependencies['module'], dependencies['connection'] + params, vpn, _m, conn = ( + dependencies["params"], + dependencies["vpn"], + dependencies["module"], + dependencies["connection"], + ) # create connection with a route - ec2_vpc_vpn.add_routes(conn, vpn['VpnConnectionId'], ['195.168.2.0/24', '196.168.2.0/24']) + ec2_vpc_vpn.add_routes(conn, vpn["VpnConnectionId"], ["195.168.2.0/24", "196.168.2.0/24"]) # assert both routes are there current_vpn = ec2_vpc_vpn.find_connection(conn, params) - assert set(each['DestinationCidrBlock'] for each in current_vpn['Routes']) == set(['195.168.2.0/24', '196.168.2.0/24']) + assert set(each["DestinationCidrBlock"] for each in current_vpn["Routes"]) == set( + ["195.168.2.0/24", "196.168.2.0/24"] + ) # delete connection - tear_down_conn(placeboify, conn, vpn['VpnConnectionId']) + tear_down_conn(placeboify, conn, vpn["VpnConnectionId"]) From ee06b1b95b2df5bce787149a282d9bf5898f3671 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Mon, 8 May 2023 19:21:22 +0200 Subject: [PATCH 33/38] Bulk migration to Python 3.6 f-strings (#1810) Bulk migration to Python 3.6 f-strings SUMMARY We've dropped support for Python <3.6, bulk migrate to fstrings and perform some general string cleanup A combination of black --preview flynt some manual cleanup ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/ tests/ ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/de338210dc1b0bb2eecee1dc16e073163b2d1df7 --- plugins/modules/ec2_vpc_vpn.py | 37 ++++++++++--------- .../unit/plugins/modules/test_ec2_vpc_vpn.py | 4 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 8d8dc1467e1..0efce4a7470 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -384,7 +384,7 @@ def add_routes(connection, vpn_connection_id, routes_to_add): ) except (BotoCoreError, ClientError) as e: raise VPNConnectionException( - msg="Failed while adding route {0} to the VPN connection {1}.".format(route, vpn_connection_id), + msg=f"Failed while adding route {route} to the VPN connection {vpn_connection_id}.", exception=e, ) @@ -397,7 +397,7 @@ def remove_routes(connection, vpn_connection_id, routes_to_remove): ) except (BotoCoreError, ClientError) as e: raise VPNConnectionException( - msg="Failed to remove route {0} from the VPN connection {1}.".format(route, vpn_connection_id), + msg=f"Failed to remove route {route} from the VPN connection {vpn_connection_id}.", exception=e, ) @@ -435,7 +435,7 @@ def create_filter(module_params, provided_filters): elif raw_param in list(boto3ify_filter.items()): param = raw_param else: - raise VPNConnectionException(msg="{0} is not a valid filter.".format(raw_param)) + raise VPNConnectionException(msg=f"{raw_param} is not a valid filter.") # reformat filters with special formats if param == "tag": @@ -487,8 +487,10 @@ def find_connection_response(connections=None): return None else: raise VPNConnectionException( - msg="More than one matching VPN connection was found. " - "To modify or delete a VPN please specify vpn_connection_id or add filters." + msg=( + "More than one matching VPN connection was found. " + "To modify or delete a VPN please specify vpn_connection_id or add filters." + ) ) # Found unique match @@ -524,8 +526,10 @@ def create_connection( if not (customer_gateway_id and vpn_gateway_id): raise VPNConnectionException( - msg="No matching connection was found. To create a new connection you must provide " - "both vpn_gateway_id and customer_gateway_id." + msg=( + "No matching connection was found. To create a new connection you must provide " + "both vpn_gateway_id and customer_gateway_id." + ) ) try: vpn = connection.create_vpn_connection( @@ -537,7 +541,7 @@ def create_connection( ) except WaiterError as e: raise VPNConnectionException( - msg="Failed to wait for VPN connection {0} to be available".format(vpn["VpnConnection"]["VpnConnectionId"]), + msg=f"Failed to wait for VPN connection {vpn['VpnConnection']['VpnConnectionId']} to be available", exception=e, ) except (BotoCoreError, ClientError) as e: @@ -555,19 +559,17 @@ def delete_connection(connection, vpn_connection_id, delay, max_attempts): ) except WaiterError as e: raise VPNConnectionException( - msg="Failed to wait for VPN connection {0} to be removed".format(vpn_connection_id), exception=e + msg=f"Failed to wait for VPN connection {vpn_connection_id} to be removed", exception=e ) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException( - msg="Failed to delete the VPN connection: {0}".format(vpn_connection_id), exception=e - ) + raise VPNConnectionException(msg=f"Failed to delete the VPN connection: {vpn_connection_id}", exception=e) def add_tags(connection, vpn_connection_id, add): try: connection.create_tags(aws_retry=True, Resources=[vpn_connection_id], Tags=add) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed to add the tags: {0}.".format(add), exception=e) + raise VPNConnectionException(msg=f"Failed to add the tags: {add}.", exception=e) def remove_tags(connection, vpn_connection_id, remove): @@ -576,7 +578,7 @@ def remove_tags(connection, vpn_connection_id, remove): try: connection.delete_tags(aws_retry=True, Resources=[vpn_connection_id], Tags=key_dict_list) except (BotoCoreError, ClientError) as e: - raise VPNConnectionException(msg="Failed to remove the tags: {0}.".format(remove), exception=e) + raise VPNConnectionException(msg=f"Failed to remove the tags: {remove}.", exception=e) def check_for_update(connection, module_params, vpn_connection_id): @@ -624,9 +626,10 @@ def check_for_update(connection, module_params, vpn_connection_id): if will_be is not None and to_text(will_be) != to_text(is_now): raise VPNConnectionException( - msg="You cannot modify {0}, the current value of which is {1}. Modifiable VPN " - "connection attributes are tags and routes. The value you tried to change it to " - "is {2}.".format(attribute, is_now, will_be) + msg=( + f"You cannot modify {attribute}, the current value of which is {is_now}. Modifiable VPN connection" + f" attributes are tags and routes. The value you tried to change it to is {will_be}." + ) ) return changes diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 6d6f7799b6d..06be32db6db 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -357,9 +357,7 @@ def test_check_for_update_nonmodifiable_attr(placeboify, maybe_sleep): # update a parameter that isn't modifiable m.params.update(vpn_gateway_id="invalidchange") - expected_message = "You cannot modify vpn_gateway_id, the current value of which is {0}. Modifiable VPN connection attributes are".format( - current_vgw - ) + expected_message = f"You cannot modify vpn_gateway_id, the current value of which is {current_vgw}. Modifiable VPN connection attributes are" with pytest.raises(ec2_vpc_vpn.VPNConnectionException, match=expected_message): ec2_vpc_vpn.check_for_update(conn, m.params, vpn["VpnConnectionId"]) From 580bad034cb52ee04fa0c68d30bc5f6e4f9d88e9 Mon Sep 17 00:00:00 2001 From: GomathiselviS Date: Thu, 13 Jul 2023 10:31:56 +0530 Subject: [PATCH 34/38] Add transit-gateway-id parameter to ec2_vpc_vpn module (#1877) Add transit-gateway-id parameter to ec2_vpc_vpn module SUMMARY This PR adds transit_gateway_id parameter to ec2_vpc_vpn module. It is needed for the validated content role that manages the creation of transit gateway and attaches VPN to the created transit gateway. ISSUE TYPE Feature Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Bikouo Aubin Reviewed-by: Alina Buzachis Reviewed-by: GomathiselviS Reviewed-by: Mark Chappell This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/d74c698560cffac89c1afacc1c3ff9c490f861b9 --- plugins/modules/ec2_vpc_vpn.py | 50 ++++++++++++-- .../targets/ec2_vpc_vpn/tasks/main.yml | 65 ++++++++++++++++++- 2 files changed, 107 insertions(+), 8 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 0efce4a7470..3e4987d9725 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -35,6 +35,7 @@ vpn_gateway_id: description: - The ID of the virtual private gateway. + - Mutually exclusive with I(transit_gateway_id). type: str vpn_connection_id: description: @@ -46,6 +47,12 @@ default: False type: bool required: false + transit_gateway_id: + description: + - The ID of the transit gateway. + - Mutually exclusive with I(vpn_gateway_id). + type: str + version_added: 6.2.0 tunnel_options: description: - An optional list object containing no more than two dict members, each of which may contain I(TunnelInsideCidr) @@ -139,12 +146,18 @@ # Note: None of these examples set aws_access_key, aws_secret_key, or region. # It is assumed that their matching environment variables are set. -- name: create a VPN connection +- name: create a VPN connection with vpn_gateway_id community.aws.ec2_vpc_vpn: state: present vpn_gateway_id: vgw-XXXXXXXX customer_gateway_id: cgw-XXXXXXXX +- name: Attach a vpn connection to transit gateway + community.aws.ec2_vpc_vpn: + state: present + transit_gateway_id: tgw-XXXXXXXX + customer_gateway_id: cgw-XXXXXXXX + - name: modify VPN connection tags community.aws.ec2_vpc_vpn: state: present @@ -231,6 +244,12 @@ returned: I(state=present) sample: vpn_gateway_id: vgw-cb0ae2a2 +transit_gateway_id: + description: The transit gateway id to which the vpn connection can be attached. + type: str + returned: I(state=present) + sample: + transit_gateway_id: tgw-cb0ae2a2 options: description: The VPN connection options (currently only containing static_routes_only). type: complex @@ -421,6 +440,7 @@ def create_filter(module_params, provided_filters): param_to_filter = { "customer_gateway_id": "customer-gateway-id", "vpn_gateway_id": "vpn-gateway-id", + "transit_gateway_id": "transit-gateway-id", "vpn_connection_id": "vpn-connection-id", } @@ -505,6 +525,7 @@ def create_connection( customer_gateway_id, static_only, vpn_gateway_id, + transit_gateway_id, connection_type, max_attempts, delay, @@ -524,17 +545,21 @@ def create_connection( if t_opt: options["TunnelOptions"] = t_opt - if not (customer_gateway_id and vpn_gateway_id): + if not (customer_gateway_id and (vpn_gateway_id or transit_gateway_id)): raise VPNConnectionException( msg=( "No matching connection was found. To create a new connection you must provide " - "both vpn_gateway_id and customer_gateway_id." + "customer_gateway_id and one of either transit_gateway_id or vpn_gateway_id." ) ) + vpn_connection_params = {"Type": connection_type, "CustomerGatewayId": customer_gateway_id, "Options": options} + if vpn_gateway_id: + vpn_connection_params["VpnGatewayId"] = vpn_gateway_id + if transit_gateway_id: + vpn_connection_params["TransitGatewayId"] = transit_gateway_id + try: - vpn = connection.create_vpn_connection( - Type=connection_type, CustomerGatewayId=customer_gateway_id, VpnGatewayId=vpn_gateway_id, Options=options - ) + vpn = connection.create_vpn_connection(**vpn_connection_params) connection.get_waiter("vpn_connection_available").wait( VpnConnectionIds=[vpn["VpnConnection"]["VpnConnectionId"]], WaiterConfig={"Delay": delay, "MaxAttempts": max_attempts}, @@ -674,6 +699,7 @@ def get_check_mode_results(connection, module_params, vpn_connection_id=None, cu "customer_gateway_configuration": "", "customer_gateway_id": module_params.get("customer_gateway_id"), "vpn_gateway_id": module_params.get("vpn_gateway_id"), + "transit_gateway_id": module_params.get("transit_gateway_id"), "options": {"static_routes_only": module_params.get("static_only")}, "routes": [module_params.get("routes")], } @@ -752,6 +778,7 @@ def ensure_present(connection, module_params, check_mode=False): customer_gateway_id=module_params.get("customer_gateway_id"), static_only=module_params.get("static_only"), vpn_gateway_id=module_params.get("vpn_gateway_id"), + transit_gateway_id=module_params.get("transit_gateway_id"), connection_type=module_params.get("connection_type"), tunnel_options=module_params.get("tunnel_options"), max_attempts=max_attempts, @@ -797,6 +824,7 @@ def main(): vpn_gateway_id=dict(type="str"), tags=dict(type="dict", aliases=["resource_tags"]), connection_type=dict(default="ipsec.1", type="str"), + transit_gateway_id=dict(type="str"), tunnel_options=dict(no_log=True, type="list", default=[], elements="dict"), static_only=dict(default=False, type="bool"), customer_gateway_id=dict(type="str"), @@ -807,7 +835,15 @@ def main(): wait_timeout=dict(type="int", default=600), delay=dict(type="int", default=15), ) - module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True) + mutually_exclusive = [ + ["vpn_gateway_id", "transit_gateway_id"], + ] + + module = AnsibleAWSModule( + argument_spec=argument_spec, + supports_check_mode=True, + mutually_exclusive=mutually_exclusive, + ) connection = module.client("ec2", retry_decorator=VPNRetry.jittered_backoff(retries=10)) state = module.params.get("state") diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml index a4c740887e8..cf33bf9e684 100644 --- a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml @@ -35,7 +35,63 @@ name: testcgw register: cgw - - name: create vpn connection, with customer gateway + - name: create transit gateway + ec2_transit_gateway: + description: "Transit Gateway for vpn attachment" + register: tgw + + - name: create vpn connection, with customer gateway, vpn_gateway_id and transit_gateway + ec2_vpc_vpn: + customer_gateway_id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' + vpn_gateway_id: '{{ vgw.vgw.id }}' + transit_gateway_id: '{{ tgw.transit_gateway.transit_gateway_id }}' + state: present + register: result + ignore_errors: true + + - name: assert creation of vpn failed + assert: + that: + - result is failed + - result.msg == "parameters are mutually exclusive: vpn_gateway_id|transit_gateway_id" + + + - name: create vpn connection, with customer gateway and transit_gateway + ec2_vpc_vpn: + customer_gateway_id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' + transit_gateway_id: '{{ tgw.transit_gateway.transit_gateway_id }}' + state: present + register: tgw_vpn + + - name: Store ID of VPN + set_fact: + vpn_id: '{{ tgw_vpn.vpn_connection_id }}' + + # ============================================================ + - name: test success with no parameters + ec2_vpc_vpn_info: + register: result + + - name: assert success with no parameters + assert: + that: + - 'result.changed == false' + - 'result.vpn_connections != []' + # ============================================================ + + - name: Delete vpn created with transit gateway + ec2_vpc_vpn: + state: absent + vpn_connection_id: '{{ vpn_id }}' + register: result + retries: 10 + delay: 3 + until: result is not failed + ignore_errors: true + + # ============================================================ + + - name: create vpn connection, with customer gateway and vpn gateway ec2_vpc_vpn: customer_gateway_id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' vpn_gateway_id: '{{ vgw.vgw.id }}' @@ -47,6 +103,7 @@ vpn_id: '{{ vpn.vpn_connection_id }}' # ============================================================ + - name: test success with no parameters ec2_vpc_vpn_info: register: result @@ -163,3 +220,9 @@ delay: 3 until: result is not failed ignore_errors: true + + - name: delete transit gateway + ec2_transit_gateway: + transit_gateway_id: '{{ tgw.transit_gateway.transit_gateway_id }}' + state: absent + ignore_errors: true From 72476106553828f349225e874621ed6df3d860ce Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 31 Aug 2023 17:58:59 +0200 Subject: [PATCH 35/38] Mass update of docs and tests (credentials/session tokens) (#1921) Mass update of docs and tests (credentials/session tokens) SUMMARY We had a cleanup of credentials/session parameters which included a batch of deprecations and renames. Ensure that all of our tests and docs are using the 'canonical' names ISSUE TYPE Docs Pull Request COMPONENT NAME plugins/modules/batch_compute_environment.py plugins/modules/cloudformation_exports_info.py plugins/modules/ec2_vpc_vpn.py plugins/modules/elasticache.py plugins/modules/elasticache_parameter_group.py plugins/modules/elasticache_snapshot.py plugins/modules/ses_rule_set.py plugins/modules/sts_assume_role.py plugins/modules/sts_session_token.py tests/integration ADDITIONAL INFORMATION See also ansible-collections/amazon.aws#1172 ansible-collections/amazon.aws#1714 Reviewed-by: Alina Buzachis This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/4a5b50e9b9c0d6ca1a1f802f3b03d4f503c16885 --- plugins/modules/ec2_vpc_vpn.py | 3 +-- tests/integration/targets/ec2_vpc_vpn/tasks/main.yml | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 3e4987d9725..abc97f796b7 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -143,8 +143,7 @@ """ EXAMPLES = r""" -# Note: None of these examples set aws_access_key, aws_secret_key, or region. -# It is assumed that their matching environment variables are set. +# Note: These examples do not set authentication details, see the AWS Guide for details. - name: create a VPN connection with vpn_gateway_id community.aws.ec2_vpc_vpn: diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml index cf33bf9e684..9514d7cf350 100644 --- a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' block: From 9f673fda437149a7b5c16c7e0fded9ad51d461ab Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Tue, 17 Oct 2023 21:27:02 +0200 Subject: [PATCH 36/38] Apply isort and flynt (#1962) SUMMARY Apply isort - see also ansible-collections/amazon.aws#1771 Apply flynt - see also ansible-collections/amazon.aws#1802 ISSUE TYPE Feature Pull Request COMPONENT NAME ADDITIONAL INFORMATION This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/c0117b5466958bd0f8b5fc620306adde1422a62d --- plugins/modules/ec2_vpc_vpn_info.py | 2 +- .../unit/plugins/modules/test_ec2_vpc_vpn.py | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 95d8a8ca7e5..d304e456833 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -168,8 +168,8 @@ from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict -from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict +from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 06be32db6db..2b5db4226dd 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -1,24 +1,29 @@ # (c) 2017 Red Hat Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) -from __future__ import absolute_import, division, print_function +from __future__ import absolute_import +from __future__ import division +from __future__ import print_function __metaclass__ = type import os -import pytest - -# Magic... Incorrectly identified by pylint as unused -# pylint: disable-next=unused-import -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify -# pylint: disable-next=unused-import -from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep +import pytest import ansible_collections.amazon.aws.plugins.module_utils.retries as aws_retries -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_conn from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_tag_list_to_ansible_dict +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info + +# Magic... Incorrectly identified by pylint as unused +# isort: off +# pylint: disable=unused-import +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import maybe_sleep +from ansible_collections.amazon.aws.tests.unit.utils.amazon_placebo_fixtures import placeboify + +# pylint: enable=unused-import +# isort: on from ansible_collections.community.aws.plugins.modules import ec2_vpc_vpn From 9a617bb61ea8c5539a0536a6d40dbd819566adbc Mon Sep 17 00:00:00 2001 From: abikouo Date: Thu, 19 Sep 2024 19:07:01 +0200 Subject: [PATCH 37/38] Update FQCN, clean tests and add changelog fragment --- changelogs/fragments/migrate_ec2_vpc_vpn.yml | 8 + meta/runtime.yml | 2 + plugins/modules/ec2_vpc_vpn.py | 20 +- plugins/modules/ec2_vpc_vpn_info.py | 8 +- tests/integration/targets/ec2_vpc_vpn/aliases | 2 +- .../targets/ec2_vpc_vpn/tasks/main.yml | 54 +++-- .../targets/ec2_vpc_vpn/tasks/tags.yml | 186 +++++++++--------- .../unit/plugins/modules/test_ec2_vpc_vpn.py | 2 +- 8 files changed, 145 insertions(+), 137 deletions(-) create mode 100644 changelogs/fragments/migrate_ec2_vpc_vpn.yml diff --git a/changelogs/fragments/migrate_ec2_vpc_vpn.yml b/changelogs/fragments/migrate_ec2_vpc_vpn.yml new file mode 100644 index 00000000000..0b1acd8f7cd --- /dev/null +++ b/changelogs/fragments/migrate_ec2_vpc_vpn.yml @@ -0,0 +1,8 @@ +--- +major_changes: + - ec2_vpc_vpn - The module has been migrated from the ``community.aws`` collection. + Playbooks using the Fully Qualified Collection Name for this module should be + updated to use ``amazon.aws.ec2_vpc_vpn``. + - ec2_vpc_vpn_info - The module has been migrated from the ``community.aws`` collection. + Playbooks using the Fully Qualified Collection Name for this module should be + updated to use ``amazon.aws.ec2_vpc_vpn_info``. diff --git a/meta/runtime.yml b/meta/runtime.yml index 94614615f1e..668edbd2e00 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -68,6 +68,8 @@ action_groups: - ec2_vpc_route_table_info - ec2_vpc_subnet - ec2_vpc_subnet_info + - ec2_vpc_vpn + - ec2_vpc_vpn_info - elb_application_lb - elb_application_lb_info - elb_classic_lb diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index abc97f796b7..5d94cb2915e 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -146,19 +146,19 @@ # Note: These examples do not set authentication details, see the AWS Guide for details. - name: create a VPN connection with vpn_gateway_id - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: state: present vpn_gateway_id: vgw-XXXXXXXX customer_gateway_id: cgw-XXXXXXXX - name: Attach a vpn connection to transit gateway - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: state: present transit_gateway_id: tgw-XXXXXXXX customer_gateway_id: cgw-XXXXXXXX - name: modify VPN connection tags - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: state: present vpn_connection_id: vpn-XXXXXXXX tags: @@ -166,12 +166,12 @@ Other: ansible-tag-2 - name: delete a connection - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: vpn_connection_id: vpn-XXXXXXXX state: absent - name: modify VPN tags (identifying VPN by filters) - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: state: present filters: cidr: 194.168.1.0/24 @@ -184,7 +184,7 @@ static_only: true - name: set up VPN with tunnel options utilizing 'TunnelInsideCidr' only - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: state: present filters: vpn: vpn-XXXXXXXX @@ -196,7 +196,7 @@ TunnelInsideCidr: '169.254.100.5/30' - name: add routes and remove any preexisting ones - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: state: present filters: vpn: vpn-XXXXXXXX @@ -206,14 +206,14 @@ purge_routes: true - name: remove all routes - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: state: present vpn_connection_id: vpn-XXXXXXXX routes: [] purge_routes: true - name: delete a VPN identified by filters - community.aws.ec2_vpc_vpn: + amazon.aws.ec2_vpc_vpn: state: absent filters: tags: @@ -324,7 +324,7 @@ from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict from ansible_collections.amazon.aws.plugins.module_utils.tagging import compare_aws_tags -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule +from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule class VPNConnectionException(Exception): diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index d304e456833..48d68f01524 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -37,16 +37,16 @@ EXAMPLES = r""" # # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Gather information about all vpn connections - community.aws.ec2_vpc_vpn_info: + amazon.aws.ec2_vpc_vpn_info: - name: Gather information about a filtered list of vpn connections, based on tags - community.aws.ec2_vpc_vpn_info: + amazon.aws.ec2_vpc_vpn_info: filters: "tag:Name": test-connection register: vpn_conn_info - name: Gather information about vpn connections by specifying connection IDs. - community.aws.ec2_vpc_vpn_info: + amazon.aws.ec2_vpc_vpn_info: filters: vpn-gateway-id: vgw-cbe66beb register: vpn_conn_info @@ -171,7 +171,7 @@ from ansible_collections.amazon.aws.plugins.module_utils.tagging import boto3_tag_list_to_ansible_dict from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list -from ansible_collections.community.aws.plugins.module_utils.modules import AnsibleCommunityAWSModule as AnsibleAWSModule +from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule def date_handler(obj): diff --git a/tests/integration/targets/ec2_vpc_vpn/aliases b/tests/integration/targets/ec2_vpc_vpn/aliases index 28e84af91be..d1e8ffb859f 100644 --- a/tests/integration/targets/ec2_vpc_vpn/aliases +++ b/tests/integration/targets/ec2_vpc_vpn/aliases @@ -1,3 +1,3 @@ cloud/aws - +time=12m ec2_vpc_vpn_info diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml index 9514d7cf350..20aa4048eb7 100644 --- a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml @@ -1,7 +1,4 @@ ---- -- name: 'ec2_vpc_vpn_info integration tests' - collections: - - amazon.aws +- name: ec2_vpc_vpn_info integration tests module_defaults: group/aws: access_key: '{{ aws_access_key }}' @@ -13,19 +10,19 @@ # ============================================================ - name: create a VPC ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" + name: '{{ resource_prefix }}-vpc' state: present - cidr_block: "10.0.0.0/26" + cidr_block: 10.0.0.0/26 tags: - Name: "{{ resource_prefix }}-vpc" - Description: "Created by ansible-test" + Name: '{{ resource_prefix }}-vpc' + Description: Created by ansible-test register: vpc_result - name: create vpn gateway and attach it to vpc ec2_vpc_vgw: state: present vpc_id: '{{ vpc_result.vpc.id }}' - name: "{{ resource_prefix }}-vgw" + name: '{{ resource_prefix }}-vgw' register: vgw - name: create customer gateway @@ -37,7 +34,7 @@ - name: create transit gateway ec2_transit_gateway: - description: "Transit Gateway for vpn attachment" + description: Transit Gateway for vpn attachment register: tgw - name: create vpn connection, with customer gateway, vpn_gateway_id and transit_gateway @@ -52,8 +49,8 @@ - name: assert creation of vpn failed assert: that: - - result is failed - - result.msg == "parameters are mutually exclusive: vpn_gateway_id|transit_gateway_id" + - result is failed + - result.msg == "parameters are mutually exclusive: vpn_gateway_id|transit_gateway_id" - name: create vpn connection, with customer gateway and transit_gateway @@ -75,8 +72,8 @@ - name: assert success with no parameters assert: that: - - 'result.changed == false' - - 'result.vpn_connections != []' + - result.changed == false + - result.vpn_connections != [] # ============================================================ - name: Delete vpn created with transit gateway @@ -111,25 +108,26 @@ - name: assert success with no parameters assert: that: - - 'result.changed == false' - - 'result.vpn_connections != []' + - result.changed == false + - result.vpn_connections != [] - name: test success with customer gateway id as a filter ec2_vpc_vpn_info: filters: - customer-gateway-id: '{{ cgw.gateway.customer_gateway.customer_gateway_id }}' + customer-gateway-id: '{{ cgw.gateway.customer_gateway.customer_gateway_id + }}' vpn-connection-id: '{{ vpn.vpn_connection_id }}' register: result - name: assert success with customer gateway id as filter assert: that: - - 'result.changed == false' - - 'result.vpn_connections != []' + - result.changed == false + - result.vpn_connections != [] # ============================================================ - - include_tasks: 'tags.yml' + - include_tasks: tags.yml # ============================================================ @@ -138,11 +136,11 @@ state: absent vpn_connection_id: '{{ vpn_id }}' register: result - check_mode: True + check_mode: true - assert: that: - - result is changed + - result is changed - name: delete vpn connection ec2_vpc_vpn: @@ -152,18 +150,18 @@ - assert: that: - - result is changed + - result is changed - name: delete vpn connection - idempotency (check) ec2_vpc_vpn: state: absent vpn_connection_id: '{{ vpn_id }}' register: result - check_mode: True + check_mode: true - assert: that: - - result is not changed + - result is not changed - name: delete vpn connection - idempotency ec2_vpc_vpn: @@ -173,7 +171,7 @@ - assert: that: - - result is not changed + - result is not changed # ============================================================ always: @@ -212,9 +210,9 @@ - name: delete vpc ec2_vpc_net: - name: "{{ resource_prefix }}-vpc" + name: '{{ resource_prefix }}-vpc' state: absent - cidr_block: "10.0.0.0/26" + cidr_block: 10.0.0.0/26 register: result retries: 10 delay: 3 diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml index fb97f01faab..25701626a8a 100644 --- a/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml +++ b/tests/integration/targets/ec2_vpc_vpn/tasks/tags.yml @@ -1,26 +1,26 @@ - vars: first_tags: - 'Key with Spaces': Value with spaces + Key with Spaces: Value with spaces CamelCaseKey: CamelCaseValue pascalCaseKey: pascalCaseValue snake_case_key: snake_case_value second_tags: - 'New Key with Spaces': Value with spaces + New Key with Spaces: Value with spaces NewCamelCaseKey: CamelCaseValue newPascalCaseKey: pascalCaseValue new_snake_case_key: snake_case_value third_tags: - 'Key with Spaces': Value with spaces + Key with Spaces: Value with spaces CamelCaseKey: CamelCaseValue pascalCaseKey: pascalCaseValue snake_case_key: snake_case_value - 'New Key with Spaces': Updated Value with spaces + New Key with Spaces: Updated Value with spaces final_tags: - 'Key with Spaces': Value with spaces + Key with Spaces: Value with spaces CamelCaseKey: CamelCaseValue pascalCaseKey: pascalCaseValue snake_case_key: snake_case_value - 'New Key with Spaces': Updated Value with spaces + New Key with Spaces: Updated Value with spaces NewCamelCaseKey: CamelCaseValue newPascalCaseKey: pascalCaseValue new_snake_case_key: snake_case_value @@ -37,20 +37,20 @@ - name: (check) add tags ec2_vpc_vpn: tags: '{{ first_tags }}' - state: 'present' + state: present register: tag_vpn - check_mode: True + check_mode: true - name: assert would change assert: that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id - name: add tags ec2_vpc_vpn: tags: '{{ first_tags }}' - state: 'present' + state: present register: tag_vpn - name: get VPC VPN facts @@ -60,28 +60,28 @@ - name: verify the tags were added assert: that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == first_tags + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == first_tags - name: (check) add tags - IDEMPOTENCY ec2_vpc_vpn: tags: '{{ first_tags }}' - state: 'present' + state: present register: tag_vpn - check_mode: True + check_mode: true - name: assert would not change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id - name: add tags - IDEMPOTENCY ec2_vpc_vpn: tags: '{{ first_tags }}' - state: 'present' + state: present register: tag_vpn - name: get VPC VPN facts ec2_vpc_vpn_info: {} @@ -90,10 +90,10 @@ - name: verify no change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == first_tags + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == first_tags # ============================================================ @@ -116,21 +116,21 @@ - name: (check) modify tags with purge ec2_vpc_vpn: tags: '{{ second_tags }}' - state: 'present' + state: present purge_tags: true register: tag_vpn - check_mode: True + check_mode: true - name: assert would change assert: that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id - name: modify tags with purge ec2_vpc_vpn: tags: '{{ second_tags }}' - state: 'present' + state: present purge_tags: true register: tag_vpn - name: get VPC VPN facts @@ -140,29 +140,29 @@ - name: verify the tags were added assert: that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == second_tags + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == second_tags - name: (check) modify tags with purge - IDEMPOTENCY ec2_vpc_vpn: tags: '{{ second_tags }}' - state: 'present' + state: present purge_tags: true register: tag_vpn - check_mode: True + check_mode: true - name: assert would not change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id - name: modify tags with purge - IDEMPOTENCY ec2_vpc_vpn: tags: '{{ second_tags }}' - state: 'present' + state: present purge_tags: true register: tag_vpn - name: get VPC VPN facts @@ -172,32 +172,32 @@ - name: verify no change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == second_tags + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == second_tags # ============================================================ - name: (check) modify tags without purge ec2_vpc_vpn: tags: '{{ third_tags }}' - state: 'present' - purge_tags: False + state: present + purge_tags: false register: tag_vpn - check_mode: True + check_mode: true - name: assert would change assert: that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id - name: modify tags without purge ec2_vpc_vpn: tags: '{{ third_tags }}' - state: 'present' - purge_tags: False + state: present + purge_tags: false register: tag_vpn - name: get VPC VPN facts ec2_vpc_vpn_info: @@ -206,30 +206,30 @@ - name: verify the tags were added assert: that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == final_tags + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == final_tags - name: (check) modify tags without purge - IDEMPOTENCY ec2_vpc_vpn: tags: '{{ third_tags }}' - state: 'present' - purge_tags: False + state: present + purge_tags: false register: tag_vpn - check_mode: True + check_mode: true - name: assert would not change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id - name: modify tags without purge - IDEMPOTENCY ec2_vpc_vpn: tags: '{{ third_tags }}' - state: 'present' - purge_tags: False + state: present + purge_tags: false register: tag_vpn - name: get VPC VPN facts ec2_vpc_vpn_info: @@ -238,28 +238,28 @@ - name: verify no change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == final_tags + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == final_tags # ============================================================ - name: (check) No change to tags without setting tags ec2_vpc_vpn: - state: 'present' + state: present register: tag_vpn - check_mode: True + check_mode: true - name: assert would change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id - name: No change to tags without setting tags ec2_vpc_vpn: - state: 'present' + state: present register: tag_vpn - name: get VPC VPN facts ec2_vpc_vpn_info: @@ -268,32 +268,32 @@ - name: verify no tags were added assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].tags == final_tags + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].tags == final_tags # ============================================================ - name: (check) remove tags ec2_vpc_vpn: tags: {} - state: 'present' - purge_tags: True + state: present + purge_tags: true register: tag_vpn - check_mode: True + check_mode: true - name: assert would change assert: that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id - name: remove tags ec2_vpc_vpn: tags: {} - state: 'present' - purge_tags: True + state: present + purge_tags: true register: tag_vpn - name: get VPC VPN facts ec2_vpc_vpn_info: @@ -302,29 +302,29 @@ - name: verify the tags were removed assert: that: - - tag_vpn is changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn is changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id - name: (check) remove tags - IDEMPOTENCY ec2_vpc_vpn: tags: {} - state: 'present' - purge_tags: True + state: present + purge_tags: true register: tag_vpn - check_mode: True + check_mode: true - name: assert would not change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id - name: remove tags - IDEMPOTENCY ec2_vpc_vpn: tags: {} - state: 'present' - purge_tags: True + state: present + purge_tags: true register: tag_vpn - name: get VPC VPN facts ec2_vpc_vpn_info: @@ -333,6 +333,6 @@ - name: verify no change assert: that: - - tag_vpn is not changed - - tag_vpn.vpn_connection_id == vpn_id - - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id + - tag_vpn is not changed + - tag_vpn.vpn_connection_id == vpn_id + - tag_vpn_info.vpn_connections[0].vpn_connection_id == vpn_id diff --git a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py index 2b5db4226dd..fb49ec1cbed 100644 --- a/tests/unit/plugins/modules/test_ec2_vpc_vpn.py +++ b/tests/unit/plugins/modules/test_ec2_vpc_vpn.py @@ -25,7 +25,7 @@ # pylint: enable=unused-import # isort: on -from ansible_collections.community.aws.plugins.modules import ec2_vpc_vpn +from ansible_collections.amazon.aws.plugins.modules import ec2_vpc_vpn class FailException(Exception): From a3d9d4e9b701d7c8276995eec8415c740d83378c Mon Sep 17 00:00:00 2001 From: abikouo Date: Fri, 20 Sep 2024 08:07:41 +0200 Subject: [PATCH 38/38] added 'version_added_collection' --- plugins/modules/ec2_vpc_vpn.py | 1 + plugins/modules/ec2_vpc_vpn_info.py | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 5d94cb2915e..703769afbcb 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -8,6 +8,7 @@ --- module: ec2_vpc_vpn version_added: 1.0.0 +version_added_collection: community.aws short_description: Create, modify, and delete EC2 VPN connections description: - This module creates, modifies, and deletes VPN connections. Idempotence is achieved by using the filters diff --git a/plugins/modules/ec2_vpc_vpn_info.py b/plugins/modules/ec2_vpc_vpn_info.py index 48d68f01524..01d15c682f7 100644 --- a/plugins/modules/ec2_vpc_vpn_info.py +++ b/plugins/modules/ec2_vpc_vpn_info.py @@ -8,6 +8,7 @@ --- module: ec2_vpc_vpn_info version_added: 1.0.0 +version_added_collection: community.aws short_description: Gather information about VPN Connections in AWS. description: - Gather information about VPN Connections in AWS.