Ejemplo n.º 1
0
def custom_widgets(request):
    ws = [
        MenuWidget(fauxfactory.gen_alphanumeric(),
                   description=fauxfactory.gen_alphanumeric(),
                   active=True,
                   shortcuts={
                       "Services / Catalogs": fauxfactory.gen_alphanumeric(),
                       "Clouds / Providers": fauxfactory.gen_alphanumeric(),
                   },
                   visibility="<To All Users>"),
        ReportWidget(fauxfactory.gen_alphanumeric(),
                     description=fauxfactory.gen_alphanumeric(),
                     active=True,
                     filter=[
                         "Events", "Operations",
                         "Operations VMs Powered On/Off for Last Week"
                     ],
                     columns=["VM Name", "Message"],
                     rows="10",
                     timer={
                         "run": "Hourly",
                         "hours": "Hour"
                     },
                     visibility="<To All Users>"),
        ChartWidget(
            fauxfactory.gen_alphanumeric(),
            description=fauxfactory.gen_alphanumeric(),
            active=True,
            filter=
            "Configuration Management/Virtual Machines/Vendor and Guest OS",
            timer={
                "run": "Hourly",
                "hours": "Hour"
            },
            visibility="<To All Users>"),
        RSSFeedWidget(fauxfactory.gen_alphanumeric(),
                      description=fauxfactory.gen_alphanumeric(),
                      active=True,
                      type="Internal",
                      feed="Administrative Events",
                      rows="8",
                      visibility="<To All Users>"),
    ]
    map(lambda w: w.create(), ws)  # create all widgets
    request.addfinalizer(
        lambda: map(lambda w: w.delete(), ws))  # Delete them after test
    return ws
Ejemplo n.º 2
0
def test_menuwidget_crud():
    w = MenuWidget(
        fauxfactory.gen_alphanumeric(),
        description=fauxfactory.gen_alphanumeric(),
        active=True,
        shortcuts={
            "Services / Catalogs": fauxfactory.gen_alphanumeric(),
            "Clouds / Providers": fauxfactory.gen_alphanumeric(),
        },
        visibility=["<By Role>",
                    sel.ByText("EvmRole-administrator")])
    w.create()
    with update(w):
        w.active = False
    w.delete()
Ejemplo n.º 3
0
def test_menuwidget_crud():
    w = MenuWidget(
        generate_random_string(),
        description=generate_random_string(),
        active=True,
        shortcuts={
            "Services / Catalogs": generate_random_string(),
            "Clouds / Providers": generate_random_string(),
        },
        visibility=["<By Role>", sel.ByText("EvmRole-administrator")]
    )
    w.create()
    with update(w):
        w.active = False
    w.delete()
Ejemplo n.º 4
0
def test_menuwidget_crud():
    w = MenuWidget(
        fauxfactory.gen_alphanumeric(),
        description=fauxfactory.gen_alphanumeric(),
        active=True,
        shortcuts={
            "Services / Catalogs": fauxfactory.gen_alphanumeric(),
            "Clouds / Providers": fauxfactory.gen_alphanumeric(),
        },
        visibility=["<By Role>", sel.ByText("EvmRole-administrator")]
    )
    w.create()
    with update(w):
        w.active = False
    w.delete()