Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Registering a view in a new module is not listed as a destination #8210

@john-dupuy

Description

@john-dupuy

When you try to register a view in a new module, it is not picked up as a destination for what it is registered against. For instance, consider the following code:

@navigator.register(Server)
class MonitorAlertsAll(CFMENavigateStep):
    VIEW = MonitorAlertsAllView
    prerequisite = NavigateToSibling("LoggedIn")

    def step(self):
        self.prerequisite_view.navigation.select("Monitor","Alerts","All Alerts")

Running

In [1]: from cfme.utils.appliance.implementations.ui import navigator
In [2]: from cfme.base import Server
In [4]: x = navigator.list_destinations(Server)
In [5]: app = store.current_appliance
In [6]: y = app.server.list_destinations()['UI']

The destination (MonitorAlertsAll) does not appear in either x or y, unless the file is imported manually or from a file that has a reference to Server elsewhere. Note that this behavior is known, so this issue is really an enhancement. It would be nice to have the module be automatically imported, without having to register the view in a specific location.

This issue also highlights another behavior that is perhaps undesirable. Namely, continuing the code from above:

In [8]: x == y
Out[8]: False

So the destinations registered against the class Server are different than the destinations registered against the object store.current_appliance.server. It would be good to have these return equivalent destinations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions