senlin_dashboard.cluster.clusters package

Submodules

senlin_dashboard.cluster.clusters.forms module

class senlin_dashboard.cluster.clusters.forms.CreateForm(request, *args, **kwargs)[source]

Bases: SelfHandlingForm

base_fields = {'desired_capacity': <django.forms.fields.IntegerField object>, 'max_size': <django.forms.fields.IntegerField object>, 'metadata': <django.forms.fields.CharField object>, 'min_size': <django.forms.fields.IntegerField object>, 'name': <django.forms.fields.CharField object>, 'parent': <horizon.forms.fields.ThemableChoiceField object>, 'profile_id': <horizon.forms.fields.ThemableChoiceField object>, 'timeout': <django.forms.fields.IntegerField object>}
declared_fields = {'desired_capacity': <django.forms.fields.IntegerField object>, 'max_size': <django.forms.fields.IntegerField object>, 'metadata': <django.forms.fields.CharField object>, 'min_size': <django.forms.fields.IntegerField object>, 'name': <django.forms.fields.CharField object>, 'parent': <horizon.forms.fields.ThemableChoiceField object>, 'profile_id': <horizon.forms.fields.ThemableChoiceField object>, 'timeout': <django.forms.fields.IntegerField object>}
handle(request, data)[source]
property media

Return all media required to render the widgets on this form.

class senlin_dashboard.cluster.clusters.forms.ManagePoliciesForm(request, *args, **kwargs)[source]

Bases: SelfHandlingForm

base_fields = {'cluster_id': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>, 'policies': <horizon.forms.fields.ThemableChoiceField object>}
declared_fields = {'cluster_id': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>, 'policies': <horizon.forms.fields.ThemableChoiceField object>}
handle(request, data)[source]
property media

Return all media required to render the widgets on this form.

senlin_dashboard.cluster.clusters.panel module

class senlin_dashboard.cluster.clusters.panel.Clusters[source]

Bases: Panel

name = 'Clusters'
slug = 'clusters'

senlin_dashboard.cluster.clusters.tables module

class senlin_dashboard.cluster.clusters.tables.AttachedPoliciesTable(request, data=None, needs_form_wrapper=None, **kwargs)[source]

Bases: DataTable

class Meta[source]

Bases: object

hidden_title = False
name = 'attached_policies'
row_actions = (<class 'senlin_dashboard.cluster.clusters.tables.DetachPolicy'>,)
table_actions = (<class 'senlin_dashboard.cluster.clusters.tables.DetachPolicy'>,)
verbose_name = 'Attached Policies'
base_actions = {'detach': <DetachPolicy: detach>}
base_columns = {'enabled': <Column: enabled>, 'policy_name': <Column: policy_name>, 'policy_type': <Column: policy_type>}
class senlin_dashboard.cluster.clusters.tables.CheckCluster(*args, **kwargs)[source]

Bases: BatchAction

action(request, obj_id)[source]

Accepts a single object id and performs the specific action.

This method is required.

Return values are discarded, errors raised are caught and logged.

static action_past(count)[source]
static action_present(count)[source]
base_options = {'__classcell__': <cell at 0x7f750051ec80: BaseActionMetaClass object>, '__doc__': 'A table action which takes batch action on one or more objects.\n\n    This action should not require user input on a per-object basis.\n\n    .. attribute:: name\n\n       A short name or "slug" representing this action.\n       Should be one word such as "delete", "add", "disable", etc.\n\n    .. method:: action_present\n\n       Method returning a present action name. This is used as an action label.\n\n       Method must accept an integer/long parameter and return the display\n       forms of the name properly pluralised (depending on the integer) and\n       translated in a string or tuple/list.\n\n       The returned display form is highly recommended to be a complete action\n       name with a form of a transitive verb and an object noun. Each word is\n       capitalized and the string should be marked as translatable.\n\n       If tuple or list - then setting self.current_present_action = n will\n       set the current active item from the list(action_present[n])\n\n    .. method:: action_past\n\n       Method returning a past action name. This is usually used to display\n       a message when the action is completed.\n\n       Method must accept an integer/long parameter and return the display\n       forms of the name properly pluralised (depending on the integer) and\n       translated in a string or tuple/list.\n\n       The detail is same as that of ``action_present``.\n\n    .. attribute:: success_url\n\n       Optional location to redirect after completion of the delete\n       action. Defaults to the current page.\n\n    .. attribute:: help_text\n\n       Optional message for providing an appropriate help text for\n       the horizon user.\n\n    ', '__init__': <function BatchAction.__init__>, '__module__': 'senlin_dashboard.cluster.clusters.tables', '__qualname__': 'CheckCluster', '__repr__': <function BaseAction.__repr__>, '_allowed': <function BatchAction._allowed>, '_get_action_name': <function BatchAction._get_action_name>, 'action': <function CheckCluster.action>, 'action_past': <staticmethod(<function CheckCluster.action_past>)>, 'action_present': <staticmethod(<function CheckCluster.action_present>)>, 'allowed': <function BaseAction.allowed>, 'associate_with_table': <function BaseAction.associate_with_table>, 'data_type_matched': <function BaseAction.data_type_matched>, 'default_message_level': 'success', 'get_default_attrs': <function BatchAction.get_default_attrs>, 'get_default_classes': <function BaseAction.get_default_classes>, 'get_param_name': <function Action.get_param_name>, 'get_policy_target': <function BaseAction.get_policy_target>, 'get_success_url': <function BatchAction.get_success_url>, 'handle': <function BatchAction.handle>, 'help_text': 'This action cannot be undone.', 'name': 'check', 'update': <function BatchAction.update>}
name = 'check'
class senlin_dashboard.cluster.clusters.tables.ClusterFilterAction(*args, **kwargs)[source]

Bases: FilterAction

base_options = {'__classcell__': <cell at 0x7f750051eaa0: BaseActionMetaClass object>, '__doc__': 'A base class representing a filter action for a table.\n\n    .. attribute:: name\n\n        The short name or "slug" representing this action. Defaults to\n        ``"filter"``.\n\n    .. attribute:: verbose_name\n\n        A descriptive name used for display purposes. Defaults to the\n        value of ``name`` with the first letter of each word capitalized.\n\n    .. attribute:: param_name\n\n        A string representing the name of the request parameter used for the\n        search term. Default: ``"q"``.\n\n    .. attribute:: filter_type\n\n        A string representing the type of this filter. If this is set to\n        ``"server"`` then ``filter_choices`` must also be provided.\n        Default: ``"query"``.\n\n    .. attribute:: filter_choices\n\n        Required for server type filters. A tuple of tuples representing the\n        filter options. Tuple composition should evaluate to (string, string,\n        boolean, string, boolean), representing the following:\n\n        * The first value is the filter parameter.\n        * The second value represents display value.\n        * The third optional value indicates whether or not it should be\n          applied to the API request as an API query attribute. API type\n          filters do not need to be accounted for in the filter method since\n          the API will do the filtering. However, server type filters in\n          general will need to be performed in the filter method.\n          By default this attribute is not provided (``False``).\n        * The fourth optional value is used as help text if provided.\n          The default is ``None`` which means no help text.\n        * The fifth optional value determines whether or not the choice\n          is displayed to users. It defaults to ``True``. This is useful\n          when the choice needs to be displayed conditionally.\n\n    .. attribute:: needs_preloading\n\n        If True, the filter function will be called for the initial\n        GET request with an empty ``filter_string``, regardless of the\n        value of ``method``.\n\n    ', '__init__': <function FilterAction.__init__>, '__module__': 'senlin_dashboard.cluster.clusters.tables', '__qualname__': 'ClusterFilterAction', '__repr__': <function BaseAction.__repr__>, '_allowed': <function BaseAction._allowed>, 'allowed': <function BaseAction.allowed>, 'assign_type_string': <function FilterAction.assign_type_string>, 'associate_with_table': <function BaseAction.associate_with_table>, 'data_type_filter': <function FilterAction.data_type_filter>, 'data_type_matched': <function BaseAction.data_type_matched>, 'filter': <function FilterAction.filter>, 'filter_choices': (('name', 'Cluster Name =', True), ('status', 'Status =', True), ('profile_name', 'Profile Name =', True)), 'filter_type': 'server', 'get_default_attrs': <function BaseAction.get_default_attrs>, 'get_default_classes': <function BaseAction.get_default_classes>, 'get_param_name': <function FilterAction.get_param_name>, 'get_policy_target': <function BaseAction.get_policy_target>, 'get_select_options': <function FilterAction.get_select_options>, 'is_api_filter': <function FilterAction.is_api_filter>, 'name': 'filter', 'update': <function BaseAction.update>}
filter_choices = (('name', 'Cluster Name =', True), ('status', 'Status =', True), ('profile_name', 'Profile Name =', True))
filter_type = 'server'
class senlin_dashboard.cluster.clusters.tables.ClustersTable(request, data=None, needs_form_wrapper=None, **kwargs)[source]

Bases: DataTable

class Meta[source]

Bases: object

name = 'clusters'
row_actions = (<class 'senlin_dashboard.cluster.clusters.tables.ManagePolicies'>, <class 'senlin_dashboard.cluster.clusters.tables.CheckCluster'>, <class 'senlin_dashboard.cluster.clusters.tables.RecoverCluster'>, <class 'senlin_dashboard.cluster.clusters.tables.DeleteCluster'>)
row_class

alias of UpdateRow

status_columns = ['status']
table_actions = (<class 'senlin_dashboard.cluster.clusters.tables.ClusterFilterAction'>, <class 'senlin_dashboard.cluster.clusters.tables.CreateCluster'>, <class 'senlin_dashboard.cluster.clusters.tables.DeleteCluster'>)
table_actions_menu = (<class 'senlin_dashboard.cluster.clusters.tables.CheckCluster'>, <class 'senlin_dashboard.cluster.clusters.tables.RecoverCluster'>)
verbose_name = 'Clusters'
STATUS_CHOICES = (('INIT', None), ('ACTIVE', True), ('ERROR', False), ('CRITICAL', False), ('WARNING', False), ('CREATING', None), ('UPDATING', None), ('DELETING', None), ('RESIZING', None), ('CHECKING', None), ('RECOVERING', None))
STATUS_DISPLAY_CHOICES = (('INIT', 'INIT'), ('ACTIVE', 'ACTIVE'), ('ERROR', 'ERROR'), ('CRITICAL', 'CRITICAL'), ('WARNING', 'WARNING'), ('CREATING', 'CREATING'), ('UPDATING', 'UPDATING'), ('DELETING', 'DELETING'), ('RESIZING', 'RESIZING'), ('CHECKING', 'CHECKING'), ('RECOVERING', 'RECOVERING'))
base_actions = {'check': <CheckCluster: check>, 'create': <CreateCluster: create>, 'delete': <DeleteCluster: delete>, 'filter': <ClusterFilterAction: filter>, 'manage_policies': <ManagePolicies: manage_policies>, 'recover': <RecoverCluster: recover>}
base_columns = {'created': <Column: created>, 'name': <WrappingColumn: name>, 'profile_name': <Column: profile_name>, 'status': <Column: status>, 'status_reason': <Column: status_reason>, 'updated': <Column: updated>}
class senlin_dashboard.cluster.clusters.tables.CreateCluster(*args, **kwargs)[source]

Bases: LinkAction

ajax = True
base_options = {'__classcell__': <cell at 0x7f750051e9e0: BaseActionMetaClass object>, '__doc__': 'A table action which is simply a link rather than a form POST.\n\n    .. attribute:: name\n\n        Required. The short name or "slug" representing this\n        action. This name should not be changed at runtime.\n\n    .. attribute:: verbose_name\n\n        A string which will be rendered as the link text. (Required)\n\n    .. attribute:: url\n\n        A string or a callable which resolves to a url to be used as the link\n        target. You must either define the ``url`` attribute or override\n        the ``get_link_url`` method on the class.\n\n    .. attribute:: allowed_data_types\n\n        A list that contains the allowed data types of the action.  If the\n        datum\'s type is in this list, the action will be shown on the row\n        for the datum.\n\n        Defaults to be an empty list (``[]``). When set to empty, the action\n        will accept any kind of data.\n    ', '__init__': <function LinkAction.__init__>, '__module__': 'senlin_dashboard.cluster.clusters.tables', '__qualname__': 'CreateCluster', '__repr__': <function BaseAction.__repr__>, '_allowed': <function BaseAction._allowed>, 'ajax': True, 'allowed': <function BaseAction.allowed>, 'associate_with_table': <function LinkAction.associate_with_table>, 'classes': ('ajax-modal', 'btn-create'), 'data_type_matched': <function BaseAction.data_type_matched>, 'get_ajax_update_url': <function LinkAction.get_ajax_update_url>, 'get_default_attrs': <function BaseAction.get_default_attrs>, 'get_default_classes': <function BaseAction.get_default_classes>, 'get_link_url': <function LinkAction.get_link_url>, 'get_policy_target': <function BaseAction.get_policy_target>, 'icon': 'plus', 'name': 'create', 'render': <function LinkAction.render>, 'update': <function BaseAction.update>, 'url': 'horizon:cluster:clusters:create', 'verbose_name': 'Create Cluster'}
classes = ('ajax-modal', 'btn-create')
icon = 'plus'
name = 'create'
url = 'horizon:cluster:clusters:create'
verbose_name = 'Create Cluster'
class senlin_dashboard.cluster.clusters.tables.DeleteCluster(*args, **kwargs)[source]

Bases: DeleteAction

static action_past(count)[source]
static action_present(count)[source]
allowed(request, datum)[source]

Determine whether this action is allowed for the current request.

This method is meant to be overridden with more specific checks.

base_options = {'__classcell__': <cell at 0x7f750051edd0: BaseActionMetaClass object>, '__doc__': 'A table action used to perform delete operations on table data.\n\n    .. attribute:: name\n\n        A short name or "slug" representing this action.\n        Defaults to \'delete\'\n\n    .. method:: action_present\n\n       Method returning a present action name. This is used as an action label.\n\n       Method must accept an integer/long parameter and return the display\n       forms of the name properly pluralised (depending on the integer) and\n       translated in a string or tuple/list.\n\n       The returned display form is highly recommended to be a complete action\n       name with a form of a transitive verb and an object noun. Each word is\n       capitalized and the string should be marked as translatable.\n\n       If tuple or list - then setting self.current_present_action = n will\n       set the current active item from the list(action_present[n])\n\n    .. method:: action_past\n\n       Method returning a past action name. This is usually used to display\n       a message when the action is completed.\n\n       Method must accept an integer/long parameter and return the display\n       forms of the name properly pluralised (depending on the integer) and\n       translated in a string or tuple/list.\n\n       The detail is same as that of ``action_present``.\n\n    .. attribute:: success_url\n\n       Optional location to redirect after completion of the delete\n       action. Defaults to the current page.\n\n    .. attribute:: help_text\n\n       Optional message for providing an appropriate help text for\n       the horizon user.\n\n    ', '__init__': <function DeleteAction.__init__>, '__module__': 'senlin_dashboard.cluster.clusters.tables', '__qualname__': 'DeleteCluster', '__repr__': <function BaseAction.__repr__>, '_allowed': <function BatchAction._allowed>, '_get_action_name': <function BatchAction._get_action_name>, 'action': <function DeleteAction.action>, 'action_past': <staticmethod(<function DeleteCluster.action_past>)>, 'action_present': <staticmethod(<function DeleteCluster.action_present>)>, 'allowed': <function DeleteCluster.allowed>, 'associate_with_table': <function BaseAction.associate_with_table>, 'data_type_matched': <function BaseAction.data_type_matched>, 'default_message_level': 'success', 'delete': <function DeleteCluster.delete>, 'get_default_attrs': <function BatchAction.get_default_attrs>, 'get_default_classes': <function BaseAction.get_default_classes>, 'get_param_name': <function Action.get_param_name>, 'get_policy_target': <function BaseAction.get_policy_target>, 'get_success_url': <function BatchAction.get_success_url>, 'handle': <function BatchAction.handle>, 'help_text': 'This action cannot be undone.', 'name': 'delete', 'update': <function BatchAction.update>}
delete(request, obj_id)[source]

Required. Deletes an object referenced by obj_id.

Override to provide delete functionality specific to your data.

class senlin_dashboard.cluster.clusters.tables.DetachPolicy(*args, **kwargs)[source]

Bases: BatchAction

action(request, obj_id)[source]

Accepts a single object id and performs the specific action.

This method is required.

Return values are discarded, errors raised are caught and logged.

static action_past(count)[source]
static action_present(count)[source]
base_options = {'__classcell__': <cell at 0x7f750051ec80: BaseActionMetaClass object>, '__doc__': 'A table action which takes batch action on one or more objects.\n\n    This action should not require user input on a per-object basis.\n\n    .. attribute:: name\n\n       A short name or "slug" representing this action.\n       Should be one word such as "delete", "add", "disable", etc.\n\n    .. method:: action_present\n\n       Method returning a present action name. This is used as an action label.\n\n       Method must accept an integer/long parameter and return the display\n       forms of the name properly pluralised (depending on the integer) and\n       translated in a string or tuple/list.\n\n       The returned display form is highly recommended to be a complete action\n       name with a form of a transitive verb and an object noun. Each word is\n       capitalized and the string should be marked as translatable.\n\n       If tuple or list - then setting self.current_present_action = n will\n       set the current active item from the list(action_present[n])\n\n    .. method:: action_past\n\n       Method returning a past action name. This is usually used to display\n       a message when the action is completed.\n\n       Method must accept an integer/long parameter and return the display\n       forms of the name properly pluralised (depending on the integer) and\n       translated in a string or tuple/list.\n\n       The detail is same as that of ``action_present``.\n\n    .. attribute:: success_url\n\n       Optional location to redirect after completion of the delete\n       action. Defaults to the current page.\n\n    .. attribute:: help_text\n\n       Optional message for providing an appropriate help text for\n       the horizon user.\n\n    ', '__init__': <function BatchAction.__init__>, '__module__': 'senlin_dashboard.cluster.clusters.tables', '__qualname__': 'DetachPolicy', '__repr__': <function BaseAction.__repr__>, '_allowed': <function BatchAction._allowed>, '_get_action_name': <function BatchAction._get_action_name>, 'action': <function DetachPolicy.action>, 'action_past': <staticmethod(<function DetachPolicy.action_past>)>, 'action_present': <staticmethod(<function DetachPolicy.action_present>)>, 'allowed': <function BaseAction.allowed>, 'associate_with_table': <function BaseAction.associate_with_table>, 'classes': ('btn-danger', 'btn-detach'), 'data_type_matched': <function BaseAction.data_type_matched>, 'default_message_level': 'success', 'get_default_attrs': <function BatchAction.get_default_attrs>, 'get_default_classes': <function BaseAction.get_default_classes>, 'get_param_name': <function Action.get_param_name>, 'get_policy_target': <function BaseAction.get_policy_target>, 'get_success_url': <function DetachPolicy.get_success_url>, 'handle': <function BatchAction.handle>, 'help_text': 'This action cannot be undone.', 'name': 'detach', 'update': <function BatchAction.update>}
classes = ('btn-danger', 'btn-detach')
get_success_url(request)[source]

Returns the URL to redirect to after a successful action.

name = 'detach'
class senlin_dashboard.cluster.clusters.tables.ManagePolicies(*args, **kwargs)[source]

Bases: LinkAction

base_options = {'__classcell__': <cell at 0x7f750051e9e0: BaseActionMetaClass object>, '__doc__': 'A table action which is simply a link rather than a form POST.\n\n    .. attribute:: name\n\n        Required. The short name or "slug" representing this\n        action. This name should not be changed at runtime.\n\n    .. attribute:: verbose_name\n\n        A string which will be rendered as the link text. (Required)\n\n    .. attribute:: url\n\n        A string or a callable which resolves to a url to be used as the link\n        target. You must either define the ``url`` attribute or override\n        the ``get_link_url`` method on the class.\n\n    .. attribute:: allowed_data_types\n\n        A list that contains the allowed data types of the action.  If the\n        datum\'s type is in this list, the action will be shown on the row\n        for the datum.\n\n        Defaults to be an empty list (``[]``). When set to empty, the action\n        will accept any kind of data.\n    ', '__init__': <function LinkAction.__init__>, '__module__': 'senlin_dashboard.cluster.clusters.tables', '__qualname__': 'ManagePolicies', '__repr__': <function BaseAction.__repr__>, '_allowed': <function BaseAction._allowed>, 'ajax': False, 'allowed': <function BaseAction.allowed>, 'associate_with_table': <function LinkAction.associate_with_table>, 'classes': ('ajax-modal',), 'data_type_matched': <function BaseAction.data_type_matched>, 'get_ajax_update_url': <function LinkAction.get_ajax_update_url>, 'get_default_attrs': <function BaseAction.get_default_attrs>, 'get_default_classes': <function BaseAction.get_default_classes>, 'get_link_url': <function LinkAction.get_link_url>, 'get_policy_target': <function BaseAction.get_policy_target>, 'icon': 'pencil', 'name': 'manage_policies', 'render': <function LinkAction.render>, 'update': <function BaseAction.update>, 'url': 'horizon:cluster:clusters:manage_policies', 'verbose_name': 'Manage Policies'}
classes = ('ajax-modal',)
icon = 'pencil'
name = 'manage_policies'
url = 'horizon:cluster:clusters:manage_policies'
verbose_name = 'Manage Policies'
class senlin_dashboard.cluster.clusters.tables.RecoverCluster(*args, **kwargs)[source]

Bases: BatchAction

action(request, obj_id)[source]

Accepts a single object id and performs the specific action.

This method is required.

Return values are discarded, errors raised are caught and logged.

static action_past(count)[source]
static action_present(count)[source]
allowed(request, datum)[source]

Determine whether this action is allowed for the current request.

This method is meant to be overridden with more specific checks.

base_options = {'__classcell__': <cell at 0x7f750051ec80: BaseActionMetaClass object>, '__doc__': 'A table action which takes batch action on one or more objects.\n\n    This action should not require user input on a per-object basis.\n\n    .. attribute:: name\n\n       A short name or "slug" representing this action.\n       Should be one word such as "delete", "add", "disable", etc.\n\n    .. method:: action_present\n\n       Method returning a present action name. This is used as an action label.\n\n       Method must accept an integer/long parameter and return the display\n       forms of the name properly pluralised (depending on the integer) and\n       translated in a string or tuple/list.\n\n       The returned display form is highly recommended to be a complete action\n       name with a form of a transitive verb and an object noun. Each word is\n       capitalized and the string should be marked as translatable.\n\n       If tuple or list - then setting self.current_present_action = n will\n       set the current active item from the list(action_present[n])\n\n    .. method:: action_past\n\n       Method returning a past action name. This is usually used to display\n       a message when the action is completed.\n\n       Method must accept an integer/long parameter and return the display\n       forms of the name properly pluralised (depending on the integer) and\n       translated in a string or tuple/list.\n\n       The detail is same as that of ``action_present``.\n\n    .. attribute:: success_url\n\n       Optional location to redirect after completion of the delete\n       action. Defaults to the current page.\n\n    .. attribute:: help_text\n\n       Optional message for providing an appropriate help text for\n       the horizon user.\n\n    ', '__init__': <function BatchAction.__init__>, '__module__': 'senlin_dashboard.cluster.clusters.tables', '__qualname__': 'RecoverCluster', '__repr__': <function BaseAction.__repr__>, '_allowed': <function BatchAction._allowed>, '_get_action_name': <function BatchAction._get_action_name>, 'action': <function RecoverCluster.action>, 'action_past': <staticmethod(<function RecoverCluster.action_past>)>, 'action_present': <staticmethod(<function RecoverCluster.action_present>)>, 'allowed': <function RecoverCluster.allowed>, 'associate_with_table': <function BaseAction.associate_with_table>, 'data_type_matched': <function BaseAction.data_type_matched>, 'default_message_level': 'success', 'get_default_attrs': <function BatchAction.get_default_attrs>, 'get_default_classes': <function BaseAction.get_default_classes>, 'get_param_name': <function Action.get_param_name>, 'get_policy_target': <function BaseAction.get_policy_target>, 'get_success_url': <function BatchAction.get_success_url>, 'handle': <function BatchAction.handle>, 'help_text': 'This action cannot be undone.', 'name': 'recover', 'update': <function BatchAction.update>}
name = 'recover'
class senlin_dashboard.cluster.clusters.tables.UpdateRow(table, datum=None)[source]

Bases: Row

ajax = True
get_data(request, cluster_id)[source]

Fetches the updated data for the row based on the given object ID.

Must be implemented by a subclass to allow AJAX updating.

senlin_dashboard.cluster.clusters.tables.get_updated_time(object)[source]

senlin_dashboard.cluster.clusters.tabs module

class senlin_dashboard.cluster.clusters.tabs.ClusterDetailTabs(request, **kwargs)[source]

Bases: TabGroup

slug = 'cluster_details'
sticky = True
tabs = (<class 'senlin_dashboard.cluster.clusters.tabs.OverviewTab'>, <class 'senlin_dashboard.cluster.clusters.tabs.EventTab'>, <class 'senlin_dashboard.cluster.clusters.tabs.NodesTab'>)
class senlin_dashboard.cluster.clusters.tabs.EventTab(tab_group, request)[source]

Bases: EventTab

get_event_data()[source]
class senlin_dashboard.cluster.clusters.tabs.NodesTab(tab_group, request)[source]

Bases: TableTab

get_nodes_data()[source]
name = 'Nodes'
preload = False
slug = 'nodes'
table_classes = (<class 'senlin_dashboard.cluster.nodes.tables.NodesTable'>,)
template_name = 'cluster/clusters/_detail_nodes.html'
class senlin_dashboard.cluster.clusters.tabs.OverviewTab(tab_group, request=None, policy_rules=None)[source]

Bases: Tab

get_context_data(request)[source]

Return a dictionary of context data used to render the tab.

Required.

name = 'Overview'
slug = 'overview'
template_name = 'cluster/clusters/_detail_overview.html'

senlin_dashboard.cluster.clusters.tests module

class senlin_dashboard.cluster.clusters.tests.ClustersTest(methodName='runTest')[source]

Bases: TestCase

test_cluster_detail()[source]
test_cluster_event()[source]
test_cluster_mamage_policies_index()[source]
test_cluster_nodes()[source]
test_create_node()[source]
test_index()[source]
test_index_cluster_list_exception()[source]
test_index_no_cluster()[source]

senlin_dashboard.cluster.clusters.urls module

senlin_dashboard.cluster.clusters.views module

class senlin_dashboard.cluster.clusters.views.CreateView(*args, **kwargs)[source]

Bases: ModalFormView

form_class

alias of CreateForm

modal_header = 'Create Cluster'
page_title = 'Create Cluster'
submit_label = 'Create Cluster'
submit_url = '/cluster/create/'
success_url = '/cluster/'
template_name = 'cluster/clusters/create.html'
text = 'Create Cluster'
class senlin_dashboard.cluster.clusters.views.DetailView[source]

Bases: TabView

get_context_data(**kwargs)[source]

Adds the tab_group variable to the context data.

get_object()[source]
get_tabs(request, *args, **kwargs)[source]

Returns the initialized tab group for this view.

page_title = '{{ cluster.name }}'
profile_url = 'horizon:cluster:profiles:detail'
tab_group_class

alias of ClusterDetailTabs

template_name = 'horizon/common/_detail.html'
class senlin_dashboard.cluster.clusters.views.IndexView(*args, **kwargs)[source]

Bases: DataTableView

get_data()[source]
has_more_data(table)[source]
has_prev_data(table)[source]
page_title = 'Clusters'
table_class

alias of ClustersTable

template_name = 'cluster/clusters/index.html'
class senlin_dashboard.cluster.clusters.views.ManagePoliciesView(*args, **kwargs)[source]

Bases: DataTableView, ModalFormView

form_class

alias of ManagePoliciesForm

get(request, *args, **kwargs)[source]

Handle GET requests: instantiate a blank version of the form.

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_data()[source]
get_form(**kwargs)[source]

Returns an instance of the form to be used in this view.

get_initial()[source]

Return the initial data to use for forms on this view.

modal_header = 'Manage Policies'
page_title = 'Manage Policies'
post(request, *args, **kwargs)[source]

Handle POST requests: instantiate a form instance with the passed POST variables and then check if it’s valid.

submit_label = 'Manage Policies'
submit_url = 'horizon:cluster:clusters:manage_policies'
success_url = '/cluster/'
table_class

alias of AttachedPoliciesTable

template_name = 'cluster/clusters/manage_policies.html'
text = 'Manage Policies'

Module contents