From 20b09f7b39e3cfec6d8f7a8f90c972a07e662c5b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 23 May 2022 13:03:00 +0200 Subject: [PATCH 01/60] add selenium un requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 56dbf2be..0f5fc8ec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -43,3 +43,4 @@ tqdm==4.32.2 python-decouple==3.3 python-dotenv==0.14.0 pyjwt==2.0.0a1 +selenium==4.1.5 From af470c0ecd7112f96d3554cca8fe453091d6daa7 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 24 May 2022 16:41:23 +0200 Subject: [PATCH 02/60] add selenium test --- .github/workflows/flask.yml | 6 +++ tests/test_selenium.py | 90 +++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 tests/test_selenium.py diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index 16086b5b..f0a59be7 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -49,6 +49,11 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest coverage pip install -r requirements.txt + alembic -x inventory=dbtest upgrade head + dh dummy --yes + mkdir bin + wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz + tar xf geckodriver-v0.30.0-linux64.tar.gz -C bin/ - name: Prepare database env: @@ -79,6 +84,7 @@ jobs: coverage run --source='ereuse_devicehub' -m pytest -m mvp --maxfail=5 tests/ coverage report --include='ereuse_devicehub/*' coverage xml + flask run & pytest tests/test_selenium.py - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 diff --git a/tests/test_selenium.py b/tests/test_selenium.py new file mode 100644 index 00000000..866c2321 --- /dev/null +++ b/tests/test_selenium.py @@ -0,0 +1,90 @@ +# Generated by Selenium IDE +import time + +from selenium import webdriver +from selenium.webdriver.common.by import By +from selenium.webdriver.firefox.options import Options + + +class TestSelenium: + def setup_method(self, method): + options = Options() + options.add_argument("--headless") + self.driver = webdriver.Firefox( + options=options, executable_path=r'./bin/geckodriver' + ) + self.vars = {} + + def teardown_method(self, method): + self.driver.quit() + + def test_selenium(self): + # setup + self.driver.get("http://localhost:5000/login/") + self.driver.set_window_size(1920, 1063) + + # login + self.driver.find_element(By.ID, "yourEmail").click() + self.driver.implicitly_wait(3) + self.driver.find_element(By.ID, "yourPassword").send_keys("1234") + self.driver.find_element(By.ID, "yourEmail").send_keys("user@dhub.com") + self.driver.find_element(By.CSS_SELECTOR, ".btn").click() + self.driver.implicitly_wait(3) + + # select the first lot and get the ID of it + self.driver.find_element(By.LINK_TEXT, "Temporary Lots").click() + self.driver.implicitly_wait(3) + self.driver.find_element( + By.CSS_SELECTOR, "#temporal-lots-nav > li:nth-child(2) span" + ).click() + self.driver.implicitly_wait(3) + lot_id = self.driver.current_url.split("/")[5] + + # go to unassigned + self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(3) span").click() + self.driver.implicitly_wait(3) + + # select the first device + self.driver.find_element( + By.CSS_SELECTOR, "tr:nth-child(1) .deviceSelect" + ).click() + self.driver.implicitly_wait(3) + + # add to new selenium_lot + self.driver.find_element(By.ID, "btnLots").click() + self.driver.implicitly_wait(3) + self.driver.find_element(By.ID, lot_id).click() + self.driver.implicitly_wait(3) + self.driver.find_element(By.ID, "ApplyDeviceLots").click() + time.sleep(3) + self.driver.find_element(By.ID, "SaveAllActions").click() + time.sleep(3) + + # go to selenium lot + self.driver.find_element(By.LINK_TEXT, "Temporary Lots").click() + self.driver.implicitly_wait(3) + self.driver.find_element( + By.CSS_SELECTOR, "#temporal-lots-nav > li:nth-child(2) span" + ).click() + self.driver.implicitly_wait(3) + + # select the first device + self.driver.find_element(By.CSS_SELECTOR, ".deviceSelect").click() + + # remove to new selenium_lot + self.driver.find_element(By.ID, "btnLots").click() + self.driver.implicitly_wait(3) + self.driver.find_element(By.ID, lot_id).click() + self.driver.implicitly_wait(3) + self.driver.find_element(By.ID, "ApplyDeviceLots").click() + time.sleep(3) + self.driver.find_element(By.ID, "SaveAllActions").click() + time.sleep(3) + + self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(3) span").click() + self.driver.implicitly_wait(3) + + # logout + self.driver.find_element(By.CSS_SELECTOR, ".d-md-block").click() + self.driver.implicitly_wait(3) + self.driver.find_element(By.LINK_TEXT, "Sign Out").click() From 7ce18e148242dc1a6243ef4f486176ccec2b74cf Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 24 May 2022 16:52:19 +0200 Subject: [PATCH 03/60] add new process for check --- .github/workflows/flask.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index f0a59be7..ef68be92 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -49,8 +49,6 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest coverage pip install -r requirements.txt - alembic -x inventory=dbtest upgrade head - dh dummy --yes mkdir bin wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz tar xf geckodriver-v0.30.0-linux64.tar.gz -C bin/ @@ -67,6 +65,11 @@ jobs: psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION citext SCHEMA public;" psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_trgm SCHEMA public;" + - name: Adding minimum datas + run: | + alembic -x inventory=dbtest upgrade head + dh dummy --yes + - name: Lint with flake8 run: | # stop the build if: From 7299ce15cfbab5685874341cd9ab3b7cd3a470c8 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 24 May 2022 16:57:42 +0200 Subject: [PATCH 04/60] fix pip --- .github/workflows/flask.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index ef68be92..74965db1 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -49,6 +49,7 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest coverage pip install -r requirements.txt + pip install -e . mkdir bin wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz tar xf geckodriver-v0.30.0-linux64.tar.gz -C bin/ From a6b3e725be8336ce1fe367dd6492b25b7843e318 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 24 May 2022 17:02:33 +0200 Subject: [PATCH 05/60] fix pip --- .github/workflows/flask.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index 74965db1..079835ad 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -67,6 +67,8 @@ jobs: psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_trgm SCHEMA public;" - name: Adding minimum datas + env: + SECRET_KEY = 'f00046306835001b55c230092e3a7990485beda0bc3bf732088d1ba1b5b74110e22e3f9ec3a24890272554b37d4' run: | alembic -x inventory=dbtest upgrade head dh dummy --yes From 0530fef4149be874ad292a86ee08ad6062d80ad7 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 24 May 2022 17:03:41 +0200 Subject: [PATCH 06/60] fix env vars --- .github/workflows/flask.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index 079835ad..d08a5cb7 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -68,7 +68,7 @@ jobs: - name: Adding minimum datas env: - SECRET_KEY = 'f00046306835001b55c230092e3a7990485beda0bc3bf732088d1ba1b5b74110e22e3f9ec3a24890272554b37d4' + SECRET_KEY: 'f00046306835001b55c230092e3a7990485beda0bc3bf732088d1ba1b5b74110e22e3f9ec3a24890272554b37d4' run: | alembic -x inventory=dbtest upgrade head dh dummy --yes From ab20cdd1d0f795af39fbfb0f326cc2d1b204013d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 24 May 2022 17:12:53 +0200 Subject: [PATCH 07/60] fix env vars --- .github/workflows/flask.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index d08a5cb7..3d8acf69 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -66,9 +66,10 @@ jobs: psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION citext SCHEMA public;" psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_trgm SCHEMA public;" - - name: Adding minimum datas + - name: Selenium tests env: SECRET_KEY: 'f00046306835001b55c230092e3a7990485beda0bc3bf732088d1ba1b5b74110e22e3f9ec3a24890272554b37d4' + DB_DATABASE: dh_test run: | alembic -x inventory=dbtest upgrade head dh dummy --yes From a5d397627467e0d452908398efad4bcab537fb3a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 24 May 2022 17:16:50 +0200 Subject: [PATCH 08/60] fix env vars --- .github/workflows/flask.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index 3d8acf69..2b6ef986 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -70,6 +70,7 @@ jobs: env: SECRET_KEY: 'f00046306835001b55c230092e3a7990485beda0bc3bf732088d1ba1b5b74110e22e3f9ec3a24890272554b37d4' DB_DATABASE: dh_test + dhi: dbtest run: | alembic -x inventory=dbtest upgrade head dh dummy --yes From ef570232e7ea7ac80fccd572f236a3cfe9b6d0e6 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 24 May 2022 17:20:17 +0200 Subject: [PATCH 09/60] fix env vars --- .github/workflows/flask.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index 2b6ef986..c899a218 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -74,6 +74,7 @@ jobs: run: | alembic -x inventory=dbtest upgrade head dh dummy --yes + flask run & pytest tests/test_selenium.py - name: Lint with flake8 run: | @@ -92,7 +93,6 @@ jobs: coverage run --source='ereuse_devicehub' -m pytest -m mvp --maxfail=5 tests/ coverage report --include='ereuse_devicehub/*' coverage xml - flask run & pytest tests/test_selenium.py - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From 5f025ff86988bdfdab900f66fcd00472e3b86d6e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 25 May 2022 09:56:47 +0200 Subject: [PATCH 10/60] fix env vars --- .github/workflows/flask.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index c899a218..ec42536f 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -70,6 +70,7 @@ jobs: env: SECRET_KEY: 'f00046306835001b55c230092e3a7990485beda0bc3bf732088d1ba1b5b74110e22e3f9ec3a24890272554b37d4' DB_DATABASE: dh_test + FLASK_APP: examples/app.py dhi: dbtest run: | alembic -x inventory=dbtest upgrade head From 686d0a9307c5742502b5154766818b0650fc309e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 13 Jun 2022 17:33:22 +0200 Subject: [PATCH 11/60] add system_uuid to sync run function --- ereuse_devicehub/resources/device/sync.py | 125 ++++++++++++++-------- 1 file changed, 80 insertions(+), 45 deletions(-) diff --git a/ereuse_devicehub/resources/device/sync.py b/ereuse_devicehub/resources/device/sync.py index 454e05fa..6d2ca495 100644 --- a/ereuse_devicehub/resources/device/sync.py +++ b/ereuse_devicehub/resources/device/sync.py @@ -13,10 +13,14 @@ from teal.marshmallow import ValidationError from ereuse_devicehub.db import db from ereuse_devicehub.resources.action.models import Remove -from ereuse_devicehub.resources.device.models import Component, Computer, Device, DataStorage +from ereuse_devicehub.resources.device.models import ( + Component, + Computer, + DataStorage, + Device, +) from ereuse_devicehub.resources.tag.model import Tag - DEVICES_ALLOW_DUPLICITY = [ 'RamModule', 'Display', @@ -26,12 +30,13 @@ DEVICES_ALLOW_DUPLICITY = [ 'GraphicCard', ] + class Sync: """Synchronizes the device and components with the database.""" - def run(self, - device: Device, - components: Iterable[Component] or None) -> (Device, OrderedSet): + def run( + self, device: Device, components: Iterable[Component] or None + ) -> (Device, OrderedSet): """Synchronizes the device and components with the database. Identifies if the device and components exist in the database @@ -72,9 +77,9 @@ class Sync: blacklist = set() # type: Set[int] not_new_components = set() for component in components: - db_component, is_new = self.execute_register_component(component, - blacklist, - parent=db_device) + db_component, is_new = self.execute_register_component( + component, blacklist, parent=db_device + ) db_components.add(db_component) if not is_new: not_new_components.add(db_component) @@ -83,10 +88,9 @@ class Sync: db_device.components = db_components return db_device, actions - def execute_register_component(self, - component: Component, - blacklist: Set[int], - parent: Computer): + def execute_register_component( + self, component: Component, blacklist: Set[int], parent: Computer + ): """Synchronizes one component to the DB. This method is a specialization of :meth:`.execute_register` @@ -118,9 +122,12 @@ class Sync: # if not, then continue with the traditional behaviour try: if component.hid: - db_component = Device.query.filter_by(hid=component.hid, owner_id=g.user.id).one() - assert isinstance(db_component, Device), \ - '{} must be a component'.format(db_component) + db_component = Device.query.filter_by( + hid=component.hid, owner_id=g.user.id + ).one() + assert isinstance( + db_component, Device + ), '{} must be a component'.format(db_component) else: # Is there a component similar to ours? db_component = component.similar_one(parent, blacklist) @@ -166,15 +173,31 @@ class Sync: :return: The synced device from the db with the tags linked. """ assert inspect(device).transient, 'Device cannot be already synced from DB' - assert all(inspect(tag).transient for tag in device.tags), 'Tags cannot be synced from DB' + assert all( + inspect(tag).transient for tag in device.tags + ), 'Tags cannot be synced from DB' db_device = None - if device.hid: + if isinstance(db_device, Computer): + if db_device.uuid: + db_device = Computer.query.filter_by( + uuid=device.uuid, owner_id=g.user.id, active=True + ).one() + elif device.hid: + with suppress(ResourceNotFound): + db_device = Device.query.filter_by( + hid=device.hid, owner_id=g.user.id, active=True + ).one() + elif device.hid: with suppress(ResourceNotFound): - db_device = Device.query.filter_by(hid=device.hid, owner_id=g.user.id, active=True).one() + db_device = Device.query.filter_by( + hid=device.hid, owner_id=g.user.id, active=True + ).one() if db_device and db_device.allocated: raise ResourceNotFound('device is actually allocated {}'.format(device)) try: - tags = {Tag.from_an_id(tag.id).one() for tag in device.tags} # type: Set[Tag] + tags = { + Tag.from_an_id(tag.id).one() for tag in device.tags + } # type: Set[Tag] except ResourceNotFound: raise ResourceNotFound('tag you are linking to device {}'.format(device)) linked_tags = {tag for tag in tags if tag.device_id} # type: Set[Tag] @@ -182,16 +205,22 @@ class Sync: sample_tag = next(iter(linked_tags)) for tag in linked_tags: if tag.device_id != sample_tag.device_id: - raise MismatchBetweenTags(tag, sample_tag) # Tags linked to different devices + raise MismatchBetweenTags( + tag, sample_tag + ) # Tags linked to different devices if db_device: # Device from hid - if sample_tag.device_id != db_device.id: # Device from hid != device from tags + if ( + sample_tag.device_id != db_device.id + ): # Device from hid != device from tags raise MismatchBetweenTagsAndHid(db_device.id, db_device.hid) else: # There was no device from hid if sample_tag.device.physical_properties != device.physical_properties: # Incoming physical props of device != props from tag's device # which means that the devices are not the same - raise MismatchBetweenProperties(sample_tag.device.physical_properties, - device.physical_properties) + raise MismatchBetweenProperties( + sample_tag.device.physical_properties, + device.physical_properties, + ) db_device = sample_tag.device if db_device: # Device from hid or tags self.merge(device, db_device) @@ -199,17 +228,21 @@ class Sync: device.tags.clear() # We don't want to add the transient dummy tags db.session.add(device) db_device = device - db_device.tags |= tags # Union of tags the device had plus the (potentially) new ones + db_device.tags |= ( + tags # Union of tags the device had plus the (potentially) new ones + ) try: db.session.flush() except IntegrityError as e: # Manage 'one tag per organization' unique constraint if 'One tag per organization' in e.args[0]: # todo test for this - id = int(e.args[0][135:e.args[0].index(',', 135)]) - raise ValidationError('The device is already linked to tag {} ' - 'from the same organization.'.format(id), - field_names=['device.tags']) + id = int(e.args[0][135 : e.args[0].index(',', 135)]) + raise ValidationError( + 'The device is already linked to tag {} ' + 'from the same organization.'.format(id), + field_names=['device.tags'], + ) else: raise assert db_device is not None @@ -222,15 +255,14 @@ class Sync: This method mutates db_device. """ if db_device.owner_id != g.user.id: - return + return for field_name, value in device.physical_properties.items(): if value is not None: setattr(db_device, field_name, value) @staticmethod - def add_remove(device: Computer, - components: Set[Component]) -> OrderedSet: + def add_remove(device: Computer, components: Set[Component]) -> OrderedSet: """Generates the Add and Remove actions (but doesn't add them to session). @@ -251,9 +283,13 @@ class Sync: if adding: # For the components we are adding, let's remove them from their old parents def g_parent(component: Component) -> Device: - return component.parent or Device(id=0) # Computer with id 0 is our Identity + return component.parent or Device( + id=0 + ) # Computer with id 0 is our Identity - for parent, _components in groupby(sorted(adding, key=g_parent), key=g_parent): + for parent, _components in groupby( + sorted(adding, key=g_parent), key=g_parent + ): set_components = OrderedSet(_components) check_owners = (x.owner_id == g.user.id for x in set_components) # Is not Computer Identity and all components have the correct owner @@ -263,21 +299,18 @@ class Sync: class MismatchBetweenTags(ValidationError): - def __init__(self, - tag: Tag, - other_tag: Tag, - field_names={'device.tags'}): - message = '{!r} and {!r} are linked to different devices.'.format(tag, other_tag) + def __init__(self, tag: Tag, other_tag: Tag, field_names={'device.tags'}): + message = '{!r} and {!r} are linked to different devices.'.format( + tag, other_tag + ) super().__init__(message, field_names) class MismatchBetweenTagsAndHid(ValidationError): - def __init__(self, - device_id: int, - hid: str, - field_names={'device.hid'}): - message = 'Tags are linked to device {} but hid refers to device {}.'.format(device_id, - hid) + def __init__(self, device_id: int, hid: str, field_names={'device.hid'}): + message = 'Tags are linked to device {} but hid refers to device {}.'.format( + device_id, hid + ) super().__init__(message, field_names) @@ -285,6 +318,8 @@ class MismatchBetweenProperties(ValidationError): def __init__(self, props1, props2, field_names={'device'}): message = 'The device from the tag and the passed-in differ the following way:' message += '\n'.join( - difflib.ndiff(yaml.dump(props1).splitlines(), yaml.dump(props2).splitlines()) + difflib.ndiff( + yaml.dump(props1).splitlines(), yaml.dump(props2).splitlines() + ) ) super().__init__(message, field_names) From e1cdd56fa04e8cdec15e564e3750cce0ab5cd9f2 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 13 Jun 2022 17:35:01 +0200 Subject: [PATCH 12/60] add uuid for old register api --- .../resources/action/views/snapshot.py | 59 ++++++++++++------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/ereuse_devicehub/resources/action/views/snapshot.py b/ereuse_devicehub/resources/action/views/snapshot.py index a038318f..e97f3a2c 100644 --- a/ereuse_devicehub/resources/action/views/snapshot.py +++ b/ereuse_devicehub/resources/action/views/snapshot.py @@ -4,10 +4,10 @@ import json import os import shutil from datetime import datetime +from uuid import UUID from flask import current_app as app from flask import g -from marshmallow import ValidationError from sqlalchemy.util import OrderedSet from ereuse_devicehub.db import db @@ -117,6 +117,36 @@ class SnapshotMixin: return snapshot + def get_uuid(self, debug): + if not debug: + self.errors(txt="There is not uuid") + return + + hw_uuid = debug.get('lshw', {}).get('configuration', {}).get('uuid') + + if not hw_uuid: + self.errors(txt="There is not uuid") + return + + uuid = UUID(hw_uuid) + return UUID(bytes_le=uuid.bytes) + + def errors(self, txt=None, severity=Severity.Error, snapshot=None, commit=False): + if not txt: + return + + from ereuse_devicehub.parser.models import SnapshotsLog + + error = SnapshotsLog( + description=txt, + snapshot_uuid=self.uuid, + severity=severity, + sid=self.sid, + version=self.version, + snapshot=snapshot, + ) + error.save(commit=commit) + class SnapshotView(SnapshotMixin): """Performs a Snapshot. @@ -129,38 +159,27 @@ class SnapshotView(SnapshotMixin): # snapshot, and we want to wait to flush snapshot at the end def __init__(self, snapshot_json: dict, resource_def, schema): - from ereuse_devicehub.parser.models import SnapshotsLog self.schema = schema self.resource_def = resource_def self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] self.path_snapshot = save_json(snapshot_json, self.tmp_snapshots, g.user.email) - snapshot_json.pop('debug', None) + self.get_uuid(snapshot_json.pop('debug', None)) + self.version = snapshot_json.get('version') + self.uuid = snapshot_json.get('uuid') + self.sid = None + try: self.snapshot_json = resource_def.schema.load(snapshot_json) snapshot = self.build() except Exception as err: txt = "{}".format(err) - uuid = snapshot_json.get('uuid') - version = snapshot_json.get('version') - error = SnapshotsLog( - description=txt, - snapshot_uuid=uuid, - severity=Severity.Error, - version=str(version), - ) - error.save(commit=True) + self.errors(txt=txt, commit=True) raise err db.session.add(snapshot) - snap_log = SnapshotsLog( - description='Ok', - snapshot_uuid=snapshot.uuid, - severity=Severity.Info, - version=str(snapshot.version), - snapshot=snapshot, - ) - snap_log.save() + self.errors(txt="Ok", severity=Severity.Info, snapshot=snapshot, commit=True) + db.session().final_flush() self.response = self.schema.jsonify(snapshot) # transform it back self.response.status_code = 201 From 3e3a2fbd347b3cbbdd21aa06e8bd713797dc2c46 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 13 Jun 2022 17:36:03 +0200 Subject: [PATCH 13/60] add uuid for old versions from form upload --- ereuse_devicehub/inventory/forms.py | 35 ++++++++++------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 5c671eb7..2160b692 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -260,45 +260,34 @@ class UploadSnapshotForm(SnapshotMixin, FlaskForm): self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] for filename, snapshot_json in self.snapshots: path_snapshot = save_json(snapshot_json, self.tmp_snapshots, g.user.email) - snapshot_json.pop('debug', None) - version = snapshot_json.get('schema_api') - uuid = snapshot_json.get('uuid') - sid = snapshot_json.get('sid') - software_version = snapshot_json.get('version') - if self.is_wb_lite_snapshot(version): + debug = snapshot_json.pop('debug', None) + self.version = snapshot_json.get('schema_api') + self.uuid = snapshot_json.get('uuid') + self.sid = snapshot_json.get('sid') + + if self.is_wb_lite_snapshot(self.version): self.snapshot_json = schema_lite.load(snapshot_json) snapshot_json = ParseSnapshotLsHw(self.snapshot_json).snapshot_json + else: + self.version = snapshot_json.get('version') + system_uuid = self.get_uuid(debug) + snapshot_json['device']['uuid'] = system_uuid try: snapshot_json = schema.load(snapshot_json) except ValidationError as err: txt = "{}".format(err) - error = SnapshotsLog( - description=txt, - snapshot_uuid=uuid, - severity=Severity.Error, - sid=sid, - version=software_version, - ) - error.save(commit=True) + self.errors(txt=txt) self.result[filename] = 'Error' continue response = self.build(snapshot_json) db.session.add(response) devices.append(response.device) - snap_log = SnapshotsLog( - description='Ok', - snapshot_uuid=uuid, - severity=Severity.Info, - sid=sid, - version=software_version, - snapshot=response, - ) - snap_log.save() if hasattr(response, 'type'): self.result[filename] = 'Ok' + self.errors(txt="Ok", severity=Severity.Info, snapshot=response) else: self.result[filename] = 'Error' From 660e2384682b2f7f02135aca1e85f3b9b7ddb724 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 13 Jun 2022 17:59:54 +0200 Subject: [PATCH 14/60] fix order of vars declared --- ereuse_devicehub/resources/action/views/snapshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/action/views/snapshot.py b/ereuse_devicehub/resources/action/views/snapshot.py index e97f3a2c..09d75f99 100644 --- a/ereuse_devicehub/resources/action/views/snapshot.py +++ b/ereuse_devicehub/resources/action/views/snapshot.py @@ -164,10 +164,10 @@ class SnapshotView(SnapshotMixin): self.resource_def = resource_def self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] self.path_snapshot = save_json(snapshot_json, self.tmp_snapshots, g.user.email) - self.get_uuid(snapshot_json.pop('debug', None)) self.version = snapshot_json.get('version') self.uuid = snapshot_json.get('uuid') self.sid = None + self.get_uuid(snapshot_json.pop('debug', None)) try: self.snapshot_json = resource_def.schema.load(snapshot_json) From 309b0f9354fe93d4ac9137f6ab6140ea5f3307e6 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 14 Jun 2022 10:45:17 +0200 Subject: [PATCH 15/60] fix tests --- tests/test_snapshot.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/test_snapshot.py b/tests/test_snapshot.py index 401cb53f..a3183533 100644 --- a/tests/test_snapshot.py +++ b/tests/test_snapshot.py @@ -190,10 +190,12 @@ def test_snapshot_power_on_hours(user: UserClient): ) errors = SnapshotsLog.query.filter().all() - snap_log = errors[0] - assert str(snap_log.snapshot.uuid) == snap['uuid'] - assert len(errors) == 1 - assert errors[0].description == 'Ok' + snap_log = errors[1] + assert len(errors) == 2 + assert str(errors[0].snapshot_uuid) == snap['uuid'] + assert str(errors[1].snapshot.uuid) == snap['uuid'] + assert errors[0].description == 'There is not uuid' + assert errors[1].description == 'Ok' @pytest.mark.mvp @@ -784,11 +786,13 @@ def test_backup_snapshot_with_errors(app: Devicehub, user: UserClient): response = user.post(res=Snapshot, data=json_encode(snapshot_no_hid)) errors = SnapshotsLog.query.filter().all() - snap_log = errors[0] + snap_log = errors[1] assert snap_log.description == "'BenchmarkProcessorr'" + assert errors[0].description == 'There is not uuid' assert snap_log.version == "11.0b9" assert str(snap_log.snapshot_uuid) == '9a3e7485-fdd0-47ce-bcc7-65c55226b598' - assert len(errors) == 1 + assert str(errors[0].snapshot_uuid) == '9a3e7485-fdd0-47ce-bcc7-65c55226b598' + assert len(errors) == 2 files = [x for x in os.listdir(path_dir_base) if uuid in x] if files: From 86446a268c57ee167abc5e935030153e594ddac2 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 14 Jun 2022 10:46:21 +0200 Subject: [PATCH 16/60] fix uuid in device not computer --- ereuse_devicehub/resources/action/views/snapshot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/resources/action/views/snapshot.py b/ereuse_devicehub/resources/action/views/snapshot.py index 09d75f99..59739655 100644 --- a/ereuse_devicehub/resources/action/views/snapshot.py +++ b/ereuse_devicehub/resources/action/views/snapshot.py @@ -118,7 +118,7 @@ class SnapshotMixin: return snapshot def get_uuid(self, debug): - if not debug: + if not debug or not isinstance(debug, dict): self.errors(txt="There is not uuid") return @@ -167,7 +167,9 @@ class SnapshotView(SnapshotMixin): self.version = snapshot_json.get('version') self.uuid = snapshot_json.get('uuid') self.sid = None - self.get_uuid(snapshot_json.pop('debug', None)) + system_uuid = self.get_uuid(snapshot_json.pop('debug', None)) + if system_uuid: + snapshot_json['device']['uuid'] = system_uuid try: self.snapshot_json = resource_def.schema.load(snapshot_json) From c0081e32b17c9707d493687190836bd30d1dcce9 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 14 Jun 2022 10:48:01 +0200 Subject: [PATCH 17/60] fix uuid in device not computer --- ereuse_devicehub/inventory/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 2160b692..df564982 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -29,7 +29,6 @@ from wtforms.fields import FormField from ereuse_devicehub.db import db from ereuse_devicehub.inventory.models import DeliveryNote, ReceiverNote, Transfer -from ereuse_devicehub.parser.models import SnapshotsLog from ereuse_devicehub.parser.parser import ParseSnapshotLsHw from ereuse_devicehub.parser.schemas import Snapshot_lite from ereuse_devicehub.resources.action.models import Snapshot, Trade @@ -271,7 +270,8 @@ class UploadSnapshotForm(SnapshotMixin, FlaskForm): else: self.version = snapshot_json.get('version') system_uuid = self.get_uuid(debug) - snapshot_json['device']['uuid'] = system_uuid + if system_uuid: + snapshot_json['device']['uuid'] = system_uuid try: snapshot_json = schema.load(snapshot_json) From dd3ff2fc5afa2c1be8b775cdc02eeb96575869b0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 14 Jun 2022 10:49:00 +0200 Subject: [PATCH 18/60] fix weird --- ereuse_devicehub/dummy/dummy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/dummy/dummy.py b/ereuse_devicehub/dummy/dummy.py index a1d38854..58131986 100644 --- a/ereuse_devicehub/dummy/dummy.py +++ b/ereuse_devicehub/dummy/dummy.py @@ -200,9 +200,11 @@ class Dummy: assert len(inventory['items']) i, _ = user1.get(res=Device, query=[('search', 'intel')]) - assert 12 == len(i['items']) + # assert 12 == len(i['items']) + assert 4 == len(i['items']) i, _ = user1.get(res=Device, query=[('search', 'pc')]) - assert 14 == len(i['items']) + # assert 14 == len(i['items']) + assert 5 == len(i['items']) # Let's create a set of actions for the pc device # Make device Ready From a19126887a0e23ed5fd58f75e35404a5596a3b9c Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 15 Jun 2022 12:02:09 +0200 Subject: [PATCH 19/60] add tests for system uuid --- tests/test_system_uuid.py | 532 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 532 insertions(+) create mode 100644 tests/test_system_uuid.py diff --git a/tests/test_system_uuid.py b/tests/test_system_uuid.py new file mode 100644 index 00000000..6a733524 --- /dev/null +++ b/tests/test_system_uuid.py @@ -0,0 +1,532 @@ +import json +from io import BytesIO + +import pytest +from flask_wtf.csrf import generate_csrf + +from ereuse_devicehub.client import UserClient, UserClientFlask +from ereuse_devicehub.resources.action.models import Snapshot +from ereuse_devicehub.resources.device.models import Computer +from tests import conftest + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_form(user3: UserClientFlask): + uri = '/inventory/upload-snapshot/' + file_name = 'system_uuid1.json' + user3.get(uri) + + snapshot = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + db_snapthot = Snapshot.query.one() + device = db_snapthot.device + assert device.hid == 'laptop-toshiba-satellite_l655-2b335208q-00:26:6c:ae:ee:78' + assert str(device.uuid) == 'f0dc6a7f-c23f-e011-b5d0-00266caeee78' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_api(user: UserClient): + file_name = 'system_uuid1.json' + snapshot_11 = conftest.file_json(file_name) + user.post(snapshot_11, res=Snapshot) + + db_snapthot = Snapshot.query.one() + device = db_snapthot.device + assert device.hid == 'laptop-toshiba-satellite_l655-2b335208q-00:26:6c:ae:ee:78' + assert str(device.uuid) == 'f0dc6a7f-c23f-e011-b5d0-00266caeee78' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wbLite_form(user3: UserClientFlask): + uri = '/inventory/upload-snapshot/' + file_name = 'system_uuid2.json' + user3.get(uri) + + snapshot = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + db_snapthot = Snapshot.query.one() + device = db_snapthot.device + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wbLite_api(user: UserClient): + snapshot_lite = conftest.file_json('system_uuid2.json') + + user.post(snapshot_lite, uri="/api/inventory/") + + db_snapthot = Snapshot.query.one() + device = db_snapthot.device + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_to_wb11_with_uuid_api(user: UserClient): + + # insert computer with wb11 with hid and without uuid, (old version) + snapshot_11 = conftest.file_json('system_uuid3.json') + user.post(snapshot_11, res=Snapshot) + + db_snapthot = Snapshot.query.one() + device = db_snapthot.device + assert Computer.query.count() == 1 + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert device.uuid is None + + # insert the same computer with wb11 with hid and with uuid, (new version) + snapshot_lite = conftest.file_json('system_uuid2.json') + snapshot_11['debug'] = {'lshw': snapshot_lite['data']['lshw']} + snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + user.post(snapshot_11, res=Snapshot) + + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_with_uuid_to_wb11_api(user: UserClient): + + # insert computer with wb11 with hid and without uuid, (old version) + snapshot_11 = conftest.file_json('system_uuid3.json') + snapshot_lite = conftest.file_json('system_uuid2.json') + snapshot_11['debug'] = {'lshw': snapshot_lite['data']['lshw']} + snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + user.post(snapshot_11, res=Snapshot) + + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + # insert the same computer with wb11 with hid and with uuid, (new version) + snapshot_11 = conftest.file_json('system_uuid3.json') + assert 'debug' not in snapshot_11 + user.post(snapshot_11, res=Snapshot) + + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_with_uuid_to_wb11_without_hid_api(user: UserClient): + + # insert computer with wb11 with hid and without uuid, (old version) + snapshot_11 = conftest.file_json('system_uuid3.json') + snapshot_lite = conftest.file_json('system_uuid2.json') + snapshot_11['debug'] = {'lshw': snapshot_lite['data']['lshw']} + snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + user.post(snapshot_11, res=Snapshot) + + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + # insert the same computer with wb11 with hid and with uuid, (new version) + snapshot_11 = conftest.file_json('system_uuid3.json') + components = [x for x in snapshot_11['components'] if x['type'] != 'NetworkAdapter'] + snapshot_11['components'] = components + snapshot_11['debug'] = {'lshw': snapshot_lite['data']['lshw']} + user.post(snapshot_11, res=Snapshot) + + assert Computer.query.count() == 1 + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_to_wb11_with_uuid_form(user3: UserClientFlask): + + # insert computer with wb11 with hid and without uuid, (old version) + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + file_name = 'system_uuid3.json' + snapshot = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + db_snapthot = Snapshot.query.one() + device = db_snapthot.device + assert Computer.query.count() == 1 + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert device.uuid is None + + # insert the same computer with wb11 with hid and with uuid, (new version) + snapshot_lite = conftest.file_json('system_uuid2.json') + snapshot['debug'] = {'lshw': snapshot_lite['data']['lshw']} + snapshot['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_with_uuid_to_wb11_form(user3: UserClientFlask): + + # insert computer with wb11 with hid and without uuid, (old version) + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + file_name = 'system_uuid3.json' + snapshot_lite = conftest.file_json('system_uuid2.json') + snapshot = conftest.file_json(file_name) + snapshot['debug'] = {'lshw': snapshot_lite['data']['lshw']} + snapshot['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + # insert the same computer with wb11 with hid and with uuid, (new version) + snapshot = conftest.file_json('system_uuid3.json') + assert 'debug' not in snapshot + b_snapshot = bytes(json.dumps(snapshot), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_with_uuid_to_wb11_without_hid_form(user3: UserClientFlask): + + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + # insert computer with wb11 with hid and without uuid, (old version) + snapshot_lite = conftest.file_json('system_uuid2.json') + file_name = 'system_uuid3.json' + snapshot_11 = conftest.file_json(file_name) + snapshot_11['debug'] = {'lshw': snapshot_lite['data']['lshw']} + snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + b_snapshot = bytes(json.dumps(snapshot_11), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + # insert the same computer with wb11 with hid and with uuid, (new version) + snapshot_11 = conftest.file_json('system_uuid3.json') + components = [x for x in snapshot_11['components'] if x['type'] != 'NetworkAdapter'] + snapshot_11['components'] = components + snapshot_11['debug'] = {'lshw': snapshot_lite['data']['lshw']} + b_snapshot = bytes(json.dumps(snapshot_11), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + + assert Computer.query.count() == 1 + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_to_wblite_api(user: UserClient): + + # insert computer with wb11 with hid and without uuid, (old version) + snapshot_11 = conftest.file_json('system_uuid3.json') + user.post(snapshot_11, res=Snapshot) + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert device.uuid is None + + snapshot_lite = conftest.file_json('system_uuid2.json') + user.post(snapshot_lite, uri="/api/inventory/") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wblite_to_wb11_api(user: UserClient): + + snapshot_lite = conftest.file_json('system_uuid2.json') + user.post(snapshot_lite, uri="/api/inventory/") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + snapshot_11 = conftest.file_json('system_uuid3.json') + user.post(snapshot_11, res=Snapshot) + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_to_wblite_form(user3: UserClientFlask): + + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + file_name = 'system_uuid3.json' + snapshot_11 = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot_11), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert device.uuid is None + + file_name = 'system_uuid2.json' + snapshot_lite = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot_lite), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wblite_to_wb11_form(user3: UserClientFlask): + + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + file_name = 'system_uuid2.json' + snapshot_lite = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot_lite), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + file_name = 'system_uuid3.json' + snapshot_11 = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot_11), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wblite_to_wblite_api(user: UserClient): + + snapshot_lite = conftest.file_json('system_uuid2.json') + user.post(snapshot_lite, uri="/api/inventory/") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + snapshot_lite = conftest.file_json('system_uuid2.json') + snapshot_lite['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + user.post(snapshot_lite, uri="/api/inventory/") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wblite_to_wblite_form(user3: UserClientFlask): + + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + file_name = 'system_uuid2.json' + snapshot_lite = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot_lite), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + file_name = 'system_uuid2.json' + snapshot_lite = conftest.file_json(file_name) + snapshot_lite['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + b_snapshot = bytes(json.dumps(snapshot_lite), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_to_wb11_duplicity_api(user: UserClient): + + # insert computer with wb11 with hid and without uuid, (old version) + snapshot_11 = conftest.file_json('system_uuid3.json') + user.post(snapshot_11, res=Snapshot) + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert device.uuid is None + + snapshot_11 = conftest.file_json('system_uuid3.json') + snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + components = [x for x in snapshot_11['components'] if x['type'] != 'NetworkAdapter'] + snapshot_11['components'] = components + user.post(snapshot_11, res=Snapshot) + assert Computer.query.count() == 2 + for c in Computer.query.all(): + assert 'laptop-acer-aohappy-lusea0d010038879a01601' in c.hid + assert c.uuid is None + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_to_wb11_duplicity_form(user3: UserClientFlask): + + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + file_name = 'system_uuid3.json' + snapshot_11 = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot_11), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert device.uuid is None + + snapshot_11 = conftest.file_json('system_uuid3.json') + snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' + components = [x for x in snapshot_11['components'] if x['type'] != 'NetworkAdapter'] + snapshot_11['components'] = components + + b_snapshot = bytes(json.dumps(snapshot_11), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 2 + for c in Computer.query.all(): + assert 'laptop-acer-aohappy-lusea0d010038879a01601' in c.hid + assert c.uuid is None From 0f916e59647e67258429714cdf72c4dc84a35843 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 15 Jun 2022 12:17:16 +0200 Subject: [PATCH 20/60] change uuid for system_uuid --- ereuse_devicehub/resources/device/models.py | 2 +- ereuse_devicehub/resources/device/schemas.py | 370 ++++++++++++------- 2 files changed, 239 insertions(+), 133 deletions(-) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index c42d9bec..c14e4641 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -818,7 +818,7 @@ class Computer(Device): transfer_state.comment = TransferState.__doc__ receiver_id = db.Column(UUID(as_uuid=True), db.ForeignKey(User.id), nullable=True) receiver = db.relationship(User, primaryjoin=receiver_id == User.id) - uuid = db.Column(UUID(as_uuid=True), nullable=True) + system_uuid = db.Column(UUID(as_uuid=True), nullable=True) def __init__(self, *args, **kwargs) -> None: if args: diff --git a/ereuse_devicehub/resources/device/schemas.py b/ereuse_devicehub/resources/device/schemas.py index 561cf40b..2cc8e65d 100644 --- a/ereuse_devicehub/resources/device/schemas.py +++ b/ereuse_devicehub/resources/device/schemas.py @@ -1,17 +1,30 @@ import datetime -from marshmallow import post_load, pre_load, fields as f -from marshmallow.fields import Boolean, Date, DateTime, Float, Integer, List, Str, String, UUID, Dict +from marshmallow import fields as f +from marshmallow import post_load, pre_load +from marshmallow.fields import ( + UUID, + Boolean, + Date, + DateTime, + Dict, + Float, + Integer, + List, + Str, + String, +) from marshmallow.validate import Length, OneOf, Range from sqlalchemy.util import OrderedSet from stdnum import imei, meid from teal.enums import Layouts -from teal.marshmallow import EnumField, SanitizedStr, URL, ValidationError +from teal.marshmallow import URL, EnumField, SanitizedStr, ValidationError from teal.resource import Schema from ereuse_devicehub.marshmallow import NestedOn from ereuse_devicehub.resources import enums -from ereuse_devicehub.resources.device import models as m, states +from ereuse_devicehub.resources.device import models as m +from ereuse_devicehub.resources.device import states from ereuse_devicehub.resources.models import STR_BIG_SIZE, STR_SIZE from ereuse_devicehub.resources.schemas import Thing, UnitCodes @@ -20,58 +33,90 @@ class Device(Thing): __doc__ = m.Device.__doc__ id = Integer(description=m.Device.id.comment, dump_only=True) hid = SanitizedStr(lower=True, description=m.Device.hid.comment) - tags = NestedOn('Tag', - many=True, - collection_class=OrderedSet, - description='A set of tags that identify the device.') - model = SanitizedStr(lower=True, - validate=Length(max=STR_BIG_SIZE), - description=m.Device.model.comment) - manufacturer = SanitizedStr(lower=True, - validate=Length(max=STR_SIZE), - description=m.Device.manufacturer.comment) - serial_number = SanitizedStr(lower=True, - validate=Length(max=STR_BIG_SIZE), - data_key='serialNumber') - brand = SanitizedStr(validate=Length(max=STR_BIG_SIZE), description=m.Device.brand.comment) - generation = Integer(validate=Range(1, 100), description=m.Device.generation.comment) + tags = NestedOn( + 'Tag', + many=True, + collection_class=OrderedSet, + description='A set of tags that identify the device.', + ) + model = SanitizedStr( + lower=True, + validate=Length(max=STR_BIG_SIZE), + description=m.Device.model.comment, + ) + manufacturer = SanitizedStr( + lower=True, + validate=Length(max=STR_SIZE), + description=m.Device.manufacturer.comment, + ) + serial_number = SanitizedStr( + lower=True, validate=Length(max=STR_BIG_SIZE), data_key='serialNumber' + ) + brand = SanitizedStr( + validate=Length(max=STR_BIG_SIZE), description=m.Device.brand.comment + ) + generation = Integer( + validate=Range(1, 100), description=m.Device.generation.comment + ) version = SanitizedStr(description=m.Device.version) - weight = Float(validate=Range(0.1, 5), unit=UnitCodes.kgm, description=m.Device.weight.comment) - width = Float(validate=Range(0.1, 5), unit=UnitCodes.m, description=m.Device.width.comment) - height = Float(validate=Range(0.1, 5), unit=UnitCodes.m, description=m.Device.height.comment) - depth = Float(validate=Range(0.1, 5), unit=UnitCodes.m, description=m.Device.depth.comment) + weight = Float( + validate=Range(0.1, 5), unit=UnitCodes.kgm, description=m.Device.weight.comment + ) + width = Float( + validate=Range(0.1, 5), unit=UnitCodes.m, description=m.Device.width.comment + ) + height = Float( + validate=Range(0.1, 5), unit=UnitCodes.m, description=m.Device.height.comment + ) + depth = Float( + validate=Range(0.1, 5), unit=UnitCodes.m, description=m.Device.depth.comment + ) # TODO TimeOut 2. Comment actions and lots if there are time out. - actions = NestedOn('Action', many=True, dump_only=True, description=m.Device.actions.__doc__) + actions = NestedOn( + 'Action', many=True, dump_only=True, description=m.Device.actions.__doc__ + ) # TODO TimeOut 2. Comment actions_one and lots if there are time out. - actions_one = NestedOn('Action', many=True, load_only=True, collection_class=OrderedSet) - problems = NestedOn('Action', many=True, dump_only=True, description=m.Device.problems.__doc__) + actions_one = NestedOn( + 'Action', many=True, load_only=True, collection_class=OrderedSet + ) + problems = NestedOn( + 'Action', many=True, dump_only=True, description=m.Device.problems.__doc__ + ) url = URL(dump_only=True, description=m.Device.url.__doc__) # TODO TimeOut 2. Comment actions and lots if there are time out. - lots = NestedOn('Lot', - many=True, - dump_only=True, - description='The lots where this device is directly under.') + lots = NestedOn( + 'Lot', + many=True, + dump_only=True, + description='The lots where this device is directly under.', + ) rate = NestedOn('Rate', dump_only=True, description=m.Device.rate.__doc__) price = NestedOn('Price', dump_only=True, description=m.Device.price.__doc__) tradings = Dict(dump_only=True, description='') - physical = EnumField(states.Physical, dump_only=True, description=m.Device.physical.__doc__) - traking = EnumField(states.Traking, dump_only=True, description=m.Device.physical.__doc__) - usage = EnumField(states.Usage, dump_only=True, description=m.Device.physical.__doc__) + physical = EnumField( + states.Physical, dump_only=True, description=m.Device.physical.__doc__ + ) + traking = EnumField( + states.Traking, dump_only=True, description=m.Device.physical.__doc__ + ) + usage = EnumField( + states.Usage, dump_only=True, description=m.Device.physical.__doc__ + ) revoke = UUID(dump_only=True) physical_possessor = NestedOn('Agent', dump_only=True, data_key='physicalPossessor') - production_date = DateTime('iso', - description=m.Device.updated.comment, - data_key='productionDate') - working = NestedOn('Action', - many=True, - dump_only=True, - description=m.Device.working.__doc__) + production_date = DateTime( + 'iso', description=m.Device.updated.comment, data_key='productionDate' + ) + working = NestedOn( + 'Action', many=True, dump_only=True, description=m.Device.working.__doc__ + ) variant = SanitizedStr(description=m.Device.variant.comment) sku = SanitizedStr(description=m.Device.sku.comment) image = URL(description=m.Device.image.comment) allocated = Boolean(description=m.Device.allocated.comment) - devicehub_id = SanitizedStr(data_key='devicehubID', - description=m.Device.devicehub_id.comment) + devicehub_id = SanitizedStr( + data_key='devicehubID', description=m.Device.devicehub_id.comment + ) @pre_load def from_actions_to_actions_one(self, data: dict): @@ -91,52 +136,73 @@ class Device(Thing): @post_load def validate_snapshot_actions(self, data): """Validates that only snapshot-related actions can be uploaded.""" - from ereuse_devicehub.resources.action.models import EraseBasic, Test, Rate, Install, \ - Benchmark + from ereuse_devicehub.resources.action.models import ( + Benchmark, + EraseBasic, + Install, + Rate, + Test, + ) + for action in data['actions_one']: if not isinstance(action, (Install, EraseBasic, Rate, Test, Benchmark)): - raise ValidationError('You cannot upload {}'.format(action), - field_names=['actions']) + raise ValidationError( + 'You cannot upload {}'.format(action), field_names=['actions'] + ) class Computer(Device): __doc__ = m.Computer.__doc__ # TODO TimeOut 1. Comment components if there are time out. - components = NestedOn('Component', - many=True, - dump_only=True, - collection_class=OrderedSet, - description='The components that are inside this computer.') - chassis = EnumField(enums.ComputerChassis, - description=m.Computer.chassis.comment) - ram_size = Integer(dump_only=True, - data_key='ramSize', - description=m.Computer.ram_size.__doc__) - data_storage_size = Integer(dump_only=True, - data_key='dataStorageSize', - description=m.Computer.data_storage_size.__doc__) - processor_model = Str(dump_only=True, - data_key='processorModel', - description=m.Computer.processor_model.__doc__) - graphic_card_model = Str(dump_only=True, - data_key='graphicCardModel', - description=m.Computer.graphic_card_model.__doc__) - network_speeds = List(Integer(dump_only=True), - dump_only=True, - data_key='networkSpeeds', - description=m.Computer.network_speeds.__doc__) - privacy = NestedOn('Action', - many=True, - dump_only=True, - collection_class=set, - description=m.Computer.privacy.__doc__) - amount = Integer(validate=f.validate.Range(min=0, max=100), - description=m.Computer.amount.__doc__) + components = NestedOn( + 'Component', + many=True, + dump_only=True, + collection_class=OrderedSet, + description='The components that are inside this computer.', + ) + chassis = EnumField(enums.ComputerChassis, description=m.Computer.chassis.comment) + ram_size = Integer( + dump_only=True, data_key='ramSize', description=m.Computer.ram_size.__doc__ + ) + data_storage_size = Integer( + dump_only=True, + data_key='dataStorageSize', + description=m.Computer.data_storage_size.__doc__, + ) + processor_model = Str( + dump_only=True, + data_key='processorModel', + description=m.Computer.processor_model.__doc__, + ) + graphic_card_model = Str( + dump_only=True, + data_key='graphicCardModel', + description=m.Computer.graphic_card_model.__doc__, + ) + network_speeds = List( + Integer(dump_only=True), + dump_only=True, + data_key='networkSpeeds', + description=m.Computer.network_speeds.__doc__, + ) + privacy = NestedOn( + 'Action', + many=True, + dump_only=True, + collection_class=set, + description=m.Computer.privacy.__doc__, + ) + amount = Integer( + validate=f.validate.Range(min=0, max=100), description=m.Computer.amount.__doc__ + ) # author_id = NestedOn(s_user.User, only_query='author_id') owner_id = UUID(data_key='ownerID') - transfer_state = EnumField(enums.TransferState, description=m.Computer.transfer_state.comment) + transfer_state = EnumField( + enums.TransferState, description=m.Computer.transfer_state.comment + ) receiver_id = UUID(data_key='receiverID') - uuid = UUID(required=False) + system_uuid = UUID(required=False) class Desktop(Computer): @@ -155,29 +221,36 @@ class Server(Computer): class DisplayMixin: __doc__ = m.DisplayMixin.__doc__ size = Float(description=m.DisplayMixin.size.comment, validate=Range(2, 150)) - technology = EnumField(enums.DisplayTech, - description=m.DisplayMixin.technology.comment) - resolution_width = Integer(data_key='resolutionWidth', - validate=Range(10, 20000), - description=m.DisplayMixin.resolution_width.comment, - ) - resolution_height = Integer(data_key='resolutionHeight', - validate=Range(10, 20000), - description=m.DisplayMixin.resolution_height.comment, - ) + technology = EnumField( + enums.DisplayTech, description=m.DisplayMixin.technology.comment + ) + resolution_width = Integer( + data_key='resolutionWidth', + validate=Range(10, 20000), + description=m.DisplayMixin.resolution_width.comment, + ) + resolution_height = Integer( + data_key='resolutionHeight', + validate=Range(10, 20000), + description=m.DisplayMixin.resolution_height.comment, + ) refresh_rate = Integer(data_key='refreshRate', validate=Range(10, 1000)) contrast_ratio = Integer(data_key='contrastRatio', validate=Range(100, 100000)) touchable = Boolean(description=m.DisplayMixin.touchable.comment) - aspect_ratio = String(dump_only=True, description=m.DisplayMixin.aspect_ratio.__doc__) + aspect_ratio = String( + dump_only=True, description=m.DisplayMixin.aspect_ratio.__doc__ + ) widescreen = Boolean(dump_only=True, description=m.DisplayMixin.widescreen.__doc__) class NetworkMixin: __doc__ = m.NetworkMixin.__doc__ - speed = Integer(validate=Range(min=10, max=10000), - unit=UnitCodes.mbps, - description=m.NetworkAdapter.speed.comment) + speed = Integer( + validate=Range(min=10, max=10000), + unit=UnitCodes.mbps, + description=m.NetworkAdapter.speed.comment, + ) wireless = Boolean(required=True) @@ -198,16 +271,22 @@ class Mobile(Device): imei = Integer(description=m.Mobile.imei.comment) meid = Str(description=m.Mobile.meid.comment) - ram_size = Integer(validate=Range(min=128, max=36000), - data_key='ramSize', - unit=UnitCodes.mbyte, - description=m.Mobile.ram_size.comment) - data_storage_size = Integer(validate=Range(0, 10 ** 8), - data_key='dataStorageSize', - description=m.Mobile.data_storage_size) - display_size = Float(validate=Range(min=0.1, max=30.0), - data_key='displaySize', - description=m.Mobile.display_size.comment) + ram_size = Integer( + validate=Range(min=128, max=36000), + data_key='ramSize', + unit=UnitCodes.mbyte, + description=m.Mobile.ram_size.comment, + ) + data_storage_size = Integer( + validate=Range(0, 10**8), + data_key='dataStorageSize', + description=m.Mobile.data_storage_size, + ) + display_size = Float( + validate=Range(min=0.1, max=30.0), + data_key='displaySize', + description=m.Mobile.display_size.comment, + ) @pre_load def convert_check_imei(self, data): @@ -243,17 +322,21 @@ class Component(Device): class GraphicCard(Component): __doc__ = m.GraphicCard.__doc__ - memory = Integer(validate=Range(0, 10000), - unit=UnitCodes.mbyte, - description=m.GraphicCard.memory.comment) + memory = Integer( + validate=Range(0, 10000), + unit=UnitCodes.mbyte, + description=m.GraphicCard.memory.comment, + ) class DataStorage(Component): __doc__ = m.DataStorage.__doc__ - size = Integer(validate=Range(0, 10 ** 8), - unit=UnitCodes.mbyte, - description=m.DataStorage.size.comment) + size = Integer( + validate=Range(0, 10**8), + unit=UnitCodes.mbyte, + description=m.DataStorage.size.comment, + ) interface = EnumField(enums.DataStorageInterface) privacy = NestedOn('Action', dump_only=True) @@ -269,16 +352,21 @@ class SolidStateDrive(DataStorage): class Motherboard(Component): __doc__ = m.Motherboard.__doc__ - slots = Integer(validate=Range(0, 20), - description=m.Motherboard.slots.comment) + slots = Integer(validate=Range(0, 20), description=m.Motherboard.slots.comment) usb = Integer(validate=Range(0, 20), description=m.Motherboard.usb.comment) - firewire = Integer(validate=Range(0, 20), description=m.Motherboard.firewire.comment) + firewire = Integer( + validate=Range(0, 20), description=m.Motherboard.firewire.comment + ) serial = Integer(validate=Range(0, 20), description=m.Motherboard.serial.comment) pcmcia = Integer(validate=Range(0, 20), description=m.Motherboard.pcmcia.comment) - bios_date = Date(validate=Range(datetime.date(year=1980, month=1, day=1), - datetime.date(year=2030, month=1, day=1)), - data_key='biosDate', - description=m.Motherboard.bios_date) + bios_date = Date( + validate=Range( + datetime.date(year=1980, month=1, day=1), + datetime.date(year=2030, month=1, day=1), + ), + data_key='biosDate', + description=m.Motherboard.bios_date, + ) ram_slots = Integer(validate=Range(1), data_key='ramSlots') ram_max_size = Integer(validate=Range(1), data_key='ramMaxSize') @@ -290,22 +378,32 @@ class NetworkAdapter(NetworkMixin, Component): class Processor(Component): __doc__ = m.Processor.__doc__ - speed = Float(validate=Range(min=0.1, max=15), - unit=UnitCodes.ghz, - description=m.Processor.speed.comment) - cores = Integer(validate=Range(min=1, max=10), description=m.Processor.cores.comment) - threads = Integer(validate=Range(min=1, max=20), description=m.Processor.threads.comment) - address = Integer(validate=OneOf({8, 16, 32, 64, 128, 256}), - description=m.Processor.address.comment) + speed = Float( + validate=Range(min=0.1, max=15), + unit=UnitCodes.ghz, + description=m.Processor.speed.comment, + ) + cores = Integer( + validate=Range(min=1, max=10), description=m.Processor.cores.comment + ) + threads = Integer( + validate=Range(min=1, max=20), description=m.Processor.threads.comment + ) + address = Integer( + validate=OneOf({8, 16, 32, 64, 128, 256}), + description=m.Processor.address.comment, + ) abi = SanitizedStr(lower=True, description=m.Processor.abi.comment) class RamModule(Component): __doc__ = m.RamModule.__doc__ - size = Integer(validate=Range(min=128, max=17000), - unit=UnitCodes.mbyte, - description=m.RamModule.size.comment) + size = Integer( + validate=Range(min=128, max=17000), + unit=UnitCodes.mbyte, + description=m.RamModule.size.comment, + ) speed = Integer(validate=Range(min=100, max=10000), unit=UnitCodes.mhz) interface = EnumField(enums.RamInterface) format = EnumField(enums.RamFormat) @@ -323,7 +421,9 @@ class Battery(Component): __doc__ = m.Battery.__doc__ wireless = Boolean(description=m.Battery.wireless.comment) - technology = EnumField(enums.BatteryTechnology, description=m.Battery.technology.comment) + technology = EnumField( + enums.BatteryTechnology, description=m.Battery.technology.comment + ) size = Integer(required=True, description=m.Battery.size.comment) @@ -393,12 +493,18 @@ class WirelessAccessPoint(Networking): class Printer(Device): __doc__ = m.Printer.__doc__ - wireless = Boolean(required=True, missing=False, description=m.Printer.wireless.comment) - scanning = Boolean(required=True, missing=False, description=m.Printer.scanning.comment) - technology = EnumField(enums.PrinterTechnology, - required=True, - description=m.Printer.technology.comment) - monochrome = Boolean(required=True, missing=True, description=m.Printer.monochrome.comment) + wireless = Boolean( + required=True, missing=False, description=m.Printer.wireless.comment + ) + scanning = Boolean( + required=True, missing=False, description=m.Printer.scanning.comment + ) + technology = EnumField( + enums.PrinterTechnology, required=True, description=m.Printer.technology.comment + ) + monochrome = Boolean( + required=True, missing=True, description=m.Printer.monochrome.comment + ) class LabelPrinter(Printer): From 34def901cbf64a3ba65649fd8ce7dec8cf3752c0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 15 Jun 2022 12:18:44 +0200 Subject: [PATCH 21/60] change uuid in views and forms for system_uuid --- ereuse_devicehub/inventory/forms.py | 2 +- ereuse_devicehub/parser/parser.py | 4 ++-- .../resources/action/views/snapshot.py | 2 +- ereuse_devicehub/resources/device/sync.py | 15 +++++++++------ 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index df564982..f338e102 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -271,7 +271,7 @@ class UploadSnapshotForm(SnapshotMixin, FlaskForm): self.version = snapshot_json.get('version') system_uuid = self.get_uuid(debug) if system_uuid: - snapshot_json['device']['uuid'] = system_uuid + snapshot_json['device']['system_uuid'] = system_uuid try: snapshot_json = schema.load(snapshot_json) diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index fa511f66..49e7dee6 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -52,7 +52,7 @@ class ParseSnapshot: self.device['type'] = self.get_type() self.device['sku'] = self.get_sku() self.device['version'] = self.get_version() - self.device['uuid'] = self.get_uuid() + self.device['system_uuid'] = self.get_uuid() def set_components(self): self.get_cpu() @@ -379,7 +379,7 @@ class ParseSnapshotLsHw: raise ValidationError(txt) self.device = pc - self.device['uuid'] = self.get_uuid() + self.device['system_uuid'] = self.get_uuid() def set_components(self): memory = None diff --git a/ereuse_devicehub/resources/action/views/snapshot.py b/ereuse_devicehub/resources/action/views/snapshot.py index 59739655..1aaf3985 100644 --- a/ereuse_devicehub/resources/action/views/snapshot.py +++ b/ereuse_devicehub/resources/action/views/snapshot.py @@ -169,7 +169,7 @@ class SnapshotView(SnapshotMixin): self.sid = None system_uuid = self.get_uuid(snapshot_json.pop('debug', None)) if system_uuid: - snapshot_json['device']['uuid'] = system_uuid + snapshot_json['device']['system_uuid'] = system_uuid try: self.snapshot_json = resource_def.schema.load(snapshot_json) diff --git a/ereuse_devicehub/resources/device/sync.py b/ereuse_devicehub/resources/device/sync.py index 6d2ca495..4871d6b7 100644 --- a/ereuse_devicehub/resources/device/sync.py +++ b/ereuse_devicehub/resources/device/sync.py @@ -177,12 +177,15 @@ class Sync: inspect(tag).transient for tag in device.tags ), 'Tags cannot be synced from DB' db_device = None - if isinstance(db_device, Computer): - if db_device.uuid: - db_device = Computer.query.filter_by( - uuid=device.uuid, owner_id=g.user.id, active=True - ).one() - elif device.hid: + if isinstance(device, Computer): + # first search by uuid + if device.system_uuid: + with suppress(ResourceNotFound): + db_device = Computer.query.filter_by( + system_uuid=device.system_uuid, owner_id=g.user.id, active=True + ).one() + # if no there are any Computer by uuid search by hid + if not db_device and device.hid: with suppress(ResourceNotFound): db_device = Device.query.filter_by( hid=device.hid, owner_id=g.user.id, active=True From 95cf33fd3c803e7c318cb0fff82379072cc12733 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 15 Jun 2022 12:19:15 +0200 Subject: [PATCH 22/60] fix tests system uuid --- tests/test_system_uuid.py | 60 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/test_system_uuid.py b/tests/test_system_uuid.py index 6a733524..867605c2 100644 --- a/tests/test_system_uuid.py +++ b/tests/test_system_uuid.py @@ -30,7 +30,7 @@ def test_wb11_form(user3: UserClientFlask): db_snapthot = Snapshot.query.one() device = db_snapthot.device assert device.hid == 'laptop-toshiba-satellite_l655-2b335208q-00:26:6c:ae:ee:78' - assert str(device.uuid) == 'f0dc6a7f-c23f-e011-b5d0-00266caeee78' + assert str(device.system_uuid) == 'f0dc6a7f-c23f-e011-b5d0-00266caeee78' @pytest.mark.mvp @@ -43,7 +43,7 @@ def test_wb11_api(user: UserClient): db_snapthot = Snapshot.query.one() device = db_snapthot.device assert device.hid == 'laptop-toshiba-satellite_l655-2b335208q-00:26:6c:ae:ee:78' - assert str(device.uuid) == 'f0dc6a7f-c23f-e011-b5d0-00266caeee78' + assert str(device.system_uuid) == 'f0dc6a7f-c23f-e011-b5d0-00266caeee78' @pytest.mark.mvp @@ -66,7 +66,7 @@ def test_wbLite_form(user3: UserClientFlask): db_snapthot = Snapshot.query.one() device = db_snapthot.device assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -79,7 +79,7 @@ def test_wbLite_api(user: UserClient): db_snapthot = Snapshot.query.one() device = db_snapthot.device assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -94,7 +94,7 @@ def test_wb11_to_wb11_with_uuid_api(user: UserClient): device = db_snapthot.device assert Computer.query.count() == 1 assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert device.uuid is None + assert device.system_uuid is None # insert the same computer with wb11 with hid and with uuid, (new version) snapshot_lite = conftest.file_json('system_uuid2.json') @@ -105,7 +105,7 @@ def test_wb11_to_wb11_with_uuid_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -122,7 +122,7 @@ def test_wb11_with_uuid_to_wb11_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' # insert the same computer with wb11 with hid and with uuid, (new version) snapshot_11 = conftest.file_json('system_uuid3.json') @@ -132,7 +132,7 @@ def test_wb11_with_uuid_to_wb11_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -149,7 +149,7 @@ def test_wb11_with_uuid_to_wb11_without_hid_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' # insert the same computer with wb11 with hid and with uuid, (new version) snapshot_11 = conftest.file_json('system_uuid3.json') @@ -184,7 +184,7 @@ def test_wb11_to_wb11_with_uuid_form(user3: UserClientFlask): device = db_snapthot.device assert Computer.query.count() == 1 assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert device.uuid is None + assert device.system_uuid is None # insert the same computer with wb11 with hid and with uuid, (new version) snapshot_lite = conftest.file_json('system_uuid2.json') @@ -202,7 +202,7 @@ def test_wb11_to_wb11_with_uuid_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -230,7 +230,7 @@ def test_wb11_with_uuid_to_wb11_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' # insert the same computer with wb11 with hid and with uuid, (new version) snapshot = conftest.file_json('system_uuid3.json') @@ -247,7 +247,7 @@ def test_wb11_with_uuid_to_wb11_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -275,7 +275,7 @@ def test_wb11_with_uuid_to_wb11_without_hid_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' # insert the same computer with wb11 with hid and with uuid, (new version) snapshot_11 = conftest.file_json('system_uuid3.json') @@ -304,14 +304,14 @@ def test_wb11_to_wblite_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert device.uuid is None + assert device.system_uuid is None snapshot_lite = conftest.file_json('system_uuid2.json') user.post(snapshot_lite, uri="/api/inventory/") assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -323,14 +323,14 @@ def test_wblite_to_wb11_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' snapshot_11 = conftest.file_json('system_uuid3.json') user.post(snapshot_11, res=Snapshot) assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -353,7 +353,7 @@ def test_wb11_to_wblite_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert device.uuid is None + assert device.system_uuid is None file_name = 'system_uuid2.json' snapshot_lite = conftest.file_json(file_name) @@ -368,7 +368,7 @@ def test_wb11_to_wblite_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -391,7 +391,7 @@ def test_wblite_to_wb11_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' file_name = 'system_uuid3.json' snapshot_11 = conftest.file_json(file_name) @@ -406,7 +406,7 @@ def test_wblite_to_wb11_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -418,7 +418,7 @@ def test_wblite_to_wblite_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' snapshot_lite = conftest.file_json('system_uuid2.json') snapshot_lite['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' @@ -426,7 +426,7 @@ def test_wblite_to_wblite_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -449,7 +449,7 @@ def test_wblite_to_wblite_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' file_name = 'system_uuid2.json' snapshot_lite = conftest.file_json(file_name) @@ -465,7 +465,7 @@ def test_wblite_to_wblite_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert str(device.uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' @pytest.mark.mvp @@ -478,7 +478,7 @@ def test_wb11_to_wb11_duplicity_api(user: UserClient): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert device.uuid is None + assert device.system_uuid is None snapshot_11 = conftest.file_json('system_uuid3.json') snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' @@ -488,7 +488,7 @@ def test_wb11_to_wb11_duplicity_api(user: UserClient): assert Computer.query.count() == 2 for c in Computer.query.all(): assert 'laptop-acer-aohappy-lusea0d010038879a01601' in c.hid - assert c.uuid is None + assert c.system_uuid is None @pytest.mark.mvp @@ -511,7 +511,7 @@ def test_wb11_to_wb11_duplicity_form(user3: UserClientFlask): assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' - assert device.uuid is None + assert device.system_uuid is None snapshot_11 = conftest.file_json('system_uuid3.json') snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' @@ -529,4 +529,4 @@ def test_wb11_to_wb11_duplicity_form(user3: UserClientFlask): assert Computer.query.count() == 2 for c in Computer.query.all(): assert 'laptop-acer-aohappy-lusea0d010038879a01601' in c.hid - assert c.uuid is None + assert c.system_uuid is None From a566772c427fb5fdd5b895b11cc41dc6b1c387e9 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 15 Jun 2022 12:23:27 +0200 Subject: [PATCH 23/60] add files for tests system uuid --- tests/files/system_uuid1.json | 1 + tests/files/system_uuid2.json | 3416 +++++++++++++++++++++++++++++++++ tests/files/system_uuid3.json | 172 ++ 3 files changed, 3589 insertions(+) create mode 100644 tests/files/system_uuid1.json create mode 100644 tests/files/system_uuid2.json create mode 100644 tests/files/system_uuid3.json diff --git a/tests/files/system_uuid1.json b/tests/files/system_uuid1.json new file mode 100644 index 00000000..025ca1ae --- /dev/null +++ b/tests/files/system_uuid1.json @@ -0,0 +1 @@ +{"closed": true, "components": [{"actions": [{"elapsed": 18, "rate": 18.0935, "type": "BenchmarkProcessorSysbench"}, {"elapsed": 0, "rate": 21333.08, "type": "BenchmarkProcessor"}], "address": 64, "brand": "Core i5", "cores": 2, "generation": 1, "manufacturer": "Intel Corp.", "model": "Intel Core i5 CPU M 480 @ 2.67GHz", "serialNumber": null, "speed": 1.3330000000000002, "threads": 4, "type": "Processor"}, {"actions": [], "manufacturer": "Advanced Micro Devices, Inc. AMD/ATI", "model": "RV710/730 HDMI Audio Radeon HD 4000 series", "serialNumber": null, "type": "SoundCard"}, {"actions": [], "manufacturer": "Generic", "model": "USB Camera", "serialNumber": "MU418ASA", "type": "SoundCard"}, {"actions": [], "manufacturer": "Intel Corporation", "model": "5 Series/3400 Series Chipset High Definition Audio", "serialNumber": null, "type": "SoundCard"}, {"actions": [], "manufacturer": "Advanced Micro Devices, Inc. AMD/ATI", "memory": null, "model": "RV710/M92 Mobility Radeon HD 4530/4570/545v", "serialNumber": null, "type": "GraphicCard"}, {"actions": [], "format": "SODIMM", "interface": "DDR3", "manufacturer": null, "model": "8JSF25664HZ-1G4D1", "serialNumber": "E277F07F", "size": 2048.0, "speed": 1067.0, "type": "RamModule"}, {"actions": [], "format": "SODIMM", "interface": "DDR3", "manufacturer": null, "model": "8JSF25664HZ-1G4D1", "serialNumber": "E277F084", "size": 2048.0, "speed": 1067.0, "type": "RamModule"}, {"actions": [], "manufacturer": "AUO \"AUO\"", "model": "AUO LCD Monitor", "productionDate": "2009-01-11T00:00:00", "refreshRate": 60, "resolutionHeight": 768, "resolutionWidth": 1366, "serialNumber": null, "size": 15.529237982414482, "technology": "LCD", "type": "Display"}, {"actions": [{"elapsed": 9, "readSpeed": 110.0, "type": "BenchmarkDataStorage", "writeSpeed": 41.0}, {"assessment": true, "currentPendingSectorCount": 0, "elapsed": 82, "length": "Short", "lifetime": 5358, "offlineUncorrectable": 0, "powerCycleCount": 1577, "reallocatedSectorCount": 0, "severity": "Info", "status": "Completed without error", "type": "TestDataStorage"}], "interface": "ATA", "manufacturer": null, "model": "HGST HTS725050A7", "serialNumber": "TF0500WJ1T3N4V", "size": 500107.86201599997, "type": "HardDrive", "variant": "A420"}, {"actions": [], "manufacturer": "Qualcomm Atheros", "model": "AR8152 v1.1 Fast Ethernet", "serialNumber": "00:26:6c:ae:ee:78", "speed": 100.0, "type": "NetworkAdapter", "variant": "c1", "wireless": false}, {"actions": [], "manufacturer": "Broadcom Inc. and subsidiaries", "model": "BCM4313 802.11bgn Wireless Network Adapter", "serialNumber": "b4:74:9f:5b:a3:88", "speed": null, "type": "NetworkAdapter", "variant": "01", "wireless": true}, {"actions": [], "biosDate": "2010-11-11T00:00:00", "firewire": 0, "manufacturer": "TOSHIBA", "model": "Portable PC", "pcmcia": 0, "ramMaxSize": 16, "ramSlots": 2, "serial": 1, "serialNumber": "Base Board Serial Number", "slots": 2, "type": "Motherboard", "usb": 2, "version": "1.90"}], "debug": {"battery": null, "hwinfo": "01: None 00.0: 10105 BIOS\n [Created at bios.186]\n Unique ID: rdCR.lZF+r4EgHp4\n Hardware Class: bios\n BIOS Keyboard LED Status:\n Scroll Lock: off\n Num Lock: on\n Caps Lock: off\n Base Memory: 627 kB\n PnP BIOS: SST2400\n BIOS: extended read supported\n SMBIOS Version: 2.6\n BIOS Info: #0\n Vendor: \"INSYDE\"\n Version: \"1.90\"\n Date: \"11/11/2010\"\n Start Address: 0x00000\n ROM Size: 1536 kB\n Features: 0x0787000100004b399a80\n PCI supported\n PnP supported\n BIOS flashable\n BIOS shadowing allowed\n CD boot supported\n Selectable boot supported\n EDD spec supported\n 1.2MB NEC 9800 Japanese Floppy supported\n 1.2MB Toshiba Japanese Floppy supported\n 720kB Floppy supported\n 2.88MB Floppy supported\n 8042 Keyboard Services supported\n CGA/Mono Video supported\n ACPI supported\n USB Legacy supported\n AGP supported\n Smart Battery supported\n BIOS Boot Spec supported\n F12 Network boot supported\n System Info: #1\n Manufacturer: \"TOSHIBA\"\n Product: \"Satellite L655\"\n Version: \"PSK1JE-0HS00RCE\"\n Serial: \"2B335208Q\"\n UUID: undefined, but settable\n Wake-up: 0x06 (Power Switch)\n Board Info: #2\n Manufacturer: \"TOSHIBA\"\n Product: \"Portable PC\"\n Version: \"Base Board Version\"\n Serial: \"Base Board Serial Number\"\n Asset Tag: \"Base Board Asset Tag\"\n Type: 0x0a (Motherboard)\n Features: 0x09\n Hosting Board\n Replaceable\n Location: \"Base Board Chassis Location\"\n Chassis: #3\n Chassis Info: #3\n Manufacturer: \"Chassis Manufacturer\"\n Version: \"Chassis Version\"\n Serial: \"Chassis Serial Number\"\n Asset Tag: \"No Asset Tag\"\n Type: 0x0a (Notebook)\n Bootup State: 0x03 (Safe)\n Power Supply State: 0x03 (Safe)\n Thermal State: 0x03 (Safe)\n Security Status: 0x03 (None)\n System Slot: #4\n Designation: \"J5C1\"\n Type: 0xaa (Other)\n Bus Width: 0x0d (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 0\n Characteristics: 0x0300 (PME#, Hot-Plug)\n System Slot: #5\n Designation: \"J6C1\"\n Type: 0xa6 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 0\n Characteristics: 0x0300 (PME#, Hot-Plug)\n System Slot: #6\n Designation: \"J6C2\"\n Type: 0xa6 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 1\n Characteristics: 0x0300 (PME#, Hot-Plug)\n System Slot: #7\n Designation: \"J6D2\"\n Type: 0xa6 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 2\n Characteristics: 0x0300 (PME#, Hot-Plug)\n System Slot: #8\n Designation: \"J7C1\"\n Type: 0xa6 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 3\n Characteristics: 0x0300 (PME#, Hot-Plug)\n System Slot: #9\n Designation: \"J7D2\"\n Type: 0xa6 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 4\n Characteristics: 0x0300 (PME#, Hot-Plug)\n System Slot: #10\n Designation: \"J8C2\"\n Type: 0xaa (Other)\n Bus Width: 0x0d (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 1\n Characteristics: 0x0300 (PME#, Hot-Plug)\n System Slot: #11\n Designation: \"J8C1\"\n Type: 0xa6 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 5\n Characteristics: 0x0300 (PME#, Hot-Plug)\n OEM Strings: #12\n PSK1JE-0HS00RCE,R14473CE\n F9DOLN36YBvIQ\n NPosI2-uSzAWa\n cl7c1Y10zusGj\n System Config Options (Jumpers & Switches) #13:\n NVR:00707902\n DSN:TF0500WJ1T3N4V\n DSN:8JSF25664HZ-1G4D1 E277F07F\n DSN:780C2D78\n Type 15 Record: #14\n Data 00: 0f 1d 0e 00 00 00 00 00 00 00 04 01 78 56 34 12\n Data 10: 00 00 00 00 80 03 02 07 00 08 04 16 00\n Pointing Device: #15\n Type: 0x07 (Touch Pad)\n Interface: 0x04 (PS/2)\n Buttons: 4\n Type 27 Record: #16\n Data 00: 1b 0e 10 00 ff ff 63 00 00 00 00 00 d0 07\n Type 32 Record: #17\n Data 00: 20 14 11 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 10: 00 00 00 00\n Type 39 Record: #18\n Data 00: 27 16 12 00 00 01 02 03 04 05 06 07 4b 00 a6 21\n Data 10: ff ff 10 00 ff ff\n String 1: \"OEM_Define0\"\n String 2: \"OEM_Define1\"\n String 3: \"OEM_Define2\"\n String 4: \"OEM_Define3\"\n String 5: \"OEM_Define4\"\n String 6: \"OEM_Define5\"\n String 7: \"OEM_Define6\"\n Type 40 Record: #19\n Data 00: 28 12 13 00 02 06 04 00 05 01 aa 07 00 00 05 02\n Data 10: dc 05\n String 1: \"PCIExpressx16\"\n String 2: \"Compiler Version: VC 9.0\"\n Type 41 Record: #20\n Data 00: 29 0b 14 00 01 85 01 00 00 00 01\n String 1: \"Hanksville Gbe Lan Connection\"\n Type 136 Record: #21\n Data 00: 88 06 15 00 5a 5a\n Type 129 Record: #22\n Data 00: 81 08 16 00 01 01 02 01\n String 1: \"Intel_ASF\"\n String 2: \"Intel_ASF_001\"\n Type 130 Record: #23\n Data 00: 82 14 17 00 24 41 4d 54 01 01 01 01 01 a5 1f 02\n Data 10: 00 00 00 00\n Physical Memory Array: #24\n Use: 0x03 (System memory)\n Location: 0x03 (Motherboard)\n Slots: 2\n Max. Size: 16 GB\n ECC: 0x03 (None)\n Error Info: No Error\n Memory Device: #25\n Location: \"DIMM0\"\n Bank: \"BANK 0\"\n Serial: \"E277F07F\"\n Asset Tag: \"Unknown\"\n Part Number: \"8JSF25664HZ-1G4D1\"\n Memory Array: #24\n Error Info: #27\n Form Factor: 0x0d (SODIMM)\n Type: 0x18 (Other)\n Type Detail: 0x0080 (Synchronous)\n Data Width: 64 bits\n Size: 2 GB\n Speed: 1067 MHz\n Type 6 Record: #26\n Data 00: 06 0c 1a 00 01 ff 00 00 01 0b 0b 00\n String 1: \"DIMM0\"\n 32bit-Memory Error Info: #27\n Type: 0x03 (OK)\n Granularity: 0x02 (Unknown)\n Operation: 0x02 (Unknown)\n Memory Device Mapping: #28\n Memory Device: #25\n Array Mapping: #34\n Interleave Pos: 1\n Interleaved Depth: 1\n Start Address: 0x00000000\n End Address: 0x80000000\n Memory Device: #29\n Location: \"DIMM1\"\n Bank: \"BANK 2\"\n Serial: \"E277F084\"\n Asset Tag: \"Unknown\"\n Part Number: \"8JSF25664HZ-1G4D1\"\n Memory Array: #24\n Error Info: #31\n Form Factor: 0x0d (SODIMM)\n Type: 0x18 (Other)\n Type Detail: 0x0080 (Synchronous)\n Data Width: 64 bits\n Size: 2 GB\n Speed: 1067 MHz\n Type 6 Record: #30\n Data 00: 06 0c 1e 00 01 ff 00 00 01 0b 0b 00\n String 1: \"DIMM1\"\n 32bit-Memory Error Info: #31\n Type: 0x03 (OK)\n Granularity: 0x02 (Unknown)\n Operation: 0x02 (Unknown)\n Memory Device Mapping: #32\n Memory Device: #29\n Array Mapping: #34\n Interleave Pos: 2\n Interleaved Depth: 1\n Start Address: 0x00000000\n End Address: 0x80000000\n 32bit-Memory Error Info: #33\n Type: 0x03 (OK)\n Granularity: 0x02 (Unknown)\n Operation: 0x02 (Unknown)\n Memory Array Mapping: #34\n Memory Array: #24\n Partition Width: 2\n Start Address: 0x0000000000000000\n End Address: 0x0000000100000000\n Type 5 Record: #35\n Data 00: 05 14 23 00 03 06 03 03 0d 01 00 01 00 00 02 1a\n Data 10: 00 1e 00 04\n Processor Info: #36\n Socket: \"CPU\"\n Socket Type: 0x04 (ZIF Socket)\n Socket Status: Populated\n Type: 0x03 (CPU)\n Family: 0xcd (Other)\n Manufacturer: \"Intel(R) Corporation\"\n Version: \"Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz\"\n Asset Tag: \"FFFF\"\n Processor ID: 0xbfebfbff00020655\n Status: 0x01 (Enabled)\n External Clock: 1066 MHz\n Max. Speed: 2666 MHz\n Current Speed: 2659 MHz\n L1 Cache: #40\n L2 Cache: #39\n L3 Cache: #37\n Cache Info: #37\n Designation: \"L3 Cache\"\n Level: L3\n State: Enabled\n Mode: 0x00 (Write Through)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x05 (Unified)\n Associativity: 0x09 (Other)\n Max. Size: 3072 kB\n Current Size: 3072 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Cache Info: #38\n Designation: \"L1 Cache\"\n Level: L1\n State: Enabled\n Mode: 0x00 (Write Through)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x04 (Data)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 32 kB\n Current Size: 32 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Cache Info: #39\n Designation: \"L2 Cache\"\n Level: L2\n State: Enabled\n Mode: 0x00 (Write Through)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x05 (Unified)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 256 kB\n Current Size: 256 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Cache Info: #40\n Designation: \"L1 Cache\"\n Level: L1\n State: Enabled\n Mode: 0x00 (Write Through)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x03 (Instruction)\n Associativity: 0x05 (4-way Set-Associative)\n Max. Size: 32 kB\n Current Size: 32 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n02: None 00.0: 10107 System\n [Created at sys.63]\n Unique ID: rdCR.n_7QNeEnh23\n Hardware Class: system\n Model: \"Toshiba Satellite L655\"\n Vendor: \"Toshiba\"\n Device: \"Satellite L655\"\n Compatible to: int 0xf001 0x0002 \"Toshiba Notebook\"\n Formfactor: \"laptop\"\n Requires: toshutils, ial\n Driver Info #0:\n Driver Status: thermal,fan are active\n Driver Activation Cmd: \"modprobe thermal; modprobe fan\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n03: None 00.0: 10104 FPU\n [Created at misc.191]\n Unique ID: rdCR.EMpH5pjcahD\n Hardware Class: unknown\n Model: \"FPU\"\n I/O Ports: 0xf0-0xff (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n04: None 00.0: 0801 DMA controller (8237)\n [Created at misc.205]\n Unique ID: rdCR.f5u1ucRm+H9\n Hardware Class: unknown\n Model: \"DMA controller\"\n I/O Ports: 0x00-0xcf7 (rw)\n I/O Ports: 0xc0-0xdf (rw)\n I/O Ports: 0x80-0x8f (rw)\n DMA: 4\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n05: None 00.0: 0800 PIC (8259)\n [Created at misc.218]\n Unique ID: rdCR.8uRK7LxiIA2\n Hardware Class: unknown\n Model: \"PIC\"\n I/O Ports: 0x20-0x21 (rw)\n I/O Ports: 0xa0-0xa1 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n06: None 00.0: 0900 Keyboard controller\n [Created at misc.250]\n Unique ID: rdCR.9N+EecqykME\n Hardware Class: unknown\n Model: \"Keyboard controller\"\n I/O Port: 0x60 (rw)\n I/O Port: 0x64 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n07: None 00.0: 10400 PS/2 Controller\n [Created at misc.303]\n Unique ID: rdCR.DziBbWO85o5\n Hardware Class: unknown\n Model: \"PS/2 Controller\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n12: None 00.0: 10102 Main Memory\n [Created at memory.74]\n Unique ID: rdCR.CxwsZFjVASF\n Hardware Class: memory\n Model: \"Main Memory\"\n Memory Range: 0x00000000-0xf4063fff (rw)\n Memory Size: 3 GB + 768 MB\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n13: PCI 3f00.1: 0600 Host bridge\n [Created at pci.378]\n Unique ID: BrFw.lqSJp3ESun0\n SysFS ID: /devices/pci0000:3f/0000:3f:00.1\n SysFS BusID: 0000:3f:00.1\n Hardware Class: bridge\n Model: \"Intel Core Processor QuickPath Architecture System Address Decoder\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2d01 \"Core Processor QuickPath Architecture System Address Decoder\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x02\n Module Alias: \"pci:v00008086d00002D01sv00001179sd0000FF1Ebc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n14: PCI 1e.0: 0604 PCI bridge (Subtractive decode)\n [Created at pci.378]\n Unique ID: 6NW+.jZRGAV6FjG2\n SysFS ID: /devices/pci0000:00/0000:00:1e.0\n SysFS BusID: 0000:00:1e.0\n Hardware Class: bridge\n Model: \"Intel 82801 Mobile PCI Bridge\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2448 \"82801 Mobile PCI Bridge\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0xa5\n Module Alias: \"pci:v00008086d00002448sv00001179sd0000FF1Ebc06sc04i01\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n15: PCI 1f.3: 0c05 SMBus\n [Created at pci.378]\n Unique ID: nS1_.A7+QEbHdre8\n SysFS ID: /devices/pci0000:00/0000:00:1f.3\n SysFS BusID: 0000:00:1f.3\n Hardware Class: unknown\n Model: \"Intel 5 Series/3400 Series Chipset SMBus Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b30 \"5 Series/3400 Series Chipset SMBus Controller\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"i801_smbus\"\n Driver Modules: \"i2c_i801\"\n Memory Range: 0xd6106000-0xd61060ff (rw,non-prefetchable)\n I/O Ports: 0x5000-0x501f (rw)\n IRQ: 19 (no events)\n Module Alias: \"pci:v00008086d00003B30sv00001179sd0000FF1Ebc0Csc05i00\"\n Driver Info #0:\n Driver Status: i2c_i801 is active\n Driver Activation Cmd: \"modprobe i2c_i801\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n16: PCI 00.0: 0600 Host bridge\n [Created at pci.378]\n Unique ID: qLht.TGXtxAo2wxE\n SysFS ID: /devices/pci0000:00/0000:00:00.0\n SysFS BusID: 0000:00:00.0\n Hardware Class: bridge\n Model: \"Intel Core Processor DRAM Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x0044 \"Core Processor DRAM Controller\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x02\n Module Alias: \"pci:v00008086d00000044sv00001179sd0000FF1Ebc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n17: PCI 1c.1: 0604 PCI bridge (Normal decode)\n [Created at pci.378]\n Unique ID: qTvu.tH6D++6P1cE\n SysFS ID: /devices/pci0000:00/0000:00:1c.1\n SysFS BusID: 0000:00:1c.1\n Hardware Class: bridge\n Model: \"Intel 5 Series/3400 Series Chipset PCI Express Root Port 2\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b44 \"5 Series/3400 Series Chipset PCI Express Root Port 2\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"pcieport\"\n IRQ: 16 (77 events)\n Module Alias: \"pci:v00008086d00003B44sv00001179sd0000FF1Ebc06sc04i00\"\n Driver Info #0:\n Driver Status: shpchp is active\n Driver Activation Cmd: \"modprobe shpchp\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n18: PCI 1a.0: 0c03 USB Controller (EHCI)\n [Created at pci.378]\n Unique ID: pwJ7.qg1BmtWyHQ2\n SysFS ID: /devices/pci0000:00/0000:00:1a.0\n SysFS BusID: 0000:00:1a.0\n Hardware Class: usb controller\n Model: \"Intel 5 Series/3400 Series Chipset USB2 Enhanced Host Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b3c \"5 Series/3400 Series Chipset USB2 Enhanced Host Controller\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"ehci-pci\"\n Driver Modules: \"ehci_pci\"\n Memory Range: 0xd6105c00-0xd6105fff (rw,non-prefetchable)\n IRQ: 16 (77 events)\n Module Alias: \"pci:v00008086d00003B3Csv00001179sd0000FF1Ebc0Csc03i20\"\n Driver Info #0:\n Driver Status: ehci-hcd is active\n Driver Activation Cmd: \"modprobe ehci-hcd\"\n Driver Info #1:\n Driver Status: ehci_pci is active\n Driver Activation Cmd: \"modprobe ehci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n19: PCI 3f02.3: 0600 Host bridge\n [Created at pci.378]\n Unique ID: 3jKX.1ISoSKM8Nh7\n SysFS ID: /devices/pci0000:3f/0000:3f:02.3\n SysFS BusID: 0000:3f:02.3\n Hardware Class: bridge\n Model: \"Intel 1st Generation Core i3/5/7 Processor Reserved\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2d13 \"1st Generation Core i3/5/7 Processor Reserved\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x02\n Module Alias: \"pci:v00008086d00002D13sv00001179sd0000FF1Ebc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n20: PCI 1d.0: 0c03 USB Controller (EHCI)\n [Created at pci.378]\n Unique ID: 1GTX.iMUBwNE54n0\n SysFS ID: /devices/pci0000:00/0000:00:1d.0\n SysFS BusID: 0000:00:1d.0\n Hardware Class: usb controller\n Model: \"Intel 5 Series/3400 Series Chipset USB2 Enhanced Host Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b34 \"5 Series/3400 Series Chipset USB2 Enhanced Host Controller\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"ehci-pci\"\n Driver Modules: \"ehci_pci\"\n Memory Range: 0xd6105800-0xd6105bff (rw,non-prefetchable)\n IRQ: 23 (9319 events)\n Module Alias: \"pci:v00008086d00003B34sv00001179sd0000FF1Ebc0Csc03i20\"\n Driver Info #0:\n Driver Status: ehci-hcd is active\n Driver Activation Cmd: \"modprobe ehci-hcd\"\n Driver Info #1:\n Driver Status: ehci_pci is active\n Driver Activation Cmd: \"modprobe ehci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n21: PCI 100.1: 0403 Audio device\n [Created at pci.378]\n Unique ID: NXNs.OrWqF_ZZaBC\n Parent ID: vSkL.2XETTswzFpB\n SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.1\n SysFS BusID: 0000:01:00.1\n Hardware Class: sound\n Model: \"ATI RV710/730 HDMI Audio [Radeon HD 4000 series]\"\n Vendor: pci 0x1002 \"ATI Technologies Inc\"\n Device: pci 0xaa38 \"RV710/730 HDMI Audio [Radeon HD 4000 series]\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xfd12 \n Driver: \"snd_hda_intel\"\n Driver Modules: \"snd_hda_intel\"\n Memory Range: 0xd6010000-0xd6013fff (rw,non-prefetchable)\n IRQ: 29 (38 events)\n Module Alias: \"pci:v00001002d0000AA38sv00001179sd0000FD12bc04sc03i00\"\n Driver Info #0:\n Driver Status: snd_hda_intel is active\n Driver Activation Cmd: \"modprobe snd_hda_intel\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #30 (PCI bridge)\n\n22: PCI 3f02.1: 0600 Host bridge\n [Created at pci.378]\n Unique ID: L3Ms.+SZIVB7kJw6\n SysFS ID: /devices/pci0000:3f/0000:3f:02.1\n SysFS BusID: 0000:3f:02.1\n Hardware Class: bridge\n Model: \"Intel 1st Generation Core i3/5/7 Processor QPI Physical 0\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2d11 \"1st Generation Core i3/5/7 Processor QPI Physical 0\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x02\n Module Alias: \"pci:v00008086d00002D11sv00001179sd0000FF1Ebc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n23: PCI 1f.6: 1180 Signal processing controller\n [Created at pci.378]\n Unique ID: ORVU.iLtqN_eyK08\n SysFS ID: /devices/pci0000:00/0000:00:1f.6\n SysFS BusID: 0000:00:1f.6\n Hardware Class: unknown\n Model: \"Intel 5 Series/3400 Series Chipset Thermal Subsystem\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b32 \"5 Series/3400 Series Chipset Thermal Subsystem\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"intel ips\"\n Driver Modules: \"intel_ips\"\n Memory Range: 0xd6104000-0xd6104fff (rw,non-prefetchable)\n IRQ: 21 (no events)\n Module Alias: \"pci:v00008086d00003B32sv00001179sd0000FF1Ebc11sc80i00\"\n Driver Info #0:\n Driver Status: intel_ips is active\n Driver Activation Cmd: \"modprobe intel_ips\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n24: PCI 1c.4: 0604 PCI bridge (Normal decode)\n [Created at pci.378]\n Unique ID: QSNP.zmmitQqdBv0\n SysFS ID: /devices/pci0000:00/0000:00:1c.4\n SysFS BusID: 0000:00:1c.4\n Hardware Class: bridge\n Model: \"Intel 5 Series/3400 Series Chipset PCI Express Root Port 5\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b4a \"5 Series/3400 Series Chipset PCI Express Root Port 5\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"pcieport\"\n IRQ: 17 (no events)\n Module Alias: \"pci:v00008086d00003B4Asv00001179sd0000FF1Ebc06sc04i00\"\n Driver Info #0:\n Driver Status: shpchp is active\n Driver Activation Cmd: \"modprobe shpchp\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n25: PCI 3f00.0: 0600 Host bridge\n [Created at pci.378]\n Unique ID: JWm4.7eUj1wh_HAB\n SysFS ID: /devices/pci0000:3f/0000:3f:00.0\n SysFS BusID: 0000:3f:00.0\n Hardware Class: bridge\n Model: \"Intel Core Processor QuickPath Architecture Generic Non-core Registers\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2c62 \"Core Processor QuickPath Architecture Generic Non-core Registers\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x02\n Module Alias: \"pci:v00008086d00002C62sv00001179sd0000FF1Ebc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n26: PCI 1f.2: 0106 SATA controller (AHCI 1.0)\n [Created at pci.378]\n Unique ID: w7Y8.wH5PELXclsA\n SysFS ID: /devices/pci0000:00/0000:00:1f.2\n SysFS BusID: 0000:00:1f.2\n Hardware Class: storage\n Model: \"Intel 5 Series/3400 Series Chipset 4 port SATA AHCI Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b29 \"5 Series/3400 Series Chipset 4 port SATA AHCI Controller\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"ahci\"\n Driver Modules: \"ahci\"\n I/O Ports: 0x5048-0x504f (rw)\n I/O Ports: 0x5054-0x5057 (rw)\n I/O Ports: 0x5040-0x5047 (rw)\n I/O Ports: 0x5050-0x5053 (rw)\n I/O Ports: 0x5020-0x503f (rw)\n Memory Range: 0xd6105000-0xd61057ff (rw,non-prefetchable)\n IRQ: 26 (7081 events)\n Module Alias: \"pci:v00008086d00003B29sv00001179sd0000FF1Ebc01sc06i01\"\n Driver Info #0:\n Driver Status: ahci is active\n Driver Activation Cmd: \"modprobe ahci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n27: PCI 300.0: 0282 WLAN controller\n [Created at pci.378]\n Unique ID: yPDY.OkM9BHkdPe1\n Parent ID: qTvu.tH6D++6P1cE\n SysFS ID: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0\n SysFS BusID: 0000:03:00.0\n Hardware Class: network\n Model: \"Broadcom BCM4313 802.11bgn Wireless Network Adapter\"\n Vendor: pci 0x14e4 \"Broadcom\"\n Device: pci 0x4727 \"BCM4313 802.11bgn Wireless Network Adapter\"\n SubVendor: pci 0x144f \"Askey Computer Corp.\"\n SubDevice: pci 0x7175 \n Revision: 0x01\n Driver: \"bcma-pci-bridge\"\n Driver Modules: \"bcma\"\n Device File: wlp3s0b1\n Features: WLAN\n Memory Range: 0xd4000000-0xd4003fff (rw,non-prefetchable)\n IRQ: 17 (no events)\n HW Address: b4:74:9f:5b:a3:88\n Permanent HW Address: b4:74:9f:5b:a3:88\n Link detected: no\n WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13\n WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472\n WLAN encryption modes: WEP40 WEP104 TKIP CCMP\n WLAN authentication modes: open sharedkey wpa-psk wpa-eap\n Module Alias: \"pci:v000014E4d00004727sv0000144Fsd00007175bc02sc80i00\"\n Driver Info #0:\n Driver Status: bcma is active\n Driver Activation Cmd: \"modprobe bcma\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (PCI bridge)\n\n28: PCI 1c.0: 0604 PCI bridge (Normal decode)\n [Created at pci.378]\n Unique ID: z8Q3.rSDj1tt_zqD\n SysFS ID: /devices/pci0000:00/0000:00:1c.0\n SysFS BusID: 0000:00:1c.0\n Hardware Class: bridge\n Model: \"Intel 5 Series/3400 Series Chipset PCI Express Root Port 1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b42 \"5 Series/3400 Series Chipset PCI Express Root Port 1\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"pcieport\"\n IRQ: 17 (no events)\n Module Alias: \"pci:v00008086d00003B42sv00001179sd0000FF1Ebc06sc04i00\"\n Driver Info #0:\n Driver Status: shpchp is active\n Driver Activation Cmd: \"modprobe shpchp\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n29: PCI 1f.0: 0601 ISA bridge\n [Created at pci.378]\n Unique ID: BUZT.vC5uMgxBrT5\n SysFS ID: /devices/pci0000:00/0000:00:1f.0\n SysFS BusID: 0000:00:1f.0\n Hardware Class: bridge\n Model: \"Intel HM55 Chipset LPC Interface Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b09 \"HM55 Chipset LPC Interface Controller\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"lpc_ich\"\n Driver Modules: \"lpc_ich\"\n Module Alias: \"pci:v00008086d00003B09sv00001179sd0000FF1Ebc06sc01i00\"\n Driver Info #0:\n Driver Status: lpc_ich is active\n Driver Activation Cmd: \"modprobe lpc_ich\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n30: PCI 01.0: 0604 PCI bridge (Normal decode)\n [Created at pci.378]\n Unique ID: vSkL.2XETTswzFpB\n SysFS ID: /devices/pci0000:00/0000:00:01.0\n SysFS BusID: 0000:00:01.0\n Hardware Class: bridge\n Model: \"Intel Core Processor PCI Express x16 Root Port\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x0045 \"Core Processor PCI Express x16 Root Port\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 24 (no events)\n Module Alias: \"pci:v00008086d00000045sv00001179sd0000FF1Ebc06sc04i00\"\n Driver Info #0:\n Driver Status: shpchp is active\n Driver Activation Cmd: \"modprobe shpchp\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n31: PCI 200.0: 0200 Ethernet controller\n [Created at pci.378]\n Unique ID: c3qJ.uiWJ0ofqvH2\n Parent ID: z8Q3.rSDj1tt_zqD\n SysFS ID: /devices/pci0000:00/0000:00:1c.0/0000:02:00.0\n SysFS BusID: 0000:02:00.0\n Hardware Class: network\n Model: \"Qualcomm Atheros AR8152 v1.1 Fast Ethernet\"\n Vendor: pci 0x1969 \"Qualcomm Atheros\"\n Device: pci 0x2060 \"AR8152 v1.1 Fast Ethernet\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0xc1\n Driver: \"atl1c\"\n Driver Modules: \"atl1c\"\n Device File: enp2s0\n Memory Range: 0xd5000000-0xd503ffff (rw,non-prefetchable)\n I/O Ports: 0x3000-0x3fff (rw)\n IRQ: 30 (694 events)\n HW Address: 00:26:6c:ae:ee:78\n Permanent HW Address: 00:26:6c:ae:ee:78\n Link detected: yes\n Module Alias: \"pci:v00001969d00002060sv00001179sd0000FF1Ebc02sc00i00\"\n Driver Info #0:\n Driver Status: atl1c is active\n Driver Activation Cmd: \"modprobe atl1c\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #28 (PCI bridge)\n\n32: PCI 3f02.2: 0600 Host bridge\n [Created at pci.378]\n Unique ID: COrh.WtV2_lERrI7\n SysFS ID: /devices/pci0000:3f/0000:3f:02.2\n SysFS BusID: 0000:3f:02.2\n Hardware Class: bridge\n Model: \"Intel 1st Generation Core i3/5/7 Processor Reserved\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2d12 \"1st Generation Core i3/5/7 Processor Reserved\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x02\n Module Alias: \"pci:v00008086d00002D12sv00001179sd0000FF1Ebc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n33: PCI 16.0: 0780 Communication controller\n [Created at pci.378]\n Unique ID: WnlC.r1vDpXk9NR2\n SysFS ID: /devices/pci0000:00/0000:00:16.0\n SysFS BusID: 0000:00:16.0\n Hardware Class: unknown\n Model: \"Intel 5 Series/3400 Series Chipset HECI Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b64 \"5 Series/3400 Series Chipset HECI Controller\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x06\n Driver: \"mei_me\"\n Driver Modules: \"mei_me\"\n Memory Range: 0xd6106100-0xd610610f (rw,non-prefetchable)\n IRQ: 27 (15 events)\n Module Alias: \"pci:v00008086d00003B64sv00001179sd0000FF1Ebc07sc80i00\"\n Driver Info #0:\n Driver Status: mei_me is active\n Driver Activation Cmd: \"modprobe mei_me\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n34: PCI 100.0: 0300 VGA compatible controller (VGA)\n [Created at pci.378]\n Unique ID: VCu0.IqraTS9Vgx8\n Parent ID: vSkL.2XETTswzFpB\n SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0\n SysFS BusID: 0000:01:00.0\n Hardware Class: graphics card\n Model: \"ATI RV710/M92 [Mobility Radeon HD 4530/4570/545v]\"\n Vendor: pci 0x1002 \"ATI Technologies Inc\"\n Device: pci 0x9553 \"RV710/M92 [Mobility Radeon HD 4530/4570/545v]\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xfd12 \n Driver: \"radeon\"\n Driver Modules: \"drm\"\n Memory Range: 0xc0000000-0xcfffffff (ro,non-prefetchable)\n I/O Ports: 0x4000-0x4fff (rw)\n Memory Range: 0xd6000000-0xd600ffff (rw,non-prefetchable)\n Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)\n IRQ: 25 (3 events)\n I/O Ports: 0x3c0-0x3df (rw)\n Module Alias: \"pci:v00001002d00009553sv00001179sd0000FD12bc03sc00i00\"\n Driver Info #0:\n Driver Status: radeon is active\n Driver Activation Cmd: \"modprobe radeon\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #30 (PCI bridge)\n\n35: PCI 1b.0: 0403 Audio device\n [Created at pci.378]\n Unique ID: u1Nb.cZY9sRyXw_5\n SysFS ID: /devices/pci0000:00/0000:00:1b.0\n SysFS BusID: 0000:00:1b.0\n Hardware Class: sound\n Model: \"Intel 5 Series/3400 Series Chipset High Definition Audio\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x3b56 \"5 Series/3400 Series Chipset High Definition Audio\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x05\n Driver: \"snd_hda_intel\"\n Driver Modules: \"snd_hda_intel\"\n Memory Range: 0xd6100000-0xd6103fff (rw,non-prefetchable)\n IRQ: 28 (241 events)\n Module Alias: \"pci:v00008086d00003B56sv00001179sd0000FF1Ebc04sc03i00\"\n Driver Info #0:\n Driver Status: snd_hda_intel is active\n Driver Activation Cmd: \"modprobe snd_hda_intel\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n36: PCI 3f02.0: 0600 Host bridge\n [Created at pci.378]\n Unique ID: Tks0.U2dY0d+0oX6\n SysFS ID: /devices/pci0000:3f/0000:3f:02.0\n SysFS BusID: 0000:3f:02.0\n Hardware Class: bridge\n Model: \"Intel Core Processor QPI Link 0\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2d10 \"Core Processor QPI Link 0\"\n SubVendor: pci 0x1179 \"Toshiba America Info Systems\"\n SubDevice: pci 0xff1e \n Revision: 0x02\n Module Alias: \"pci:v00008086d00002D10sv00001179sd0000FF1Ebc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n37: None 00.0: 10002 LCD Monitor\n [Created at monitor.125]\n Unique ID: rdCR.IyVABrDqMV5\n Parent ID: VCu0.IqraTS9Vgx8\n Hardware Class: monitor\n Model: \"AUO LCD Monitor\"\n Vendor: AUO \"AUO\"\n Device: eisa 0x22ec \n Resolution: 1366x768@60Hz\n Size: 344x193 mm\n Year of Manufacture: 2009\n Week of Manufacture: 1\n Detailed Timings #0:\n Resolution: 1366x768\n Horizontal: 1366 1398 1422 1432 (+32 +56 +66) -hsync\n Vertical: 768 771 775 806 (+3 +7 +38) -vsync\n Frequencies: 69.30 MHz, 48.39 kHz, 60.04 Hz\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #34 (VGA compatible controller)\n\n38: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: z9pp.xhndlW9HXJ7\n SysFS ID: /devices/pnp0/00:00\n SysFS BusID: 00:00\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0303 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n39: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: KiZ0.WYwRElrJa93\n SysFS ID: /devices/pnp0/00:03\n SysFS BusID: 00:03\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0b00 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n40: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: QL3u.vEo5eLYm1q9\n SysFS ID: /devices/pnp0/00:01\n SysFS BusID: 00:01\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: TOS \"TOSHIBA\"\n SubDevice: eisa 0x0100 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n41: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: ntp4.B+yZ9Ve8gC1\n SysFS ID: /devices/pnp0/00:04\n SysFS BusID: 00:04\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0c02 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n42: ISA(PnP) 00.0: 0000 Unclassified device\n [Created at isapnp.142]\n Unique ID: tWJy.B+yZ9Ve8gC1\n SysFS ID: /devices/pnp0/00:02\n SysFS BusID: 00:02\n Hardware Class: unknown\n Model: \"Unclassified device\"\n SubVendor: PNP \"PnP\"\n SubDevice: eisa 0x0c02 \n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n43: SCSI 600.0: 10600 Disk\n [Created at block.245]\n Unique ID: JPTW.JHrHtXU+tPD\n Parent ID: 1GTX.iMUBwNE54n0\n SysFS ID: /class/block/sdb\n SysFS BusID: 6:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/host6/target6:0:0/6:0:0:0\n Hardware Class: disk\n Model: \"G & T USB Flash Drive\"\n Vendor: usb 0x0204 \"G & T\"\n Device: usb 0x6025 \"USB Flash Drive\"\n Revision: \"5.00\"\n Serial ID: \"11CB08110819\"\n Driver: \"usb-storage\", \"sd\"\n Driver Modules: \"usb_storage\", \"sd_mod\"\n Device File: /dev/sdb (/dev/sg2)\n Device Files: /dev/sdb, /dev/disk/by-id/usb-G___T_USB_Flash_Drive_11CB08110819-0:0, /dev/disk/by-label/Debian\\x20stretch\\x2020201126-11:11, /dev/disk/by-path/pci-0000:00:1d.0-usb-0:1.3:1.0-scsi-0:0:0:0, /dev/disk/by-uuid/2020-11-26-10-11-36-00\n Device Number: block 8:16-8:31 (char 21:2)\n BIOS id: 0x80\n Geometry (Logical): CHS 1012/32/62\n Size: 2009088 sectors a 512 bytes\n Capacity: 0 GB (1028653056 bytes)\n Speed: 480 Mbps\n Geometry (BIOS EDD): CHS 981/64/32\n Size (BIOS EDD): 2009088 sectors\n Geometry (BIOS Legacy): CHS 980/64/32\n Module Alias: \"usb:v0204p6025d0100dc00dsc00dp00ic08isc06ip50in00\"\n Driver Info #0:\n Driver Status: uas is active\n Driver Activation Cmd: \"modprobe uas\"\n Driver Info #1:\n Driver Status: usb_storage is active\n Driver Activation Cmd: \"modprobe usb_storage\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #20 (USB Controller)\n\n44: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: h4pj.SE1wIdpsiiC\n Parent ID: JPTW.JHrHtXU+tPD\n SysFS ID: /class/block/sdb/sdb1\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sdb1\n Device Files: /dev/sdb1, /dev/disk/by-id/usb-G___T_USB_Flash_Drive_11CB08110819-0:0-part1, /dev/disk/by-label/Debian\\x20stretch\\x2020201126-11:11, /dev/disk/by-partuuid/c5a49965-01, /dev/disk/by-path/pci-0000:00:1d.0-usb-0:1.3:1.0-scsi-0:0:0:0-part1, /dev/disk/by-uuid/2020-11-26-10-11-36-00\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #43 (Disk)\n\n45: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: 8G3o.SE1wIdpsiiC\n Parent ID: JPTW.JHrHtXU+tPD\n SysFS ID: /class/block/sdb/sdb2\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sdb2\n Device Files: /dev/sdb2, /dev/disk/by-id/usb-G___T_USB_Flash_Drive_11CB08110819-0:0-part2, /dev/disk/by-label/Debian\\x20stretch\\x2020201126-11:11, /dev/disk/by-partuuid/c5a49965-02, /dev/disk/by-path/pci-0000:00:1d.0-usb-0:1.3:1.0-scsi-0:0:0:0-part2, /dev/disk/by-uuid/F541-65B8\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #43 (Disk)\n\n46: SCSI 500.0: 10602 CD-ROM (DVD)\n [Created at block.249]\n Unique ID: KD9E.We_LAMOPHH1\n Parent ID: w7Y8.wH5PELXclsA\n SysFS ID: /class/block/sr0\n SysFS BusID: 5:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0\n Hardware Class: cdrom\n Model: \"MATSHITA DVD-RAM UJ890AS\"\n Vendor: \"MATSHITA\"\n Device: \"DVD-RAM UJ890AS\"\n Revision: \"1.40\"\n Driver: \"ahci\", \"sr\"\n Driver Modules: \"ahci\", \"sr_mod\"\n Device File: /dev/sr0 (/dev/sg1)\n Device Files: /dev/sr0, /dev/cdrom, /dev/cdrw, /dev/disk/by-id/ata-MATSHITADVD-RAM_UJ890AS_YJ94_096433, /dev/disk/by-path/pci-0000:00:1f.2-ata-6, /dev/dvd, /dev/dvdrw\n Device Number: block 11:0 (char 21:1)\n Features: CD-R, CD-RW, DVD, DVD-R, DVD-RW, DVD-R DL, DVD+R, DVD+RW, DVD+R DL, DVD-RAM, MRW, MRW-W\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #26 (SATA controller)\n Drive Speed: 24\n\n47: IDE 100.0: 10600 Disk\n [Created at block.245]\n Unique ID: 3OOL.+wXimW9_038\n Parent ID: w7Y8.wH5PELXclsA\n SysFS ID: /class/block/sda\n SysFS BusID: 1:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0\n Hardware Class: disk\n Model: \"HGST HTS725050A7\"\n Vendor: \"HGST\"\n Device: \"HTS725050A7\"\n Revision: \"A420\"\n Serial ID: \"TF0500WJ1T3N4V\"\n Driver: \"ahci\", \"sd\"\n Driver Modules: \"ahci\", \"sd_mod\"\n Device File: /dev/sda\n Device Files: /dev/sda, /dev/disk/by-id/ata-HGST_HTS725050A7E630_TF0500WJ1T3N4V, /dev/disk/by-id/wwn-0x5000cca7c5d90e1c, /dev/disk/by-path/pci-0000:00:1f.2-ata-2\n Device Number: block 8:0-8:15\n BIOS id: 0x81\n Geometry (Logical): CHS 60801/255/63\n Size: 976773168 sectors a 512 bytes\n Capacity: 465 GB (500107862016 bytes)\n Geometry (BIOS EDD): CHS 969021/16/63\n Size (BIOS EDD): 976773168 sectors\n Geometry (BIOS Legacy): CHS 1023/255/63\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #26 (SATA controller)\n\n48: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: bdUI.SE1wIdpsiiC\n Parent ID: 3OOL.+wXimW9_038\n SysFS ID: /class/block/sda/sda1\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sda1\n Device Files: /dev/sda1, /dev/disk/by-id/ata-HGST_HTS725050A7E630_TF0500WJ1T3N4V-part1, /dev/disk/by-id/wwn-0x5000cca7c5d90e1c-part1, /dev/disk/by-label/Reservado\\x20para\\x20el\\x20sistema, /dev/disk/by-partuuid/26c13fc1-01, /dev/disk/by-path/pci-0000:00:1f.2-ata-2-part1, /dev/disk/by-uuid/7228FE0628FDC8DD\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #47 (Disk)\n\n49: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: 2pkM.SE1wIdpsiiC\n Parent ID: 3OOL.+wXimW9_038\n SysFS ID: /class/block/sda/sda2\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sda2\n Device Files: /dev/sda2, /dev/disk/by-id/ata-HGST_HTS725050A7E630_TF0500WJ1T3N4V-part2, /dev/disk/by-id/wwn-0x5000cca7c5d90e1c-part2, /dev/disk/by-partuuid/26c13fc1-02, /dev/disk/by-path/pci-0000:00:1f.2-ata-2-part2, /dev/disk/by-uuid/D47D001D7CFFF856\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #47 (Disk)\n\n50: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: FKGF.0j9+vWlqL56\n Parent ID: pBe4.oLWCeziExdF\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0\n SysFS BusID: 2-1:1.0\n Hardware Class: hub\n Model: \"Intel Integrated Rate Matching Hub\"\n Hotplug: USB\n Vendor: usb 0x8087 \"Intel Corp.\"\n Device: usb 0x0020 \"Integrated Rate Matching Hub\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v8087p0020d0000dc09dsc00dp01ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #60 (Hub)\n\n51: USB 00.2: 11500 Bluetooth Device\n [Created at usb.122]\n Unique ID: X9s8.je3THlN9hV7\n Parent ID: FKGF.0j9+vWlqL56\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.2\n SysFS BusID: 2-1.6:1.2\n Hardware Class: bluetooth\n Model: \"Toshiba Askey Bluetooth Module\"\n Hotplug: USB\n Vendor: usb 0x0930 \"Toshiba Corp.\"\n Device: usb 0x0214 \"Askey Bluetooth Module\"\n Revision: \"5.46\"\n Serial ID: \"4CEDDE970979\"\n Speed: 12 Mbps\n Module Alias: \"usb:v0930p0214d0546dcE0dsc01dp01icFFiscFFipFFin02\"\n Driver Info #0:\n Driver Status: btusb is active\n Driver Activation Cmd: \"modprobe btusb\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #50 (Hub)\n\n52: USB 00.0: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: dwDZ.dAruvaykoi3\n Parent ID: ADDn.0j9+vWlqL56\n SysFS ID: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0\n SysFS BusID: 1-1.3:1.0\n Hardware Class: unknown\n Model: \"Importek Laptop Integrated Webcam\"\n Hotplug: USB\n Vendor: usb 0x10f1 \"Importek\"\n Device: usb 0x1a2a \"Laptop Integrated Webcam\"\n Revision: \"18.15\"\n Serial ID: \"MU418ASA\"\n Driver: \"uvcvideo\"\n Driver Modules: \"uvcvideo\"\n Device File: /dev/input/event12\n Device Files: /dev/input/event12, /dev/input/by-id/usb-Generic_USB_Camera_MU418ASA-event-if00, /dev/input/by-path/pci-0000:00:1a.0-usb-0:1.3:1.0-event\n Device Number: char 13:76\n Speed: 480 Mbps\n Module Alias: \"usb:v10F1p1A2Ad1815dcEFdsc02dp01ic0Eisc01ip00in00\"\n Driver Info #0:\n Driver Status: uvcvideo is active\n Driver Activation Cmd: \"modprobe uvcvideo\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #58 (Hub)\n\n54: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: k4bc.FHd55n4xKo7\n Parent ID: pwJ7.qg1BmtWyHQ2\n SysFS ID: /devices/pci0000:00/0000:00:1a.0/usb1/1-0:1.0\n SysFS BusID: 1-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"4.09\"\n Serial ID: \"0000:00:1a.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0409dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #18 (USB Controller)\n\n58: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: ADDn.0j9+vWlqL56\n Parent ID: k4bc.FHd55n4xKo7\n SysFS ID: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1:1.0\n SysFS BusID: 1-1:1.0\n Hardware Class: hub\n Model: \"Intel Integrated Rate Matching Hub\"\n Hotplug: USB\n Vendor: usb 0x8087 \"Intel Corp.\"\n Device: usb 0x0020 \"Integrated Rate Matching Hub\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v8087p0020d0000dc09dsc00dp01ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #54 (Hub)\n\n60: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: pBe4.oLWCeziExdF\n Parent ID: 1GTX.iMUBwNE54n0\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0\n SysFS BusID: 2-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"4.09\"\n Serial ID: \"0000:00:1d.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0409dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #20 (USB Controller)\n\n61: PS/2 00.0: 10800 Keyboard\n [Created at input.226]\n Unique ID: nLyy.+49ps10DtUF\n Hardware Class: keyboard\n Model: \"AT Translated Set 2 keyboard\"\n Vendor: 0x0001 \n Device: 0x0001 \"AT Translated Set 2 keyboard\"\n Compatible to: int 0x0211 0x0001\n Device File: /dev/input/event0\n Device Number: char 13:64\n Driver Info #0:\n XkbRules: xfree86\n XkbModel: pc104\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n62: PS/2 00.0: 10500 PS/2 Mouse\n [Created at input.249]\n Unique ID: AH6Q.ZHI3OT7LsxA\n Hardware Class: mouse\n Model: \"SynPS/2 Synaptics TouchPad\"\n Vendor: 0x0002 \n Device: 0x0007 \"SynPS/2 Synaptics TouchPad\"\n Compatible to: int 0x0210 0x0002\n Device File: /dev/input/mice (/dev/input/mouse0)\n Device Files: /dev/input/mice, /dev/input/mouse0, /dev/input/event5\n Device Number: char 13:63 (char 13:32)\n Driver Info #0:\n Buttons: 2\n Wheels: 0\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n63: None 00.0: 10103 CPU\n [Created at cpu.460]\n Unique ID: rdCR.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: Intel\n Vendor: \"GenuineIntel\"\n Model: 6.37.5 \"Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,xtopology,nonstop_tsc,aperfmperf,pni,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,popcnt,lahf_lm,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,dtherm,ida,arat,flush_l1d\n Clock: 1200 MHz\n BogoMips: 5333.27\n Cache: 3072 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n64: None 01.0: 10103 CPU\n [Created at cpu.460]\n Unique ID: wkFv.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: Intel\n Vendor: \"GenuineIntel\"\n Model: 6.37.5 \"Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,xtopology,nonstop_tsc,aperfmperf,pni,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,popcnt,lahf_lm,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,dtherm,ida,arat,flush_l1d\n Clock: 1200 MHz\n BogoMips: 5333.27\n Cache: 3072 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n65: None 02.0: 10103 CPU\n [Created at cpu.460]\n Unique ID: +rIN.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: Intel\n Vendor: \"GenuineIntel\"\n Model: 6.37.5 \"Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,xtopology,nonstop_tsc,aperfmperf,pni,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,popcnt,lahf_lm,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,dtherm,ida,arat,flush_l1d\n Clock: 2666 MHz\n BogoMips: 5333.27\n Cache: 3072 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n66: None 03.0: 10103 CPU\n [Created at cpu.460]\n Unique ID: 4zLr.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: Intel\n Vendor: \"GenuineIntel\"\n Model: 6.37.5 \"Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,xtopology,nonstop_tsc,aperfmperf,pni,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,popcnt,lahf_lm,ssbd,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,dtherm,ida,arat,flush_l1d\n Clock: 1200 MHz\n BogoMips: 5333.27\n Cache: 3072 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n67: None 00.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: Ij4C.ndpeucax6V1\n Parent ID: c3qJ.uiWJ0ofqvH2\n SysFS ID: /class/net/enp2s0\n SysFS Device Link: /devices/pci0000:00/0000:00:1c.0/0000:02:00.0\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"atl1c\"\n Driver Modules: \"atl1c\"\n Device File: enp2s0\n HW Address: 00:26:6c:ae:ee:78\n Permanent HW Address: 00:26:6c:ae:ee:78\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #31 (Ethernet controller)\n\n68: None 00.0: 10700 Loopback\n [Created at net.126]\n Unique ID: ZsBS.GQNx7L4uPNA\n SysFS ID: /class/net/lo\n Hardware Class: network interface\n Model: \"Loopback network interface\"\n Device File: lo\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n69: None 00.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: VJXz.ndpeucax6V1\n Parent ID: yPDY.OkM9BHkdPe1\n SysFS ID: /class/net/wlp3s0b1\n SysFS Device Link: /devices/pci0000:00/0000:00:1c.1/0000:03:00.0/bcma0:1\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"brcmsmac\"\n Driver Modules: \"brcmsmac\"\n Device File: wlp3s0b1\n HW Address: b4:74:9f:5b:a3:88\n Permanent HW Address: b4:74:9f:5b:a3:88\n Link detected: no\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #27 (WLAN controller)\n", "lshw": {"capabilities": {"dmi-2.6": "DMI version 2.6", "smbios-2.6": "SMBIOS version 2.6"}, "children": [{"children": [{"capabilities": {"acpi": "ACPI", "agp": "AGP", "biosbootspecification": "BIOS boot specification", "bootselect": "Selectable boot path", "cdboot": "Booting from CD-ROM/DVD", "edd": "Enhanced Disk Drive extensions", "int10video": "INT10 CGA/Mono video", "int13floppy2880": "3.5\" 2.88MB floppy", "int13floppy720": "3.5\" 720KB floppy", "int13floppynec": "NEC 9800 floppy", "int13floppytoshiba": "Toshiba floppy", "int9keyboard": "i8042 keyboard controller", "netboot": "Function-key initiated network service boot", "pci": "PCI bus", "pnp": "Plug-and-Play", "shadowing": "BIOS shadowing", "smartbattery": "Smart battery", "upgrade": "BIOS EEPROM can be upgraded", "usb": "USB legacy emulation"}, "capacity": 1507328, "claimed": true, "class": "memory", "date": "11/11/2010", "description": "BIOS", "id": "firmware", "physid": "0", "size": 1048576, "units": "bytes", "vendor": "INSYDE", "version": "1.90"}, {"children": [{"claimed": true, "class": "memory", "clock": 1067000000, "description": "SODIMM DDR3 Synchronous 1067 MHz (0.9 ns)", "handle": "DMI:0019", "id": "bank:0", "physid": "0", "product": "8JSF25664HZ-1G4D1", "serial": "E277F07F", "size": 2147483648, "slot": "DIMM0", "units": "bytes", "width": 64}, {"claimed": true, "class": "memory", "clock": 1067000000, "description": "SODIMM DDR3 Synchronous 1067 MHz (0.9 ns)", "handle": "DMI:001D", "id": "bank:1", "physid": "1", "product": "8JSF25664HZ-1G4D1", "serial": "E277F084", "size": 2147483648, "slot": "DIMM1", "units": "bytes", "width": 64}], "claimed": true, "class": "memory", "description": "System Memory", "handle": "DMI:0018", "id": "memory", "physid": "18", "size": 4294967296, "slot": "System board or motherboard", "units": "bytes"}, {"businfo": "cpu@0", "capabilities": {"acpi": "thermal control (ACPI)", "aperfmperf": true, "apic": "on-chip advanced programmable interrupt controller (APIC)", "arat": true, "arch_perfmon": true, "bts": true, "clflush": true, "cmov": "conditional move instruction", "constant_tsc": true, "cpufreq": "CPU Frequency scaling", "cx16": true, "cx8": "compare and exchange 8-byte", "de": "debugging extensions", "ds_cpl": true, "dtes64": true, "dtherm": true, "dts": "debug trace and EMON store MSRs", "ept": true, "est": true, "flexpriority": true, "flush_l1d": true, "fpu": "mathematical co-processor", "fpu_exception": "FPU exceptions reporting", "fxsr": "fast floating point save/restore", "ht": "HyperThreading", "ibpb": true, "ibrs": true, "ida": true, "lahf_lm": true, "mca": "machine check architecture", "mce": "machine check exceptions", "mmx": "multimedia extensions (MMX)", "monitor": true, "msr": "model-specific registers", "mtrr": "memory type range registers", "nonstop_tsc": true, "nx": "no-execute bit (NX)", "pae": "4GB+ memory addressing (Physical Address Extension)", "pat": "page attribute table", "pbe": "pending break event", "pdcm": true, "pebs": true, "pge": "page global enable", "pni": true, "popcnt": true, "pse": "page size extensions", "pse36": "36-bit page size extensions", "rdtscp": true, "sep": "fast system calls", "ss": "self-snoop", "ssbd": true, "sse": "streaming SIMD extensions (SSE)", "sse2": "streaming SIMD extensions (SSE2)", "sse4_1": true, "sse4_2": true, "ssse3": true, "stibp": true, "tm": "thermal interrupt and status", "tm2": true, "tpr_shadow": true, "tsc": "time stamp counter", "vme": "virtual mode extensions", "vmx": "CPU virtualization (Vanderpool)", "vnmi": true, "vpid": true, "wp": true, "x86-64": "64bits extensions (x86-64)", "xtopology": true, "xtpr": true}, "capacity": 2667000000, "children": [{"capabilities": {"internal": "Internal", "synchronous": "Synchronous", "unified": "Unified cache", "write-through": "Write-trough"}, "capacity": 3145728, "claimed": true, "class": "memory", "configuration": {"level": "3"}, "description": "L3 cache", "handle": "DMI:0025", "id": "cache:0", "physid": "25", "size": 3145728, "slot": "L3 Cache", "units": "bytes"}, {"capabilities": {"internal": "Internal", "synchronous": "Synchronous", "unified": "Unified cache", "write-through": "Write-trough"}, "capacity": 262144, "claimed": true, "class": "memory", "configuration": {"level": "2"}, "description": "L2 cache", "handle": "DMI:0027", "id": "cache:1", "physid": "27", "size": 262144, "slot": "L2 Cache", "units": "bytes"}, {"capabilities": {"instruction": "Instruction cache", "internal": "Internal", "synchronous": "Synchronous", "write-through": "Write-trough"}, "capacity": 32768, "claimed": true, "class": "memory", "configuration": {"level": "1"}, "description": "L1 cache", "handle": "DMI:0028", "id": "cache:2", "physid": "28", "size": 32768, "slot": "L1 Cache", "units": "bytes"}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.0", "id": "logicalcpu:0", "physid": "0.1", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.1", "id": "logicalcpu:1", "physid": "0.2", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.2", "id": "logicalcpu:2", "physid": "0.3", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.3", "id": "logicalcpu:3", "physid": "0.4", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.4", "id": "logicalcpu:4", "physid": "0.5", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.5", "id": "logicalcpu:5", "physid": "0.6", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.6", "id": "logicalcpu:6", "physid": "0.7", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.7", "id": "logicalcpu:7", "physid": "0.8", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.8", "id": "logicalcpu:8", "physid": "0.9", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.9", "id": "logicalcpu:9", "physid": "0.a", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.10", "id": "logicalcpu:10", "physid": "0.b", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.11", "id": "logicalcpu:11", "physid": "0.c", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.12", "id": "logicalcpu:12", "physid": "0.d", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.13", "id": "logicalcpu:13", "physid": "0.e", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.14", "id": "logicalcpu:14", "physid": "0.f", "width": 64}, {"capabilities": {"logical": "Logical CPU"}, "claimed": true, "class": "processor", "description": "Logical CPU", "handle": "CPU:0.15", "id": "logicalcpu:15", "physid": "0.10", "width": 64}], "claimed": true, "class": "processor", "clock": 1066000000, "configuration": {"cores": "2", "enabledcores": "2", "id": "0", "threads": "4"}, "description": "CPU", "handle": "DMI:0024", "id": "cpu", "physid": "24", "product": "Intel(R) Core(TM) i5 CPU M 480 @ 2.67GHz", "serial": "0002-0655-0000-0000-0000-0000", "size": 1333000000, "slot": "CPU", "units": "Hz", "vendor": "Intel Corp.", "version": "6.5.5", "width": 64}, {"capabilities": {"data": "Data cache", "internal": "Internal", "synchronous": "Synchronous", "write-through": "Write-trough"}, "capacity": 32768, "claimed": true, "class": "memory", "configuration": {"level": "1"}, "description": "L1 cache", "handle": "DMI:0026", "id": "cache", "physid": "26", "size": 32768, "slot": "L1 Cache", "units": "bytes"}, {"businfo": "pci@0000:00:00.0", "children": [{"businfo": "pci@0000:00:01.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "normal_decode": true, "pci": true, "pciexpress": "PCI Express", "pm": "Power Management"}, "children": [{"businfo": "pci@0000:01:00.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "pm": "Power Management", "rom": "extension ROM", "vga_controller": true}, "claimed": true, "class": "display", "clock": 33000000, "configuration": {"driver": "radeon", "latency": "0"}, "description": "VGA compatible controller", "handle": "PCI:0000:01:00.0", "id": "display", "physid": "0", "product": "RV710/M92 [Mobility Radeon HD 4530/4570/545v]", "vendor": "Advanced Micro Devices, Inc. [AMD/ATI]", "version": "00", "width": 32}, {"businfo": "pci@0000:01:00.1", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "pm": "Power Management"}, "claimed": true, "class": "multimedia", "clock": 33000000, "configuration": {"driver": "snd_hda_intel", "latency": "0"}, "description": "Audio device", "handle": "PCI:0000:01:00.1", "id": "multimedia", "physid": "0.1", "product": "RV710/730 HDMI Audio [Radeon HD 4000 series]", "vendor": "Advanced Micro Devices, Inc. [AMD/ATI]", "version": "00", "width": 32}], "claimed": true, "class": "bridge", "clock": 33000000, "configuration": {"driver": "pcieport"}, "description": "PCI bridge", "handle": "PCIBUS:0000:01", "id": "pci:0", "physid": "1", "product": "Core Processor PCI Express x16 Root Port", "vendor": "Intel Corporation", "version": "02", "width": 32}, {"businfo": "pci@0000:00:16.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management"}, "claimed": true, "class": "communication", "clock": 33000000, "configuration": {"driver": "mei_me", "latency": "0"}, "description": "Communication controller", "handle": "PCI:0000:00:16.0", "id": "communication", "physid": "16", "product": "5 Series/3400 Series Chipset HECI Controller", "vendor": "Intel Corporation", "version": "06", "width": 64}, {"businfo": "pci@0000:00:1a.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "debug": "Debug port", "ehci": "Enhanced Host Controller Interface (USB2)", "pm": "Power Management"}, "children": [{"businfo": "usb@1", "capabilities": {"usb-2.00": "USB 2.0"}, "children": [{"businfo": "usb@1:1", "capabilities": {"usb-2.00": "USB 2.0"}, "children": [{"businfo": "usb@1:1.3", "capabilities": {"usb-2.00": "USB 2.0"}, "claimed": true, "class": "multimedia", "configuration": {"driver": "uvcvideo", "maxpower": "500mA", "speed": "480Mbit/s"}, "description": "Video", "handle": "USB:1:3", "id": "usb", "physid": "3", "product": "USB Camera", "serial": "MU418ASA", "vendor": "Generic", "version": "18.15"}], "claimed": true, "class": "bus", "configuration": {"driver": "hub", "slots": "6", "speed": "480Mbit/s"}, "description": "USB hub", "handle": "USB:1:2", "id": "usb", "physid": "1", "product": "Integrated Rate Matching Hub", "vendor": "Intel Corp.", "version": "0.00"}], "claimed": true, "class": "bus", "configuration": {"driver": "hub", "slots": "3", "speed": "480Mbit/s"}, "handle": "USB:1:1", "id": "usbhost", "logicalname": "usb1", "physid": "1", "product": "EHCI Host Controller", "vendor": "Linux 4.9.0-14-686-pae ehci_hcd", "version": "4.09"}], "claimed": true, "class": "bus", "clock": 33000000, "configuration": {"driver": "ehci-pci", "latency": "0"}, "description": "USB controller", "handle": "PCI:0000:00:1a.0", "id": "usb:0", "physid": "1a", "product": "5 Series/3400 Series Chipset USB2 Enhanced Host Controller", "vendor": "Intel Corporation", "version": "05", "width": 32}, {"businfo": "pci@0000:00:1b.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "pm": "Power Management"}, "claimed": true, "class": "multimedia", "clock": 33000000, "configuration": {"driver": "snd_hda_intel", "latency": "0"}, "description": "Audio device", "handle": "PCI:0000:00:1b.0", "id": "multimedia", "physid": "1b", "product": "5 Series/3400 Series Chipset High Definition Audio", "vendor": "Intel Corporation", "version": "05", "width": 64}, {"businfo": "pci@0000:00:1c.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "normal_decode": true, "pci": true, "pciexpress": "PCI Express", "pm": "Power Management"}, "children": [{"businfo": "pci@0000:02:00.0", "capabilities": {"100bt": "100Mbit/s", "100bt-fd": "100Mbit/s (full duplex)", "10bt": "10Mbit/s", "10bt-fd": "10Mbit/s (full duplex)", "autonegotiation": "Auto-negotiation", "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "ethernet": true, "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "physical": "Physical interface", "pm": "Power Management", "tp": "twisted pair", "vpd": "Vital Product Data"}, "capacity": 100000000, "claimed": true, "class": "network", "clock": 33000000, "configuration": {"autonegotiation": "on", "broadcast": "yes", "driver": "atl1c", "driverversion": "1.0.1.1-NAPI", "duplex": "full", "ip": "192.168.0.123", "latency": "0", "link": "yes", "multicast": "yes", "port": "twisted pair", "speed": "100Mbit/s"}, "description": "Ethernet interface", "handle": "PCI:0000:02:00.0", "id": "network", "logicalname": "enp2s0", "physid": "0", "product": "AR8152 v1.1 Fast Ethernet", "serial": "00:26:6c:ae:ee:78", "size": 100000000, "units": "bit/s", "vendor": "Qualcomm Atheros", "version": "c1", "width": 64}], "claimed": true, "class": "bridge", "clock": 33000000, "configuration": {"driver": "pcieport"}, "description": "PCI bridge", "handle": "PCIBUS:0000:02", "id": "pci:1", "physid": "1c", "product": "5 Series/3400 Series Chipset PCI Express Root Port 1", "vendor": "Intel Corporation", "version": "05", "width": 32}, {"businfo": "pci@0000:00:1c.1", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "normal_decode": true, "pci": true, "pciexpress": "PCI Express", "pm": "Power Management"}, "children": [{"businfo": "pci@0000:03:00.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "ethernet": true, "msi": "Message Signalled Interrupts", "pciexpress": "PCI Express", "physical": "Physical interface", "pm": "Power Management", "wireless": "Wireless-LAN"}, "claimed": true, "class": "network", "clock": 33000000, "configuration": {"broadcast": "yes", "driver": "brcmsmac", "driverversion": "4.9.0-14-686-pae", "firmware": "N/A", "latency": "0", "link": "no", "multicast": "yes", "wireless": "IEEE 802.11"}, "description": "Wireless interface", "disabled": true, "handle": "PCI:0000:03:00.0", "id": "network", "logicalname": "wlp3s0b1", "physid": "0", "product": "BCM4313 802.11bgn Wireless Network Adapter", "serial": "b4:74:9f:5b:a3:88", "vendor": "Broadcom Inc. and subsidiaries", "version": "01", "width": 64}], "claimed": true, "class": "bridge", "clock": 33000000, "configuration": {"driver": "pcieport"}, "description": "PCI bridge", "handle": "PCIBUS:0000:03", "id": "pci:2", "physid": "1c.1", "product": "5 Series/3400 Series Chipset PCI Express Root Port 2", "vendor": "Intel Corporation", "version": "05", "width": 32}, {"businfo": "pci@0000:00:1c.4", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "normal_decode": true, "pci": true, "pciexpress": "PCI Express", "pm": "Power Management"}, "claimed": true, "class": "bridge", "clock": 33000000, "configuration": {"driver": "pcieport"}, "description": "PCI bridge", "handle": "PCIBUS:0000:20", "id": "pci:3", "physid": "1c.4", "product": "5 Series/3400 Series Chipset PCI Express Root Port 5", "vendor": "Intel Corporation", "version": "05", "width": 32}, {"businfo": "pci@0000:00:1d.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "debug": "Debug port", "ehci": "Enhanced Host Controller Interface (USB2)", "pm": "Power Management"}, "children": [{"businfo": "usb@2", "capabilities": {"usb-2.00": "USB 2.0"}, "children": [{"businfo": "usb@2:1", "capabilities": {"usb-2.00": "USB 2.0"}, "children": [{"businfo": "usb@2:1.3", "capabilities": {"emulated": "Emulated device", "scsi": "SCSI", "usb-2.00": "USB 2.0"}, "children": [{"businfo": "scsi@6:0.0.0", "capabilities": {"removable": "support is removable"}, "children": [{"capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"capabilities": {"bootable": "Bootable partition (active)", "nofs": "No filesystem", "primary": "Primary partition"}, "capacity": 479166464, "claimed": true, "class": "volume", "configuration": {"mount.fstype": "iso9660", "mount.options": "ro,noatime", "state": "mounted"}, "description": "Empty partition", "dev": "8:17", "id": "volume:0", "logicalname": ["/dev/sdb1", "/lib/live/mount/medium"], "physid": "1"}, {"capabilities": {"boot": "Contains boot code", "fat": "Windows FAT", "initialized": "initialized volume", "primary": "Primary partition"}, "claimed": true, "class": "volume", "configuration": {"FATs": "2", "filesystem": "fat"}, "description": "Windows FAT volume", "dev": "8:18", "id": "volume:1", "logicalname": "/dev/sdb2", "physid": "2", "serial": "f541-65b8", "size": 18446744073709551104, "vendor": "mkfs.fat", "version": "FAT12"}], "claimed": true, "class": "disk", "configuration": {"signature": "c5a49965"}, "dev": "8:16", "id": "medium", "logicalname": "/dev/sdb", "physid": "0", "size": 1028653056, "units": "bytes"}], "claimed": true, "class": "disk", "configuration": {"ansiversion": "2", "logicalsectorsize": "512", "sectorsize": "512"}, "description": "SCSI Disk", "dev": "8:16", "handle": "SCSI:06:00:00:00", "id": "disk", "logicalname": "/dev/sdb", "physid": "0.0.0", "product": "USB Flash Drive", "size": 1028653056, "units": "bytes", "vendor": "G & T", "version": "5.00"}], "claimed": true, "class": "storage", "configuration": {"driver": "usb-storage", "maxpower": "100mA", "speed": "480Mbit/s"}, "description": "Mass storage device", "handle": "USB:2:3", "id": "usb:0", "logicalname": "scsi6", "physid": "3", "product": "USB Flash Drive", "serial": "11CB08110819", "vendor": "G & T", "version": "1.00"}, {"businfo": "usb@2:1.6", "capabilities": {"bluetooth": "Bluetooth wireless radio", "usb-2.00": "USB 2.0"}, "claimed": true, "class": "communication", "configuration": {"driver": "btusb", "speed": "12Mbit/s"}, "description": "Bluetooth wireless interface", "handle": "USB:2:4", "id": "usb:1", "physid": "6", "product": "Askey Bluetooth Module", "serial": "4CEDDE970979", "vendor": "Broadcom Corp", "version": "5.46"}], "claimed": true, "class": "bus", "configuration": {"driver": "hub", "slots": "8", "speed": "480Mbit/s"}, "description": "USB hub", "handle": "USB:2:2", "id": "usb", "physid": "1", "product": "Integrated Rate Matching Hub", "vendor": "Intel Corp.", "version": "0.00"}], "claimed": true, "class": "bus", "configuration": {"driver": "hub", "slots": "3", "speed": "480Mbit/s"}, "handle": "USB:2:1", "id": "usbhost", "logicalname": "usb2", "physid": "1", "product": "EHCI Host Controller", "vendor": "Linux 4.9.0-14-686-pae ehci_hcd", "version": "4.09"}], "claimed": true, "class": "bus", "clock": 33000000, "configuration": {"driver": "ehci-pci", "latency": "0"}, "description": "USB controller", "handle": "PCI:0000:00:1d.0", "id": "usb:1", "physid": "1d", "product": "5 Series/3400 Series Chipset USB2 Enhanced Host Controller", "vendor": "Intel Corporation", "version": "05", "width": 32}, {"businfo": "pci@0000:00:1e.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "pci": true, "subtractive_decode": true}, "claimed": true, "class": "bridge", "clock": 33000000, "description": "PCI bridge", "handle": "PCIBUS:0000:04", "id": "pci:4", "physid": "1e", "product": "82801 Mobile PCI Bridge", "vendor": "Intel Corporation", "version": "a5", "width": 32}, {"businfo": "pci@0000:00:1f.0", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "isa": true}, "claimed": true, "class": "bridge", "clock": 33000000, "configuration": {"driver": "lpc_ich", "latency": "0"}, "description": "ISA bridge", "handle": "PCI:0000:00:1f.0", "id": "isa", "physid": "1f", "product": "HM55 Chipset LPC Interface Controller", "vendor": "Intel Corporation", "version": "05", "width": 32}, {"businfo": "pci@0000:00:1f.2", "capabilities": {"ahci_1.0": true, "bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management", "storage": true}, "claimed": true, "class": "storage", "clock": 66000000, "configuration": {"driver": "ahci", "latency": "0"}, "description": "SATA controller", "handle": "PCI:0000:00:1f.2", "id": "storage", "physid": "1f.2", "product": "5 Series/3400 Series Chipset 4 port SATA AHCI Controller", "vendor": "Intel Corporation", "version": "05", "width": 32}, {"businfo": "pci@0000:00:1f.3", "claimed": true, "class": "bus", "clock": 33000000, "configuration": {"driver": "i801_smbus", "latency": "0"}, "description": "SMBus", "handle": "PCI:0000:00:1f.3", "id": "serial", "physid": "1f.3", "product": "5 Series/3400 Series Chipset SMBus Controller", "vendor": "Intel Corporation", "version": "05", "width": 64}, {"businfo": "pci@0000:00:1f.6", "capabilities": {"bus_master": "bus mastering", "cap_list": "PCI capabilities listing", "msi": "Message Signalled Interrupts", "pm": "Power Management"}, "claimed": true, "class": "generic", "clock": 33000000, "configuration": {"driver": "intel ips", "latency": "0"}, "description": "Signal processing controller", "handle": "PCI:0000:00:1f.6", "id": "generic", "physid": "1f.6", "product": "5 Series/3400 Series Chipset Thermal Subsystem", "vendor": "Intel Corporation", "version": "05", "width": 64}], "claimed": true, "class": "bridge", "clock": 33000000, "description": "Host bridge", "handle": "PCIBUS:0000:00", "id": "pci:0", "physid": "100", "product": "Core Processor DRAM Controller", "vendor": "Intel Corporation", "version": "02", "width": 32}, {"businfo": "pci@0000:3f:00.0", "claimed": true, "class": "bridge", "clock": 33000000, "description": "Host bridge", "handle": "PCIBUS:0000:3f", "id": "pci:1", "physid": "101", "product": "Core Processor QuickPath Architecture Generic Non-core Registers", "vendor": "Intel Corporation", "version": "02", "width": 32}, {"businfo": "pci@0000:3f:00.1", "claimed": true, "class": "bridge", "clock": 33000000, "description": "Host bridge", "handle": "PCIBUS:0000:3f", "id": "pci:2", "physid": "102", "product": "Core Processor QuickPath Architecture System Address Decoder", "vendor": "Intel Corporation", "version": "02", "width": 32}, {"businfo": "pci@0000:3f:02.0", "claimed": true, "class": "bridge", "clock": 33000000, "description": "Host bridge", "handle": "PCIBUS:0000:3f", "id": "pci:3", "physid": "103", "product": "Core Processor QPI Link 0", "vendor": "Intel Corporation", "version": "02", "width": 32}, {"businfo": "pci@0000:3f:02.1", "claimed": true, "class": "bridge", "clock": 33000000, "description": "Host bridge", "handle": "PCIBUS:0000:3f", "id": "pci:4", "physid": "104", "product": "1st Generation Core i3/5/7 Processor QPI Physical 0", "vendor": "Intel Corporation", "version": "02", "width": 32}, {"businfo": "pci@0000:3f:02.2", "claimed": true, "class": "bridge", "clock": 33000000, "description": "Host bridge", "handle": "PCIBUS:0000:3f", "id": "pci:5", "physid": "105", "product": "1st Generation Core i3/5/7 Processor Reserved", "vendor": "Intel Corporation", "version": "02", "width": 32}, {"businfo": "pci@0000:3f:02.3", "claimed": true, "class": "bridge", "clock": 33000000, "description": "Host bridge", "handle": "PCIBUS:0000:3f", "id": "pci:6", "physid": "106", "product": "1st Generation Core i3/5/7 Processor Reserved", "vendor": "Intel Corporation", "version": "02", "width": 32}, {"capabilities": {"emulated": "Emulated device"}, "children": [{"businfo": "scsi@1:0.0.0", "capabilities": {"partitioned": "Partitioned disk", "partitioned:dos": "MS-DOS partition table"}, "children": [{"businfo": "scsi@1:0.0.0,1", "capabilities": {"bootable": "Bootable partition (active)", "initialized": "initialized volume", "ntfs": "Windows NTFS", "primary": "Primary partition"}, "capacity": 104857600, "claimed": true, "class": "volume", "configuration": {"clustersize": "4096", "created": "2019-04-05 08:10:11", "filesystem": "ntfs", "label": "Reservado para el sistema", "state": "clean"}, "description": "Windows NTFS volume", "dev": "8:1", "id": "volume:0", "logicalname": "/dev/sda1", "physid": "1", "serial": "28fd-c8dd", "size": 103808512, "version": "3.1"}, {"businfo": "scsi@1:0.0.0,2", "capabilities": {"initialized": "initialized volume", "ntfs": "Windows NTFS", "primary": "Primary partition"}, "capacity": 500000882688, "claimed": true, "class": "volume", "configuration": {"clustersize": "4096", "created": "2019-04-05 08:10:14", "filesystem": "ntfs", "state": "clean"}, "description": "Windows NTFS volume", "dev": "8:2", "id": "volume:1", "logicalname": "/dev/sda2", "physid": "2", "serial": "90a89a82-b567-b141-aa11-b8851da96da5", "size": 499995639296, "version": "3.1"}], "claimed": true, "class": "disk", "configuration": {"ansiversion": "5", "logicalsectorsize": "512", "sectorsize": "4096", "signature": "26c13fc1"}, "description": "ATA Disk", "dev": "8:0", "handle": "SCSI:01:00:00:00", "id": "disk", "logicalname": "/dev/sda", "physid": "0.0.0", "product": "HGST HTS725050A7", "serial": "TF0500WJ1T3N4V", "size": 500107862016, "units": "bytes", "version": "A420"}], "claimed": true, "class": "storage", "id": "scsi:0", "logicalname": "scsi1", "physid": "1"}, {"capabilities": {"emulated": "Emulated device"}, "children": [{"businfo": "scsi@5:0.0.0", "capabilities": {"audio": "Audio CD playback", "cd-r": "CD-R burning", "cd-rw": "CD-RW burning", "dvd": "DVD playback", "dvd-r": "DVD-R burning", "dvd-ram": "DVD-RAM burning", "removable": "support is removable"}, "claimed": true, "class": "disk", "configuration": {"ansiversion": "5", "status": "nodisc"}, "description": "DVD-RAM writer", "dev": "11:0", "handle": "SCSI:05:00:00:00", "id": "cdrom", "logicalname": ["/dev/cdrom", "/dev/cdrw", "/dev/dvd", "/dev/dvdrw", "/dev/sr0"], "physid": "0.0.0", "product": "DVD-RAM UJ890AS", "vendor": "MATSHITA", "version": "1.40"}], "claimed": true, "class": "storage", "id": "scsi:1", "logicalname": "scsi5", "physid": "2"}], "claimed": true, "class": "bus", "description": "Motherboard", "handle": "DMI:0002", "id": "core", "physid": "0", "product": "Portable PC", "serial": "Base Board Serial Number", "slot": "Base Board Chassis Location", "vendor": "TOSHIBA", "version": "Base Board Version"}, {"capacity": 75, "class": "power", "description": "OEM_Define1", "id": "power", "physid": "1", "product": "OEM_Define5", "serial": "OEM_Define3", "units": "mWh", "vendor": "OEM_Define2", "version": "OEM_Define6"}], "claimed": true, "class": "system", "configuration": {"boot": "normal", "chassis": "notebook", "family": "Intel_Mobile", "sku": "Calpella", "uuid": "7F6ADCF0-3FC2-11E0-B5D0-00266CAEEE78"}, "description": "Notebook", "handle": "DMI:0001", "id": "debian", "product": "Satellite L655 (Calpella)", "serial": "2B335208Q", "vendor": "TOSHIBA", "version": "PSK1JE-0HS00RCE", "width": 32}}, "device": {"actions": [{"elapsed": 1, "rate": 0.9713, "type": "BenchmarkRamSysbench"}, {"elapsed": 240, "severity": "Info", "type": "StressTest"}], "chassis": "Netbook", "manufacturer": "TOSHIBA", "model": "Satellite L655", "serialNumber": "2B335208Q", "sku": "Calpella", "type": "Laptop", "version": "PSK1JE-0HS00RCE"}, "elapsed": 360, "endTime": "2022-05-05T07:56:32.477121+00:00", "software": "Workbench", "type": "Snapshot", "uuid": "2596b886-7df5-4923-aa2a-2b7f7d305062", "version": "11.0b11"} \ No newline at end of file diff --git a/tests/files/system_uuid2.json b/tests/files/system_uuid2.json new file mode 100644 index 00000000..17b12b07 --- /dev/null +++ b/tests/files/system_uuid2.json @@ -0,0 +1,3416 @@ +{ + "data": { + "dmidecode": "# dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 3.0 present.\n36 structures occupying 1653 bytes.\nTable at 0x000E80B0.\n\nHandle 0x0000, DMI type 0, 24 bytes\nBIOS Information\n\tVendor: Acer\n\tVersion: V3.05(DDR2)\n\tRelease Date: 08/12/2010\n\tROM Size: 2 MB\n\tCharacteristics:\n\t\tPCI is supported\n\t\tBIOS is upgradeable\n\t\tBIOS shadowing is allowed\n\t\tBoot from CD is supported\n\t\tSelectable boot is supported\n\t\tBIOS ROM is socketed\n\t\tEDD is supported\n\t\tJapanese floppy for NEC 9800 1.2 MB is supported (int 13h)\n\t\tJapanese floppy for Toshiba 1.2 MB is supported (int 13h)\n\t\t5.25\"/360 kB floppy services are supported (int 13h)\n\t\t5.25\"/1.2 MB floppy services are supported (int 13h)\n\t\t3.5\"/720 kB floppy services are supported (int 13h)\n\t\t3.5\"/2.88 MB floppy services are supported (int 13h)\n\t\t8042 keyboard services are supported (int 9h)\n\t\tCGA/mono video services are supported (int 10h)\n\t\tACPI is supported\n\t\tUSB legacy is supported\n\t\tTargeted content distribution is supported\n\tBIOS Revision: 5.220\n\nHandle 0x0001, DMI type 1, 27 bytes\nSystem Information\n\tManufacturer: Acer\n\tProduct Name: AOHAPPY\n\tVersion: V3.05(DDR2)\n\tSerial Number: LUSEA0D010038879A01601\n\tUUID: 9ce64e36-829c-b19c-2111-88ae1da6f3d0\n\tWake-up Type: Power Switch\n\tSKU Number: NetTopSku\n\tFamily: Intel_Mobile\n\nHandle 0x0002, DMI type 2, 16 bytes\nBase Board Information\n\tManufacturer: Acer\n\tProduct Name: AOHAPPY\n\tVersion: V3.05(DDR2)\n\tSerial Number: Base Board Serial Number\n\tAsset Tag: Base Board Asset Tag\n\tFeatures:\n\t\tBoard is a hosting board\n\t\tBoard is replaceable\n\tLocation In Chassis: Base Board Chassis Location\n\tChassis Handle: 0x0003\n\tType: Motherboard\n\tContained Object Handles: 0\n\nHandle 0x0003, DMI type 3, 22 bytes\nChassis Information\n\tManufacturer: Acer\n\tType: Notebook\n\tLock: Not Present\n\tVersion: V3.05(DDR2)\n\tSerial Number: Chassis Serial Number\n\tAsset Tag: \n\tBoot-up State: Safe\n\tPower Supply State: Safe\n\tThermal State: Safe\n\tSecurity Status: None\n\tOEM Information: 0x00000000\n\tHeight: Unspecified\n\tNumber Of Power Cords: 1\n\tContained Elements: 0\n\tSKU Number: Not Specified\n\nHandle 0x0004, DMI type 9, 17 bytes\nSystem Slot Information\n\tDesignation: J7\n\tType: x1 PCI Express\n\tCurrent Usage: Available\n\tLength: Other\n\tID: 0\n\tCharacteristics:\n\t\tPME signal is supported\n\t\tHot-plug devices are supported\n\nHandle 0x0005, DMI type 11, 5 bytes\nOEM Strings\n\tString 1: EFI Software for PineTrail \n\tString 2: String2 for Original Equipment Manufacturer\n\tString 3: String3 for Original Equipment Manufacturer\n\tString 4: String4 for Original Equipment Manufacturer\n\tString 5: String5 for Original Equipment Manufacturer\n\nHandle 0x0006, DMI type 12, 5 bytes\nSystem Configuration Options\n\tOption 1: String1 for Type12 Equipment Manufacturer\n\tOption 2: String2 for Type12 Equipment Manufacturer\n\tOption 3: String3 for Type12 Equipment Manufacturer\n\tOption 4: String4 for Type12 Equipment Manufacturer\n\nHandle 0x0007, DMI type 21, 7 bytes\nBuilt-in Pointing Device\n\tType: Touch Pad\n\tInterface: PS/2\n\tButtons: 4\n\nHandle 0x0008, DMI type 32, 20 bytes\nSystem Boot Information\n\tStatus: No errors detected\n\nHandle 0x0009, DMI type 129, 5 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t81 05 09 00 4F\n\tStrings:\n\t\tem Test 1\n\t\tOem Test 2\n\nHandle 0x000A, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J20\n\tInternal Connector Type: None\n\tExternal Reference Designator: Keyboard\n\tExternal Connector Type: PS/2\n\tPort Type: Keyboard Port\n\nHandle 0x000B, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J22\n\tInternal Connector Type: None\n\tExternal Reference Designator: Mouse\n\tExternal Connector Type: PS/2\n\tPort Type: Mouse Port\n\nHandle 0x000C, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J9\n\tInternal Connector Type: None\n\tExternal Reference Designator: SD Card Slot\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000D, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J14\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000E, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J16\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000F, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J18\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0010, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J8\n\tInternal Connector Type: None\n\tExternal Reference Designator: Network\n\tExternal Connector Type: RJ-45\n\tPort Type: Network Port\n\nHandle 0x0011, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: U11\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: OnBoard Primary IDE\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x0012, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J5\n\tInternal Connector Type: None\n\tExternal Reference Designator: CRT\n\tExternal Connector Type: DB-15 female\n\tPort Type: Video Port\n\nHandle 0x0013, DMI type 40, 18 bytes\nAdditional Information 1\n\tReferenced Handle: 0x0004\n\tReferenced Offset: 0x05\n\tString: PCIExpressx16\n\tValue: 0xaa\nAdditional Information 2\n\tReferenced Handle: 0x0000\n\tReferenced Offset: 0x05\n\tString: Compiler Version: VC 9.0\n\tValue: 0x05dc\n\nHandle 0x0014, DMI type 41, 11 bytes\nOnboard Device\n\tReference Designation: 82567LM Gigabit Network Connection\n\tType: Ethernet\n\tStatus: Enabled\n\tType Instance: 1\n\tBus Address: 0000:00:00.1\n\nHandle 0x0015, DMI type 16, 15 bytes\nPhysical Memory Array\n\tLocation: System Board Or Motherboard\n\tUse: System Memory\n\tError Correction Type: None\n\tMaximum Capacity: 4 GB\n\tError Information Handle: No Error\n\tNumber Of Devices: 2\n\nHandle 0x0016, DMI type 17, 28 bytes\nMemory Device\n\tArray Handle: 0x0015\n\tError Information Handle: 0x0017\n\tTotal Width: 64 bits\n\tData Width: 64 bits\n\tSize: 1 GB\n\tForm Factor: SODIMM\n\tSet: None\n\tLocator: DIMM0\n\tBank Locator: BANK 0\n\tType: DDR2\n\tType Detail: Synchronous\n\tSpeed: 667 MT/s\n\tManufacturer: AD00000000000000\n\tSerial Number: 4F43487B\n\tAsset Tag: Unknown\n\tPart Number: 48594D503131325336344350362D53362020\n\tRank: Unknown\n\nHandle 0x0017, DMI type 18, 23 bytes\n32-bit Memory Error Information\n\tType: OK\n\tGranularity: Unknown\n\tOperation: Unknown\n\tVendor Syndrome: Unknown\n\tMemory Array Address: Unknown\n\tDevice Address: Unknown\n\tResolution: Unknown\n\nHandle 0x0018, DMI type 6, 12 bytes\nMemory Module Information\n\tSocket Designation: DIMM0\n\tBank Connections: None\n\tCurrent Speed: 1 ns\n\tType: Unknown DIMM\n\tInstalled Size: 1024 MB (Single-bank Connection)\n\tEnabled Size: 1024 MB (Single-bank Connection)\n\tError Status: OK\n\nHandle 0x0019, DMI type 20, 19 bytes\nMemory Device Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x0003FFFFFFF\n\tRange Size: 1 GB\n\tPhysical Device Handle: 0x0016\n\tMemory Array Mapped Address Handle: 0x001B\n\tPartition Row Position: 1\n\nHandle 0x001A, DMI type 18, 23 bytes\n32-bit Memory Error Information\n\tType: OK\n\tGranularity: Unknown\n\tOperation: Unknown\n\tVendor Syndrome: Unknown\n\tMemory Array Address: Unknown\n\tDevice Address: Unknown\n\tResolution: Unknown\n\nHandle 0x001B, DMI type 19, 15 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x0003FFFFFFF\n\tRange Size: 1 GB\n\tPhysical Array Handle: 0x0015\n\tPartition Width: 0\n\nHandle 0x001C, DMI type 5, 20 bytes\nMemory Controller Information\n\tError Detecting Method: None\n\tError Correcting Capabilities:\n\t\tUnknown\n\t\tNone\n\tSupported Interleave: One-way Interleave\n\tCurrent Interleave: One-way Interleave\n\tMaximum Memory Module Size: 4096 MB\n\tMaximum Total Memory Size: 8192 MB\n\tSupported Speeds:\n\t\tOther\n\tSupported Memory Types:\n\t\tOther\n\tMemory Module Voltage: Unknown\n\tAssociated Memory Slots: 2\n\t\t0x0018\n\t\t0x0018\n\tEnabled Error Correcting Capabilities:\n\t\tNone\n\nHandle 0x001D, DMI type 4, 42 bytes\nProcessor Information\n\tSocket Designation: CPU\n\tType: Central Processor\n\tFamily: Pentium M\n\tManufacturer: Intel(R) Corporation\n\tID: CA 06 01 00 FF FB E9 BF\n\tSignature: Type 0, Family 6, Model 28, Stepping 10\n\tFlags:\n\t\tFPU (Floating-point unit on-chip)\n\t\tVME (Virtual mode extension)\n\t\tDE (Debugging extension)\n\t\tPSE (Page size extension)\n\t\tTSC (Time stamp counter)\n\t\tMSR (Model specific registers)\n\t\tPAE (Physical address extension)\n\t\tMCE (Machine check exception)\n\t\tCX8 (CMPXCHG8 instruction supported)\n\t\tAPIC (On-chip APIC hardware supported)\n\t\tSEP (Fast system call)\n\t\tMTRR (Memory type range registers)\n\t\tPGE (Page global enable)\n\t\tMCA (Machine check architecture)\n\t\tCMOV (Conditional move instruction supported)\n\t\tPAT (Page attribute table)\n\t\tCLFSH (CLFLUSH instruction supported)\n\t\tDS (Debug store)\n\t\tACPI (ACPI supported)\n\t\tMMX (MMX technology supported)\n\t\tFXSR (FXSAVE and FXSTOR instructions supported)\n\t\tSSE (Streaming SIMD extensions)\n\t\tSSE2 (Streaming SIMD extensions 2)\n\t\tSS (Self-snoop)\n\t\tHTT (Multi-threading)\n\t\tTM (Thermal monitor supported)\n\t\tPBE (Pending break enabled)\n\tVersion: Intel(R) Atom(TM) CPU N450 @ 1.66GHz\n\tVoltage: 1.6 V\n\tExternal Clock: 667 MHz\n\tMax Speed: 1666 MHz\n\tCurrent Speed: 1666 MHz\n\tStatus: Populated, Enabled\n\tUpgrade: Socket 478\n\tL1 Cache Handle: 0x001F\n\tL2 Cache Handle: 0x001E\n\tL3 Cache Handle: Not Provided\n\tSerial Number: Not Specified\n\tAsset Tag: FFFF\n\tPart Number: Not Specified\n\tCore Count: 1\n\tCore Enabled: 1\n\tThread Count: 2\n\tCharacteristics:\n\t\t64-bit capable\n\nHandle 0x001E, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: Unknown\n\tConfiguration: Enabled, Not Socketed, Level 2\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 512 kB\n\tMaximum Size: 512 kB\n\tSupported SRAM Types:\n\t\tSynchronous\n\tInstalled SRAM Type: Synchronous\n\tSpeed: Unknown\n\tError Correction Type: Single-bit ECC\n\tSystem Type: Unified\n\tAssociativity: 8-way Set-associative\n\nHandle 0x001F, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: Unknown\n\tConfiguration: Enabled, Not Socketed, Level 1\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 32 kB\n\tMaximum Size: 32 kB\n\tSupported SRAM Types:\n\t\tSynchronous\n\tInstalled SRAM Type: Synchronous\n\tSpeed: Unknown\n\tError Correction Type: Single-bit ECC\n\tSystem Type: Instruction\n\tAssociativity: 8-way Set-associative\n\nHandle 0x0020, DMI type 170, 62 bytes\nAcer Hotkey Function\n\tFunction bitmap for Communication Button: 0x0001\n\t\tWiFi: Yes\n\t\t3G: No\n\t\tWiMAX: No\n\t\tBluetooth: No\n\tFunction bitmap for Application Button: 0x0008\n\tFunction bitmap for Media Button: 0x0007\n\tFunction bitmap for Display Button: 0x000c\n\tFunction bitmap for Others Button: 0x0002\n\tCommunication Function Key Number: 3\n\nHandle 0x0021, DMI type 172, 6 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tAC 06 21 00 01 00\n\nHandle 0x0022, DMI type 171, 19 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tAB 13 22 00 02 69 19 60 20 05 86 80 D8 27 07 86\n\t\t80 83 00\n\nHandle 0x0023, DMI type 127, 4 bytes\nEnd Of Table\n\n", + "hwinfo": "01: None 00.0: 10105 BIOS\n [Created at bios.186]\n Unique ID: rdCR.lZF+r4EgHp4\n Hardware Class: bios\n BIOS Keyboard LED Status:\n Scroll Lock: off\n Num Lock: off\n Caps Lock: off\n Serial Port 0: 0x3f8\n Base Memory: 639 kB\n PnP BIOS: SST2400\n BIOS: extended read supported\n SMBIOS Version: 3.0\n BIOS Info: #0\n Vendor: \"Acer\"\n Version: \"V3.05(DDR2)\"\n Date: \"08/12/2010\"\n Start Address: 0x00000\n ROM Size: 2048 kB\n Features: 0x0403000000004bfb9880\n PCI supported\n BIOS flashable\n BIOS shadowing allowed\n CD boot supported\n Selectable boot supported\n BIOS ROM socketed\n EDD spec supported\n 1.2MB NEC 9800 Japanese Floppy supported\n 1.2MB Toshiba Japanese Floppy supported\n 360kB Floppy supported\n 1.2MB Floppy supported\n 720kB Floppy supported\n 2.88MB Floppy supported\n 8042 Keyboard Services supported\n CGA/Mono Video supported\n ACPI supported\n USB Legacy supported\n System Info: #1\n Manufacturer: \"Acer\"\n Product: \"AOHAPPY\"\n Version: \"V3.05(DDR2)\"\n Serial: \"LUSEA0D010038879A01601\"\n UUID: 364ee69c-9c82-9cb1-2111-88ae1da6f3d0\n Wake-up: 0x06 (Power Switch)\n Board Info: #2\n Manufacturer: \"Acer\"\n Product: \"AOHAPPY\"\n Version: \"V3.05(DDR2)\"\n Serial: \"Base Board Serial Number\"\n Asset Tag: \"Base Board Asset Tag\"\n Type: 0x0a (Motherboard)\n Features: 0x09\n Hosting Board\n Replaceable\n Location: \"Base Board Chassis Location\"\n Chassis: #3\n Chassis Info: #3\n Manufacturer: \"Acer\"\n Version: \"V3.05(DDR2)\"\n Serial: \"Chassis Serial Number\"\n Type: 0x0a (Notebook)\n Bootup State: 0x03 (Safe)\n Power Supply State: 0x03 (Safe)\n Thermal State: 0x03 (Safe)\n Security Status: 0x03 (None)\n System Slot: #4\n Designation: \"J7\"\n Type: 0xa5 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 0\n Characteristics: 0x0300 (PME#, Hot-Plug)\n OEM Strings: #5\n EFI Software for PineTrail\n String2 for Original Equipment Manufacturer\n String3 for Original Equipment Manufacturer\n String4 for Original Equipment Manufacturer\n String5 for Original Equipment Manufacturer\n System Config Options (Jumpers & Switches) #6:\n String1 for Type12 Equipment Manufacturer\n String2 for Type12 Equipment Manufacturer\n String3 for Type12 Equipment Manufacturer\n String4 for Type12 Equipment Manufacturer\n Pointing Device: #7\n Type: 0x07 (Touch Pad)\n Interface: 0x04 (PS/2)\n Buttons: 4\n Type 32 Record: #8\n Data 00: 20 14 08 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 10: 00 00 00 00\n Type 129 Record: #9\n Data 00: 81 05 09 00 4f\n String 1: \"em Test 1\"\n String 2: \"Oem Test 2\"\n Port Connector: #10\n Type: 0x0d (Keyboard Port)\n Internal Designator: \"J20\"\n External Designator: \"Keyboard\"\n External Connector: 0x0f (PS/2)\n Port Connector: #11\n Type: 0x0e (Mouse Port)\n Internal Designator: \"J22\"\n External Designator: \"Mouse\"\n External Connector: 0x0f (PS/2)\n Port Connector: #12\n Type: 0x10 (USB)\n Internal Designator: \"J9\"\n External Designator: \"SD Card Slot\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #13\n Type: 0x10 (USB)\n Internal Designator: \"J14\"\n External Designator: \"USB\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #14\n Type: 0x10 (USB)\n Internal Designator: \"J16\"\n External Designator: \"USB\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #15\n Type: 0x10 (USB)\n Internal Designator: \"J18\"\n External Designator: \"USB\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #16\n Type: 0x1f (Network Port)\n Internal Designator: \"J8\"\n External Designator: \"Network\"\n External Connector: 0x0b (RJ-45)\n Port Connector: #17\n Type: 0xff (Other)\n Internal Designator: \"U11\"\n Internal Connector: 0x16 (On Board IDE)\n External Designator: \"OnBoard Primary IDE\"\n Port Connector: #18\n Type: 0x1c (Video Port)\n Internal Designator: \"J5\"\n External Designator: \"CRT\"\n External Connector: 0x07 (DB-15 pin female)\n Type 40 Record: #19\n Data 00: 28 12 13 00 02 06 04 00 05 01 aa 07 00 00 05 02\n Data 10: dc 05\n String 1: \"PCIExpressx16\"\n String 2: \"Compiler Version: VC 9.0\"\n Type 41 Record: #20\n Data 00: 29 0b 14 00 01 85 01 00 00 00 01\n String 1: \"82567LM Gigabit Network Connection\"\n Physical Memory Array: #21\n Use: 0x03 (System memory)\n Location: 0x03 (Motherboard)\n Slots: 2\n Max. Size: 4 GB\n ECC: 0x03 (None)\n Error Info: No Error\n Memory Device: #22\n Location: \"DIMM0\"\n Bank: \"BANK 0\"\n Manufacturer: \"AD00000000000000\"\n Serial: \"4F43487B\"\n Asset Tag: \"Unknown\"\n Part Number: \"48594D503131325336344350362D53362020\"\n Memory Array: #21\n Error Info: #23\n Form Factor: 0x0d (SODIMM)\n Type: 0x13 (Other)\n Type Detail: 0x0080 (Synchronous)\n Data Width: 64 bits\n Size: 1 GB\n Speed: 667 MHz\n 32bit-Memory Error Info: #23\n Type: 0x03 (OK)\n Granularity: 0x02 (Unknown)\n Operation: 0x02 (Unknown)\n Type 6 Record: #24\n Data 00: 06 0c 18 00 01 ff 01 02 01 0a 0a 00\n String 1: \"DIMM0\"\n Memory Device Mapping: #25\n Memory Device: #22\n Array Mapping: #27\n Row: 1\n Interleave Pos: 0\n Interleaved Depth: 0\n Start Address: 0x00000000\n End Address: 0x40000000\n 32bit-Memory Error Info: #26\n Type: 0x03 (OK)\n Granularity: 0x02 (Unknown)\n Operation: 0x02 (Unknown)\n Memory Array Mapping: #27\n Memory Array: #21\n Partition Width: 0\n Start Address: 0x00000000\n End Address: 0x40000000\n Type 5 Record: #28\n Data 00: 05 14 1c 00 03 06 03 03 0c 01 00 01 00 00 02 18\n Data 10: 00 18 00 04\n Processor Info: #29\n Socket: \"CPU\"\n Socket Type: 0x0f (Socket 478)\n Socket Status: Populated\n Type: 0x03 (CPU)\n Family: 0xb9 (Other)\n Manufacturer: \"Intel(R) Corporation\"\n Version: \"Intel(R) Atom(TM) CPU N450 @ 1.66GHz\"\n Asset Tag: \"FFFF\"\n Processor ID: 0xbfe9fbff000106ca\n Status: 0x01 (Enabled)\n Voltage: 1.6 V\n External Clock: 667 MHz\n Max. Speed: 1666 MHz\n Current Speed: 1666 MHz\n L1 Cache: #31\n L2 Cache: #30\n Cache Info: #30\n Designation: \"Unknown\"\n Level: L2\n State: Enabled\n Mode: 0x01 (Write Back)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x05 (Unified)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 512 kB\n Current Size: 512 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Cache Info: #31\n Designation: \"Unknown\"\n Level: L1\n State: Enabled\n Mode: 0x01 (Write Back)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x03 (Instruction)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 32 kB\n Current Size: 32 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Type 170 Record: #32\n Data 00: aa 3e 20 00 01 00 08 00 07 00 0c 00 02 00 03 02\n Data 10: 41 08 23 02 08 00 41 02 04 00 49 02 01 00 4a 02\n Data 20: 02 00 61 02 08 00 62 02 04 00 63 02 01 00 64 02\n Data 30: 02 00 81 02 04 00 85 02 02 00 82 02 08 00\n Type 172 Record: #33\n Data 00: ac 06 21 00 01 00\n Type 171 Record: #34\n Data 00: ab 13 22 00 02 69 19 60 20 05 86 80 d8 27 07 86\n Data 10: 80 83 00\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n02: None 00.0: 10107 System\n [Created at sys.64]\n Unique ID: rdCR.n_7QNeEnh23\n Hardware Class: system\n Model: \"System\"\n Formfactor: \"laptop\"\n Driver Info #0:\n Driver Status: thermal,fan are not active\n Driver Activation Cmd: \"modprobe thermal; modprobe fan\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n03: None 00.0: 10104 FPU\n [Created at misc.191]\n Unique ID: rdCR.EMpH5pjcahD\n Hardware Class: unknown\n Model: \"FPU\"\n I/O Ports: 0xf0-0xff (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n04: None 00.0: 0801 DMA controller (8237)\n [Created at misc.205]\n Unique ID: rdCR.f5u1ucRm+H9\n Hardware Class: unknown\n Model: \"DMA controller\"\n I/O Ports: 0x00-0xcf7 (rw)\n I/O Ports: 0xc0-0xdf (rw)\n I/O Ports: 0x80-0x8f (rw)\n DMA: 4\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n05: None 00.0: 0800 PIC (8259)\n [Created at misc.218]\n Unique ID: rdCR.8uRK7LxiIA2\n Hardware Class: unknown\n Model: \"PIC\"\n I/O Ports: 0x20-0x21 (rw)\n I/O Ports: 0xa0-0xa1 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n06: None 00.0: 0900 Keyboard controller\n [Created at misc.250]\n Unique ID: rdCR.9N+EecqykME\n Hardware Class: unknown\n Model: \"Keyboard controller\"\n I/O Port: 0x60 (rw)\n I/O Port: 0x64 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n07: None 00.0: 10400 PS/2 Controller\n [Created at misc.303]\n Unique ID: rdCR.DziBbWO85o5\n Hardware Class: unknown\n Model: \"PS/2 Controller\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n10: None 00.0: 10102 Main Memory\n [Created at memory.74]\n Unique ID: rdCR.CxwsZFjVASF\n Hardware Class: memory\n Model: \"Main Memory\"\n Memory Range: 0x00000000-0x3c54efff (rw)\n Memory Size: 960 MB\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n11: PCI 1f.2: 0106 SATA controller (AHCI 1.0)\n [Created at pci.386]\n Unique ID: w7Y8.D2p8kvfIMi4\n SysFS ID: /devices/pci0000:00/0000:00:1f.2\n SysFS BusID: 0000:00:1f.2\n Hardware Class: storage\n Model: \"Intel NM10/ICH7 Family SATA Controller [AHCI mode]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27c1 \"NM10/ICH7 Family SATA Controller [AHCI mode]\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"ahci\"\n Driver Modules: \"ahci\"\n I/O Ports: 0x60b8-0x60bf (rw)\n I/O Ports: 0x60cc-0x60cf (rw)\n I/O Ports: 0x60b0-0x60b7 (rw)\n I/O Ports: 0x60c8-0x60cb (rw)\n I/O Ports: 0x60a0-0x60af (rw)\n Memory Range: 0x58204000-0x582043ff (rw,non-prefetchable)\n IRQ: 26 (447 events)\n Module Alias: \"pci:v00008086d000027C1sv00001025sd00000349bc01sc06i01\"\n Driver Info #0:\n Driver Status: ahci is active\n Driver Activation Cmd: \"modprobe ahci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n12: PCI 1c.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: z8Q3._3VzjoUPJG5\n SysFS ID: /devices/pci0000:00/0000:00:1c.0\n SysFS BusID: 0000:00:1c.0\n Hardware Class: bridge\n Model: \"Intel NM10/ICH7 Family PCI Express Port 1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27d0 \"NM10/ICH7 Family PCI Express Port 1\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 24 (no events)\n Module Alias: \"pci:v00008086d000027D0sv00001025sd00000349bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n13: PCI 1d.3: 0c03 USB Controller (UHCI)\n [Created at pci.386]\n Unique ID: eEx1._hf+eJmJdO5\n SysFS ID: /devices/pci0000:00/0000:00:1d.3\n SysFS BusID: 0000:00:1d.3\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB UHCI Controller #4\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27cb \"NM10/ICH7 Family USB UHCI Controller #4\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"uhci_hcd\"\n Driver Modules: \"uhci_hcd\"\n I/O Ports: 0x6020-0x603f (rw)\n IRQ: 22 (6495 events)\n Module Alias: \"pci:v00008086d000027CBsv00001025sd00000349bc0Csc03i00\"\n Driver Info #0:\n Driver Status: uhci-hcd is active\n Driver Activation Cmd: \"modprobe uhci-hcd\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n14: PCI 1f.0: 0601 ISA bridge\n [Created at pci.386]\n Unique ID: BUZT.79IsqZc8gE8\n SysFS ID: /devices/pci0000:00/0000:00:1f.0\n SysFS BusID: 0000:00:1f.0\n Hardware Class: bridge\n Model: \"Intel NM10 Family LPC Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27bc \"NM10 Family LPC Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Module Alias: \"pci:v00008086d000027BCsv00001025sd00000349bc06sc01i00\"\n Driver Info #0:\n Driver Status: lpc_ich is active\n Driver Activation Cmd: \"modprobe lpc_ich\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n15: PCI 200.0: 0280 Network controller\n [Created at pci.386]\n Unique ID: B35A.b2hGE10yl_2\n Parent ID: qTvu.0vNThxjpM16\n SysFS ID: /devices/pci0000:00/0000:00:1c.1/0000:02:00.0\n SysFS BusID: 0000:02:00.0\n Hardware Class: network\n Model: \"Intel Centrino Wireless-N 1000 BGN\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x0083 \"Centrino Wireless-N 1000 [Condor Peak]\"\n SubVendor: pci 0x8086 \"Intel Corporation\"\n SubDevice: pci 0x1305 \"Centrino Wireless-N 1000 BGN\"\n Memory Range: 0x56000000-0x56001fff (rw,non-prefetchable)\n IRQ: 17 (3 events)\n Module Alias: \"pci:v00008086d00000083sv00008086sd00001305bc02sc80i00\"\n Driver Info #0:\n Driver Status: iwlwifi is active\n Driver Activation Cmd: \"modprobe iwlwifi\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (PCI bridge)\n\n16: PCI 1d.1: 0c03 USB Controller (UHCI)\n [Created at pci.386]\n Unique ID: vayM.ysmVhAXvZd4\n SysFS ID: /devices/pci0000:00/0000:00:1d.1\n SysFS BusID: 0000:00:1d.1\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB UHCI Controller #2\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27c9 \"NM10/ICH7 Family USB UHCI Controller #2\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"uhci_hcd\"\n Driver Modules: \"uhci_hcd\"\n I/O Ports: 0x6060-0x607f (rw)\n IRQ: 20 (no events)\n Module Alias: \"pci:v00008086d000027C9sv00001025sd00000349bc0Csc03i00\"\n Driver Info #0:\n Driver Status: uhci-hcd is active\n Driver Activation Cmd: \"modprobe uhci-hcd\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n17: PCI 100.0: 0200 Ethernet controller\n [Created at pci.386]\n Unique ID: rBUF.AfcciKaOfeA\n Parent ID: z8Q3._3VzjoUPJG5\n SysFS ID: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0\n SysFS BusID: 0000:01:00.0\n Hardware Class: network\n Model: \"Qualcomm Atheros AR8152 v1.1 Fast Ethernet\"\n Vendor: pci 0x1969 \"Qualcomm Atheros\"\n Device: pci 0x2060 \"AR8152 v1.1 Fast Ethernet\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0xc1\n Driver: \"atl1c\"\n Driver Modules: \"atl1c\"\n Device File: eth0\n Memory Range: 0x57000000-0x5703ffff (rw,non-prefetchable)\n I/O Ports: 0x5000-0x5fff (rw)\n IRQ: 27 (17 events)\n HW Address: 88:ae:1d:a6:f3:d0\n Permanent HW Address: 88:ae:1d:a6:f3:d0\n Link detected: yes\n Module Alias: \"pci:v00001969d00002060sv00001025sd00000349bc02sc00i00\"\n Driver Info #0:\n Driver Status: atl1c is active\n Driver Activation Cmd: \"modprobe atl1c\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #12 (PCI bridge)\n\n18: PCI 02.1: 0380 Display controller\n [Created at pci.386]\n Unique ID: ruGf.O1P126g_eh2\n SysFS ID: /devices/pci0000:00/0000:00:02.1\n SysFS BusID: 0000:00:02.1\n Hardware Class: graphics card\n Model: \"Intel Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0xa012 \"Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Memory Range: 0x58100000-0x5817ffff (rw,non-prefetchable)\n Module Alias: \"pci:v00008086d0000A012sv00001025sd00000349bc03sc80i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n19: PCI 1b.0: 0403 Audio device\n [Created at pci.386]\n Unique ID: u1Nb.ZCVQnTUjxO7\n SysFS ID: /devices/pci0000:00/0000:00:1b.0\n SysFS BusID: 0000:00:1b.0\n Hardware Class: sound\n Model: \"Intel NM10/ICH7 Family High Definition Audio Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27d8 \"NM10/ICH7 Family High Definition Audio Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"snd_hda_intel\"\n Driver Modules: \"snd_hda_intel\"\n Memory Range: 0x58200000-0x58203fff (rw,non-prefetchable)\n IRQ: 28 (319 events)\n Module Alias: \"pci:v00008086d000027D8sv00001025sd00000349bc04sc03i00\"\n Driver Info #0:\n Driver Status: snd_hda_intel is active\n Driver Activation Cmd: \"modprobe snd_hda_intel\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n20: PCI 1e.0: 0604 PCI bridge (Subtractive decode)\n [Created at pci.386]\n Unique ID: 6NW+.SZEhIj3ISCE\n SysFS ID: /devices/pci0000:00/0000:00:1e.0\n SysFS BusID: 0000:00:1e.0\n Hardware Class: bridge\n Model: \"Intel 82801 Mobile PCI Bridge\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2448 \"82801 Mobile PCI Bridge\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0xe2\n Module Alias: \"pci:v00008086d00002448sv00001025sd00000349bc06sc04i01\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n21: PCI 1f.3: 0c05 SMBus\n [Created at pci.386]\n Unique ID: nS1_.lKifNMuDxy7\n SysFS ID: /devices/pci0000:00/0000:00:1f.3\n SysFS BusID: 0000:00:1f.3\n Hardware Class: unknown\n Model: \"Intel NM10/ICH7 Family SMBus Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27da \"NM10/ICH7 Family SMBus Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"i801_smbus\"\n Driver Modules: \"i2c_i801\"\n I/O Ports: 0x6000-0x601f (rw)\n IRQ: 17 (3 events)\n Module Alias: \"pci:v00008086d000027DAsv00001025sd00000349bc0Csc05i00\"\n Driver Info #0:\n Driver Status: i2c_i801 is active\n Driver Activation Cmd: \"modprobe i2c_i801\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n22: PCI 00.0: 0600 Host bridge\n [Created at pci.386]\n Unique ID: qLht.PdlOCWxMAH1\n SysFS ID: /devices/pci0000:00/0000:00:00.0\n SysFS BusID: 0000:00:00.0\n Hardware Class: bridge\n Model: \"Intel Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0xa010 \"Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Module Alias: \"pci:v00008086d0000A010sv00001025sd00000349bc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n23: PCI 1c.1: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: qTvu.0vNThxjpM16\n SysFS ID: /devices/pci0000:00/0000:00:1c.1\n SysFS BusID: 0000:00:1c.1\n Hardware Class: bridge\n Model: \"Intel NM10/ICH7 Family PCI Express Port 2\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27d2 \"NM10/ICH7 Family PCI Express Port 2\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 25 (no events)\n Module Alias: \"pci:v00008086d000027D2sv00001025sd00000349bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n24: PCI 1d.2: 0c03 USB Controller (UHCI)\n [Created at pci.386]\n Unique ID: mvRC.THjFAlec505\n SysFS ID: /devices/pci0000:00/0000:00:1d.2\n SysFS BusID: 0000:00:1d.2\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB UHCI Controller #3\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27ca \"NM10/ICH7 Family USB UHCI Controller #3\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"uhci_hcd\"\n Driver Modules: \"uhci_hcd\"\n I/O Ports: 0x6040-0x605f (rw)\n IRQ: 21 (no events)\n Module Alias: \"pci:v00008086d000027CAsv00001025sd00000349bc0Csc03i00\"\n Driver Info #0:\n Driver Status: uhci-hcd is active\n Driver Activation Cmd: \"modprobe uhci-hcd\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n25: PCI 1d.0: 0c03 USB Controller (UHCI)\n [Created at pci.386]\n Unique ID: 1GTX.RSqlCcPC2F4\n SysFS ID: /devices/pci0000:00/0000:00:1d.0\n SysFS BusID: 0000:00:1d.0\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB UHCI Controller #1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27c8 \"NM10/ICH7 Family USB UHCI Controller #1\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"uhci_hcd\"\n Driver Modules: \"uhci_hcd\"\n I/O Ports: 0x6080-0x609f (rw)\n IRQ: 18 (no events)\n Module Alias: \"pci:v00008086d000027C8sv00001025sd00000349bc0Csc03i00\"\n Driver Info #0:\n Driver Status: uhci-hcd is active\n Driver Activation Cmd: \"modprobe uhci-hcd\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n26: PCI 02.0: 0300 VGA compatible controller (VGA)\n [Created at pci.386]\n Unique ID: _Znp.ta1P8GNKN4D\n SysFS ID: /devices/pci0000:00/0000:00:02.0\n SysFS BusID: 0000:00:02.0\n Hardware Class: graphics card\n Model: \"Intel Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0xa011 \"Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Driver: \"i915\"\n Driver Modules: \"i915\"\n Memory Range: 0x58180000-0x581fffff (rw,non-prefetchable)\n I/O Ports: 0x60c0-0x60c7 (rw)\n Memory Range: 0x40000000-0x4fffffff (ro,non-prefetchable)\n Memory Range: 0x58000000-0x580fffff (rw,non-prefetchable)\n Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)\n IRQ: 16 (12 events)\n I/O Ports: 0x3c0-0x3df (rw)\n Module Alias: \"pci:v00008086d0000A011sv00001025sd00000349bc03sc00i00\"\n Driver Info #0:\n Driver Status: i915 is active\n Driver Activation Cmd: \"modprobe i915\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n27: PCI 1d.7: 0c03 USB Controller (EHCI)\n [Created at pci.386]\n Unique ID: 5YuN.+6CxPyMngcA\n SysFS ID: /devices/pci0000:00/0000:00:1d.7\n SysFS BusID: 0000:00:1d.7\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB2 EHCI Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27cc \"NM10/ICH7 Family USB2 EHCI Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"ehci-pci\"\n Driver Modules: \"ehci_pci\"\n Memory Range: 0x58204400-0x582047ff (rw,non-prefetchable)\n IRQ: 22 (6495 events)\n Module Alias: \"pci:v00008086d000027CCsv00001025sd00000349bc0Csc03i20\"\n Driver Info #0:\n Driver Status: ehci-hcd is active\n Driver Activation Cmd: \"modprobe ehci-hcd\"\n Driver Info #1:\n Driver Status: ehci_pci is active\n Driver Activation Cmd: \"modprobe ehci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n28: None 00.0: 10002 LCD Monitor\n [Created at monitor.125]\n Unique ID: rdCR.FRpzZ4yUQ5E\n Parent ID: _Znp.ta1P8GNKN4D\n Hardware Class: monitor\n Model: \"AUO LCD Monitor\"\n Vendor: AUO \"AUO\"\n Device: eisa 0x61d2 \n Resolution: 1024x600@60Hz\n Size: 222x125 mm\n Year of Manufacture: 2009\n Week of Manufacture: 0\n Detailed Timings #0:\n Resolution: 1024x600\n Horizontal: 1024 1072 1104 1338 (+48 +80 +314) -hsync\n Vertical: 600 602 608 620 (+2 +8 +20) -vsync\n Frequencies: 49.80 MHz, 37.22 kHz, 60.03 Hz\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #26 (VGA compatible controller)\n\n29: SCSI 400.0: 10600 Disk\n [Created at block.245]\n Unique ID: cLrx.EcDsbfOGe_4\n Parent ID: 5YuN.+6CxPyMngcA\n SysFS ID: /class/block/sdb\n SysFS BusID: 4:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0\n Hardware Class: disk\n Model: \"Generic Flash Disk\"\n Vendor: usb 0x058f \"Generic\"\n Device: usb 0x6387 \"Flash Disk\"\n Revision: \"8.07\"\n Serial ID: \"CB7A8994\"\n Driver: \"usb-storage\", \"sd\"\n Driver Modules: \"usb_storage\", \"sd_mod\"\n Device File: /dev/sdb (/dev/sg1)\n Device Files: /dev/sdb, /dev/disk/by-id/usb-Generic_Flash_Disk_CB7A8994-0:0, /dev/disk/by-path/pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0\n Device Number: block 8:16-8:31 (char 21:1)\n BIOS id: 0x80\n Geometry (Logical): CHS 7680/64/32\n Size: 15728640 sectors a 512 bytes\n Capacity: 7 GB (8053063680 bytes)\n Speed: 480 Mbps\n Geometry (BIOS Legacy): CHS 1023/64/32\n Module Alias: \"usb:v058Fp6387d0100dc00dsc00dp00ic08isc06ip50in00\"\n Driver Info #0:\n Driver Status: uas is active\n Driver Activation Cmd: \"modprobe uas\"\n Driver Info #1:\n Driver Status: usb_storage is active\n Driver Activation Cmd: \"modprobe usb_storage\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #27 (USB Controller)\n\n30: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: h4pj.SE1wIdpsiiC\n Parent ID: cLrx.EcDsbfOGe_4\n SysFS ID: /class/block/sdb/sdb1\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sdb1\n Device Files: /dev/sdb1, /dev/disk/by-uuid/2022-05-04-11-38-52-00, /dev/disk/by-id/usb-Generic_Flash_Disk_CB7A8994-0:0-part1, /dev/disk/by-path/pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0-part1, /dev/disk/by-partuuid/31eb10bc-01, /dev/disk/by-label/WORKBENCH\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #29 (Disk)\n\n31: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: 8G3o.SE1wIdpsiiC\n Parent ID: cLrx.EcDsbfOGe_4\n SysFS ID: /class/block/sdb/sdb2\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sdb2\n Device Files: /dev/sdb2, /dev/disk/by-uuid/5CCA-7F76, /dev/disk/by-partuuid/31eb10bc-02, /dev/disk/by-path/pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0-part2, /dev/disk/by-id/usb-Generic_Flash_Disk_CB7A8994-0:0-part2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #29 (Disk)\n\n32: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: bRJs.SE1wIdpsiiC\n Parent ID: cLrx.EcDsbfOGe_4\n SysFS ID: /class/block/sdb/sdb3\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sdb3\n Device Files: /dev/sdb3, /dev/disk/by-partuuid/31eb10bc-03, /dev/disk/by-path/pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0-part3, /dev/disk/by-id/usb-Generic_Flash_Disk_CB7A8994-0:0-part3, /dev/disk/by-uuid/E90B-54DD\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #29 (Disk)\n\n33: IDE 00.0: 10600 Disk\n [Created at block.245]\n Unique ID: 3OOL.UDy1GyFdcg9\n Parent ID: w7Y8.D2p8kvfIMi4\n SysFS ID: /class/block/sda\n SysFS BusID: 0:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0\n Hardware Class: disk\n Model: \"WDC WD1600BEVT-2\"\n Vendor: \"WDC\"\n Device: \"WD1600BEVT-2\"\n Revision: \"1A01\"\n Serial ID: \"WD-WX11A80W7430\"\n Driver: \"ahci\", \"sd\"\n Driver Modules: \"ahci\", \"sd_mod\"\n Device File: /dev/sda\n Device Files: /dev/sda, /dev/disk/by-path/pci-0000:00:1f.2-ata-1, /dev/disk/by-path/pci-0000:00:1f.2-ata-1.0, /dev/disk/by-id/wwn-0x50014ee60062fb13, /dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WX11A80W7430\n Device Number: block 8:0-8:15\n BIOS id: 0x81\n Geometry (Logical): CHS 19457/255/63\n Size: 312581808 sectors a 512 bytes\n Capacity: 149 GB (160041885696 bytes)\n Geometry (BIOS EDD): CHS 310101/16/63\n Size (BIOS EDD): 312581808 sectors\n Geometry (BIOS Legacy): CHS 1023/255/63\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #11 (SATA controller)\n\n34: USB 00.1: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: xnLL.t657xhWJSc1\n Parent ID: k4bc.9T1GDCLyFd9\n SysFS ID: /devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.1\n SysFS BusID: 1-4:1.1\n Hardware Class: unknown\n Model: \"ALi Gateway Webcam\"\n Hotplug: USB\n Vendor: usb 0x0402 \"ALi Corp.\"\n Device: usb 0x9665 \"Gateway Webcam\"\n Revision: \"0.09\"\n Driver: \"uvcvideo\"\n Driver Modules: \"uvcvideo\"\n Speed: 480 Mbps\n Module Alias: \"usb:v0402p9665d0009dcEFdsc02dp01ic0Eisc02ip00in01\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #38 (Hub)\n\n36: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: uIhY.gkSaZmjGyhD\n Parent ID: vayM.ysmVhAXvZd4\n SysFS ID: /devices/pci0000:00/0000:00:1d.1/usb3/3-0:1.0\n SysFS BusID: 3-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 1.1 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0001 \"1.1 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.1\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1D6Bp0001d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #16 (USB Controller)\n\n37: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: zPk0.RTX9xWW_uz4\n Parent ID: mvRC.THjFAlec505\n SysFS ID: /devices/pci0000:00/0000:00:1d.2/usb4/4-0:1.0\n SysFS BusID: 4-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 1.1 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0001 \"1.1 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.2\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1D6Bp0001d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #24 (USB Controller)\n\n38: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: k4bc.9T1GDCLyFd9\n Parent ID: 5YuN.+6CxPyMngcA\n SysFS ID: /devices/pci0000:00/0000:00:1d.7/usb1/1-0:1.0\n SysFS BusID: 1-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.7\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #27 (USB Controller)\n\n40: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: 2XnU.CCckIHJirFC\n Parent ID: eEx1._hf+eJmJdO5\n SysFS ID: /devices/pci0000:00/0000:00:1d.3/usb5/5-0:1.0\n SysFS BusID: 5-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 1.1 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0001 \"1.1 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.3\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1D6Bp0001d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #13 (USB Controller)\n\n41: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: pBe4.v+N+B0xY+P6\n Parent ID: 1GTX.RSqlCcPC2F4\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/usb2/2-0:1.0\n SysFS BusID: 2-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 1.1 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0001 \"1.1 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1D6Bp0001d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #25 (USB Controller)\n\n42: PS/2 00.0: 10800 Keyboard\n [Created at input.226]\n Unique ID: nLyy.+49ps10DtUF\n Hardware Class: keyboard\n Model: \"AT Translated Set 2 keyboard\"\n Vendor: 0x0001 \n Device: 0x0001 \"AT Translated Set 2 keyboard\"\n Compatible to: int 0x0211 0x0001\n Device File: /dev/input/event0\n Device Files: /dev/input/event0, /dev/input/by-path/platform-i8042-serio-0-event-kbd\n Device Number: char 13:64\n Driver Info #0:\n XkbRules: xfree86\n XkbModel: pc104\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n43: PS/2 00.0: 10500 PS/2 Mouse\n [Created at input.249]\n Unique ID: AH6Q.ZHI3OT7LsxA\n Hardware Class: mouse\n Model: \"SynPS/2 Synaptics TouchPad\"\n Vendor: 0x0002 \n Device: 0x0007 \"SynPS/2 Synaptics TouchPad\"\n Compatible to: int 0x0210 0x0002\n Device File: /dev/input/mice (/dev/input/mouse0)\n Device Files: /dev/input/mice, /dev/input/mouse0, /dev/input/event6, /dev/input/by-path/platform-i8042-serio-1-event-mouse, /dev/input/by-path/platform-i8042-serio-1-mouse\n Device Number: char 13:63 (char 13:32)\n Driver Info #0:\n Buttons: 2\n Wheels: 0\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n44: None 00.0: 10103 CPU\n [Created at cpu.465]\n Unique ID: rdCR.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.28.10 \"Intel(R) Atom(TM) CPU N450 @ 1.66GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,lm,constant_tsc,arch_perfmon,pebs,bts,nopl,cpuid,aperfmperf,pni,dtes64,monitor,ds_cpl,est,tm2,ssse3,cx16,xtpr,pdcm,movbe,lahf_lm,dtherm\n Clock: 1659 MHz\n BogoMips: 3325.10\n Cache: 512 kb\n Units/Processor: 2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n45: None 01.0: 10103 CPU\n [Created at cpu.465]\n Unique ID: wkFv.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.28.10 \"Intel(R) Atom(TM) CPU N450 @ 1.66GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,lm,constant_tsc,arch_perfmon,pebs,bts,nopl,cpuid,aperfmperf,pni,dtes64,monitor,ds_cpl,est,tm2,ssse3,cx16,xtpr,pdcm,movbe,lahf_lm,dtherm\n Clock: 1659 MHz\n BogoMips: 3325.10\n Cache: 512 kb\n Units/Processor: 2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n46: None 00.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: usDW.ndpeucax6V1\n Parent ID: rBUF.AfcciKaOfeA\n SysFS ID: /class/net/eth0\n SysFS Device Link: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"atl1c\"\n Driver Modules: \"atl1c\"\n Device File: eth0\n HW Address: 88:ae:1d:a6:f3:d0\n Permanent HW Address: 88:ae:1d:a6:f3:d0\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (Ethernet controller)\n\n47: None 00.0: 10700 Loopback\n [Created at net.126]\n Unique ID: ZsBS.GQNx7L4uPNA\n SysFS ID: /class/net/lo\n Hardware Class: network interface\n Model: \"Loopback network interface\"\n Device File: lo\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n", + "lshw": { + "capabilities": { + "dmi-3.0": "DMI version 3.0", + "smbios-3.0": "SMBIOS version 3.0", + "smp": "Symmetric Multi-Processing", + "vsyscall32": "32-bit processes" + }, + "children": [ + { + "children": [ + { + "capabilities": { + "acpi": "ACPI", + "bootselect": "Selectable boot path", + "cdboot": "Booting from CD-ROM/DVD", + "edd": "Enhanced Disk Drive extensions", + "int10video": "INT10 CGA/Mono video", + "int13floppy1200": "5.25\" 1.2MB floppy", + "int13floppy2880": "3.5\" 2.88MB floppy", + "int13floppy360": "5.25\" 360KB floppy", + "int13floppy720": "3.5\" 720KB floppy", + "int13floppynec": "NEC 9800 floppy", + "int13floppytoshiba": "Toshiba floppy", + "int9keyboard": "i8042 keyboard controller", + "pci": "PCI bus", + "shadowing": "BIOS shadowing", + "socketedrom": "BIOS ROM is socketed", + "upgrade": "BIOS EEPROM can be upgraded", + "usb": "USB legacy emulation" + }, + "capacity": 2097152, + "claimed": true, + "class": "memory", + "date": "08/12/2010", + "description": "BIOS", + "id": "firmware", + "physid": "0", + "size": 1048576, + "units": "bytes", + "vendor": "Acer", + "version": "V3.05(DDR2)" + }, + { + "children": [ + { + "claimed": true, + "class": "memory", + "clock": 667000000, + "description": "SODIMM DDR2 Synchronous 667 MHz (1.5 ns)", + "handle": "DMI:0016", + "id": "bank", + "physid": "0", + "product": "48594D503131325336344350362D53362020", + "serial": "4F43487B", + "size": 1073741824, + "slot": "DIMM0", + "units": "bytes", + "vendor": "Hynix Semiconductor (Hyundai Electronics)", + "width": 64 + } + ], + "claimed": true, + "class": "memory", + "description": "System Memory", + "handle": "DMI:0015", + "id": "memory", + "physid": "15", + "size": 1073741824, + "slot": "System board or motherboard", + "units": "bytes" + }, + { + "businfo": "cpu@0", + "capabilities": { + "acpi": "thermal control (ACPI)", + "aperfmperf": true, + "apic": "on-chip advanced programmable interrupt controller (APIC)", + "arch_perfmon": true, + "bts": true, + "clflush": true, + "cmov": "conditional move instruction", + "constant_tsc": true, + "cpufreq": "CPU Frequency scaling", + "cpuid": true, + "cx16": true, + "cx8": "compare and exchange 8-byte", + "de": "debugging extensions", + "ds_cpl": true, + "dtes64": true, + "dtherm": true, + "dts": "debug trace and EMON store MSRs", + "est": true, + "fpu": "mathematical co-processor", + "fpu_exception": "FPU exceptions reporting", + "fxsr": "fast floating point save/restore", + "ht": "HyperThreading", + "lahf_lm": true, + "lm": "64bits extensions (x86-64)", + "mca": "machine check architecture", + "mce": "machine check exceptions", + "mmx": "multimedia extensions (MMX)", + "monitor": true, + "movbe": true, + "msr": "model-specific registers", + "mtrr": "memory type range registers", + "nopl": true, + "nx": "no-execute bit (NX)", + "pae": "4GB+ memory addressing (Physical Address Extension)", + "pat": "page attribute table", + "pbe": "pending break event", + "pdcm": true, + "pebs": true, + "pge": "page global enable", + "pni": true, + "pse": "page size extensions", + "sep": "fast system calls", + "ss": "self-snoop", + "sse": "streaming SIMD extensions (SSE)", + "sse2": "streaming SIMD extensions (SSE2)", + "ssse3": true, + "syscall": "fast system calls", + "tm": "thermal interrupt and status", + "tm2": true, + "tsc": "time stamp counter", + "vme": "virtual mode extensions", + "wp": true, + "x86-64": "64bits extensions (x86-64)", + "xtpr": true + }, + "capacity": 1666000000, + "children": [ + { + "capabilities": { + "internal": "Internal", + "synchronous": "Synchronous", + "unified": "Unified cache", + "write-back": "Write-back" + }, + "capacity": 524288, + "claimed": true, + "class": "memory", + "configuration": { + "level": "2" + }, + "description": "L2 cache", + "handle": "DMI:001E", + "id": "cache:0", + "physid": "1e", + "size": 524288, + "slot": "Unknown", + "units": "bytes" + }, + { + "capabilities": { + "instruction": "Instruction cache", + "internal": "Internal", + "synchronous": "Synchronous", + "write-back": "Write-back" + }, + "capacity": 32768, + "claimed": true, + "class": "memory", + "configuration": { + "level": "1" + }, + "description": "L1 cache", + "handle": "DMI:001F", + "id": "cache:1", + "physid": "1f", + "size": 32768, + "slot": "Unknown", + "units": "bytes" + } + ], + "claimed": true, + "class": "processor", + "clock": 667000000, + "configuration": { + "cores": "1", + "enabledcores": "1", + "threads": "2" + }, + "description": "CPU", + "handle": "DMI:001D", + "id": "cpu", + "physid": "1d", + "product": "Intel(R) Atom(TM) CPU N450 @ 1.66GHz", + "size": 1331774000, + "slot": "CPU", + "units": "Hz", + "vendor": "Intel Corp.", + "version": "6.28.10", + "width": 64 + }, + { + "businfo": "pci@0000:00:00.0", + "children": [ + { + "businfo": "pci@0000:00:02.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "fb": "framebuffer", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "rom": "extension ROM", + "vga_controller": true + }, + "claimed": true, + "class": "display", + "clock": 33000000, + "configuration": { + "depth": "32", + "driver": "i915", + "latency": "0", + "resolution": "1024,600" + }, + "description": "VGA compatible controller", + "handle": "PCI:0000:00:02.0", + "id": "display:0", + "logicalname": "/dev/fb0", + "physid": "2", + "product": "Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller", + "vendor": "Intel Corporation", + "version": "00", + "width": 32 + }, + { + "businfo": "pci@0000:00:02.1", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "pm": "Power Management" + }, + "class": "display", + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "description": "Display controller", + "handle": "PCI:0000:00:02.1", + "id": "display:1", + "physid": "2.1", + "product": "Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller", + "vendor": "Intel Corporation", + "version": "00", + "width": 32 + }, + { + "businfo": "pci@0000:00:1b.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "pm": "Power Management" + }, + "children": [ + { + "capabilities": { + "pci": "PCI" + }, + "claimed": true, + "class": "input", + "id": "input:0", + "logicalname": [ + "input11", + "/dev/input/event10" + ], + "physid": "0", + "product": "HDA Digital PCBeep" + }, + { + "claimed": true, + "class": "input", + "id": "input:1", + "logicalname": [ + "input12", + "/dev/input/event11" + ], + "physid": "1", + "product": "HDA Intel Mic" + }, + { + "claimed": true, + "class": "input", + "id": "input:2", + "logicalname": [ + "input13", + "/dev/input/event12" + ], + "physid": "2", + "product": "HDA Intel Headphone" + } + ], + "claimed": true, + "class": "multimedia", + "clock": 33000000, + "configuration": { + "driver": "snd_hda_intel", + "latency": "0" + }, + "description": "Audio device", + "handle": "PCI:0000:00:1b.0", + "id": "multimedia", + "logicalname": [ + "card0", + "/dev/snd/controlC0", + "/dev/snd/hwC0D0", + "/dev/snd/pcmC0D0c", + "/dev/snd/pcmC0D0p" + ], + "physid": "1b", + "product": "NM10/ICH7 Family High Definition Audio Controller", + "vendor": "Intel Corporation", + "version": "02", + "width": 64 + }, + { + "businfo": "pci@0000:00:1c.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "msi": "Message Signalled Interrupts", + "normal_decode": true, + "pci": true, + "pciexpress": "PCI Express", + "pm": "Power Management" + }, + "children": [ + { + "businfo": "pci@0000:01:00.0", + "capabilities": { + "100bt": "100Mbit/s", + "100bt-fd": "100Mbit/s (full duplex)", + "10bt": "10Mbit/s", + "10bt-fd": "10Mbit/s (full duplex)", + "autonegotiation": "Auto-negotiation", + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "ethernet": true, + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "physical": "Physical interface", + "pm": "Power Management", + "tp": "twisted pair", + "vpd": "Vital Product Data" + }, + "capacity": 100000000, + "claimed": true, + "class": "network", + "clock": 33000000, + "configuration": { + "autonegotiation": "on", + "broadcast": "yes", + "driver": "atl1c", + "driverversion": "5.10.0-13-amd64", + "duplex": "full", + "ip": "192.168.4.45", + "latency": "0", + "link": "yes", + "multicast": "yes", + "port": "twisted pair", + "speed": "100Mbit/s" + }, + "description": "Ethernet interface", + "handle": "PCI:0000:01:00.0", + "id": "network", + "logicalname": "eth0", + "physid": "0", + "product": "AR8152 v1.1 Fast Ethernet", + "serial": "88:ae:1d:a6:f3:d0", + "size": 100000000, + "units": "bit/s", + "vendor": "Qualcomm Atheros", + "version": "c1", + "width": 64 + } + ], + "claimed": true, + "class": "bridge", + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "description": "PCI bridge", + "handle": "PCIBUS:0000:01", + "id": "pci:0", + "physid": "1c", + "product": "NM10/ICH7 Family PCI Express Port 1", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1c.1", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "msi": "Message Signalled Interrupts", + "normal_decode": true, + "pci": true, + "pciexpress": "PCI Express", + "pm": "Power Management" + }, + "children": [ + { + "businfo": "pci@0000:02:00.0", + "capabilities": { + "cap_list": "PCI capabilities listing", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "pm": "Power Management" + }, + "class": "network", + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "description": "Network controller", + "handle": "PCI:0000:02:00.0", + "id": "network", + "physid": "0", + "product": "Centrino Wireless-N 1000 [Condor Peak]", + "vendor": "Intel Corporation", + "version": "00", + "width": 64 + } + ], + "claimed": true, + "class": "bridge", + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "description": "PCI bridge", + "handle": "PCIBUS:0000:02", + "id": "pci:1", + "physid": "1c.1", + "product": "NM10/ICH7 Family PCI Express Port 2", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.0", + "capabilities": { + "bus_master": "bus mastering", + "uhci": "Universal Host Controller Interface (USB1)" + }, + "children": [ + { + "businfo": "usb@2", + "capabilities": { + "usb-1.10": "USB 1.1" + }, + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "12Mbit/s" + }, + "handle": "USB:2:1", + "id": "usbhost", + "logicalname": "usb2", + "physid": "1", + "product": "UHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "uhci_hcd", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.0", + "id": "usb:0", + "physid": "1d", + "product": "NM10/ICH7 Family USB UHCI Controller #1", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.1", + "capabilities": { + "bus_master": "bus mastering", + "uhci": "Universal Host Controller Interface (USB1)" + }, + "children": [ + { + "businfo": "usb@3", + "capabilities": { + "usb-1.10": "USB 1.1" + }, + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "12Mbit/s" + }, + "handle": "USB:3:1", + "id": "usbhost", + "logicalname": "usb3", + "physid": "1", + "product": "UHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "uhci_hcd", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.1", + "id": "usb:1", + "physid": "1d.1", + "product": "NM10/ICH7 Family USB UHCI Controller #2", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.2", + "capabilities": { + "bus_master": "bus mastering", + "uhci": "Universal Host Controller Interface (USB1)" + }, + "children": [ + { + "businfo": "usb@4", + "capabilities": { + "usb-1.10": "USB 1.1" + }, + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "12Mbit/s" + }, + "handle": "USB:4:1", + "id": "usbhost", + "logicalname": "usb4", + "physid": "1", + "product": "UHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "uhci_hcd", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.2", + "id": "usb:2", + "physid": "1d.2", + "product": "NM10/ICH7 Family USB UHCI Controller #3", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.3", + "capabilities": { + "bus_master": "bus mastering", + "uhci": "Universal Host Controller Interface (USB1)" + }, + "children": [ + { + "businfo": "usb@5", + "capabilities": { + "usb-1.10": "USB 1.1" + }, + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "12Mbit/s" + }, + "handle": "USB:5:1", + "id": "usbhost", + "logicalname": "usb5", + "physid": "1", + "product": "UHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "uhci_hcd", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.3", + "id": "usb:3", + "physid": "1d.3", + "product": "NM10/ICH7 Family USB UHCI Controller #4", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.7", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "debug": "Debug port", + "ehci": "Enhanced Host Controller Interface (USB2)", + "pm": "Power Management" + }, + "children": [ + { + "businfo": "usb@1", + "capabilities": { + "usb-2.00": "USB 2.0" + }, + "children": [ + { + "businfo": "usb@1:2", + "capabilities": { + "emulated": "Emulated device", + "scsi": "SCSI", + "usb-2.00": "USB 2.0" + }, + "children": [ + { + "businfo": "scsi@4:0.0.0", + "capabilities": { + "removable": "support is removable" + }, + "children": [ + { + "capabilities": { + "partitioned": "Partitioned disk", + "partitioned:dos": "MS-DOS partition table" + }, + "children": [ + { + "capabilities": { + "boot": "Contains boot code", + "fat": "Windows FAT", + "initialized": "initialized volume", + "primary": "Primary partition" + }, + "claimed": true, + "class": "volume", + "configuration": { + "FATs": "2", + "filesystem": "fat" + }, + "description": "Windows FAT volume", + "dev": "8:18", + "id": "volume:0", + "logicalname": "/dev/sdb2", + "physid": "2", + "serial": "5cca-7f76", + "size": 18446744073709549568, + "vendor": "mkfs.fat", + "version": "FAT16" + }, + { + "capabilities": { + "fat": "Windows FAT", + "hidden": "Hidden partition", + "initialized": "initialized volume", + "primary": "Primary partition" + }, + "claimed": true, + "class": "volume", + "configuration": { + "FATs": "2", + "filesystem": "fat", + "mount.fstype": "vfat", + "mount.options": "rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro", + "state": "mounted" + }, + "description": "Windows FAT volume", + "dev": "8:19", + "id": "volume:1", + "logicalname": [ + "/dev/sdb3", + "/mnt" + ], + "physid": "3", + "serial": "e90b-54dd", + "size": 18446744073709549568, + "vendor": "mkfs.fat", + "version": "FAT16" + } + ], + "claimed": true, + "class": "disk", + "configuration": { + "signature": "31eb10bc" + }, + "dev": "8:16", + "id": "medium", + "logicalname": "/dev/sdb", + "physid": "0", + "size": 8053063680, + "units": "bytes" + } + ], + "claimed": true, + "class": "disk", + "configuration": { + "ansiversion": "4", + "logicalsectorsize": "512", + "sectorsize": "512" + }, + "description": "SCSI Disk", + "dev": "8:16", + "handle": "SCSI:04:00:00:00", + "id": "disk", + "logicalname": "/dev/sdb", + "physid": "0.0.0", + "product": "Flash Disk", + "serial": "CB7A8994", + "size": 8053063680, + "units": "bytes", + "vendor": "Generic", + "version": "8.07" + } + ], + "claimed": true, + "class": "storage", + "configuration": { + "driver": "usb-storage", + "maxpower": "200mA", + "speed": "480Mbit/s" + }, + "description": "Mass storage device", + "handle": "USB:1:2", + "id": "usb:0", + "logicalname": "scsi4", + "physid": "2", + "product": "Mass Storage", + "serial": "CB7A8994", + "vendor": "Generic", + "version": "1.00" + }, + { + "businfo": "usb@1:4", + "capabilities": { + "usb": "USB", + "usb-2.00": "USB 2.0" + }, + "claimed": true, + "class": "multimedia", + "configuration": { + "driver": "uvcvideo", + "maxpower": "500mA", + "speed": "480Mbit/s" + }, + "description": "Video", + "handle": "USB:1:3", + "id": "usb:1", + "logicalname": [ + "input10", + "/dev/input/event9" + ], + "physid": "4", + "product": "1.3M WebCam: 1.3M WebCam", + "vendor": "XPA970VW0", + "version": "0.09" + } + ], + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "8", + "speed": "480Mbit/s" + }, + "handle": "USB:1:1", + "id": "usbhost", + "logicalname": "usb1", + "physid": "1", + "product": "EHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 ehci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "ehci-pci", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.7", + "id": "usb:4", + "physid": "1d.7", + "product": "NM10/ICH7 Family USB2 EHCI Controller", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1e.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "pci": true, + "subtractive_decode": true + }, + "claimed": true, + "class": "bridge", + "clock": 33000000, + "description": "PCI bridge", + "handle": "PCIBUS:0000:05", + "id": "pci:2", + "physid": "1e", + "product": "82801 Mobile PCI Bridge", + "vendor": "Intel Corporation", + "version": "e2", + "width": 32 + }, + { + "businfo": "pci@0000:00:1f.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "isa": true + }, + "children": [ + { + "capabilities": { + "pnp": true + }, + "claimed": true, + "class": "system", + "configuration": { + "driver": "system" + }, + "id": "pnp00:00", + "physid": "0", + "product": "PnP device PNP0c02" + }, + { + "capabilities": { + "pnp": true + }, + "claimed": true, + "class": "system", + "configuration": { + "driver": "rtc_cmos" + }, + "id": "pnp00:01", + "physid": "1", + "product": "PnP device PNP0b00" + }, + { + "capabilities": { + "pnp": true + }, + "claimed": true, + "class": "input", + "configuration": { + "driver": "i8042 kbd" + }, + "id": "pnp00:02", + "physid": "2", + "product": "PnP device PNP0303" + }, + { + "capabilities": { + "pnp": true + }, + "claimed": true, + "class": "generic", + "configuration": { + "driver": "i8042 aux" + }, + "id": "pnp00:03", + "physid": "3", + "product": "PnP device SYN1b1c" + } + ], + "claimed": true, + "class": "bridge", + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "description": "ISA bridge", + "handle": "PCI:0000:00:1f.0", + "id": "isa", + "physid": "1f", + "product": "NM10 Family LPC Controller", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1f.2", + "capabilities": { + "ahci_1.0": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "emulated": "Emulated device", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "sata": true + }, + "children": [ + { + "businfo": "scsi@0:0.0.0", + "claimed": true, + "class": "disk", + "configuration": { + "ansiversion": "5", + "logicalsectorsize": "512", + "sectorsize": "512" + }, + "description": "ATA Disk", + "dev": "8:0", + "handle": "SCSI:00:00:00:00", + "id": "disk", + "logicalname": "/dev/sda", + "physid": "0.0.0", + "product": "WDC WD1600BEVT-2", + "serial": "WD-WX11A80W7430", + "size": 160041885696, + "units": "bytes", + "vendor": "Western Digital", + "version": "1A01" + } + ], + "claimed": true, + "class": "storage", + "clock": 66000000, + "configuration": { + "driver": "ahci", + "latency": "0" + }, + "description": "SATA controller", + "handle": "PCI:0000:00:1f.2", + "id": "sata", + "logicalname": "scsi0", + "physid": "1f.2", + "product": "NM10/ICH7 Family SATA Controller [AHCI mode]", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1f.3", + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "i801_smbus", + "latency": "0" + }, + "description": "SMBus", + "handle": "PCI:0000:00:1f.3", + "id": "serial", + "physid": "1f.3", + "product": "NM10/ICH7 Family SMBus Controller", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + } + ], + "claimed": true, + "class": "bridge", + "clock": 33000000, + "description": "Host bridge", + "handle": "PCIBUS:0000:00", + "id": "pci", + "physid": "100", + "product": "Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge", + "vendor": "Intel Corporation", + "version": "00", + "width": 32 + } + ], + "claimed": true, + "class": "bus", + "description": "Motherboard", + "handle": "DMI:0002", + "id": "core", + "physid": "0", + "product": "AOHAPPY", + "serial": "Base Board Serial Number", + "slot": "Base Board Chassis Location", + "vendor": "Acer", + "version": "V3.05(DDR2)" + }, + { + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + }, + "claimed": true, + "class": "input", + "id": "input:0", + "logicalname": [ + "input0", + "/dev/input/event0", + "input0::capslock", + "input0::numlock", + "input0::scrolllock" + ], + "physid": "1", + "product": "AT Translated Set 2 keyboard" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:1", + "logicalname": [ + "input2", + "/dev/input/event1" + ], + "physid": "2", + "product": "Power Button" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:2", + "logicalname": [ + "input3", + "/dev/input/event2" + ], + "physid": "3", + "product": "Sleep Button" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:3", + "logicalname": [ + "input4", + "/dev/input/event3" + ], + "physid": "4", + "product": "Lid Switch" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:4", + "logicalname": [ + "input5", + "/dev/input/event4" + ], + "physid": "5", + "product": "Power Button" + }, + { + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + }, + "claimed": true, + "class": "input", + "id": "input:5", + "logicalname": [ + "input6", + "/dev/input/event6", + "/dev/input/mouse0" + ], + "physid": "6", + "product": "SynPS/2 Synaptics TouchPad" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:6", + "logicalname": [ + "input7", + "/dev/input/event5" + ], + "physid": "7", + "product": "Video Bus" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:7", + "logicalname": [ + "input8", + "/dev/input/event7" + ], + "physid": "8", + "product": "Acer WMI hotkeys" + }, + { + "capabilities": { + "isa": "ISA bus" + }, + "claimed": true, + "class": "input", + "id": "input:8", + "logicalname": [ + "input9", + "/dev/input/event8" + ], + "physid": "9", + "product": "PC Speaker" + } + ], + "claimed": true, + "class": "system", + "configuration": { + "boot": "normal", + "chassis": "notebook", + "family": "Intel_Mobile", + "sku": "NetTopSku", + "uuid": "364ee69c-9c82-9cb1-2111-88ae1da6f3d0" + }, + "description": "Notebook", + "handle": "DMI:0001", + "id": "workbench-live", + "product": "AOHAPPY (NetTopSku)", + "serial": "LUSEA0D010038879A01601", + "vendor": "Acer", + "version": "V3.05(DDR2)", + "width": 64 + }, + "lspci": "00:00.0 Host bridge: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge\n\tSubsystem: Acer Incorporated [ALI] Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge\n\tControl: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- \n\n00:02.0 VGA compatible controller: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller (prog-if 00 [VGA controller])\n\tSubsystem: Acer Incorporated [ALI] Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #0, PowerLimit 6.500W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn+ PwrFlt- MRL- PresDet+ CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet- LinkState-\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-\n\t\tAddress: fee01004 Data: 4021\n\tCapabilities: [90] Subsystem: Acer Incorporated [ALI] NM10/ICH7 Family PCI Express Port 1\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=01 ComponentID=02 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=02 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 02) (prog-if 00 [Normal decode])\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr+ NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #2, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #1, PowerLimit 6.500W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn+ PwrFlt- MRL- PresDet+ CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet- LinkState-\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-\n\t\tAddress: fee02004 Data: 4022\n\tCapabilities: [90] Subsystem: Acer Incorporated [ALI] NM10/ICH7 Family PCI Express Port 2\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=02 ComponentID=02 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=02 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI])\n\tSubsystem: Acer Incorporated [ALI] NM10/ICH7 Family USB UHCI Controller\n\tControl: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [50] Subsystem: Acer Incorporated [ALI] 82801 Mobile PCI Bridge\n\n00:1f.0 ISA bridge: Intel Corporation NM10 Family LPC Controller (rev 02)\n\tSubsystem: Acer Incorporated [ALI] NM10 Family LPC Controller\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- \n\tKernel modules: lpc_ich\n\n00:1f.2 SATA controller: Intel Corporation NM10/ICH7 Family SATA Controller [AHCI mode] (rev 02) (prog-if 01 [AHCI 1.0])\n\tSubsystem: Acer Incorporated [ALI] NM10/ICH7 Family SATA Controller [AHCI mode]\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+\n\tStatus: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- Date: Wed, 15 Jun 2022 12:52:46 +0200 Subject: [PATCH 24/60] migration change uuid for system_uuid --- ...3348969a583_system_uuid_instead_of_uuid.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ereuse_devicehub/migrations/versions/73348969a583_system_uuid_instead_of_uuid.py diff --git a/ereuse_devicehub/migrations/versions/73348969a583_system_uuid_instead_of_uuid.py b/ereuse_devicehub/migrations/versions/73348969a583_system_uuid_instead_of_uuid.py new file mode 100644 index 00000000..03441994 --- /dev/null +++ b/ereuse_devicehub/migrations/versions/73348969a583_system_uuid_instead_of_uuid.py @@ -0,0 +1,33 @@ +"""system_uuid instead of uuid + +Revision ID: 73348969a583 +Revises: dac62da1621a +Create Date: 2022-06-15 12:27:23.170313 + +""" +from alembic import context, op + +# revision identifiers, used by Alembic. +revision = '73348969a583' +down_revision = 'dac62da1621a' +branch_labels = None +depends_on = None + + +def get_inv(): + INV = context.get_x_argument(as_dictionary=True).get('inventory') + if not INV: + raise ValueError("Inventory value is not specified") + return INV + + +def upgrade(): + op.alter_column( + 'computer', 'uuid', new_column_name="system_uuid", schema=f'{get_inv()}' + ) + + +def downgrade(): + op.alter_column( + 'computer', 'system_uuid', new_column_name="uuid", schema=f'{get_inv()}' + ) From 41196ae4452aa57128fc1e71eed4a70b04e98c53 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 15 Jun 2022 13:39:06 +0200 Subject: [PATCH 25/60] add system uuid to snapshots list --- ereuse_devicehub/inventory/views.py | 6 ++++++ ereuse_devicehub/templates/inventory/snapshots_list.html | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index b7a8298b..8c483268 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -594,12 +594,18 @@ class SnapshotListView(GenericMixin): ).order_by(SnapshotsLog.created.desc()) logs = {} for snap in snapshots_log: + try: + system_uuid = snap.snapshot.device.system_uuid or '' + except AttributeError: + system_uuid = '' + if snap.snapshot_uuid not in logs: logs[snap.snapshot_uuid] = { 'sid': snap.sid, 'snapshot_uuid': snap.snapshot_uuid, 'version': snap.version, 'device': snap.get_device(), + 'system_uuid': system_uuid, 'status': snap.get_status(), 'severity': snap.severity, 'created': snap.created, diff --git a/ereuse_devicehub/templates/inventory/snapshots_list.html b/ereuse_devicehub/templates/inventory/snapshots_list.html index 43253d1b..f8a34b23 100644 --- a/ereuse_devicehub/templates/inventory/snapshots_list.html +++ b/ereuse_devicehub/templates/inventory/snapshots_list.html @@ -29,6 +29,7 @@ Snapshot id Version DHID + System UUID Status Time @@ -60,6 +61,9 @@ {% endif %} + + {{ snap.system_uuid }} + {{ snap.status }} From 08300ef612f8240f183e3b2e200bef69202da285 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 16 Jun 2022 10:38:57 +0200 Subject: [PATCH 26/60] add system_uuid in old devices --- ...b497b3_add_system_uuid_to_old_registers.py | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 ereuse_devicehub/migrations/versions/8d4fe4b497b3_add_system_uuid_to_old_registers.py diff --git a/ereuse_devicehub/migrations/versions/8d4fe4b497b3_add_system_uuid_to_old_registers.py b/ereuse_devicehub/migrations/versions/8d4fe4b497b3_add_system_uuid_to_old_registers.py new file mode 100644 index 00000000..db363a4c --- /dev/null +++ b/ereuse_devicehub/migrations/versions/8d4fe4b497b3_add_system_uuid_to_old_registers.py @@ -0,0 +1,61 @@ +"""add system uuid to old registers + +Revision ID: 8d4fe4b497b3 +Revises: 73348969a583 +Create Date: 2022-06-15 15:52:39.205192 + +""" +import os +from uuid import UUID + +from alembic import context, op + +# revision identifiers, used by Alembic. +revision = '8d4fe4b497b3' +down_revision = '73348969a583' +branch_labels = None +depends_on = None + + +def get_inv(): + INV = context.get_x_argument(as_dictionary=True).get('inventory') + if not INV: + raise ValueError("Inventory value is not specified") + return INV + + +def update_db(con, system_uuid, snapshot_uuid): + sql_snapshot = f'select id from {get_inv()}.snapshot where uuid=\'{snapshot_uuid}\'' + sql_device_id = f'select device_id from {get_inv()}.action_with_one_device where id in ({sql_snapshot})' + sql = f'select id, system_uuid from {get_inv()}.computer where id in ({sql_device_id})' + + for device_id, db_system_uuid in con.execute(sql): + if db_system_uuid: + return + + sql = f'update {get_inv()}.computer set system_uuid=\'{system_uuid}\' where id=\'{device_id}\'' + con.execute(sql) + + +def update_to_little_endian(uuid): + uuid = UUID(uuid) + return UUID(bytes_le=uuid.bytes) + + +def upgrade(): + uuids = [] + system_uuids_file = 'system_uuids.csv' + if os.path.exists(system_uuids_file): + with open(system_uuids_file) as f: + uuids = [x.split(';') for x in f.read().split('\n')] + + con = op.get_bind() + for u in uuids[1:]: + if u[0] == '': + continue + u[0] = update_to_little_endian(u[0]) + update_db(con, u[0], u[1]) + + +def downgrade(): + pass From c43e7fb578d759ff9d4543b2abd4fea39a070dfd Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 16 Jun 2022 11:47:36 +0200 Subject: [PATCH 27/60] fix splits texts --- .../8d4fe4b497b3_add_system_uuid_to_old_registers.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/migrations/versions/8d4fe4b497b3_add_system_uuid_to_old_registers.py b/ereuse_devicehub/migrations/versions/8d4fe4b497b3_add_system_uuid_to_old_registers.py index db363a4c..7be10975 100644 --- a/ereuse_devicehub/migrations/versions/8d4fe4b497b3_add_system_uuid_to_old_registers.py +++ b/ereuse_devicehub/migrations/versions/8d4fe4b497b3_add_system_uuid_to_old_registers.py @@ -47,7 +47,13 @@ def upgrade(): system_uuids_file = 'system_uuids.csv' if os.path.exists(system_uuids_file): with open(system_uuids_file) as f: - uuids = [x.split(';') for x in f.read().split('\n')] + for x in f.read().split('\n'): + z = x.split(';') + if len(z) != 2: + continue + + x, y = z + uuids.append([x.strip(), y.strip()]) con = op.get_bind() for u in uuids[1:]: From 88a164a9eef65c6be1fdfd3544c569c1bdede41e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 16 Jun 2022 17:58:32 +0200 Subject: [PATCH 28/60] save system uuid only for smbios >= 2.6 --- ereuse_devicehub/resources/action/views/snapshot.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ereuse_devicehub/resources/action/views/snapshot.py b/ereuse_devicehub/resources/action/views/snapshot.py index 1aaf3985..1477835c 100644 --- a/ereuse_devicehub/resources/action/views/snapshot.py +++ b/ereuse_devicehub/resources/action/views/snapshot.py @@ -117,11 +117,24 @@ class SnapshotMixin: return snapshot + def get_old_smbios_version(self, debug): + capabilities = debug.get('lshw', {}).get('capabilities', {}) + for x in capabilities.values(): + if "SMBIOS version" in x: + e = x.split("SMBIOS version ")[1].split(".") + if int(e[0]) < 3 and int(e[1]) < 6: + self.errors(txt=x) + return True + return False + def get_uuid(self, debug): if not debug or not isinstance(debug, dict): self.errors(txt="There is not uuid") return + if self.get_old_smbios_version(debug): + return + hw_uuid = debug.get('lshw', {}).get('configuration', {}).get('uuid') if not hw_uuid: From 5c2c4653a1d7021b41f296d07f983110739297da Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 16 Jun 2022 17:59:53 +0200 Subject: [PATCH 29/60] extract system uuid of old snapshots --- examples/extract_uuid.py | 36 ++++++++++++++++++++++++++++++++++++ examples/extract_uuids.sh | 1 + 2 files changed, 37 insertions(+) create mode 100644 examples/extract_uuid.py create mode 100644 examples/extract_uuids.sh diff --git a/examples/extract_uuid.py b/examples/extract_uuid.py new file mode 100644 index 00000000..a283f845 --- /dev/null +++ b/examples/extract_uuid.py @@ -0,0 +1,36 @@ +import json +import sys + + +def get_old_smbios_version(snapshot): + capabilities = snapshot.get('debug', {}).get('lshw', {}).get('capabilities', {}) + for x in capabilities.values(): + if "SMBIOS version" in x: + e = x.split("SMBIOS version ")[1].split(".") + if int(e[0]) < 3 and int(e[1]) < 6: + return True + return False + + +def get_uuid(snapshot): + + return ( + snapshot.get('debug', {}).get('lshw', {}).get('configuration', {}).get('uuid') + ) + + +def main(): + _file = sys.argv[1] + with open(_file) as file_snapshot: + snapshot = json.loads(file_snapshot.read()) + + if get_old_smbios_version(snapshot): + return + + system_uuid = get_uuid(snapshot) + if system_uuid: + print("{};{}".format(system_uuid, snapshot['uuid'])) + + +if __name__ == '__main__': + main() diff --git a/examples/extract_uuids.sh b/examples/extract_uuids.sh new file mode 100644 index 00000000..5068aa8b --- /dev/null +++ b/examples/extract_uuids.sh @@ -0,0 +1 @@ +for i in `ls ../snapshots/*/*.json`; do python examples/extract_uuid.py $i; done > system_uuids.csv From e4919c78b1118106345d7b7b8b33c5d0287e0e5a Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 17 Jun 2022 09:34:03 +0200 Subject: [PATCH 30/60] add test for check smbios 2.5 version --- tests/test_system_uuid.py | 74 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/tests/test_system_uuid.py b/tests/test_system_uuid.py index 867605c2..6be21dc4 100644 --- a/tests/test_system_uuid.py +++ b/tests/test_system_uuid.py @@ -530,3 +530,77 @@ def test_wb11_to_wb11_duplicity_form(user3: UserClientFlask): for c in Computer.query.all(): assert 'laptop-acer-aohappy-lusea0d010038879a01601' in c.hid assert c.system_uuid is None + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_smbios_2_5_api(user: UserClient): + + # insert computer with wb11 with hid and without uuid, (old version) + snapshot_11 = conftest.file_json('system_uuid4.json') + user.post(snapshot_11, res=Snapshot) + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert device.system_uuid is None + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wb11_smbios_2_5_form(user3: UserClientFlask): + + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + file_name = 'system_uuid4.json' + snapshot_11 = conftest.file_json(file_name) + b_snapshot = bytes(json.dumps(snapshot_11), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert device.system_uuid is None + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wblite_smbios_2_5_api(user: UserClient): + + # insert computer with wb11 with hid and without uuid, (old version) + snapshot_lite = conftest.file_json('system_uuid2.json') + snapshot_lite['data']['lshw']['capabilities']['smbios-3.0'] = 'SMBIOS version 2.5' + user.post(snapshot_lite, uri="/api/inventory/") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_wblite_smbios_2_5_form(user3: UserClientFlask): + + uri = '/inventory/upload-snapshot/' + user3.get(uri) + + file_name = 'system_uuid2.json' + snapshot_lite = conftest.file_json(file_name) + snapshot_lite['data']['lshw']['capabilities']['smbios-3.0'] = 'SMBIOS version 2.5' + b_snapshot = bytes(json.dumps(snapshot_lite), 'utf-8') + file_snap = (BytesIO(b_snapshot), file_name) + + data = { + 'snapshot': file_snap, + 'csrf_token': generate_csrf(), + } + user3.post(uri, data=data, content_type="multipart/form-data") + assert Computer.query.count() == 1 + device = Computer.query.one() + assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' + assert str(device.system_uuid) == '9ce64e36-829c-b19c-2111-88ae1da6f3d0' From f4987b7cd6496f980e3da21354ff640fbb855367 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 17 Jun 2022 09:41:59 +0200 Subject: [PATCH 31/60] add system_uuid4.json --- tests/files/system_uuid4.json | 189 ++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 tests/files/system_uuid4.json diff --git a/tests/files/system_uuid4.json b/tests/files/system_uuid4.json new file mode 100644 index 00000000..8340082b --- /dev/null +++ b/tests/files/system_uuid4.json @@ -0,0 +1,189 @@ +{ + "components": [ + { + "size": 10.030411318500475, + "technology": "LCD", + "resolutionWidth": 1024, + "model": "AUO LCD Monitor", + "actions": [], + "type": "Display", + "refreshRate": 60, + "productionDate": "2009-01-04T00:00:00", + "manufacturer": "AUO \"AUO\"", + "serialNumber": null, + "resolutionHeight": 600 + }, + { + "generation": null, + "actions": [ + { + "rate": 164.4981, + "type": "BenchmarkProcessorSysbench", + "elapsed": 165 + }, + { + "rate": 6650.48, + "type": "BenchmarkProcessor", + "elapsed": 0 + } + ], + "speed": 1.0, + "cores": 1, + "model": "Intel Atom CPU N450 @ 1.66GHz", + "address": 64, + "type": "Processor", + "threads": 2, + "manufacturer": "Intel Corp.", + "serialNumber": null, + "brand": "Atom" + }, + { + "memory": null, + "model": "Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller", + "actions": [], + "type": "GraphicCard", + "manufacturer": "Intel Corporation", + "serialNumber": null + }, + { + "type": "SoundCard", + "actions": [], + "manufacturer": "Intel Corporation", + "serialNumber": null, + "model": "NM10/ICH7 Family High Definition Audio Controller" + }, + { + "type": "SoundCard", + "actions": [], + "manufacturer": "XPA970VW0", + "serialNumber": null, + "model": "1.3M WebCam" + }, + { + "size": 1024.0, + "actions": [], + "format": "SODIMM", + "model": "48594D503131325336344350362D53362020", + "interface": "DDR2", + "type": "RamModule", + "manufacturer": "Hynix Semiconductor", + "serialNumber": "4F43487B", + "speed": 667.0 + }, + { + "size": 160041.88569599998, + "variant": "1A01", + "actions": [ + { + "type": "EraseBasic", + "steps": [ + { + "type": "StepRandom", + "endTime": "2019-10-23T08:35:31.400587+00:00", + "severity": "Info", + "startTime": "2019-10-23T07:49:54.410830+00:00" + } + ], + "endTime": "2019-10-23T08:35:31.400988+00:00", + "severity": "Info", + "startTime": "2019-10-23T07:49:54.410193+00:00" + }, + { + "elapsed": 22, + "writeSpeed": 17.3, + "readSpeed": 41.6, + "type": "BenchmarkDataStorage" + }, + { + "status": "Completed without error", + "reallocatedSectorCount": 0, + "currentPendingSectorCount": 0, + "assessment": true, + "severity": "Info", + "offlineUncorrectable": 0, + "lifetime": 4692, + "type": "TestDataStorage", + "length": "Short", + "elapsed": 118, + "powerCycleCount": 5293 + } + ], + "model": "WDC WD1600BEVT-2", + "interface": "ATA", + "type": "HardDrive", + "manufacturer": "Western Digital", + "serialNumber": "WD-WX11A80W7430" + }, + { + "variant": "c1", + "actions": [], + "speed": 100.0, + "model": "AR8152 v1.1 Fast Ethernet", + "wireless": false, + "type": "NetworkAdapter", + "serialNumber": "88:ae:1d:a6:f3:d0", + "manufacturer": "Qualcomm Atheros" + }, + { + "ramMaxSize": 4, + "slots": 1, + "model": "AOHAPPY", + "pcmcia": 0, + "type": "Motherboard", + "version": "V3.05(DDR2)", + "ramSlots": 2, + "serialNumber": "Base Board Serial Number", + "manufacturer": "Acer", + "serial": 1, + "actions": [], + "biosDate": "2010-08-12T00:00:00", + "firewire": 0, + "usb": 5 + } + ], + "software": "Workbench", + "device": { + "sku": null, + "chassis": "Netbook", + "actions": [ + { + "type": "StressTest", + "elapsed": 60, + "severity": "Info" + }, + { + "rate": 19.2726, + "type": "BenchmarkRamSysbench", + "elapsed": 19 + } + ], + "model": "AOHAPPY", + "type": "Laptop", + "version": "V3.05", + "manufacturer": "Acer", + "serialNumber": "LUSEA0D010038879A01601" + }, + "debug": { + "lshw": { + "capabilities": { + "dmi-2.5": "DMI version 2.5", + "smbios-2.5": "SMBIOS version 2.5", + "smp": "Symmetric Multi-Processing", + "vsyscall32": "32-bit processes" + }, + "configuration": { + "boot": "normal", + "chassis": "notebook", + "family": "Intel_Mobile", + "sku": "NetTopSku", + "uuid": "364ee69c-9c82-9cb1-2111-88ae1da6f3d0" + } + } + }, + "uuid": "0973fda0-589a-11eb-ae93-0242ac130002", + "type": "Snapshot", + "version": "11.0b9", + "endTime": "2019-10-23T07:43:13.625104+00:00", + "elapsed": 3138, + "closed": true +} From 5262d407b8f6bcb5910a8fad7e24c8df2c0392c2 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 17 Jun 2022 09:53:16 +0200 Subject: [PATCH 32/60] modify changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6392e99..b395d31d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ml). ## master ## testing +- [changed] #302 add system uuid for check the identity of one device. ## [2.2.0 rc1] - 2022-06-07 - [added] #212 Server side render parser Workbench Snapshots. From 559e926626f7292b012733d225888ab2f68410c3 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 17 Jun 2022 11:24:52 +0200 Subject: [PATCH 33/60] fix commit in db --- ereuse_devicehub/resources/action/views/snapshot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/action/views/snapshot.py b/ereuse_devicehub/resources/action/views/snapshot.py index 1477835c..bca48f84 100644 --- a/ereuse_devicehub/resources/action/views/snapshot.py +++ b/ereuse_devicehub/resources/action/views/snapshot.py @@ -193,7 +193,7 @@ class SnapshotView(SnapshotMixin): raise err db.session.add(snapshot) - self.errors(txt="Ok", severity=Severity.Info, snapshot=snapshot, commit=True) + self.errors(txt="Ok", severity=Severity.Info, snapshot=snapshot, commit=False) db.session().final_flush() self.response = self.schema.jsonify(snapshot) # transform it back From 3afdf3ea0b033b39c89d948d41d25dcab7e7e6fc Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 17 Jun 2022 11:25:24 +0200 Subject: [PATCH 34/60] return to the original state of dummy --- ereuse_devicehub/dummy/dummy.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ereuse_devicehub/dummy/dummy.py b/ereuse_devicehub/dummy/dummy.py index 58131986..a1d38854 100644 --- a/ereuse_devicehub/dummy/dummy.py +++ b/ereuse_devicehub/dummy/dummy.py @@ -200,11 +200,9 @@ class Dummy: assert len(inventory['items']) i, _ = user1.get(res=Device, query=[('search', 'intel')]) - # assert 12 == len(i['items']) - assert 4 == len(i['items']) + assert 12 == len(i['items']) i, _ = user1.get(res=Device, query=[('search', 'pc')]) - # assert 14 == len(i['items']) - assert 5 == len(i['items']) + assert 14 == len(i['items']) # Let's create a set of actions for the pc device # Make device Ready From 6bb5e8e6d69af3e9cb18be1a9cae5c986e9c5714 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 17 Jun 2022 11:35:40 +0200 Subject: [PATCH 35/60] fix test physical_properties --- tests/test_device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_device.py b/tests/test_device.py index 19a4545e..65c3b21c 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -130,7 +130,7 @@ def test_physical_properties(): 'model': 'foo', 'receiver_id': None, 'serial_number': 'foo-bar', - 'uuid': None, + 'system_uuid': None, 'transfer_state': TransferState.Initial } From be7cbf02c07a2b2bb900020fca9705f7e68319b8 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 23 Jun 2022 17:06:40 +0200 Subject: [PATCH 36/60] remove system uuid of public page --- ereuse_devicehub/resources/device/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index c14e4641..5fd50a1f 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -191,6 +191,7 @@ class Device(Thing): 'image', 'allocated', 'devicehub_id', + 'system_uuid', 'active', } From 6e3c032d97735f12971fc991be2d950ba3042556 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 23 Jun 2022 18:08:16 +0200 Subject: [PATCH 37/60] 3500 change name of anchor --- ereuse_devicehub/templates/workbench/settings.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ereuse_devicehub/templates/workbench/settings.html b/ereuse_devicehub/templates/workbench/settings.html index 6c762f70..01301e30 100644 --- a/ereuse_devicehub/templates/workbench/settings.html +++ b/ereuse_devicehub/templates/workbench/settings.html @@ -28,6 +28,20 @@

Download the settings only for register devices.

+ {% if iso %} +
+
+ {{ iso }} +
+
+

Download ISO workbench and burn it one one usb stick.

+

+ Download Checksum: SHA512SUMS | + Signature +

+
+
+ {% endif %} From 7cb5c7656230efa90a714b489d540672701d1425 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 23 Jun 2022 18:08:56 +0200 Subject: [PATCH 38/60] add download iso --- .../templates/ereuse_devicehub/base_site.html | 2 +- ereuse_devicehub/workbench/views.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/templates/ereuse_devicehub/base_site.html b/ereuse_devicehub/templates/ereuse_devicehub/base_site.html index 658c2345..2eeb716a 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/base_site.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/base_site.html @@ -95,7 +95,7 @@
  • - Workbench Settings + Workbench
  • diff --git a/ereuse_devicehub/workbench/views.py b/ereuse_devicehub/workbench/views.py index f70885ce..85bb22f6 100644 --- a/ereuse_devicehub/workbench/views.py +++ b/ereuse_devicehub/workbench/views.py @@ -1,3 +1,4 @@ +import os import time import flask @@ -22,6 +23,7 @@ class SettingsView(GenericMixin): def dispatch_request(self): self.get_context() + self.get_iso() self.context.update( { 'page_title': self.page_title, @@ -34,6 +36,20 @@ class SettingsView(GenericMixin): return flask.render_template(self.template_name, **self.context) + def get_iso(self): + files = [ + f + for f in os.listdir('ereuse_devicehub/static/iso/') + if f[-3:].lower() == 'iso' + ] + + self.context['iso'] = '' + self.context['iso_sha'] = '' + + if files: + self.context['iso'] = files[0] + self.context['iso_sha'] = 'aaa' + def download(self): url = "https://{}/api/inventory/".format(app.config['HOST']) self.wbContext = { From 93545ad01bc1a5ab515c18d67f82d3f61b53dad3 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 24 Jun 2022 09:59:24 +0200 Subject: [PATCH 39/60] fix test_physical_properties --- tests/test_device.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_device.py b/tests/test_device.py index 65c3b21c..67d94d6a 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -130,7 +130,6 @@ def test_physical_properties(): 'model': 'foo', 'receiver_id': None, 'serial_number': 'foo-bar', - 'system_uuid': None, 'transfer_state': TransferState.Initial } From 18e051596cd5b1e739f23e096b43b9c1ebef9ff7 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 24 Jun 2022 11:27:42 +0200 Subject: [PATCH 40/60] fixing system uuid as non physical property --- ereuse_devicehub/resources/device/sync.py | 8 ++++++++ tests/test_system_uuid.py | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/ereuse_devicehub/resources/device/sync.py b/ereuse_devicehub/resources/device/sync.py index 4871d6b7..952e935b 100644 --- a/ereuse_devicehub/resources/device/sync.py +++ b/ereuse_devicehub/resources/device/sync.py @@ -197,6 +197,7 @@ class Sync: ).one() if db_device and db_device.allocated: raise ResourceNotFound('device is actually allocated {}'.format(device)) + try: tags = { Tag.from_an_id(tag.id).one() for tag in device.tags @@ -264,6 +265,13 @@ class Sync: if value is not None: setattr(db_device, field_name, value) + # if device.system_uuid and db_device.system_uuid and device.system_uuid != db_device.system_uuid: + # TODO @cayop send error to sentry.io + # there are 2 computers duplicate get db_device for hid + + if hasattr(device, 'system_uuid') and device.system_uuid: + db_device.system_uuid = device.system_uuid + @staticmethod def add_remove(device: Computer, components: Set[Component]) -> OrderedSet: """Generates the Add and Remove actions (but doesn't add them to diff --git a/tests/test_system_uuid.py b/tests/test_system_uuid.py index 6be21dc4..e8f62956 100644 --- a/tests/test_system_uuid.py +++ b/tests/test_system_uuid.py @@ -102,6 +102,10 @@ def test_wb11_to_wb11_with_uuid_api(user: UserClient): snapshot_11['uuid'] = '0973fda0-589a-11eb-ae93-0242ac130003' user.post(snapshot_11, res=Snapshot) + assert ( + snapshot_11['debug']['lshw']['configuration']['uuid'] + == '364ee69c-9c82-9cb1-2111-88ae1da6f3d0' + ) assert Computer.query.count() == 1 device = Computer.query.one() assert device.hid == 'laptop-acer-aohappy-lusea0d010038879a01601-88:ae:1d:a6:f3:d0' From 2760348cc03ec8080ffee37e66a9a75e71638326 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 24 Jun 2022 11:45:26 +0200 Subject: [PATCH 41/60] add iso dir --- ereuse_devicehub/static/iso/SHA512SUMS | 1 + ereuse_devicehub/static/iso/SHA512SUMS.sign | 0 2 files changed, 1 insertion(+) create mode 100644 ereuse_devicehub/static/iso/SHA512SUMS create mode 100644 ereuse_devicehub/static/iso/SHA512SUMS.sign diff --git a/ereuse_devicehub/static/iso/SHA512SUMS b/ereuse_devicehub/static/iso/SHA512SUMS new file mode 100644 index 00000000..04c30697 --- /dev/null +++ b/ereuse_devicehub/static/iso/SHA512SUMS @@ -0,0 +1 @@ +868e59911be73a941938644143d81f21a2fdbe82ea0841493c2d9fc04701e058334af5fecd69c1a1525ebd5c8c17ac3f49d8ecc53bbfc8a018f169be48fe79d6 USODY_2022.5.2-beta.iso diff --git a/ereuse_devicehub/static/iso/SHA512SUMS.sign b/ereuse_devicehub/static/iso/SHA512SUMS.sign new file mode 100644 index 00000000..e69de29b From 6594cebaf65b5d7b04425e7700d2717920d19c3e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 24 Jun 2022 12:05:12 +0200 Subject: [PATCH 42/60] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d1f4de7..bae2b54e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ml). ## master ## testing +- [add] #305 add button download iso Workbench. - [changed] #302 add system uuid for check the identity of one device. ## [2.2.0] - 2022-06-24 From 72c19501fa230a34599664d7db7586a0ea8091b0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 24 Jun 2022 12:39:46 +0200 Subject: [PATCH 43/60] fixing path --- ereuse_devicehub/workbench/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/workbench/views.py b/ereuse_devicehub/workbench/views.py index 85bb22f6..c23e783f 100644 --- a/ereuse_devicehub/workbench/views.py +++ b/ereuse_devicehub/workbench/views.py @@ -1,5 +1,6 @@ import os import time +from pathlib import Path import flask from flask import Blueprint @@ -37,10 +38,9 @@ class SettingsView(GenericMixin): return flask.render_template(self.template_name, **self.context) def get_iso(self): + path = Path(__file__).parent.parent files = [ - f - for f in os.listdir('ereuse_devicehub/static/iso/') - if f[-3:].lower() == 'iso' + f for f in os.listdir(f'{path}/static/iso/') if f[-3:].lower() == 'iso' ] self.context['iso'] = '' From 9829ebe7c72c26e81568695c1d34da7eb197b56b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 24 Jun 2022 15:05:38 +0200 Subject: [PATCH 44/60] add download snapshots --- ereuse_devicehub/inventory/views.py | 34 ++++++++++++++++++- .../templates/inventory/snapshots_list.html | 8 +++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index 66cb32a1..da4df610 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -1,11 +1,15 @@ import csv import logging +import os from distutils.util import strtobool from io import StringIO +from pathlib import Path import flask import flask_weasyprint -from flask import Blueprint, g, make_response, request, url_for +from flask import Blueprint +from flask import current_app as app +from flask import g, make_response, request, url_for from flask.views import View from flask_login import current_user, login_required from werkzeug.exceptions import NotFound @@ -479,6 +483,7 @@ class ExportsView(View): 'certificates': self.erasure, 'lots': self.lots_export, 'devices_lots': self.devices_lots_export, + 'snapshot': self.snapshot, } if export_id not in export_ids: @@ -685,6 +690,33 @@ class ExportsView(View): data, "Devices_Incoming_and_Outgoing_Lots_Spreadsheet.csv" ) + def snapshot(self): + uuid = request.args.get('id') + if not uuid: + messages.error('Snapshot not exist!') + return flask.redirect(request.referrer) + + user = g.user.email + name_file = f"*_{user}_{uuid}.json" + tmp_snapshots = app.config['TMP_SNAPSHOTS'] + path_dir_base = os.path.join(tmp_snapshots, user) + + for _file in Path(path_dir_base).glob(name_file): + with open(_file) as file_snapshot: + snapshot = file_snapshot.read() + data = StringIO() + data.write(snapshot) + bfile = data.getvalue().encode('utf-8') + output = make_response(bfile) + output.headers['Content-Disposition'] = 'attachment; filename={}'.format( + name_file + ) + output.headers['Content-type'] = 'text/json' + return output + + messages.error('Snapshot not exist!') + return flask.redirect(request.referrer) + class SnapshotListView(GenericMixin): template_name = 'inventory/snapshots_list.html' diff --git a/ereuse_devicehub/templates/inventory/snapshots_list.html b/ereuse_devicehub/templates/inventory/snapshots_list.html index f8a34b23..77e37ae5 100644 --- a/ereuse_devicehub/templates/inventory/snapshots_list.html +++ b/ereuse_devicehub/templates/inventory/snapshots_list.html @@ -32,6 +32,7 @@ System UUID Status Time + @@ -68,6 +69,13 @@ {{ snap.status }} {{ snap.created.strftime('%H:%M %d-%m-%Y') }} + + {% if snap.snapshot_uuid %} + + + + {% endif %} + {% endfor %} From 5435d21828a45182e585d9bb4d200784036a31e2 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 24 Jun 2022 15:23:24 +0200 Subject: [PATCH 45/60] add test for download snapshot --- CHANGELOG.md | 1 + tests/test_render_2_0.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bae2b54e..3193c889 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ml). ## testing - [add] #305 add button download iso Workbench. +- [add] #306 add link for download json snapshot - [changed] #302 add system uuid for check the identity of one device. ## [2.2.0] - 2022-06-24 diff --git a/tests/test_render_2_0.py b/tests/test_render_2_0.py index 94aa9d7f..d300249c 100644 --- a/tests/test_render_2_0.py +++ b/tests/test_render_2_0.py @@ -1385,3 +1385,18 @@ def test_export_lots(user3: UserClientFlask): assert fixture_csv[0] == export_csv[0], 'Headers are not equal' assert fixture_csv[1][1:] == export_csv[1][1:], 'Computer information are not equal' UUID(export_csv[1][0]) + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_export_snapshot_json(user3: UserClientFlask): + file_name = 'real-eee-1001pxd.snapshot.12.json' + snap = create_device(user3, file_name) + + snapshot = conftest.yaml2json(file_name.split(".json")[0]) + snapshot = json.dumps(snapshot) + + uri = "/inventory/export/snapshot/?id={}".format(snap.uuid) + body, status = user3.get(uri) + assert status == '200 OK' + assert body == snapshot From c3ee749fe415e44e67a2fc9d8293c5097fe1ac10 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 27 Jun 2022 11:42:16 +0200 Subject: [PATCH 46/60] add sentry to app --- examples/app.py | 22 ++++++++++++++++++++++ requirements.txt | 1 + 2 files changed, 23 insertions(+) diff --git a/examples/app.py b/examples/app.py index 5a7e9fbb..690ff9f9 100644 --- a/examples/app.py +++ b/examples/app.py @@ -3,7 +3,11 @@ Example app with minimal configuration. Use this as a starting point. """ +import sentry_sdk +from decouple import config from flask_wtf.csrf import CSRFProtect +from sentry_sdk.integrations.flask import FlaskIntegration +from werkzeug.contrib.profiler import ProfilerMiddleware from ereuse_devicehub.api.views import api from ereuse_devicehub.config import DevicehubConfig @@ -13,6 +17,20 @@ from ereuse_devicehub.labels.views import labels from ereuse_devicehub.views import core from ereuse_devicehub.workbench.views import workbench +SENTRY_DSN = config('SENTRY_DSN', None) +if SENTRY_DSN: + sentry_sdk.init( + dsn=SENTRY_DSN, + integrations=[ + FlaskIntegration(), + ], + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for performance monitoring. + # We recommend adjusting this value in production. + traces_sample_rate=1.0, + ) + + app = Devicehub(inventory=DevicehubConfig.DB_SCHEMA) app.register_blueprint(core) app.register_blueprint(devices) @@ -26,3 +44,7 @@ app.register_blueprint(workbench) csrf = CSRFProtect(app) # csrf.protect(core) # csrf.protect(devices) +app.config["SQLALCHEMY_RECORD_QUERIES"] = True +app.config['PROFILE'] = True +app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30]) +app.run(debug=True) diff --git a/requirements.txt b/requirements.txt index a72507d0..aec82953 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,3 +45,4 @@ python-dotenv==0.14.0 pyjwt==2.4.0 pint==0.9 py-dmidecode==0.1.0 +sentry_sdk==1.6.0 From 5c5d1c1a641ac043b487648ea1cfad82b77e7123 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 27 Jun 2022 12:35:52 +0200 Subject: [PATCH 47/60] change changelog --- CHANGELOG.md | 3 ++- requirements.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3193c889..a7a5343c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ ml). ## testing - [add] #305 add button download iso Workbench. -- [add] #306 add link for download json snapshot +- [add] #306 add link for download json snapshot. +- [add] #308 add sentry. - [changed] #302 add system uuid for check the identity of one device. ## [2.2.0] - 2022-06-24 diff --git a/requirements.txt b/requirements.txt index aec82953..6f4bb6d9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -46,3 +46,4 @@ pyjwt==2.4.0 pint==0.9 py-dmidecode==0.1.0 sentry_sdk==1.6.0 +blinker==1.4 From fa45080a44611968f7ab870d30b9fb9bc77ca69d Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 8 Jul 2022 12:21:07 +0200 Subject: [PATCH 48/60] fixed --- .../resources/documents/device_row.py | 165 +++++++++--------- 1 file changed, 83 insertions(+), 82 deletions(-) diff --git a/ereuse_devicehub/resources/documents/device_row.py b/ereuse_devicehub/resources/documents/device_row.py index 5f48eaa3..867e707f 100644 --- a/ereuse_devicehub/resources/documents/device_row.py +++ b/ereuse_devicehub/resources/documents/device_row.py @@ -1,13 +1,18 @@ """ This file frame a correct row for csv report """ from collections import OrderedDict + from flask import url_for -from ereuse_devicehub.resources.enums import Severity -from ereuse_devicehub.resources.device import models as d, states from ereuse_devicehub.resources.action import models as da -from ereuse_devicehub.resources.action.models import (BenchmarkDataStorage, RateComputer, - TestDataStorage) +from ereuse_devicehub.resources.action.models import ( + BenchmarkDataStorage, + RateComputer, + TestDataStorage, +) +from ereuse_devicehub.resources.device import models as d +from ereuse_devicehub.resources.device import states +from ereuse_devicehub.resources.enums import Severity class DeviceRow(OrderedDict): @@ -40,20 +45,20 @@ class DeviceRow(OrderedDict): software = '' if snapshot: software = "{software} {version}".format( - software=snapshot.software.name, version=snapshot.version) + software=snapshot.software.name, version=snapshot.version + ) # General information about device self['DHID'] = device.devicehub_id self['DocumentID'] = self.document_id self['Public Link'] = '{url}{id}'.format( - url=url_for('Device.main', _external=True), - id=device.devicehub_id) + url=url_for('Device.main', _external=True), id=device.devicehub_id + ) self['Lots'] = ', '.join([x.name for x in self.device.lots]) self['Tag 1 Type'] = self['Tag 1 ID'] = self['Tag 1 Organization'] = '' self['Tag 2 Type'] = self['Tag 2 ID'] = self['Tag 2 Organization'] = '' self['Tag 3 Type'] = self['Tag 3 ID'] = self['Tag 3 Organization'] = '' for i, tag in zip(range(1, 3), device.tags): - self['Tag {} Type'.format( - i)] = 'unamed' if tag.provider else 'named' + self['Tag {} Type'.format(i)] = 'unamed' if tag.provider else 'named' self['Tag {} ID'.format(i)] = tag.id self['Tag {} Organization'.format(i)] = tag.org.name @@ -79,8 +84,7 @@ class DeviceRow(OrderedDict): self['Allocate state'] = device.allocated_status.type try: - self['Lifecycle state'] = device.last_action_of( - *states.Trading.actions()).t + self['Lifecycle state'] = device.last_action_of(*states.Status.actions()).t except LookupError: self['Lifecycle state'] = '' if isinstance(device, d.Computer): @@ -155,10 +159,12 @@ class DeviceRow(OrderedDict): self['{} {} Serial Number'.format(ctype, i)] = '' else: self['{} {} Manufacturer'.format(ctype, i)] = none2str( - component.manufacturer) + component.manufacturer + ) self['{} {} Model'.format(ctype, i)] = none2str(component.model) self['{} {} Serial Number'.format(ctype, i)] = none2str( - component.serial_number) + component.serial_number + ) if ctype == d.Processor.t: self.get_processor(ctype, i, component) @@ -178,12 +184,10 @@ class DeviceRow(OrderedDict): self['{} {} Number of cores'.format(ctype, i)] = '' self['{} {} Speed (GHz)'.format(ctype, i)] = '' self['Benchmark {} {} (points)'.format(ctype, i)] = '' - self['Benchmark ProcessorSysbench {} {} (points)'.format( - ctype, i)] = '' + self['Benchmark ProcessorSysbench {} {} (points)'.format(ctype, i)] = '' return - self['{} {} Number of cores'.format( - ctype, i)] = none2str(component.cores) + self['{} {} Number of cores'.format(ctype, i)] = none2str(component.cores) self['{} {} Speed (GHz)'.format(ctype, i)] = none2str(component.speed) benchmark = get_action(component, 'BenchmarkProcessor') @@ -194,11 +198,11 @@ class DeviceRow(OrderedDict): sysbench = get_action(component, 'BenchmarkProcessorSysbench') if not sysbench: - self['Benchmark ProcessorSysbench {} {} (points)'.format( - ctype, i)] = '' + self['Benchmark ProcessorSysbench {} {} (points)'.format(ctype, i)] = '' return - self['Benchmark ProcessorSysbench {} {} (points)'.format( - ctype, i)] = sysbench.rate + self[ + 'Benchmark ProcessorSysbench {} {} (points)'.format(ctype, i) + ] = sysbench.rate def get_ram(self, ctype, i, component): """Particular fields for component Ram Module.""" @@ -212,7 +216,7 @@ class DeviceRow(OrderedDict): def get_datastorage(self, ctype, i, component): """Particular fields for component DataStorage. - A DataStorage can be HardDrive or SolidStateDrive. + A DataStorage can be HardDrive or SolidStateDrive. """ if component is None: @@ -244,21 +248,23 @@ class DeviceRow(OrderedDict): software = '' if snapshot: software = "{software} {version}".format( - software=snapshot.software.name, version=snapshot.version) + software=snapshot.software.name, version=snapshot.version + ) self['{} {} Size (MB)'.format(ctype, i)] = none2str(component.size) component_actions = sorted(component.actions, key=lambda x: x.created) - erasures = [a for a in component_actions if a.type in [ - 'EraseBasic', 'EraseSectors', 'DataWipe']] + erasures = [ + a + for a in component_actions + if a.type in ['EraseBasic', 'EraseSectors', 'DataWipe'] + ] erasure = erasures[-1] if erasures else None if not erasure: self['Erasure {} {}'.format(ctype, i)] = none2str(component.hid) serial_number = none2str(component.serial_number) - self['Erasure {} {} Serial Number'.format( - ctype, i)] = serial_number - self['Erasure {} {} Size (MB)'.format( - ctype, i)] = none2str(component.size) + self['Erasure {} {} Serial Number'.format(ctype, i)] = serial_number + self['Erasure {} {} Size (MB)'.format(ctype, i)] = none2str(component.size) self['Erasure {} {} Software'.format(ctype, i)] = '' self['Erasure {} {} Result'.format(ctype, i)] = '' self['Erasure {} {} Certificate URL'.format(ctype, i)] = '' @@ -272,15 +278,13 @@ class DeviceRow(OrderedDict): elif hasattr(erasure, 'type') and erasure.type == 'DataWipe': self['Erasure {} {}'.format(ctype, i)] = none2str(component.hid) serial_number = none2str(component.serial_number) - self['Erasure {} {} Serial Number'.format( - ctype, i)] = serial_number - self['Erasure {} {} Size (MB)'.format( - ctype, i)] = none2str(component.size) - self['Erasure {} {} Software'.format( - ctype, i)] = erasure.document.software + self['Erasure {} {} Serial Number'.format(ctype, i)] = serial_number + self['Erasure {} {} Size (MB)'.format(ctype, i)] = none2str(component.size) + self['Erasure {} {} Software'.format(ctype, i)] = erasure.document.software self['Erasure {} {} Result'.format(ctype, i)] = get_result(erasure) - self['Erasure {} {} Certificate URL'.format( - ctype, i)] = erasure.document.url and erasure.document.url.to_text() or '' + self['Erasure {} {} Certificate URL'.format(ctype, i)] = ( + erasure.document.url and erasure.document.url.to_text() or '' + ) self['Erasure {} {} Type'.format(ctype, i)] = '' self['Erasure {} {} Method'.format(ctype, i)] = '' self['Erasure {} {} Elapsed (hours)'.format(ctype, i)] = '' @@ -291,10 +295,8 @@ class DeviceRow(OrderedDict): else: self['Erasure {} {}'.format(ctype, i)] = none2str(component.hid) serial_number = none2str(component.serial_number) - self['Erasure {} {} Serial Number'.format( - ctype, i)] = serial_number - self['Erasure {} {} Size (MB)'.format( - ctype, i)] = none2str(component.size) + self['Erasure {} {} Serial Number'.format(ctype, i)] = serial_number + self['Erasure {} {} Size (MB)'.format(ctype, i)] = none2str(component.size) self['Erasure {} {} Software'.format(ctype, i)] = software result = get_result(erasure) @@ -302,20 +304,16 @@ class DeviceRow(OrderedDict): self['Erasure {} {} Certificate URL'.format(ctype, i)] = '' self['Erasure {} {} Type'.format(ctype, i)] = erasure.type self['Erasure {} {} Method'.format(ctype, i)] = erasure.method - self['Erasure {} {} Elapsed (hours)'.format( - ctype, i)] = format(erasure.elapsed) - self['Erasure {} {} Date'.format( - ctype, i)] = format(erasure.created) + self['Erasure {} {} Elapsed (hours)'.format(ctype, i)] = format( + erasure.elapsed + ) + self['Erasure {} {} Date'.format(ctype, i)] = format(erasure.created) steps = ','.join((format(x) for x in erasure.steps)) self['Erasure {} {} Steps'.format(ctype, i)] = steps - steps_start_time = ','.join( - (format(x.start_time) for x in erasure.steps)) - self['Erasure {} {} Steps Start Time'.format( - ctype, i)] = steps_start_time - steps_end_time = ','.join((format(x.end_time) - for x in erasure.steps)) - self['Erasure {} {} Steps End Time'.format( - ctype, i)] = steps_end_time + steps_start_time = ','.join((format(x.start_time) for x in erasure.steps)) + self['Erasure {} {} Steps Start Time'.format(ctype, i)] = steps_start_time + steps_end_time = ','.join((format(x.end_time) for x in erasure.steps)) + self['Erasure {} {} Steps End Time'.format(ctype, i)] = steps_end_time benchmark = get_action(component, 'BenchmarkDataStorage') if not benchmark: @@ -323,9 +321,11 @@ class DeviceRow(OrderedDict): self['Benchmark {} {} Writing speed (MB/s)'.format(ctype, i)] = '' else: self['Benchmark {} {} Read Speed (MB/s)'.format(ctype, i)] = none2str( - benchmark.read_speed) + benchmark.read_speed + ) self['Benchmark {} {} Writing speed (MB/s)'.format(ctype, i)] = none2str( - benchmark.write_speed) + benchmark.write_speed + ) test_storage = get_action(component, 'TestDataStorage') if not test_storage: @@ -339,14 +339,16 @@ class DeviceRow(OrderedDict): self['Test {} {} Software'.format(ctype, i)] = software self['Test {} {} Type'.format(ctype, i)] = test_storage.length.value - self['Test {} {} Result'.format(ctype, i)] = get_result( - test_storage) + self['Test {} {} Result'.format(ctype, i)] = get_result(test_storage) self['Test {} {} Power cycle count'.format(ctype, i)] = none2str( - test_storage.power_cycle_count) + test_storage.power_cycle_count + ) self['Test {} {} Lifetime (days)'.format(ctype, i)] = none2str( - test_storage.lifetime) + test_storage.lifetime + ) self['Test {} {} Power on hours'.format(ctype, i)] = none2str( - test_storage.power_on_hours) + test_storage.power_on_hours + ) def get_graphic_card(self, ctype, i, component): """Particular fields for component GraphicCard.""" @@ -400,39 +402,36 @@ class StockRow(OrderedDict): def get_result(erasure): - """ For the csv is necessary simplify the message of results """ + """For the csv is necessary simplify the message of results""" if hasattr(erasure, 'type') and erasure.type == 'DataWipe': if erasure.document.success: return 'Success' return 'Failure' - type_of_results = { Severity.Error: 'Failure', Severity.Warning: 'Success with Warnings', Severity.Notice: 'Success', - Severity.Info: 'Success' - } + Severity.Info: 'Success', + } return type_of_results[erasure.severity] def none2str(string): - """ convert none to empty str """ + """convert none to empty str""" if string is None: return '' return format(string) - def get_action(component, action): - """ Filter one action from a component or return None """ + """Filter one action from a component or return None""" result = [a for a in component.actions if a.type == action] return result[-1] if result else None class ActionRow(OrderedDict): - - def __init__(self, allocate): + def __init__(self, allocate): super().__init__() # General information about allocates, deallocate and lives self['DHID'] = allocate['devicehubID'] @@ -459,7 +458,6 @@ class ActionRow(OrderedDict): class InternalStatsRow(OrderedDict): - def __init__(self, user, create, actions): super().__init__() # General information about all internal stats @@ -488,13 +486,7 @@ class InternalStatsRow(OrderedDict): def count_actions(self): for ac in self.actions: - self.is_snapshot( - self.is_deallocate( - self.is_live( - self.is_allocate(ac) - ) - ) - ) + self.is_snapshot(self.is_deallocate(self.is_live(self.is_allocate(ac)))) def is_allocate(self, ac): if ac.type == 'Allocate': @@ -531,9 +523,18 @@ class InternalStatsRow(OrderedDict): self['Snapshot (Registers)'] += 1 def quarter(self, month): - q = {1: 'Q1', 2: 'Q1', 3: 'Q1', - 4: 'Q2', 5: 'Q2', 6: 'Q2', - 7: 'Q3', 8: 'Q3', 9: 'Q3', - 10: 'Q4', 11: 'Q4', 12: 'Q4', - } + q = { + 1: 'Q1', + 2: 'Q1', + 3: 'Q1', + 4: 'Q2', + 5: 'Q2', + 6: 'Q2', + 7: 'Q3', + 8: 'Q3', + 9: 'Q3', + 10: 'Q4', + 11: 'Q4', + 12: 'Q4', + } return q[int(month)] From acc8015b92ccbdbc8cb4e3e52ca9c81f8d0be221 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 8 Jul 2022 12:46:46 +0200 Subject: [PATCH 49/60] changelog --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a5343c..d0159c29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ml). - [add] #306 add link for download json snapshot. - [add] #308 add sentry. - [changed] #302 add system uuid for check the identity of one device. +- [fixed] #309 column lifecycle status is always empty. ## [2.2.0] - 2022-06-24 - [changed] #304 change anchor of link devices lots. @@ -158,3 +159,17 @@ First server render HTML version. Completely rewrites views of angular JS client - [added] #83 add owner_id in all kind of device - [fixed] #89 save json on disk only for shapshots - [fixed] #91 The most old time allow is 1970-01-01 + + +# Release notes + +## [2.2.1] +The pr #302 involves some changes in the deployment process +For to do the deployment you need to do run the script extract_uuids.sh before to run alembic. +This is the correct secuence if the schema of you proyect is *dbtest* +``` +git pull +sh examples/extract_uuids.sh +alembic -x inventory=dbtest upgrade head +``` +If you forget to run this script the migration is do it but not modify any device data. From cfb8706598ce404635350c7c4272864655adbfb4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 8 Jul 2022 18:55:32 +0200 Subject: [PATCH 50/60] fix test selenium --- tests/test_selenium.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/test_selenium.py b/tests/test_selenium.py index 866c2321..b4c7c79d 100644 --- a/tests/test_selenium.py +++ b/tests/test_selenium.py @@ -2,6 +2,7 @@ import time from selenium import webdriver +from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options @@ -19,6 +20,7 @@ class TestSelenium: self.driver.quit() def test_selenium(self): + # import pdb; pdb.set_trace() # setup self.driver.get("http://localhost:5000/login/") self.driver.set_window_size(1920, 1063) @@ -41,7 +43,7 @@ class TestSelenium: lot_id = self.driver.current_url.split("/")[5] # go to unassigned - self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(3) span").click() + self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(5) span").click() self.driver.implicitly_wait(3) # select the first device @@ -57,6 +59,19 @@ class TestSelenium: self.driver.implicitly_wait(3) self.driver.find_element(By.ID, "ApplyDeviceLots").click() time.sleep(3) + element = self.driver.find_element(By.ID, "ApplyDeviceLots") + time.sleep(3) + actions = ActionChains(self.driver) + time.sleep(3) + actions.move_to_element(element).perform() + time.sleep(3) + element = self.driver.find_element(By.CSS_SELECTOR, "body") + time.sleep(3) + actions = ActionChains(self.driver) + time.sleep(3) + # actions.move_to_element(element, 0, 0).perform() + actions.move_to_element(element).perform() + time.sleep(3) self.driver.find_element(By.ID, "SaveAllActions").click() time.sleep(3) @@ -81,10 +96,10 @@ class TestSelenium: self.driver.find_element(By.ID, "SaveAllActions").click() time.sleep(3) - self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(3) span").click() + self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(5) span").click() self.driver.implicitly_wait(3) # logout - self.driver.find_element(By.CSS_SELECTOR, ".d-md-block").click() + self.driver.find_element(By.CSS_SELECTOR, ".d-md-block:nth-child(2)").click() self.driver.implicitly_wait(3) self.driver.find_element(By.LINK_TEXT, "Sign Out").click() From d028cd3c794a56c1929850c12b75225aeed9f372 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 8 Jul 2022 18:55:50 +0200 Subject: [PATCH 51/60] fix test selenium --- tests/test_selenium.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_selenium.py b/tests/test_selenium.py index b4c7c79d..33cd8c79 100644 --- a/tests/test_selenium.py +++ b/tests/test_selenium.py @@ -20,7 +20,6 @@ class TestSelenium: self.driver.quit() def test_selenium(self): - # import pdb; pdb.set_trace() # setup self.driver.get("http://localhost:5000/login/") self.driver.set_window_size(1920, 1063) From f60fdfe7a158331872ee0756cc276cb73fb5c53b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Sun, 10 Jul 2022 07:21:11 +0200 Subject: [PATCH 52/60] add selenium test --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0159c29..e4f819c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ml). ## master ## testing +- [add] #281 add selenium test. - [add] #305 add button download iso Workbench. - [add] #306 add link for download json snapshot. - [add] #308 add sentry. From f359aa6cfafcacab057a7446e2b6c2202e185ab8 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Mon, 11 Jul 2022 13:40:30 +0200 Subject: [PATCH 53/60] Run Selenium as an independent workflow --- .github/workflows/flask.yml | 15 ------- .github/workflows/selenium.yml | 78 ++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/selenium.yml diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index ec42536f..16086b5b 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -49,10 +49,6 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest coverage pip install -r requirements.txt - pip install -e . - mkdir bin - wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz - tar xf geckodriver-v0.30.0-linux64.tar.gz -C bin/ - name: Prepare database env: @@ -66,17 +62,6 @@ jobs: psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION citext SCHEMA public;" psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_trgm SCHEMA public;" - - name: Selenium tests - env: - SECRET_KEY: 'f00046306835001b55c230092e3a7990485beda0bc3bf732088d1ba1b5b74110e22e3f9ec3a24890272554b37d4' - DB_DATABASE: dh_test - FLASK_APP: examples/app.py - dhi: dbtest - run: | - alembic -x inventory=dbtest upgrade head - dh dummy --yes - flask run & pytest tests/test_selenium.py - - name: Lint with flake8 run: | # stop the build if: diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml new file mode 100644 index 00000000..4e1e987a --- /dev/null +++ b/.github/workflows/selenium.yml @@ -0,0 +1,78 @@ +name: Selenium + +on: + push: + branches: [master, testing] + pull_request: + branches: [master, testing] + +jobs: + build: + runs-on: ubuntu-latest + + # Service containers to run with `container-job` + services: + # Label used to access the service container + postgres: + # Docker Hub image + image: postgres:11 + ports: + - 5432:5432 + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: + POSTGRES_DB: dh_test + POSTGRES_USER: dhub + POSTGRES_PASSWORD: ereuse + + strategy: + max-parallel: 4 + matrix: + python-version: [3.7] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Install dependencies + run: | + sudo apt-get update -qy + sudo apt-get -y install postgresql-client --no-install-recommends + python -m pip install --upgrade pip + pip install flake8 pytest coverage + pip install -r requirements.txt + pip install -e . + mkdir bin + wget https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz + tar xf geckodriver-v0.30.0-linux64.tar.gz -C bin/ + + - name: Prepare database + env: + POSTGRES_DB: dh_test + POSTGRES_USER: dhub + POSTGRES_PASSWORD: ereuse + run: | + export PGPASSWORD=$POSTGRES_PASSWORD + psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pgcrypto SCHEMA public;" + psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION ltree SCHEMA public;" + psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION citext SCHEMA public;" + psql -h "localhost" -U "$POSTGRES_USER" -d "$POSTGRES_DB" -c "CREATE EXTENSION pg_trgm SCHEMA public;" + + - name: Selenium tests + env: + SECRET_KEY: 'f00046306835001b55c230092e3a7990485beda0bc3bf732088d1ba1b5b74110e22e3f9ec3a24890272554b37d4' + DB_DATABASE: dh_test + FLASK_APP: examples/app.py + dhi: dbtest + run: | + alembic -x inventory=dbtest upgrade head + dh dummy --yes + flask run & pytest tests/test_selenium.py From d6a2dc0a141f19b25bb4ff0972e3a3bf7f20c955 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Mon, 11 Jul 2022 13:46:52 +0200 Subject: [PATCH 54/60] Bump actions versions --- .github/workflows/eslint.yml | 4 ++-- .github/workflows/flask.yml | 4 ++-- .github/workflows/selenium.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 7e42feaf..b82a0f32 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -16,10 +16,10 @@ on: branches: [master, testing] jobs: - build: + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-node@v1 with: node-version: '16' diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index 16086b5b..787e7479 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -35,9 +35,9 @@ jobs: python-version: [3.7] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: 'pip' diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 4e1e987a..ff7fc73f 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -37,7 +37,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} cache: 'pip' From 214fbb6e373d393d04d5c11ae0aca81d3cfff96a Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Mon, 11 Jul 2022 13:53:27 +0200 Subject: [PATCH 55/60] Bump to Python 3.9 on actions It's the version used on testing & production servers --- .github/workflows/flask.yml | 2 +- .github/workflows/selenium.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index 787e7479..43fbe8e7 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -32,7 +32,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7] + python-version: [3.9] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index ff7fc73f..f9209484 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -32,7 +32,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7] + python-version: [3.9] steps: - uses: actions/checkout@v3 From a303b935a8ec0d4b1c2ff274c532fa3dcf0bc5b8 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 11 Jul 2022 13:50:09 +0200 Subject: [PATCH 56/60] move extract_uuid to script folder --- {examples => scripts}/extract_uuid.py | 0 {examples => scripts}/extract_uuids.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {examples => scripts}/extract_uuid.py (100%) rename {examples => scripts}/extract_uuids.sh (100%) diff --git a/examples/extract_uuid.py b/scripts/extract_uuid.py similarity index 100% rename from examples/extract_uuid.py rename to scripts/extract_uuid.py diff --git a/examples/extract_uuids.sh b/scripts/extract_uuids.sh similarity index 100% rename from examples/extract_uuids.sh rename to scripts/extract_uuids.sh From 15a56a59ee360c2b77c5a7317c724e9274fd19b5 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 11 Jul 2022 14:07:27 +0200 Subject: [PATCH 57/60] fix flak8 --- ereuse_devicehub/parser/computer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ereuse_devicehub/parser/computer.py b/ereuse_devicehub/parser/computer.py index a6993c04..afd2e17d 100644 --- a/ereuse_devicehub/parser/computer.py +++ b/ereuse_devicehub/parser/computer.py @@ -94,7 +94,7 @@ class Processor(Component): assert not hasattr(self, 'cores') or 1 <= self.cores <= 16 @staticmethod # noqa: C901 - def processor_brand_generation(model: str): + def processor_brand_generation(model: str): # noqa: C901 """Generates the ``brand`` and ``generation`` fields for the given model. This returns a tuple with: From 8f4d3e70631645a0ebf22268f02f38107a15c23b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 11 Jul 2022 15:08:55 +0200 Subject: [PATCH 58/60] modify changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4f819c9..6566da29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -170,7 +170,7 @@ For to do the deployment you need to do run the script extract_uuids.sh before t This is the correct secuence if the schema of you proyect is *dbtest* ``` git pull -sh examples/extract_uuids.sh +sh scripts/extract_uuids.sh alembic -x inventory=dbtest upgrade head ``` If you forget to run this script the migration is do it but not modify any device data. From 2491ab91371246b6106ebaa32adb8f6cdcbe5d3e Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Mon, 11 Jul 2022 13:21:35 +0200 Subject: [PATCH 59/60] Cosmetics and fix typos --- CHANGELOG.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6566da29..471cf57d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,21 +5,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.ht ml). -## master - ## testing -- [add] #281 add selenium test. -- [add] #305 add button download iso Workbench. -- [add] #306 add link for download json snapshot. -- [add] #308 add sentry. -- [changed] #302 add system uuid for check the identity of one device. -- [fixed] #309 column lifecycle status is always empty. +- [added] #281 Add selenium test. +- [added] #305 Add button to download ISO Workbench. +- [added] #306 Add link to download JSON snapshot. +- [added] #308 Add sentry. +- [changed] #302 Add system uuid to check the identity of one device. +- [fixed] #309 Column lifecycle status is always empty. ## [2.2.0] - 2022-06-24 - [changed] #304 change anchor of link devices lots. ## [2.2.0 rc2] - 2022-06-22 -- [added] #299 Multy select with Shift. +- [added] #299 Multiselect with Shift. - [added] #300 Add Sid in label. - [added] #301 Add logo in label. - [added] #303 Add export Lots. From e6accae694bd8d92a997b88f6845967b278b7776 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Tue, 12 Jul 2022 10:10:49 +0200 Subject: [PATCH 60/60] Release version 2.3.0 --- CHANGELOG.md | 27 +++++++++++++-------------- ereuse_devicehub/__init__.py | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 471cf57d..e0fb8c4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ml). ## testing + +## [2.3.0] - 2022-07-12 - [added] #281 Add selenium test. - [added] #305 Add button to download ISO Workbench. - [added] #306 Add link to download JSON snapshot. @@ -13,6 +15,17 @@ ml). - [changed] #302 Add system uuid to check the identity of one device. - [fixed] #309 Column lifecycle status is always empty. +**IMPORTANT**: PR #302 involves some changes in the deployment process: +```bash +# First, run script `extract_uuids.sh` before applying alembic migrations (e.g. with schema `dbtest`) +sh scripts/extract_uuids.sh + +# Then, apply alembic migrations +alembic -x inventory=dbtest upgrade head +``` + +**NOTE**: If you forget (or don't need) to run this script before applying new migration it will work but any device will be updated. + ## [2.2.0] - 2022-06-24 - [changed] #304 change anchor of link devices lots. @@ -158,17 +171,3 @@ First server render HTML version. Completely rewrites views of angular JS client - [added] #83 add owner_id in all kind of device - [fixed] #89 save json on disk only for shapshots - [fixed] #91 The most old time allow is 1970-01-01 - - -# Release notes - -## [2.2.1] -The pr #302 involves some changes in the deployment process -For to do the deployment you need to do run the script extract_uuids.sh before to run alembic. -This is the correct secuence if the schema of you proyect is *dbtest* -``` -git pull -sh scripts/extract_uuids.sh -alembic -x inventory=dbtest upgrade head -``` -If you forget to run this script the migration is do it but not modify any device data. diff --git a/ereuse_devicehub/__init__.py b/ereuse_devicehub/__init__.py index 8a124bf6..55e47090 100644 --- a/ereuse_devicehub/__init__.py +++ b/ereuse_devicehub/__init__.py @@ -1 +1 @@ -__version__ = "2.2.0" +__version__ = "2.3.0"