[openstack-dev] [Horizon] How to conditionally modify attributes in CreateNetwork class.

Nader Lahouti nader.lahouti at gmail.com
Fri May 30 06:15:32 UTC 2014


Hi All,

Currently in the 
horizon/openstack_dashboard/dashboards/project/networks/workflows.py in
classes such as CreateNetwork, CreateNetworkInfo and CreateSubnetInfo, the
contributes or default_steps as shown below are fixed. Is it possible to add
entries to those attributes conditionally?

156 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#156> class CreateSubnetInfo
<http://www.xrefs.info/openstack-horizon-latest/s?refs=CreateSubnetInfo>
(workflows 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#workflows> .Step
<http://www.xrefs.info/openstack-horizon-latest/s?defs=Step> ):
157 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#157>     action_class
<http://www.xrefs.info/openstack-horizon-latest/s?refs=action_class>  =
CreateSubnetInfoAction
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#CreateSubnetInfoAction>
158 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#158>     contributes
<http://www.xrefs.info/openstack-horizon-latest/s?refs=contributes>  =
("with_subnet", "subnet_name", "cidr",
159 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#159>                    "ip_version",
"gateway_ip", "no_gateway")
160 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#160>
262 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#262> class CreateNetwork
<http://www.xrefs.info/openstack-horizon-latest/s?refs=CreateNetwork>
(workflows 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#workflows> .Workflow
<http://www.xrefs.info/openstack-horizon-latest/s?defs=Workflow> ):
263 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#263>     slug
<http://www.xrefs.info/openstack-horizon-latest/s?refs=slug>  =
"create_network"
264 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#264>     name
<http://www.xrefs.info/openstack-horizon-latest/s?refs=name>  = _("Create
Network")
265 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#265>     finalize_button_name
<http://www.xrefs.info/openstack-horizon-latest/s?refs=finalize_button_name>
= _("Create")
266 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#266>     success_message
<http://www.xrefs.info/openstack-horizon-latest/s?refs=success_message>  =
_('Created network "%s".')
267 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#267>     failure_message
<http://www.xrefs.info/openstack-horizon-latest/s?refs=failure_message>  =
_('Unable to create network "%s".')
268 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#268>     default_steps
<http://www.xrefs.info/openstack-horizon-latest/s?refs=default_steps>  =
(CreateNetworkInfo 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#CreateNetworkInfo> ,
269 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#269>
CreateSubnetInfo 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#CreateSubnetInfo> ,
270 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#270>
CreateSubnetDetail 
<http://www.xrefs.info/openstack-horizon-latest/xref/openstack_dashboard/das
hboards/project/networks/workflows.py#CreateSubnetDetail> )
Thanks for your input.
Nader.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140529/58087fb1/attachment.html>


More information about the OpenStack-dev mailing list