Skip to content

New option in files_external:list --mount-options #36420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2019
Merged

Conversation

mmattel
Copy link
Contributor

@mmattel mmattel commented Nov 12, 2019

Description

Adding a new option for the files_external:list command --mount-options.
Using --mount-options shows all mount options independent the fact if they are default or not.
I came across when working on #36397 where I wanted to see if an option is set or not.

./occ files_external:list  --output=json_pretty
[
    {
        "mount_id": 2,
        "mount_point": "\/ttt",
        "storage": "SMB \/ CIFS",
        "authentication_type": "Username and password",
        "configuration": "host: \"filer\", share: \"swwindows\", root: \"\", domain: \"mydomain\", user: \"martin\", password: \"***\"",
        "options": "",
        "applicable_users": "All",
        "applicable_groups": ""
    }
]
./occ files_external:list  --mount-options --output=json_pretty
[
    {
        "mount_id": 2,
        "mount_point": "\/ttt",
        "storage": "SMB \/ CIFS",
        "authentication_type": "Username and password",
        "configuration": "host: \"filer\", share: \"swwindows\", root: \"\", domain: \"mydomain\", user: \"martin\", password: \"***\"",
        "options": "encrypt: true, previews: true, filesystem_check_changes: 1, enable_sharing: false, encoding_compatibility: false",
        "applicable_users": "All",
        "applicable_groups": ""
    }
]

NOTE: during testing, I found a bug in the json/ json_pretty output when using option --all causing a php error. This is now fixed.

Related Issue

Motivation and Context

Helps identifying which options are present and in which state independent if they are set to default or not.

How Has This Been Tested?

Running local

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised: will be made on merge
  • Changelog item, see TEMPLATE

@codecov
Copy link

codecov bot commented Nov 12, 2019

Codecov Report

Merging #36420 into master will decrease coverage by 0.29%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #36420     +/-   ##
===========================================
- Coverage     65.16%   64.86%   -0.3%     
  Complexity    19802    19802             
===========================================
  Files          1271     1271             
  Lines         74754    74760      +6     
  Branches       1309     1309             
===========================================
- Hits          48712    48493    -219     
- Misses        25656    25881    +225     
  Partials        386      386
Flag Coverage Δ Complexity Δ
#javascript 54% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.05% <100%> (-0.34%) 19802 <0> (ø)
Impacted Files Coverage Δ Complexity Δ
apps/files_external/lib/Command/ListCommand.php 69.36% <100%> (+1.69%) 0 <0> (ø) ⬇️
apps/files_external/lib/Lib/Storage/SMB.php 0% <0%> (-52.2%) 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7cf72f...ac32722. Read the comment docs.

@mmattel mmattel force-pushed the show_options branch 2 times, most recently from 3e0f795 to bef7517 Compare November 13, 2019 09:45
@mmattel
Copy link
Contributor Author

mmattel commented Nov 19, 2019

Ping ?

@mmattel mmattel merged commit f70c0ba into master Nov 19, 2019
@delete-merged-branch delete-merged-branch bot deleted the show_options branch November 19, 2019 13:50
mmattel added a commit to owncloud/docs that referenced this pull request Nov 19, 2019
@davitol davitol mentioned this pull request Nov 26, 2019
37 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants