File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 5
5
6
6
from airgun .entities .host import HostEntity
7
7
from airgun .navigation import NavigateStep , navigator
8
+ from airgun .views .fact import HostFactView
8
9
from airgun .views .host_new import (
9
10
AllAssignedRolesView ,
10
11
EditAnsibleRolesView ,
@@ -950,6 +951,15 @@ def remediate_with_insights(
950
951
view = RemediationView (self .browser )
951
952
view .remediate .click ()
952
953
954
+ def get_host_facts (self , entity_name ):
955
+ view = self .navigate_to (self , 'NewDetails' , entity_name = entity_name )
956
+ self .browser .plugin .ensure_page_safe ()
957
+ view .wait_displayed ()
958
+ self .browser .wait_for_element (view .dropdown , exception = False )
959
+ view .dropdown .item_select ('Facts' )
960
+ host_facts_view = HostFactView (self .browser )
961
+ return host_facts_view .table .read ()
962
+
953
963
954
964
@navigator .register (NewHostEntity , 'NewDetails' )
955
965
class ShowNewHostDetails (NavigateStep ):
Original file line number Diff line number Diff line change
1
+ from widgetastic .widget import Table , Text
2
+ from widgetastic_patternfly import BreadCrumb
3
+
4
+ from airgun .views .common import BaseLoggedInView , SearchableViewMixinPF4
5
+
6
+
7
+ class HostFactView (BaseLoggedInView , SearchableViewMixinPF4 ):
8
+ breadcrumb = BreadCrumb ()
9
+
10
+ table = Table (
11
+ './/table' ,
12
+ column_widgets = {
13
+ 'Name' : Text ("./a" ),
14
+ },
15
+ )
16
+
17
+ @property
18
+ def is_displayed (self ):
19
+ breadcrumb_loaded = self .browser .wait_for_element (self .breadcrumb , exception = False )
20
+ return breadcrumb_loaded and self .breadcrumb .read ().startswith ('Facts Values' )
You can’t perform that action at this time.
0 commit comments