diff --git a/orm/services/flavor_manager/fms_rest/data/wsme/models.py b/orm/services/flavor_manager/fms_rest/data/wsme/models.py index a8b5ddb4..03f48c3f 100755 --- a/orm/services/flavor_manager/fms_rest/data/wsme/models.py +++ b/orm/services/flavor_manager/fms_rest/data/wsme/models.py @@ -493,6 +493,22 @@ class Flavor(Model): if option_pci: requested_options.extend(option_pci) + # Evaluate thread options + if 'valid_options_thread' in series_metadata: + valid_thread = [x for x in + series_metadata['valid_options_thread'].split(',')] + + option_thread = [n for n in valid_thread if n in + self.options.keys() and + self.options[n].lower() == 'true' and + self.visibility.lower() == 'private'] + + if option_thread: + es = db_models.FlavorExtraSpec( + key_name_value=series_metadata['es_thread_policy']) + extra_spec_needed.append(es) + requested_options.extend(option_thread) + # Evalulate mixed options assorted_opts = [] for mixed_key, mixed_value in mixed_options.items(): diff --git a/orm/services/flavor_manager/fms_rest/logic/flavor_logic.py b/orm/services/flavor_manager/fms_rest/logic/flavor_logic.py index 1d4ca2d2..fafd58ad 100755 --- a/orm/services/flavor_manager/fms_rest/logic/flavor_logic.py +++ b/orm/services/flavor_manager/fms_rest/logic/flavor_logic.py @@ -954,6 +954,8 @@ def calculate_name(flavor): if 'i2' in options and 'n0' not in options: options.remove('i2') + if 't0' in options and flavor.flavor.visibility.lower() != 'private': + options.remove('t0') if options: name += '.'