Ejemplo n.º 1
0
    def afterSetUp(self):
        super(TestComponentIndexing, self).afterSetUp()
        self.devcat = self.dmd.Devices.deviceSearch
        self.layer2cat = self.dmd.ZenLinkManager._getCatalog(layer=2)
        self.layer3cat = self.dmd.ZenLinkManager._getCatalog(layer=3)

        self.devclass = self.dmd.Devices.createOrganizer(DEVCLASS)
        self.devclass2 = self.dmd.Devices.createOrganizer(DEVCLASS)

        # Control
        dummydev =  self.dmd.Devices.createInstance('dummydev')

        self.dev = self.devclass.createInstance('testdev')

        manage_addIpInterface(self.dev.os.interfaces, 'eth0', True)
        self.iface = self.dev.os.interfaces._getOb('eth0')
        self.iface._setPropValue('macaddress', MAC)
        self.iface.addIpAddress(IPADDR)
        self.ipaddress = self.iface.ipaddresses()[0]
        self.net = self.dmd.Networks.getNet(NET)
        
        manage_addWinService(self.dev.os.winservices,'wuauserv','test service')
        self.winService = self.dev.os.winservices._getOb('wuauserv')
Ejemplo n.º 2
0
    def afterSetUp(self):
        super(TestComponentIndexing, self).afterSetUp()
        self.model_catalog = IModelCatalogTool(self.dmd.Devices)
        self.layer2cat = self.model_catalog.layer2
        self.layer3cat = self.model_catalog.layer3

        self.devclass = self.dmd.Devices.createOrganizer(DEVCLASS)
        self.devclass2 = self.dmd.Devices.createOrganizer(DEVCLASS)

        # Control
        dummydev =  self.dmd.Devices.createInstance('dummydev')

        self.dev = self.devclass.createInstance('testdev')

        manage_addIpInterface(self.dev.os.interfaces, 'eth0', True)
        self.iface = self.dev.os.interfaces._getOb('eth0')
        self.iface._setPropValue('macaddress', MAC)
        self.iface.addIpAddress(IPADDR)
        self.ipaddress = self.iface.ipaddresses()[0]
        self.net = self.dmd.Networks.getNet(NET)
        
        manage_addWinService(self.dev.os.winservices,'wuauserv','test service')
        self.winService = self.dev.os.winservices._getOb('wuauserv')
Ejemplo n.º 3
0
    def afterSetUp(self):
        super(TestWinServiceConfig, self).afterSetUp()

        dev = manage_createDevice(self.dmd, "test-dev1",
                                  "/Server/Windows",
                                  manageIp="10.0.10.1")
        dev.zWmiMonitorIgnore = False
        winService = manage_addWinService(dev.os.winservices, 'wsvc', 'test service')
        winService.zMonitor = True
        winService.monitor = True
        winService.startMode = 'Auto'
        winService.index_object()
        
        self._testDev = dev
        self._deviceNames = [ "test-dev1" ]
        self._configService = WinServiceConfig(self.dmd, "localhost")