Example #1
0
    row_cls = RowVolume


@ui.register_ui(
    combobox_volume_type=_ui.combobox_by_label("Type"),
    combobox_migration_policy=_ui.combobox_by_label("Migration Policy"))
class FormChangeVolumeType(_ui.Form):
    """Form to change volume type."""


@ui.register_ui(field_image_name=ui.TextField(By.NAME, 'image_name'))
class FormUploadToImage(_ui.Form):
    """Form to upload volume to image."""


@ui.register_ui(field_new_size=ui.IntegerField(By.NAME, 'new_size'))
class FormExtendVolume(_ui.Form):
    """Form extend volume."""


@ui.register_ui(field_description=ui.TextField(By.NAME, 'description'),
                field_name=ui.TextField(By.NAME, 'name'))
class FormCreateSnapshot(_ui.Form):
    """Form create volume snapshot."""


@ui.register_ui(detach_volume_button=ui.Button(By.CSS_SELECTOR,
                                               '[id$="action_detach"]'))
class RowAttachedInstance(_ui.Row):
    """Row with attached instance to volume."""
Example #2
0
@ui.register_ui(checkbox=_ui.CheckBox(By.CSS_SELECTOR,
                                      'input[type="checkbox"]'),
                dropdown_menu=DropdownMenu())
class RowFlavor(_ui.Row):
    """Row with flavor in flavors table."""


class TableFlavors(_ui.Table):
    """Flavors table."""

    columns = {'name': 2}
    row_cls = RowFlavor


@ui.register_ui(field_name=ui.TextField(By.NAME, 'name'),
                field_ram=ui.IntegerField(By.NAME, 'memory_mb'),
                field_root_disk=ui.IntegerField(By.NAME, 'disk_gb'),
                field_vcpus=ui.IntegerField(By.NAME, 'vcpus'))
class FormCreateFlavor(_ui.Form):
    """Form to create flavor."""

    submit_locator = By.CSS_SELECTOR, '[type="submit"]'


@ui.register_ui(button_add=ui.Button(By.CSS_SELECTOR, '.btn.btn-primary'))
class RowProject(_ui.Row):
    """Row with project."""


class ListProjects(ui.List):
    """List of projects."""
Example #3
0
class TableSnapshots(_ui.Table):
    """Volume snapshots table."""

    columns = {'name': 2,
               'description': 3,
               'size': 4,
               'status': 5,
               'volume_name': 6}
    row_cls = RowSnapshot


@ui.register_ui(
    combobox_source=ui.ComboBox(By.NAME, 'snapshot_source'),
    combobox_type=ui.ComboBox(By.NAME, 'type'),
    field_description=ui.TextField(By.NAME, 'description'),
    field_name=ui.TextField(By.NAME, 'name'),
    field_size=ui.IntegerField(By.NAME, 'size'))
class FormCreateVolume(_ui.Form):
    """Form to create volume from snapshot."""


@ui.register_ui(
    button_delete_snapshots=ui.Button(By.ID,
                                      'volume_snapshots__action_delete'),
    form_create_volume=FormCreateVolume(By.CSS_SELECTOR,
                                        'form[action*="volumes/create"]'),
    form_edit_snapshot=FormCreateSnapshot(By.ID, 'update_snapshot_form'),
    table_snapshots=TableSnapshots(By.ID, 'volume_snapshots'))
class TabSnapshots(_ui.Tab):
    """Volume snapshots tab."""
Example #4
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from pom import ui
from selenium.webdriver.common.by import By

from stepler.horizon.app import ui as _ui

from .base import PageBase


@ui.register_ui(field_volumes=ui.IntegerField(By.NAME, 'volumes'),
                field_key_pairs=ui.IntegerField(By.NAME, 'key_pairs'),
                field_instances=ui.IntegerField(By.NAME, 'instances'))
class FormUpdateDefaults(_ui.Form):
    """Form to update defaults."""


@ui.register_ui(
    button_update_defaults=ui.Button(By.ID, 'quotas__action_update_defaults'),
    form_update_defaults=FormUpdateDefaults(By.CSS_SELECTOR,
                                            '[action*="update_defaults"]'),
    label_key_pairs=ui.UI(By.XPATH,
                          '//tr[@id="quotas__row__key_pairs"]/td[2]'),
    label_volumes=ui.UI(By.XPATH, '//tr[@id="quotas__row__volumes"]/td[2]'),
    label_instances=ui.UI(By.XPATH,
                          '//tr[@id="quotas__row__instances"]/td[2]'))
Example #5
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from pom import ui
from selenium.webdriver.common.by import By

from horizon_autotests.app import ui as _ui

from .base import PageBase


@ui.register_ui(field_volumes=ui.IntegerField(By.NAME, 'volumes'))
class FormUpdateDefaults(_ui.Form):
    """Form to update defaults."""


@ui.register_ui(
    button_update_defaults=ui.Button(By.ID, 'quotas__action_update_defaults'),
    form_update_defaults=FormUpdateDefaults(By.CSS_SELECTOR,
                                            '[action*="update_defaults"]'),
    label_volumes=ui.UI(By.CSS_SELECTOR,
                        'tr[data-display="volumes"] > td:nth-of-type(2)'))
class PageDefaults(PageBase):
    """Defaults page."""

    url = "/admin/defaults/"
    navigate_items = "Admin", "System", "Defaults"
Example #6
0
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from pom import ui
from selenium.webdriver.common.by import By

from stepler.horizon.app import ui as _ui

from .base import PageBase


@ui.register_ui(
    combobox_lang=ui.ComboBox(By.NAME, 'language'),
    combobox_timezone=ui.ComboBox(By.NAME, 'timezone'),
    field_items_per_page=ui.IntegerField(By.NAME, 'pagesize'),
    field_instance_log_length=ui.IntegerField(By.NAME, 'instance_log_length'))
class FormSettings(_ui.Form):
    """Form of settings."""


@ui.register_ui(form_settings=FormSettings(By.ID, 'user_settings_modal'))
class PageSettings(PageBase):
    """Settings page."""

    url = "/settings/"


@ui.register_ui(
    field_confirm_password=ui.TextField(By.NAME, 'confirm_password'),
    field_current_password=ui.TextField(By.NAME, 'current_password'),
Example #7
0
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from pom import ui
from selenium.webdriver.common.by import By

from stepler.horizon.app import ui as _ui

from .base import PageBase


@ui.register_ui(
    field_volumes=ui.IntegerField(By.NAME, 'volumes'))
class FormUpdateDefaults(_ui.Form):
    """Form to update defaults."""


@ui.register_ui(
    button_update_defaults=ui.Button(By.ID, 'quotas__action_update_defaults'),
    form_update_defaults=FormUpdateDefaults(
        By.CSS_SELECTOR, '[action*="update_defaults"]'),
    label_volumes=ui.UI(
        By.CSS_SELECTOR, 'tr[data-display="volumes"] > td:nth-of-type(2)'))
class PageDefaults(PageBase):
    """Defaults page."""

    url = "/admin/defaults/"
    navigate_items = "Admin", "System", "Defaults"