Beispiel #1
0
    def test_devicemanagement_router_zenossmaintenancewindow_delete(
            self, responses):
        responses_callback(responses)

        dmr = DeviceManagementRouter(url, headers, False)
        mw = dmr.get_maintenance_window('Server/TEST', 'TestAddWindow')
        resp = mw.delete()
        assert resp['data'] is None
Beispiel #2
0
    def test_devicemanagement_router_zenossmaintenancewindow_disable(
            self, responses):
        responses_callback(responses)

        dmr = DeviceManagementRouter(url, headers, False)
        mw = dmr.get_maintenance_window('Server/TEST', 'TestAddWindow')
        mw.enabled = True
        resp = mw.disable()
        assert resp
        assert mw.enabled is False
Beispiel #3
0
    def test_devicemanagement_router_zenossmaintenancewindow_update(
            self, responses):
        responses_callback(responses)

        dmr = DeviceManagementRouter(url, headers, False)
        mw = dmr.get_maintenance_window('Server/TEST', 'TestAddWindow')
        resp = mw.update(start_date='2017/11/21',
                         start_hours='12',
                         start_minutes='30',
                         duration_minutes='30',
                         occurrence='2nd',
                         days='Monday')
        assert resp
        assert mw.duration == "01:30:00"
        assert mw.start == 1511267400
        assert mw.startTime == "2017/11/21 12:30:00.000 UTC"