The openstack_dashboard.dashboards.project.stacks.forms ModuleΒΆ

class openstack_dashboard.dashboards.project.stacks.forms.ChangeTemplateForm(*args, **kwargs)[source]

Bases: openstack_dashboard.dashboards.project.stacks.forms.TemplateForm

class Meta[source]

Bases: object

help_text = <django.utils.functional.__proxy__ object at 0x7f9f3d0b6f90>
name = <django.utils.functional.__proxy__ object at 0x7f9f3d0b62d0>
ChangeTemplateForm.base_fields = OrderedDict([('template_source', <django.forms.fields.ChoiceField object at 0x7f9f3c212290>), ('template_upload', <django.forms.fields.FileField object at 0x7f9f3c212610>), ('template_url', <django.forms.fields.URLField object at 0x7f9f3c212d10>), ('template_data', <django.forms.fields.CharField object at 0x7f9f3c2122d0>), ('environment_source', <django.forms.fields.ChoiceField object at 0x7f9f3c2120d0>), ('environment_upload', <django.forms.fields.FileField object at 0x7f9f3d0b6190>), ('environment_data', <django.forms.fields.CharField object at 0x7f9f3d0b6b10>), ('stack_id', <django.forms.fields.CharField object at 0x7f9f3db32090>), ('stack_name', <django.forms.fields.CharField object at 0x7f9f3d0b6790>)])
ChangeTemplateForm.declared_fields = OrderedDict([('template_source', <django.forms.fields.ChoiceField object at 0x7f9f3c212290>), ('template_upload', <django.forms.fields.FileField object at 0x7f9f3c212610>), ('template_url', <django.forms.fields.URLField object at 0x7f9f3c212d10>), ('template_data', <django.forms.fields.CharField object at 0x7f9f3c2122d0>), ('environment_source', <django.forms.fields.ChoiceField object at 0x7f9f3c2120d0>), ('environment_upload', <django.forms.fields.FileField object at 0x7f9f3d0b6190>), ('environment_data', <django.forms.fields.CharField object at 0x7f9f3d0b6b10>), ('stack_id', <django.forms.fields.CharField object at 0x7f9f3db32090>), ('stack_name', <django.forms.fields.CharField object at 0x7f9f3d0b6790>)])
ChangeTemplateForm.media
class openstack_dashboard.dashboards.project.stacks.forms.CreateStackForm(*args, **kwargs)[source]

Bases: horizon.forms.base.SelfHandlingForm

class Meta[source]

Bases: object

name = <django.utils.functional.__proxy__ object at 0x7f9f3d0b6990>
CreateStackForm.base_fields = OrderedDict([('environment_data', <django.forms.fields.CharField object at 0x7f9f3b197b10>), ('parameters', <django.forms.fields.CharField object at 0x7f9f3d0b6c50>), ('stack_name', <django.forms.fields.RegexField object at 0x7f9f3d0b6f50>), ('timeout_mins', <django.forms.fields.IntegerField object at 0x7f9f3bfe8390>), ('enable_rollback', <django.forms.fields.BooleanField object at 0x7f9f3bfe8990>)])
CreateStackForm.declared_fields = OrderedDict([('environment_data', <django.forms.fields.CharField object at 0x7f9f3b197b10>), ('parameters', <django.forms.fields.CharField object at 0x7f9f3d0b6c50>), ('stack_name', <django.forms.fields.RegexField object at 0x7f9f3d0b6f50>), ('timeout_mins', <django.forms.fields.IntegerField object at 0x7f9f3bfe8390>), ('enable_rollback', <django.forms.fields.BooleanField object at 0x7f9f3bfe8990>)])
CreateStackForm.handle(*func_args, **func_kwargs)[source]
CreateStackForm.media
CreateStackForm.param_prefix = '__param_'
class openstack_dashboard.dashboards.project.stacks.forms.EditStackForm(*args, **kwargs)[source]

Bases: openstack_dashboard.dashboards.project.stacks.forms.CreateStackForm

class Meta[source]

Bases: object

name = <django.utils.functional.__proxy__ object at 0x7f9f3bfe8950>
EditStackForm.base_fields = OrderedDict([('environment_data', <django.forms.fields.CharField object at 0x7f9f3b197b10>), ('parameters', <django.forms.fields.CharField object at 0x7f9f3d0b6c50>), ('stack_name', <django.forms.fields.CharField object at 0x7f9f3bfe8a50>), ('timeout_mins', <django.forms.fields.IntegerField object at 0x7f9f3bfe8390>), ('enable_rollback', <django.forms.fields.BooleanField object at 0x7f9f3bfe8990>), ('stack_id', <django.forms.fields.CharField object at 0x7f9f3d789fd0>)])
EditStackForm.declared_fields = OrderedDict([('environment_data', <django.forms.fields.CharField object at 0x7f9f3b197b10>), ('parameters', <django.forms.fields.CharField object at 0x7f9f3d0b6c50>), ('stack_name', <django.forms.fields.CharField object at 0x7f9f3bfe8a50>), ('timeout_mins', <django.forms.fields.IntegerField object at 0x7f9f3bfe8390>), ('enable_rollback', <django.forms.fields.BooleanField object at 0x7f9f3bfe8990>), ('stack_id', <django.forms.fields.CharField object at 0x7f9f3d789fd0>)])
EditStackForm.handle(*func_args, **func_kwargs)[source]
EditStackForm.media
class openstack_dashboard.dashboards.project.stacks.forms.PreviewStackForm(*args, **kwargs)[source]

Bases: openstack_dashboard.dashboards.project.stacks.forms.CreateStackForm

class Meta[source]

Bases: object

name = <django.utils.functional.__proxy__ object at 0x7f9f3bfe8b10>
PreviewStackForm.base_fields = OrderedDict([('environment_data', <django.forms.fields.CharField object at 0x7f9f3b197b10>), ('parameters', <django.forms.fields.CharField object at 0x7f9f3d0b6c50>), ('stack_name', <django.forms.fields.RegexField object at 0x7f9f3d0b6f50>), ('timeout_mins', <django.forms.fields.IntegerField object at 0x7f9f3bfe8390>), ('enable_rollback', <django.forms.fields.BooleanField object at 0x7f9f3bfe8990>)])
PreviewStackForm.declared_fields = OrderedDict([('environment_data', <django.forms.fields.CharField object at 0x7f9f3b197b10>), ('parameters', <django.forms.fields.CharField object at 0x7f9f3d0b6c50>), ('stack_name', <django.forms.fields.RegexField object at 0x7f9f3d0b6f50>), ('timeout_mins', <django.forms.fields.IntegerField object at 0x7f9f3bfe8390>), ('enable_rollback', <django.forms.fields.BooleanField object at 0x7f9f3bfe8990>)])
PreviewStackForm.handle(request, data)[source]
PreviewStackForm.media
class openstack_dashboard.dashboards.project.stacks.forms.PreviewTemplateForm(*args, **kwargs)[source]

Bases: openstack_dashboard.dashboards.project.stacks.forms.TemplateForm

class Meta[source]

Bases: object

help_text = <django.utils.functional.__proxy__ object at 0x7f9f3d0b6e10>
name = <django.utils.functional.__proxy__ object at 0x7f9f3d0b6ad0>
PreviewTemplateForm.base_fields = OrderedDict([('template_source', <django.forms.fields.ChoiceField object at 0x7f9f3c212290>), ('template_upload', <django.forms.fields.FileField object at 0x7f9f3c212610>), ('template_url', <django.forms.fields.URLField object at 0x7f9f3c212d10>), ('template_data', <django.forms.fields.CharField object at 0x7f9f3c2122d0>), ('environment_source', <django.forms.fields.ChoiceField object at 0x7f9f3c2120d0>), ('environment_upload', <django.forms.fields.FileField object at 0x7f9f3d0b6190>), ('environment_data', <django.forms.fields.CharField object at 0x7f9f3d0b6b10>)])
PreviewTemplateForm.declared_fields = OrderedDict([('template_source', <django.forms.fields.ChoiceField object at 0x7f9f3c212290>), ('template_upload', <django.forms.fields.FileField object at 0x7f9f3c212610>), ('template_url', <django.forms.fields.URLField object at 0x7f9f3c212d10>), ('template_data', <django.forms.fields.CharField object at 0x7f9f3c2122d0>), ('environment_source', <django.forms.fields.ChoiceField object at 0x7f9f3c2120d0>), ('environment_upload', <django.forms.fields.FileField object at 0x7f9f3d0b6190>), ('environment_data', <django.forms.fields.CharField object at 0x7f9f3d0b6b10>)])
PreviewTemplateForm.media
class openstack_dashboard.dashboards.project.stacks.forms.TemplateForm(*args, **kwargs)[source]

Bases: horizon.forms.base.SelfHandlingForm

class Meta[source]

Bases: object

help_text = <django.utils.functional.__proxy__ object at 0x7f9f3c212910>
name = <django.utils.functional.__proxy__ object at 0x7f9f3c212590>
TemplateForm.attributes = {'data-envsource-raw': <django.utils.functional.__proxy__ object at 0x7f9f3d0b6e50>, 'data-switch-on': 'envsource', 'class': 'switched'}
TemplateForm.base_choices = [('file', <django.utils.functional.__proxy__ object at 0x7f9f3c212990>), ('raw', <django.utils.functional.__proxy__ object at 0x7f9f3c212690>)]
TemplateForm.base_fields = OrderedDict([('template_source', <django.forms.fields.ChoiceField object at 0x7f9f3c212290>), ('template_upload', <django.forms.fields.FileField object at 0x7f9f3c212610>), ('template_url', <django.forms.fields.URLField object at 0x7f9f3c212d10>), ('template_data', <django.forms.fields.CharField object at 0x7f9f3c2122d0>), ('environment_source', <django.forms.fields.ChoiceField object at 0x7f9f3c2120d0>), ('environment_upload', <django.forms.fields.FileField object at 0x7f9f3d0b6190>), ('environment_data', <django.forms.fields.CharField object at 0x7f9f3d0b6b10>)])
TemplateForm.clean()[source]
TemplateForm.clean_uploaded_files(prefix, field_label, cleaned, files)[source]

Cleans Template & Environment data from form upload.

Does some of the crunchy bits for processing uploads vs raw data depending on what the user specified. Identical process for environment data & template data.

Parameters:
  • prefix (str) – prefix (environment, template) of field
  • field_label (str) – translated prefix str for messages
  • prefix – existing cleaned fields from form
Return type:

dict

Returns:

cleaned dict including environment & template data

TemplateForm.create_kwargs(data)[source]
TemplateForm.declared_fields = OrderedDict([('template_source', <django.forms.fields.ChoiceField object at 0x7f9f3c212290>), ('template_upload', <django.forms.fields.FileField object at 0x7f9f3c212610>), ('template_url', <django.forms.fields.URLField object at 0x7f9f3c212d10>), ('template_data', <django.forms.fields.CharField object at 0x7f9f3c2122d0>), ('environment_source', <django.forms.fields.ChoiceField object at 0x7f9f3c2120d0>), ('environment_upload', <django.forms.fields.FileField object at 0x7f9f3d0b6190>), ('environment_data', <django.forms.fields.CharField object at 0x7f9f3d0b6b10>)])
TemplateForm.handle(request, data)[source]
TemplateForm.media
TemplateForm.url_choice = [('url', <django.utils.functional.__proxy__ object at 0x7f9f3c212950>)]
openstack_dashboard.dashboards.project.stacks.forms.create_upload_form_attributes(prefix, input_type, name)[source]

Creates attribute dicts for the switchable upload form

Parameters:
  • prefix (str) – prefix (environment, template) of field
  • input_type (str) – field type (file, raw, url)
  • name (str) – translated text label to display to user
Return type:

dict

Returns:

an attribute set to pass to form build

Previous topic

The openstack_dashboard.dashboards.project.stacks Module

Next topic

The openstack_dashboard.dashboards.project.stacks.mappings Module

Project Source

This Page