Maor Blaustein 6832c4dd4b Migrate metadata rate limiting tests
Main changes from original tests:
- Made alternative 'is_service_on_node' base method instead
  of helper plugin 'get_nodes_info_by_name' use.
- Configuration restored in between tests using permissive values due
  to 'oc patch' inability to remove configuration in podified.
- Feature disabled using configuration when all tests finished
  for same reason of inability to remove configuration.
- Podman inspect health/healthcheck json output inconsistent
  in podified/tripleo envs, also not supported in devstack,
  systemctl is-active used instead.
- Many methods made to use on '_set_rate_limiting_config',
  difference between podified/devstack handled by method calls there.
- Metadata configuration file according to OSP type (devstack/other).
- Adjust migrated imports and configuration.
- Replaced test UUIDs with unique ones.

Change-Id: Ia17be6044eb88b00568f469c8ff5ebb98dba6559
2024-04-09 23:29:22 +03:00

44 lines
1.4 KiB
Python

# Copyright 2020 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
GLOBAL_IP = '1.1.1.1'
METADATA_SERVICE_IP = '169.254.169.254'
NCAT_PORT = 65000
NCAT_TIMEOUT = 30
IP_HEADER_LENGTH = 20
TCP_HEADER_LENGTH = 20
UDP_HEADER_LENGTH = 8
ETHERNET_HEADER_LENGTH = 18
STATE_UP = 'up'
STATE_DOWN = 'down'
ACTION_STOP = 'stop'
ACTION_START = 'start'
DHCP_OPTIONS_NMCLI_TO_NEUTRON = {
'dhcp_lease_time': 'lease-time',
'domain_name': 'domain-name',
'domain_name_servers': 'dns-server',
'interface_mtu': 'mtu',
'dhcp6_domain_search': 'domain-search',
'dhcp6_name_servers': 'dns-server'}
DHCP_OPTIONS_NUMBER_TO_NAME = {
'26': 'mtu'}
DHCP_OPTIONS_NEUTRON_TO_OVN = {
'domain-name': 'domain_name',
'mtu': 'mtu',
'dns-server': 'dns_server',
'lease-time': 'lease_time',
'domain-search': 'domain_search',
'26': 'mtu'}