diff options
author | Scott Dodson <sdodson@redhat.com> | 2018-02-05 14:31:47 -0500 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2018-02-05 15:09:07 -0500 |
commit | 5402ff05c7f5695bbe60cb6966e57a038c4fe1c0 (patch) | |
tree | 5dfc6f4d0df5bd4d455a09efd1f3914bf76cf9d6 /roles/lib_utils | |
parent | 90f577883066f7213afca2a1159c69cabece57dc (diff) | |
download | openshift-5402ff05c7f5695bbe60cb6966e57a038c4fe1c0.tar.gz openshift-5402ff05c7f5695bbe60cb6966e57a038c4fe1c0.tar.bz2 openshift-5402ff05c7f5695bbe60cb6966e57a038c4fe1c0.tar.xz openshift-5402ff05c7f5695bbe60cb6966e57a038c4fe1c0.zip |
Initial support for 3.10
Diffstat (limited to 'roles/lib_utils')
4 files changed, 14 insertions, 10 deletions
diff --git a/roles/lib_utils/lookup_plugins/openshift_master_facts_default_predicates.py b/roles/lib_utils/lookup_plugins/openshift_master_facts_default_predicates.py index 4858c5ec6..3926acd54 100644 --- a/roles/lib_utils/lookup_plugins/openshift_master_facts_default_predicates.py +++ b/roles/lib_utils/lookup_plugins/openshift_master_facts_default_predicates.py @@ -40,10 +40,10 @@ class LookupModule(LookupBase): # pylint: disable=line-too-long raise AnsibleError("Either OpenShift needs to be installed or openshift_release needs to be specified") if deployment_type == 'origin': - if short_version not in ['1.1', '1.2', '1.3', '1.4', '1.5', '3.6', '3.7', '3.8', '3.9', 'latest']: + if short_version not in ['1.1', '1.2', '1.3', '1.4', '1.5', '3.6', '3.7', '3.8', '3.9', '3.10', 'latest']: raise AnsibleError("Unknown short_version %s" % short_version) elif deployment_type == 'openshift-enterprise': - if short_version not in ['3.1', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', 'latest']: + if short_version not in ['3.1', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', 'latest']: raise AnsibleError("Unknown short_version %s" % short_version) else: raise AnsibleError("Unknown deployment_type %s" % deployment_type) @@ -53,7 +53,7 @@ class LookupModule(LookupBase): short_version = re.sub('^1.', '3.', short_version) if short_version == 'latest': - short_version = '3.9' + short_version = '3.10' # Predicates ordered according to OpenShift Origin source: # origin/vendor/k8s.io/kubernetes/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go @@ -114,7 +114,7 @@ class LookupModule(LookupBase): {'name': 'CheckNodeDiskPressure'}, ]) - if short_version in ['3.7', '3.8', '3.9']: + if short_version in ['3.7', '3.8', '3.9', '3.10']: predicates.extend([ {'name': 'NoVolumeZoneConflict'}, {'name': 'MaxEBSVolumeCount'}, diff --git a/roles/lib_utils/lookup_plugins/openshift_master_facts_default_priorities.py b/roles/lib_utils/lookup_plugins/openshift_master_facts_default_priorities.py index 18e1b2e0c..de1b949fd 100644 --- a/roles/lib_utils/lookup_plugins/openshift_master_facts_default_priorities.py +++ b/roles/lib_utils/lookup_plugins/openshift_master_facts_default_priorities.py @@ -41,10 +41,10 @@ class LookupModule(LookupBase): raise AnsibleError("Either OpenShift needs to be installed or openshift_release needs to be specified") if deployment_type == 'origin': - if short_version not in ['1.1', '1.2', '1.3', '1.4', '1.5', '3.6', '3.7', '3.8', '3.9', 'latest']: + if short_version not in ['1.1', '1.2', '1.3', '1.4', '1.5', '3.6', '3.7', '3.8', '3.9', '3.10', 'latest']: raise AnsibleError("Unknown short_version %s" % short_version) elif deployment_type == 'openshift-enterprise': - if short_version not in ['3.1', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', 'latest']: + if short_version not in ['3.1', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10', 'latest']: raise AnsibleError("Unknown short_version %s" % short_version) else: raise AnsibleError("Unknown deployment_type %s" % deployment_type) @@ -54,7 +54,7 @@ class LookupModule(LookupBase): short_version = re.sub('^1.', '3.', short_version) if short_version == 'latest': - short_version = '3.9' + short_version = '3.10' if short_version == '3.1': priorities.extend([ @@ -91,7 +91,7 @@ class LookupModule(LookupBase): {'name': 'InterPodAffinityPriority', 'weight': 1} ]) - if short_version in ['3.5', '3.6', '3.7', '3.8', '3.9']: + if short_version in ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10']: priorities.extend([ {'name': 'SelectorSpreadPriority', 'weight': 1}, {'name': 'InterPodAffinityPriority', 'weight': 1}, diff --git a/roles/lib_utils/test/openshift_master_facts_default_predicates_tests.py b/roles/lib_utils/test/openshift_master_facts_default_predicates_tests.py index 11aad9f03..64d333d72 100644 --- a/roles/lib_utils/test/openshift_master_facts_default_predicates_tests.py +++ b/roles/lib_utils/test/openshift_master_facts_default_predicates_tests.py @@ -71,7 +71,7 @@ DEFAULT_PREDICATES_3_7 = [ {'name': 'NoVolumeNodeConflict'}, ] -DEFAULT_PREDICATES_3_9 = DEFAULT_PREDICATES_3_8 = DEFAULT_PREDICATES_3_7 +DEFAULT_PREDICATES_3_10 = DEFAULT_PREDICATES_3_9 = DEFAULT_PREDICATES_3_8 = DEFAULT_PREDICATES_3_7 REGION_PREDICATE = { 'name': 'Region', @@ -101,6 +101,8 @@ TEST_VARS = [ ('3.8', 'openshift-enterprise', DEFAULT_PREDICATES_3_8), ('3.9', 'origin', DEFAULT_PREDICATES_3_9), ('3.9', 'openshift-enterprise', DEFAULT_PREDICATES_3_9), + ('3.10', 'origin', DEFAULT_PREDICATES_3_10), + ('3.10', 'openshift-enterprise', DEFAULT_PREDICATES_3_10), ] diff --git a/roles/lib_utils/test/openshift_master_facts_default_priorities_tests.py b/roles/lib_utils/test/openshift_master_facts_default_priorities_tests.py index 527fc9ff4..4d73c7d07 100644 --- a/roles/lib_utils/test/openshift_master_facts_default_priorities_tests.py +++ b/roles/lib_utils/test/openshift_master_facts_default_priorities_tests.py @@ -44,7 +44,7 @@ DEFAULT_PRIORITIES_1_5 = [ DEFAULT_PRIORITIES_3_6 = DEFAULT_PRIORITIES_1_5 -DEFAULT_PRIORITIES_3_9 = DEFAULT_PRIORITIES_3_8 = DEFAULT_PRIORITIES_3_7 = DEFAULT_PRIORITIES_3_6 +DEFAULT_PRIORITIES_3_10 = DEFAULT_PRIORITIES_3_9 = DEFAULT_PRIORITIES_3_8 = DEFAULT_PRIORITIES_3_7 = DEFAULT_PRIORITIES_3_6 ZONE_PRIORITY = { 'name': 'Zone', @@ -75,6 +75,8 @@ TEST_VARS = [ ('3.8', 'openshift-enterprise', DEFAULT_PRIORITIES_3_8), ('3.9', 'origin', DEFAULT_PRIORITIES_3_9), ('3.9', 'openshift-enterprise', DEFAULT_PRIORITIES_3_9), + ('3.10', 'origin', DEFAULT_PRIORITIES_3_10), + ('3.10', 'openshift-enterprise', DEFAULT_PRIORITIES_3_10) ] |