Esempio n. 1
0
 def test_add_gui_item(self):
     gui1 = GuiItem('url1', 184)
     gui2 = GuiItem('url2', 200)
     test = GuiList([])
     test.add(gui1)
     test.add(gui2)
     assert len(test.guilist) == 2
     assert test.guilist[0].status == 184
     assert test.guilist[1].url == 'url2'
    def get_guis(cls) -> GuiItem:
        """Retrieve the status of the SO GUIs.

        Only one GUI is referenced for SO: SO monitor

        Return the list of GUIs
        """
        gui_url = settings.SO_MONITOR_GUI_SERVICE
        so_gui_response = cls.send_message("GET", "Get SO GUI Status", gui_url)
        guilist = GuiList([])
        guilist.add(GuiItem(gui_url, so_gui_response.status_code))
        return guilist
    def get_guis(cls) -> GuiItem:
        """Retrieve the status of the SDC GUIs.

        Only one GUI is referenced for SDC
        the SDC Front End

        Return the list of GUIs
        """
        gui_url = settings.SDC_GUI_SERVICE
        sdc_gui_response = cls.send_message("GET", "Get SDC GUI Status",
                                            gui_url)
        guilist = GuiList([])
        guilist.add(GuiItem(gui_url, sdc_gui_response.status_code))
        return guilist
Esempio n. 4
0
    def get_guis(cls) -> GuiItem:
        """Retrieve the status of the AAI GUIs.

        Only one GUI is referenced for AAI
        the AAI sparky GUI

        Return the list of GUIs
        """
        gui_url = settings.AAI_GUI_SERVICE
        aai_gui_response = cls.send_message("GET", "Get AAI GUI Status",
                                            gui_url)
        guilist = GuiList([])
        guilist.add(GuiItem(gui_url, aai_gui_response.status_code))
        return guilist
Esempio n. 5
0
    def get_guis(cls) -> GuiItem:
        """Retrieve the status of the CDS GUIs.

        Only one GUI is referenced for CDS: CDS UI

        Return the list of GUIs
        """
        gui_url = settings.CDS_GUI_SERVICE
        cds_gui_response = cls.send_message(
            "GET", "Get CDS GUI Status", gui_url)
        guilist = GuiList([])
        guilist.add(GuiItem(
            gui_url,
            cds_gui_response.status_code))
        return guilist
Esempio n. 6
0
    def get_guis(cls) -> GuiItem:
        """Retrieve the status of the SDNC GUIs.

        There are 2 GUIS
        - SDNC DG Builder
        - SDNC ODL

        Return the list of GUIs
        """
        guilist = GuiList([])
        url = settings.SDNC_DG_GUI_SERVICE
        response = cls.send_message("GET", "Get SDNC GUI DG Status", url)
        guilist.add(GuiItem(url, response.status_code))
        url = settings.SDNC_ODL_GUI_SERVICE
        response = cls.send_message("GET", "Get SDNC ODL GUI Status", url)
        guilist.add(GuiItem(url, response.status_code))
        return guilist
Esempio n. 7
0
 def test_add_bad_gui_item(self):
     with self.assertRaises(AttributeError):
         test = GuiList([])
         test.add('not a gui item object')
Esempio n. 8
0
 def test_create_bad_gui_list(self):
     with self.assertRaises(TypeError):
         list = GuiList(1, 2, 3)