Hi Timur, Really appreciate your reply. Will try your suggestions.
Thanks, Nader. On Tue, Jun 3, 2014 at 4:22 AM, Timur Sufiev <[email protected]> wrote: > Hello, Nader! > > As for `contributes` attribute, you could override `contribute(self, > data, context)` method in your descendant of `workflows.Step` which by > default simply iterates over all keys in `contributes`. > > Either you could use even more flexible approach (which also fits for > `default_steps`): define in your `workflows.Step` descendants methods > `contributes(self)` and `default_steps(self)` (with the conditional > logic you need) and then decorate them with @property. > > On Fri, May 30, 2014 at 10:15 AM, Nader Lahouti <[email protected]> > wrote: > > 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? > > > > 156class CreateSubnetInfo(workflows.Step): > > 157 action_class = CreateSubnetInfoAction > > 158 contributes = ("with_subnet", "subnet_name", "cidr", > > 159 "ip_version", "gateway_ip", "no_gateway") > > 160 > > > > 262class CreateNetwork(workflows.Workflow): > > 263 slug = "create_network" > > 264 name = _("Create Network") > > 265 finalize_button_name = _("Create") > > 266 success_message = _('Created network "%s".') > > 267 failure_message = _('Unable to create network "%s".') > > 268 default_steps = (CreateNetworkInfo, > > 269 CreateSubnetInfo, > > 270 CreateSubnetDetail) > > > > Thanks for your input. > > > > Nader. > > > > > > _______________________________________________ > > OpenStack-dev mailing list > > [email protected] > > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > > > > > > -- > Timur Sufiev > > _______________________________________________ > OpenStack-dev mailing list > [email protected] > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >
_______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
