Remove deprecated google modules (#1370)

* Remove deprecated google modules.

* Remove ignore.txt entries.
This commit is contained in:
Felix Fontein 2020-11-24 06:34:48 +01:00 committed by GitHub
commit c52839c601
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 28 additions and 4610 deletions

View file

@ -14,10 +14,6 @@ plugins/modules/cloud/centurylink/clc_modify_server.py validate-modules:paramete
plugins/modules/cloud/centurylink/clc_publicip.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/centurylink/clc_server.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/centurylink/clc_server_snapshot.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcdns_record.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gce.py pylint:blacklisted-name
plugins/modules/cloud/google/gce.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gce.py yamllint:unparsable-with-libyaml
plugins/modules/cloud/google/gce_eip.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_eip.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gce_img.py pylint:blacklisted-name
@ -37,13 +33,6 @@ plugins/modules/cloud/google/gce_snapshot.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_snapshot.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gce_tag.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_tag.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_backend_service.py pylint:blacklisted-name
plugins/modules/cloud/google/gcp_backend_service.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_forwarding_rule.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_healthcheck.py pylint:blacklisted-name
plugins/modules/cloud/google/gcp_healthcheck.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_target_proxy.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_url_map.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcpubsub.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcpubsub_info.py validate-modules:parameter-state-invalid-choice
plugins/modules/cloud/heroku/heroku_collaborator.py validate-modules:parameter-list-no-elements
@ -682,7 +671,5 @@ plugins/modules/web_infrastructure/rundeck_acl_policy.py pylint:blacklisted-name
plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py validate-modules:parameter-type-not-in-doc
plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py validate-modules:doc-elements-mismatch
scripts/inventory/gce.py pylint:blacklisted-name
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate
tests/utils/shippable/check_matrix.py replace-urlopen
tests/utils/shippable/timing.py shebang

View file

@ -14,10 +14,6 @@ plugins/modules/cloud/centurylink/clc_modify_server.py validate-modules:paramete
plugins/modules/cloud/centurylink/clc_publicip.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/centurylink/clc_server.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/centurylink/clc_server_snapshot.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcdns_record.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gce.py pylint:blacklisted-name
plugins/modules/cloud/google/gce.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gce.py yamllint:unparsable-with-libyaml
plugins/modules/cloud/google/gce_eip.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_eip.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gce_img.py pylint:blacklisted-name
@ -37,13 +33,6 @@ plugins/modules/cloud/google/gce_snapshot.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_snapshot.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gce_tag.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_tag.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_backend_service.py pylint:blacklisted-name
plugins/modules/cloud/google/gcp_backend_service.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_forwarding_rule.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_healthcheck.py pylint:blacklisted-name
plugins/modules/cloud/google/gcp_healthcheck.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_target_proxy.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcp_url_map.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcpubsub.py validate-modules:parameter-list-no-elements
plugins/modules/cloud/google/gcpubsub_info.py validate-modules:parameter-state-invalid-choice
plugins/modules/cloud/heroku/heroku_collaborator.py validate-modules:parameter-list-no-elements
@ -682,7 +671,5 @@ plugins/modules/web_infrastructure/rundeck_acl_policy.py pylint:blacklisted-name
plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py validate-modules:parameter-type-not-in-doc
plugins/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py validate-modules:doc-elements-mismatch
scripts/inventory/gce.py pylint:blacklisted-name
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate
tests/utils/shippable/check_matrix.py replace-urlopen
tests/utils/shippable/timing.py shebang

View file

@ -6,16 +6,6 @@ plugins/module_utils/_mount.py future-import-boilerplate
plugins/module_utils/_mount.py metaclass-boilerplate
plugins/modules/cloud/centurylink/clc_alert_policy.py validate-modules:no-default-for-required-parameter
plugins/modules/cloud/centurylink/clc_firewall_policy.py validate-modules:no-default-for-required-parameter
plugins/modules/cloud/google/gcdns_record.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gcdns_record.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gcdns_record.py validate-modules:missing-main-call
plugins/modules/cloud/google/gcdns_zone.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gcdns_zone.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gcdns_zone.py validate-modules:missing-main-call
plugins/modules/cloud/google/gce.py pylint:blacklisted-name
plugins/modules/cloud/google/gce.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gce.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gce.py validate-modules:missing-main-call
plugins/modules/cloud/google/gce_eip.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_img.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_instance_template.py pylint:blacklisted-name
@ -26,26 +16,6 @@ plugins/modules/cloud/google/gce_net.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_pd.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_snapshot.py pylint:blacklisted-name
plugins/modules/cloud/google/gce_tag.py pylint:blacklisted-name
plugins/modules/cloud/google/gcp_backend_service.py pylint:blacklisted-name
plugins/modules/cloud/google/gcp_backend_service.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gcp_backend_service.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gcp_backend_service.py validate-modules:missing-main-call
plugins/modules/cloud/google/gcp_forwarding_rule.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gcp_forwarding_rule.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gcp_forwarding_rule.py validate-modules:missing-main-call
plugins/modules/cloud/google/gcp_healthcheck.py pylint:blacklisted-name
plugins/modules/cloud/google/gcp_healthcheck.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gcp_healthcheck.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gcp_healthcheck.py validate-modules:missing-main-call
plugins/modules/cloud/google/gcp_target_proxy.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gcp_target_proxy.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gcp_target_proxy.py validate-modules:missing-main-call
plugins/modules/cloud/google/gcp_url_map.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gcp_url_map.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gcp_url_map.py validate-modules:missing-main-call
plugins/modules/cloud/google/gcspanner.py validate-modules:deprecation-mismatch
plugins/modules/cloud/google/gcspanner.py validate-modules:invalid-documentation
plugins/modules/cloud/google/gcspanner.py validate-modules:missing-main-call
plugins/modules/cloud/kubevirt/kubevirt_cdi_upload.py validate-modules:doc-missing-type
plugins/modules/cloud/kubevirt/kubevirt_preset.py validate-modules:parameter-type-not-in-doc
plugins/modules/cloud/kubevirt/kubevirt_pvc.py validate-modules:parameter-type-not-in-doc
@ -530,7 +500,5 @@ plugins/modules/web_infrastructure/nginx_status_facts.py validate-modules:invali
plugins/modules/web_infrastructure/rundeck_acl_policy.py pylint:blacklisted-name
plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py validate-modules:parameter-type-not-in-doc
scripts/inventory/gce.py pylint:blacklisted-name
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate
tests/unit/plugins/modules/cloud/google/test_gcp_forwarding_rule.py metaclass-boilerplate
tests/utils/shippable/check_matrix.py replace-urlopen
tests/utils/shippable/timing.py shebang

View file

@ -1,30 +0,0 @@
import unittest
from ansible_collections.community.general.plugins.modules.cloud.google.gcp_forwarding_rule import _build_global_forwarding_rule_dict
class TestGCPFowardingRule(unittest.TestCase):
"""Unit tests for gcp_fowarding_rule module."""
params_dict = {
'forwarding_rule_name': 'foo_fowarding_rule_name',
'address': 'foo_external_address',
'target': 'foo_targetproxy',
'region': 'global',
'port_range': 80,
'protocol': 'TCP',
'state': 'present',
}
def test__build_global_forwarding_rule_dict(self):
expected = {
'name': 'foo_fowarding_rule_name',
'IPAddress': 'https://www.googleapis.com/compute/v1/projects/my-project/global/addresses/foo_external_address',
'target': 'https://www.googleapis.com/compute/v1/projects/my-project/global/targetHttpProxies/foo_targetproxy',
'region': 'global',
'portRange': 80,
'IPProtocol': 'TCP',
}
actual = _build_global_forwarding_rule_dict(
self.params_dict, 'my-project')
self.assertEqual(expected, actual)

View file

@ -1,169 +0,0 @@
# 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 unittest
from ansible_collections.community.general.plugins.modules.cloud.google.gcp_url_map import _build_path_matchers, _build_url_map_dict
class TestGCPUrlMap(unittest.TestCase):
"""Unit tests for gcp_url_map module."""
params_dict = {
'url_map_name': 'foo_url_map_name',
'description': 'foo_url_map description',
'host_rules': [
{
'description': 'host rules description',
'hosts': [
'www.example.com',
'www2.example.com'
],
'path_matcher': 'host_rules_path_matcher'
}
],
'path_matchers': [
{
'name': 'path_matcher_one',
'description': 'path matcher one',
'defaultService': 'bes-pathmatcher-one-default',
'pathRules': [
{
'service': 'my-one-bes',
'paths': [
'/',
'/aboutus'
]
}
]
},
{
'name': 'path_matcher_two',
'description': 'path matcher two',
'defaultService': 'bes-pathmatcher-two-default',
'pathRules': [
{
'service': 'my-two-bes',
'paths': [
'/webapp',
'/graphs'
]
}
]
}
]
}
def test__build_path_matchers(self):
input_list = [
{
'defaultService': 'bes-pathmatcher-one-default',
'description': 'path matcher one',
'name': 'path_matcher_one',
'pathRules': [
{
'paths': [
'/',
'/aboutus'
],
'service': 'my-one-bes'
}
]
},
{
'defaultService': 'bes-pathmatcher-two-default',
'description': 'path matcher two',
'name': 'path_matcher_two',
'pathRules': [
{
'paths': [
'/webapp',
'/graphs'
],
'service': 'my-two-bes'
}
]
}
]
expected = [
{
'defaultService': 'https://www.googleapis.com/compute/v1/projects/my-project/global/backendServices/bes-pathmatcher-one-default',
'description': 'path matcher one',
'name': 'path_matcher_one',
'pathRules': [
{
'paths': [
'/',
'/aboutus'
],
'service': 'https://www.googleapis.com/compute/v1/projects/my-project/global/backendServices/my-one-bes'
}
]
},
{
'defaultService': 'https://www.googleapis.com/compute/v1/projects/my-project/global/backendServices/bes-pathmatcher-two-default',
'description': 'path matcher two',
'name': 'path_matcher_two',
'pathRules': [
{
'paths': [
'/webapp',
'/graphs'
],
'service': 'https://www.googleapis.com/compute/v1/projects/my-project/global/backendServices/my-two-bes'
}
]
}
]
actual = _build_path_matchers(input_list, 'my-project')
self.assertEqual(expected, actual)
def test__build_url_map_dict(self):
expected = {
'description': 'foo_url_map description',
'hostRules': [
{
'description': 'host rules description',
'hosts': [
'www.example.com',
'www2.example.com'
],
'pathMatcher': 'host_rules_path_matcher'
}
],
'name': 'foo_url_map_name',
'pathMatchers': [
{
'defaultService': 'https://www.googleapis.com/compute/v1/projects/my-project/global/backendServices/bes-pathmatcher-one-default',
'description': 'path matcher one',
'name': 'path_matcher_one',
'pathRules': [
{
'paths': [
'/',
'/aboutus'
],
'service': 'https://www.googleapis.com/compute/v1/projects/my-project/global/backendServices/my-one-bes'
}
]
},
{
'defaultService': 'https://www.googleapis.com/compute/v1/projects/my-project/global/backendServices/bes-pathmatcher-two-default',
'description': 'path matcher two',
'name': 'path_matcher_two',
'pathRules': [
{
'paths': [
'/webapp',
'/graphs'
],
'service': 'https://www.googleapis.com/compute/v1/projects/my-project/global/backendServices/my-two-bes'
}
]
}
]
}
actual = _build_url_map_dict(self.params_dict, 'my-project')
self.assertEqual(expected, actual)