"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py" between
horizon-20.1.1.tar.gz and horizon-20.1.2.tar.gz

About: OpenStack Horizon (Optional Service: Dashboard) provides a web-based self-service portal to interact with underlying OpenStack services, such as launching an instance, assigning IP addresses and configuring access controls.
The "Xena" series (latest release).

resize_instance.py  (horizon-20.1.1):resize_instance.py  (horizon-20.1.2)
skipping to change at line 48 skipping to change at line 48
label=_("New Flavor"), label=_("New Flavor"),
help_text=_("Choose the flavor to launch.")) help_text=_("Choose the flavor to launch."))
class Meta(object): class Meta(object):
name = _("Flavor Choice") name = _("Flavor Choice")
slug = 'flavor_choice' slug = 'flavor_choice'
help_text_template = ("project/instances/" help_text_template = ("project/instances/"
"_flavors_and_quotas.html") "_flavors_and_quotas.html")
def populate_flavor_choices(self, request, context): def populate_flavor_choices(self, request, context):
old_flavor_id = context.get('old_flavor_id') old_flavor_name = context.get('old_flavor_name')
flavors = context.get('flavors').values() flavors = context.get('flavors').values()
# Remove current flavor from the list of flavor choices # Remove current flavor from the list of flavor choices
flavors = [flavor for flavor in flavors if flavor.id != old_flavor_id] flavors = [flavor for flavor in flavors
if flavor.name != old_flavor_name]
if flavors: if flavors:
if len(flavors) > 1: if len(flavors) > 1:
flavors = instance_utils.sort_flavor_list(request, flavors) flavors = instance_utils.sort_flavor_list(request, flavors)
else: else:
flavor = flavors[0] flavor = flavors[0]
flavors = [(flavor.id, flavor.name)] flavors = [(flavor.id, flavor.name)]
flavors.insert(0, ("", _("Select a New Flavor"))) flavors.insert(0, ("", _("Select a New Flavor")))
else: else:
flavors.insert(0, ("", _("No flavors available"))) flavors.insert(0, ("", _("No flavors available")))
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)