Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

spec for ls osroot(ls /) #81

Merged
merged 1 commit into from
Jun 7, 2018

Conversation

TripleJQK
Copy link
Contributor

No description provided.

@TripleJQK TripleJQK changed the base branch from master to uploader_json June 1, 2018 07:44
@xiangce
Copy link
Contributor

xiangce commented Jun 6, 2018

I did a test with the uploader_json and I don't think the newly added ls_osroot works for the LsOsroot parser.

Here is my test log:

# ls insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-l*
insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-la_.dev.null_.var.www  insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lanR_.sys.firmware
insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lan                    insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lanR_.var.lib.docker.volumes
insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lanR_.boot             insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-la_.var.log_.var.log.audit
insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lanR_.dev              insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-l_.boot.grub2.grub.cfg
insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lanR_.dev.disk         insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-l_.boot.grub.grub.conf
insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lanR_.etc              insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-l_.etc.ssh.sshd_config

# python -m insights -p insights.parsers.ls_osroot -- /tmp/a.tar.gz
INFO:insights.core.dr:Trying insights.specs.default.DefaultSpecs.ls_osroot
INFO:insights.core.dr:Trying insights.specs.insights_archive.InsightsArchiveSpecs.ls_osroot
INFO:insights.core.dr:Trying insights.specs.Specs.ls_osroot
INFO:insights.core.dr:Trying insights.parsers.ls_osroot.LsOsroot


datasource instances:

parser instances:

# python -m insights -p insights.parsers.ls_dev -- /tmp/a.tar.gz                                                                                                                             
INFO:insights.core.dr:Trying insights.specs.insights_archive.InsightsArchiveSpecs.ls_dev
INFO:insights.core.dr:Trying insights.specs.default.DefaultSpecs.ls_dev
INFO:insights.core.dr:Trying insights.specs.Specs.ls_dev
INFO:insights.core.dr:Trying insights.parsers.ls_dev.LsDev


datasource instances:
'insights.specs.Specs.ls_dev:'
TextFileProvider("/tmp/tmpi713HH/insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lanR_.dev")                                                                             

'insights.specs.insights_archive.InsightsArchiveSpecs.ls_dev:'
TextFileProvider("/tmp/tmpi713HH/insights-liuxc-rhel-client-test-20180606015748/insights_commands/ls_-lanR_.dev")                                                                             


parser instances:
'insights.parsers.ls_dev.LsDev:'
<insights.parsers.ls_dev.LsDev object at 0x7fe8f08bf0d0>

I think this might be caused by #28 (comment), the current insights-core could not map the insights_commands/ls_-lan in the collected data with the ls_osroot spec.

@csams
Copy link

csams commented Jun 7, 2018

@xiangce Try changing the spec in insights/specs/insights_archive.py to ls_osroot = simple_file("insights_commands/ls_-lan")

@wcmitchell wcmitchell merged commit c7a2e99 into RedHatInsights:uploader_json Jun 7, 2018
@xiangce
Copy link
Contributor

xiangce commented Jun 11, 2018

@csams - It's OK to change the simple_file and truncate the last ., but as I mentioned in #28 (comment), the current FileListing Class cannot parser the simple_file that doesn't contain any . correctly, See insights/core/init.py#L1171

I'll open an issue for it to the insights-core project.

@xiangce
Copy link
Contributor

xiangce commented Jun 11, 2018

Issue opened: RedHatInsights/insights-core#1203

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants