def fill(self, values): if isinstance(values, six.string_types): new_values = dict(type=values) elif isinstance(values, (list, tuple)): new_values = dict(type=values[0], **values[1]) else: raise TypeError("Evaluate part should be a string or tuple.") return View.fill(self, new_values)
def __init__(self, parent, id, number="", move_into=None, move_from=None, available_items="choices_chosen", chosen_items="members_chosen", logger=None): View.__init__(self, parent, logger=logger) self.available_items = available_items self.chosen_items = chosen_items self.id = id if number: self.number = "[{}]".format(number) else: self.number = number if isinstance(move_into, WidgetDescriptor): self._move_into = move_into.klass(self, **move_into.kwargs) else: self._move_into = move_into if isinstance(move_from, WidgetDescriptor): self._move_from = move_from.klass(self, **move_from.kwargs) else: self._move_from = move_from
class PhysicalChassisToolbar(View): """Represents chassis toolbar and its controls.""" identify = Dropdown(text="Identify") view_selector = View.nested(ItemsToolBarViewSelector)
class TenantEditTagEntities(View): """The entities on the edit tags page""" breadcrumb = BreadCrumb() title = Text('#explorer_title_text') included_widgets = View.include(BaseNonInteractiveEntitiesView, use_parent=True)
class OneProviderComponentsToolbar(View): policy = Dropdown(text='Policy') download = Dropdown(text='Download') back = Button(name='show_summary') view_selector = View.nested(ItemsToolBarViewSelector)
class SecurityGroupDetailsToolBar(View): """ Represents provider details toolbar """ policy = Dropdown(text='Policy') download = Button(title='Download summary in PDF format') view_selector = View.nested(ItemsToolBarViewSelector)
class CloudNetworkToolBar(View): """ Represents cloud networks toolbar and its controls """ configuration = Dropdown(text='Configuration') policy = Dropdown(text='Policy') download = Dropdown(text='Download') view_selector = View.nested(ItemsToolBarViewSelector)
def __init__(self, parent, id="edit_email_div", logger=None): View.__init__(self, parent, logger=logger) self.id = id
def fill(self, values): new_values = dict(type=values[0], **values[1]) return View.fill(self, new_values)
class visual(WaitTab): # noqa TAB_NAME = 'Visual' including_entities = View.include(VisualForm, use_parent=True)
class TimeProfileView(BaseLoggedInPage): entities = View.nested(TimeProfileEntities) configuration = Dropdown('Configuration')
class KeyPairToolbar(View): policy = Dropdown('Policy') configuration = Dropdown('Configuration') download = Dropdown('Download') view_selector = View.nested(ItemsToolBarViewSelector)
class PlaybooksToolbar(View): view_selector = View.nested(ItemsToolBarViewSelector) download = Dropdown("Download")
def __init__(self, parent, locator, logger=None): View.__init__(self, parent=parent, logger=logger) self.locator = locator
def __init__(self, parent, logger=None): View.__init__(self, parent, logger=logger)
class AvailabilityZoneToolBar(View): """View containing the toolbar widgets""" policy = Dropdown('Policy') download = Dropdown('Download') # Title attribute, no displayed text view_selector = View.nested(ItemsToolBarViewSelector)
class ConfigManagementAddView(ConfigManagementView): """The add page""" sidebar = View.nested(ConfigManagementSideBar) entities = View.nested(ConfigManagementAddEntities) is_displayed = displayed_not_implemented
class default_views(WaitTab): # noqa TAB_NAME = 'Default Views' including_entities = View.include(DefaultViewsForm, use_parent=True)
def __init__(self, parent, show_loc=None, logger=None): View.__init__(self, parent, logger=logger) self.show_loc = show_loc
class default_filters(WaitTab): # noqa TAB_NAME = 'Default Filters' including_entities = View.include(DefaultFiltersForm, use_parent=True)
class ObjectStoreObjectToolbar(View): """The toolbar on the Object Store Object page""" configuration = Dropdown('Configuration') policy = Dropdown('Policy') download = Dropdown('Download') view_selector = View.nested(ItemsToolBarViewSelector)
class time_profiles(WaitTab): # noqa TAB_NAME = 'Time Profiles' including_entities = View.include(TimeProfilesView, use_parent=True)
class NetworkPortToolBar(View): """ Represents provider toolbar and its controls """ policy = Dropdown(text='Policy') download = Dropdown(text='Download') view_selector = View.nested(ItemsToolBarViewSelector)
class SubnetToolBar(View): """ Represents provider toolbar and its controls """ configuration = Dropdown(text='Configuration') policy = Dropdown(text='Policy') download = Dropdown(text='Download') view_selector = View.nested(ItemsToolBarViewSelector)
class content_views(SatTab): TAB_NAME = 'Content Views' resources = View.nested(AddRemoveResourcesView)
class BalancerToolBar(View): """ Represents balancers toolbar and its controls """ policy = Dropdown(text='Policy') download = Dropdown(text='Download') view_selector = View.nested(ItemsToolBarViewSelector)
class repositories(SatTabWithDropdown): TAB_NAME = 'Yum Content' SUB_ITEM = 'Repositories' resources = View.nested(AddRemoveResourcesView)
def __init__(self, parent, tab, logger=None): View.__init__(self, parent, logger=logger) self.tab = tab
class docker_repositories(SatTabWithDropdown): TAB_NAME = 'Container Images' SUB_ITEM = 'Repositories' resources = View.nested(AddRemoveResourcesView)
class toolbar(View): # noqa configuration = Dropdown(text='Configuration') policy = Dropdown(text='Policy') download = Dropdown(text='Download') view_selector = View.nested(ItemsToolBarViewSelector)
class ostree_content(SatTab): TAB_NAME = 'OSTree Content' resources = View.nested(AddRemoveResourcesView)
class ConfigManagementAddEntities(View): """The entities on the add page""" title = Text('//div[@id="main-content"]//h1') form = View.nested(ConfigManagementAddForm) add = Button('Add') cancel = Button('Cancel')
class PhysicalRacksToolbar(View): """Represents racks toolbar and its controls.""" configuration = Dropdown(text="Configuration") view_selector = View.nested(ItemsToolBarViewSelector)
def __init__(self, parent, param_type, logger=None): View.__init__(self, parent, logger=logger) self.param_type = param_type
class basic_info(WaitTab): # noqa TAB_NAME = 'Basic Info' included_form = View.include(BasicInfoForm, use_parent=True)
class template(SatTab): name = TextInput(id='job_template_name') default = Checkbox(id='job_template_default') template_editor = View.nested(TemplateEditor) description = TextInput(id='job_template_description') audit = TextInput(id='job_template_audit_comment')
class form(View): # noqa policy = BootstrapSelect('policy_id') # TODO policies table, ability to remove entities = View.nested(BaseNonInteractiveEntitiesView) cancel_button = Button('Cancel')
def __init__(self, parent, select_loc, up_loc, down_loc, logger=None): View.__init__(self, parent, logger=logger) self.select_loc = select_loc self.up_loc = up_loc self.down_loc = down_loc