"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "horizon/tables/actions.py" between
horizon-20.1.0.tar.gz and horizon-20.1.1.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).

actions.py  (horizon-20.1.0):actions.py  (horizon-20.1.1)
skipping to change at line 53 skipping to change at line 53
This way actions can inherit from each other but still use This way actions can inherit from each other but still use
the class attributes DSL. Meaning, all attributes of Actions are the class attributes DSL. Meaning, all attributes of Actions are
defined as class attributes, but in the background, it will be used as defined as class attributes, but in the background, it will be used as
parameters for the initializer of the object. The object is then parameters for the initializer of the object. The object is then
initialized clean way. Similar principle is used in DataTableMetaclass. initialized clean way. Similar principle is used in DataTableMetaclass.
""" """
def __new__(cls, name, bases, attrs): def __new__(cls, name, bases, attrs):
# Options of action are set as class attributes, loading them. # Options of action are set as class attributes, loading them.
options = {} options = {}
if attrs: if attrs:
options = attrs # NOTE: It is required to create a new dict object
# to avoid a recursive reference when no parent class
# has 'base_options' attribute.
options = dict(attrs)
# Iterate in reverse to preserve final order # Iterate in reverse to preserve final order
for base in bases[::-1]: for base in bases[::-1]:
# It actually throws all super classes away except immediate # It actually throws all super classes away except immediate
# superclass. But it's fine, immediate super-class base_options # superclass. But it's fine, immediate super-class base_options
# includes everything because superclasses was created also by # includes everything because superclasses was created also by
# this metaclass. Same principle is used in DataTableMetaclass. # this metaclass. Same principle is used in DataTableMetaclass.
if hasattr(base, 'base_options') and base.base_options: if hasattr(base, 'base_options') and base.base_options:
base_options = {} base_options = {}
# Updating options by superclasses. # Updating options by superclasses.
 End of changes. 1 change blocks. 
1 lines changed or deleted 4 lines changed or added

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