def __init__(self, request, *args, **kwargs):
        super(ConfigureNodegroupsAction, self). \
            __init__(request, *args, **kwargs)

        plugin, hadoop_version = whelpers.\
            get_plugin_and_hadoop_version(request)

        self.templates = saharaclient.nodegroup_template_find(
            request, plugin_name=plugin, hadoop_version=hadoop_version)

        deletable = request.REQUEST.get("deletable", dict())

        if 'forms_ids' in request.POST:
            self.groups = []
            for id in json.loads(request.POST['forms_ids']):
                group_name = "group_name_" + str(id)
                template_id = "template_id_" + str(id)
                count = "count_" + str(id)
                serialized = "serialized_" + str(id)
                self.groups.append({"name": request.POST[group_name],
                                    "template_id": request.POST[template_id],
                                    "count": request.POST[count],
                                    "id": id,
                                    "deletable": deletable.get(
                                        request.POST[group_name], "true"),
                                    "serialized": request.POST[serialized]})

                whelpers.build_node_group_fields(self,
                                                 group_name,
                                                 template_id,
                                                 count,
                                                 serialized)
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/project/data_processing/cluster_templates/workflows/create.py/ConfigureNodegroupsAction.__init__/original