diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-11-13 11:20:16 -0500 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2017-11-13 13:54:05 -0500 |
commit | 284e4158b2f521e6f91eab243bfae01fc09a07a5 (patch) | |
tree | 8ee7b493cb86c721f1b97ff927742bed0dd75531 /roles/openshift_master_facts | |
parent | 7175c6f228f61b883d958c12ba5130f37a0615c4 (diff) | |
download | openshift-284e4158b2f521e6f91eab243bfae01fc09a07a5.tar.gz openshift-284e4158b2f521e6f91eab243bfae01fc09a07a5.tar.bz2 openshift-284e4158b2f521e6f91eab243bfae01fc09a07a5.tar.xz openshift-284e4158b2f521e6f91eab243bfae01fc09a07a5.zip |
First pass at v3.8 support
Diffstat (limited to 'roles/openshift_master_facts')
3 files changed, 12 insertions, 8 deletions
diff --git a/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py b/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py index f27eb629d..edc98813c 100644 --- a/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_predicates.py +++ b/roles/openshift_master_facts/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', 'latest']: + if short_version not in ['1.1', '1.2', '1.3', '1.4', '1.5', '3.6', '3.7', '3.8', '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', 'latest']: + if short_version not in ['3.1', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '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.7' + short_version = '3.8' # 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']: + if short_version in ['3.7', '3.8']: predicates.extend([ {'name': 'NoVolumeZoneConflict'}, {'name': 'MaxEBSVolumeCount'}, diff --git a/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_priorities.py b/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_priorities.py index fe488f49c..21985c7c2 100644 --- a/roles/openshift_master_facts/lookup_plugins/openshift_master_facts_default_priorities.py +++ b/roles/openshift_master_facts/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', 'latest']: + if short_version not in ['1.1', '1.2', '1.3', '1.4', '1.5', '3.6', '3.7', '3.8', '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', 'latest']: + if short_version not in ['3.1', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8', '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.7' + short_version = '3.8' 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']: + if short_version in ['3.5', '3.6', '3.7', '3.8']: priorities.extend([ {'name': 'SelectorSpreadPriority', 'weight': 1}, {'name': 'InterPodAffinityPriority', 'weight': 1}, diff --git a/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py b/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py index 38a918803..f58341280 100644 --- a/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py +++ b/roles/openshift_master_facts/test/openshift_master_facts_default_predicates_tests.py @@ -71,6 +71,8 @@ DEFAULT_PREDICATES_3_7 = [ {'name': 'NoVolumeNodeConflict'}, ] +DEFAULT_PREDICATES_3_8 = DEFAULT_PREDICATES_3_7 + REGION_PREDICATE = { 'name': 'Region', 'argument': { @@ -95,6 +97,8 @@ TEST_VARS = [ ('3.6', 'openshift-enterprise', DEFAULT_PREDICATES_3_6), ('3.7', 'origin', DEFAULT_PREDICATES_3_7), ('3.7', 'openshift-enterprise', DEFAULT_PREDICATES_3_7), + ('3.8', 'origin', DEFAULT_PREDICATES_3_8), + ('3.8', 'openshift-enterprise', DEFAULT_PREDICATES_3_8), ] |