예제 #1
0
    def test_device_attributes_existence(self):
        nm_device = NMDbusDevice()
        nm_settings = NMDbusSettings()

        device_count = 0
        for device in nm_device.devices():
            assert device.interface is not None
            assert device.state is not None
            assert device.active_connection_path is not None
            assert device.connections_path is not None

            for connection_path in device.connections_path:
                settings_con = nm_settings.connection(connection_path)
                assert settings_con.connection.uuid is not None

            device_count += 1

        self.assertGreaterEqual(device_count, 1)
예제 #2
0
파일: nmdbus_test.py 프로젝트: EdDev/vdsm
    def test_device_attributes_existence(self):
        nm_device = NMDbusDevice()
        nm_settings = NMDbusSettings()

        device_count = 0
        for device in nm_device.devices():
            assert device.interface is not None
            assert device.state is not None
            assert device.active_connection_path is not None
            assert device.connections_path is not None

            for connection_path in device.connections_path:
                settings_con = nm_settings.connection(connection_path)
                assert settings_con.connection.uuid is not None

            device_count += 1

        self.assertGreaterEqual(device_count, 1)
예제 #3
0
파일: nmdbus_test.py 프로젝트: xin49/vdsm
    def test_device_attributes_existence(self):
        nm_device = NMDbusDevice()
        nm_settings = NMDbusSettings()

        device_count = 0
        iface = iface_name()
        with dummy_devices(1) as nics:
            with nm_connections(iface, IPV4ADDR, slaves=nics):
                for device in nm_device.devices():
                    try:
                        assert device.interface() is not None
                        assert device.state() is not None
                        assert device.active_connection_path() is not None
                        assert device.connections_path() is not None
                    except errors.NMPropertiesNotFoundError:
                        continue

                    for connection_path in device.connections_path():
                        settings_con = nm_settings.connection(connection_path)
                        assert settings_con.connection.uuid is not None

                    device_count += 1

        self.assertGreaterEqual(device_count, 1)
예제 #4
0
파일: nmdbus_test.py 프로젝트: nirs/vdsm
    def test_device_attributes_existence(self):
        nm_device = NMDbusDevice()
        nm_settings = NMDbusSettings()

        device_count = 0
        iface = iface_name()
        with dummy_devices(1) as nics:
            with nm_connections(iface, IPV4ADDR, slaves=nics):
                for device in nm_device.devices():
                    try:
                        assert device.interface() is not None
                        assert device.state() is not None
                        assert device.active_connection_path() is not None
                        assert device.connections_path() is not None
                    except errors.NMPropertiesNotFoundError:
                        continue

                    for connection_path in device.connections_path():
                        settings_con = nm_settings.connection(connection_path)
                        assert settings_con.connection.uuid is not None

                    device_count += 1

        self.assertGreaterEqual(device_count, 1)