chef-ruby-lvm-attrib 0.2.7 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.expeditor/config.yml +50 -0
- data/.expeditor/run_linux_tests.sh +16 -0
- data/.expeditor/update_version.sh +12 -0
- data/.expeditor/verify.pipeline.yml +19 -0
- data/.github/CODEOWNERS +3 -3
- data/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md +29 -0
- data/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md +40 -0
- data/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md +17 -0
- data/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md +12 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +3 -0
- data/.rubocop.yml +4 -0
- data/CHANGELOG.md +40 -1
- data/CONTRIBUTING.md +1 -0
- data/Gemfile +1 -0
- data/README.md +3 -1
- data/Rakefile +10 -5
- data/VERSION +1 -0
- data/bin/generate_field_data +61 -39
- data/lib/lvm/attributes.rb +2 -2
- data/lib/lvm/attributes/2.02.185(2)/lvs.yaml +328 -0
- data/lib/lvm/attributes/2.02.185(2)/lvsseg.yaml +138 -0
- data/lib/lvm/attributes/2.02.185(2)/pvs.yaml +113 -0
- data/lib/lvm/attributes/2.02.185(2)/pvsseg.yaml +16 -0
- data/lib/lvm/attributes/2.02.185(2)/vgs.yaml +140 -0
- data/lib/lvm/attributes/2.02.186(2)/lvs.yaml +328 -0
- data/lib/lvm/attributes/2.02.186(2)/lvsseg.yaml +138 -0
- data/lib/lvm/attributes/2.02.186(2)/pvs.yaml +113 -0
- data/lib/lvm/attributes/2.02.186(2)/pvsseg.yaml +16 -0
- data/lib/lvm/attributes/2.02.186(2)/vgs.yaml +140 -0
- data/lib/lvm/attributes/2.03.02(2)/lvs.yaml +328 -0
- data/lib/lvm/attributes/2.03.02(2)/lvsseg.yaml +138 -0
- data/lib/lvm/attributes/2.03.02(2)/pvs.yaml +113 -0
- data/lib/lvm/attributes/2.03.02(2)/pvsseg.yaml +16 -0
- data/lib/lvm/attributes/2.03.02(2)/vgs.yaml +140 -0
- data/lib/lvm/attributes/2.03.05(2)/lvs.yaml +328 -0
- data/lib/lvm/attributes/2.03.05(2)/lvsseg.yaml +138 -0
- data/lib/lvm/attributes/2.03.05(2)/pvs.yaml +113 -0
- data/lib/lvm/attributes/2.03.05(2)/pvsseg.yaml +16 -0
- data/lib/lvm/attributes/2.03.05(2)/vgs.yaml +140 -0
- data/lib/lvm/attributes/2.03.07(2)/lvs.yaml +348 -0
- data/lib/lvm/attributes/2.03.07(2)/lvsseg.yaml +214 -0
- data/lib/lvm/attributes/2.03.07(2)/pvs.yaml +113 -0
- data/lib/lvm/attributes/2.03.07(2)/pvsseg.yaml +16 -0
- data/lib/lvm/attributes/2.03.07(2)/vgs.yaml +140 -0
- data/lib/lvm/attributes/2.03.08(2)/lvs.yaml +364 -0
- data/lib/lvm/attributes/2.03.08(2)/lvsseg.yaml +214 -0
- data/lib/lvm/attributes/2.03.08(2)/pvs.yaml +113 -0
- data/lib/lvm/attributes/2.03.08(2)/pvsseg.yaml +16 -0
- data/lib/lvm/attributes/2.03.08(2)/vgs.yaml +140 -0
- data/lib/lvm/attributes/2.03.10(2)/lvs.yaml +364 -0
- data/lib/lvm/attributes/2.03.10(2)/lvsseg.yaml +214 -0
- data/lib/lvm/attributes/2.03.10(2)/pvs.yaml +113 -0
- data/lib/lvm/attributes/2.03.10(2)/pvsseg.yaml +16 -0
- data/lib/lvm/attributes/2.03.10(2)/vgs.yaml +140 -0
- metadata +49 -5
- data/.github/ISSUE_TEMPLATE.md +0 -13
- data/.github/lock.yml +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b2d54b7e6f54dbb95e71f142b7bcb16a3367e08ddbbb894a7ff4550c288bbdfb
|
|
4
|
+
data.tar.gz: 3575359f88c8ac4508850ee1b183a8cb7a122b8b1258a2c3faf2ec7727ec9e4e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c84d342cea64c78c686845be3b71dad7219061665e497d2c4cfcf5b01fde706b2a74668445bfabf08feec99b98c282911b545e9bc370784d59a827e3ef45ec9
|
|
7
|
+
data.tar.gz: 6ed0243bbc69a562cf6120a7dfe340f04c774f3585a880514628c203e22913cd6695f5b893336c0f9d73fb5df43a413183fc303bedbcf2df4a8ec06a037c7233
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Documentation available at https://expeditor.chef.io/docs/getting-started/
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
# Slack channel in Chef Software slack to send notifications about build failures, etc
|
|
5
|
+
slack:
|
|
6
|
+
notify_channel: chef-infra-notify
|
|
7
|
+
|
|
8
|
+
# This publish is triggered by the `built_in:publish_rubygems` artifact_action.
|
|
9
|
+
rubygems:
|
|
10
|
+
- chef-ruby-lvm-attrib
|
|
11
|
+
|
|
12
|
+
github:
|
|
13
|
+
# This deletes the GitHub PR branch after successfully merged into the release branch
|
|
14
|
+
delete_branch_on_merge: true
|
|
15
|
+
# The tag format to use (e.g. v1.0.0)
|
|
16
|
+
version_tag_format: "v{{version}}"
|
|
17
|
+
# allow bumping the minor release via label
|
|
18
|
+
minor_bump_labels:
|
|
19
|
+
- "Expeditor: Bump Version Minor"
|
|
20
|
+
# allow bumping the major release via label
|
|
21
|
+
major_bump_labels:
|
|
22
|
+
- "Expeditor: Bump Version Major"
|
|
23
|
+
|
|
24
|
+
changelog:
|
|
25
|
+
rollup_header: Changes not yet released to rubygems.org
|
|
26
|
+
|
|
27
|
+
# These actions are taken, in order they are specified, anytime a Pull Request is merged.
|
|
28
|
+
merge_actions:
|
|
29
|
+
- built_in:bump_version:
|
|
30
|
+
ignore_labels:
|
|
31
|
+
- "Expeditor: Skip Version Bump"
|
|
32
|
+
- "Expeditor: Skip All"
|
|
33
|
+
- bash:.expeditor/update_version.sh:
|
|
34
|
+
only_if: built_in:bump_version
|
|
35
|
+
- built_in:update_changelog:
|
|
36
|
+
ignore_labels:
|
|
37
|
+
- "Expeditor: Skip Changelog"
|
|
38
|
+
- "Expeditor: Skip All"
|
|
39
|
+
- built_in:build_gem:
|
|
40
|
+
only_if: built_in:bump_version
|
|
41
|
+
|
|
42
|
+
pipelines:
|
|
43
|
+
- verify:
|
|
44
|
+
description: Pull Request validation tests
|
|
45
|
+
public: true
|
|
46
|
+
|
|
47
|
+
promote:
|
|
48
|
+
actions:
|
|
49
|
+
- built_in:rollover_changelog
|
|
50
|
+
- built_in:publish_rubygems
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# This script runs a passed in command, but first setups up the bundler caching on the repo
|
|
4
|
+
|
|
5
|
+
set -ue
|
|
6
|
+
|
|
7
|
+
export USER="root"
|
|
8
|
+
export LANG=C.UTF-8 LANGUAGE=C.UTF-8
|
|
9
|
+
|
|
10
|
+
echo "--- bundle install"
|
|
11
|
+
|
|
12
|
+
bundle config --local path vendor/bundle
|
|
13
|
+
bundle install --jobs=7 --retry=3
|
|
14
|
+
|
|
15
|
+
echo "+++ bundle exec task"
|
|
16
|
+
bundle exec $@
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# After a PR merge, Chef Expeditor will bump the PATCH version in the VERSION file.
|
|
4
|
+
# It then executes this file to update any other files/components with that new version.
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
set -evx
|
|
8
|
+
|
|
9
|
+
sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/lvm/attributes.rb
|
|
10
|
+
|
|
11
|
+
# Once Expeditor finshes executing this script, it will commit the changes and push
|
|
12
|
+
# the commit as a new tag corresponding to the value in the VERSION file.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
expeditor:
|
|
3
|
+
cached_folders:
|
|
4
|
+
- vendor
|
|
5
|
+
defaults:
|
|
6
|
+
buildkite:
|
|
7
|
+
retry:
|
|
8
|
+
automatic:
|
|
9
|
+
limit: 1
|
|
10
|
+
timeout_in_minutes: 30
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- label: lint-chefstyle
|
|
14
|
+
command:
|
|
15
|
+
- .expeditor/run_linux_tests.sh "rake style"
|
|
16
|
+
expeditor:
|
|
17
|
+
executor:
|
|
18
|
+
docker:
|
|
19
|
+
image: ruby:2.7-buster
|
data/.github/CODEOWNERS
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Order is important. The last matching pattern has the most precedence.
|
|
2
2
|
|
|
3
|
-
*
|
|
4
|
-
.expeditor
|
|
5
|
-
|
|
3
|
+
* @chef/chef-infra-reviewers @chef/chef-infra-approvers @chef/chef-infra-owners
|
|
4
|
+
.expeditor/ @chef/jex-team
|
|
5
|
+
*.md @chef/docs-team
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: � Bug Report
|
|
3
|
+
about: If something isn't working as expected �.
|
|
4
|
+
labels: "Status: Untriaged"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Version:
|
|
8
|
+
|
|
9
|
+
[Version of the project installed]
|
|
10
|
+
|
|
11
|
+
# Environment:
|
|
12
|
+
|
|
13
|
+
[Details about the environment such as the Operating System, cookbook details, etc...]
|
|
14
|
+
|
|
15
|
+
# Scenario:
|
|
16
|
+
|
|
17
|
+
[What you are trying to achieve and you can't?]
|
|
18
|
+
|
|
19
|
+
# Steps to Reproduce:
|
|
20
|
+
|
|
21
|
+
[If you are filing an issue what are the things we need to do in order to repro your problem?]
|
|
22
|
+
|
|
23
|
+
# Expected Result:
|
|
24
|
+
|
|
25
|
+
[What are you expecting to happen as the consequence of above reproduction steps?]
|
|
26
|
+
|
|
27
|
+
# Actual Result:
|
|
28
|
+
|
|
29
|
+
[What actually happens after the reproduction steps?]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Design Proposal
|
|
3
|
+
about: I have a significant change I would like to propose and discuss before starting
|
|
4
|
+
labels: "Status: Untriaged"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### When a Change Needs a Design Proposal
|
|
8
|
+
|
|
9
|
+
A design proposal should be opened any time a change meets one of the following qualifications:
|
|
10
|
+
|
|
11
|
+
- Significantly changes the user experience of a project in a way that impacts users.
|
|
12
|
+
- Significantly changes the underlying architecture of the project in a way that impacts other developers.
|
|
13
|
+
- Changes the development or testing process of the project such as a change of CI systems or test frameworks.
|
|
14
|
+
|
|
15
|
+
### Why We Use This Process
|
|
16
|
+
|
|
17
|
+
- Allows all interested parties (including any community member) to discuss large impact changes to a project.
|
|
18
|
+
- Serves as a durable paper trail for discussions regarding project architecture.
|
|
19
|
+
- Forces design discussions to occur before PRs are created.
|
|
20
|
+
- Reduces PR refactoring and rejected PRs.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<!--- Proposal description and rationale. -->
|
|
25
|
+
|
|
26
|
+
## Motivation
|
|
27
|
+
|
|
28
|
+
<!---
|
|
29
|
+
As a <<user_profile>>,
|
|
30
|
+
I want to <<functionality>>,
|
|
31
|
+
so that <<benefit>>.
|
|
32
|
+
-->
|
|
33
|
+
|
|
34
|
+
## Specification
|
|
35
|
+
|
|
36
|
+
<!--- A detailed description of the planned implementation. -->
|
|
37
|
+
|
|
38
|
+
## Downstream Impact
|
|
39
|
+
|
|
40
|
+
<!--- Which other tools will be impacted by this work? -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 🚀 Enhancement Request
|
|
3
|
+
about: I have a suggestion (and may want to implement it 🙂)!
|
|
4
|
+
labels: "Status: Untriaged"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
### Describe the Enhancement:
|
|
8
|
+
<!--- What you are trying to achieve that you can't? -->
|
|
9
|
+
|
|
10
|
+
### Describe the Need:
|
|
11
|
+
<!--- What kind of user do you believe would utilize this enhancement, and how many users might want this functionality -->
|
|
12
|
+
|
|
13
|
+
### Current Alternative
|
|
14
|
+
<!--- Is there a current alternative that you can utilize to workaround the lack of this enhancement -->
|
|
15
|
+
|
|
16
|
+
### Can We Help You Implement This?:
|
|
17
|
+
<!--- The best way to ensure your enhancement is built is to help implement the enhancement yourself. If you're interested in helping out we'd love to give you a hand to make this possible. Let us know if there's something you need. -->
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 🤗 Support Question
|
|
3
|
+
about: If you have a question 💬, please check out our Slack!
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
We use GitHub issues to track bugs and feature requests. If you need help please post to our Mailing List or join the Chef Community Slack.
|
|
7
|
+
|
|
8
|
+
* Chef Community Slack at http://community-slack.chef.io/.
|
|
9
|
+
* Chef Mailing List https://discourse.chef.io/
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Support issues opened here will be closed and redirected to Slack or Discourse.
|
|
@@ -9,4 +9,7 @@ StackOverflow discussions that are relevant]
|
|
|
9
9
|
|
|
10
10
|
### Check List
|
|
11
11
|
|
|
12
|
+
- [ ] New functionality includes tests
|
|
13
|
+
- [ ] All tests pass
|
|
12
14
|
- [ ] All commits have been signed-off for the Developer Certificate of Origin. See <https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco>
|
|
15
|
+
- [ ] PR title is a worthy inclusion in the CHANGELOG
|
data/.rubocop.yml
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
# chef-ruby-lvm-attrib Changelog
|
|
2
|
+
|
|
3
|
+
<!-- latest_release 0.3.3 -->
|
|
4
|
+
## [v0.3.3](https://github.com/chef/chef-ruby-lvm-attrib/tree/v0.3.3) (2020-07-21)
|
|
5
|
+
|
|
6
|
+
#### Merged Pull Requests
|
|
7
|
+
- Added v2_03_07 attributes [#28](https://github.com/chef/chef-ruby-lvm-attrib/pull/28) ([bottleneko](https://github.com/bottleneko))
|
|
8
|
+
<!-- latest_release -->
|
|
9
|
+
<!-- release_rollup since=0.3.2 -->
|
|
10
|
+
### Changes not yet released to rubygems.org
|
|
11
|
+
|
|
12
|
+
#### Merged Pull Requests
|
|
13
|
+
- Added v2_03_07 attributes [#28](https://github.com/chef/chef-ruby-lvm-attrib/pull/28) ([bottleneko](https://github.com/bottleneko)) <!-- 0.3.3 -->
|
|
14
|
+
<!-- release_rollup -->
|
|
15
|
+
|
|
16
|
+
<!-- latest_stable_release -->
|
|
17
|
+
## [v0.3.2](https://github.com/chef/chef-ruby-lvm-attrib/tree/v0.3.2) (2020-05-27)
|
|
18
|
+
|
|
19
|
+
#### Merged Pull Requests
|
|
20
|
+
- Added v2_03_08 attributes [#27](https://github.com/chef/chef-ruby-lvm-attrib/pull/27) ([gaelik](https://github.com/gaelik))
|
|
21
|
+
<!-- latest_stable_release -->
|
|
22
|
+
|
|
23
|
+
## [v0.3.1](https://github.com/chef/chef-ruby-lvm-attrib/tree/v0.3.1) (2020-04-15)
|
|
24
|
+
|
|
25
|
+
#### Merged Pull Requests
|
|
26
|
+
- Add 2.03.10 data [#25](https://github.com/chef/chef-ruby-lvm-attrib/pull/25) ([tas50](https://github.com/tas50))
|
|
27
|
+
|
|
28
|
+
## [v0.3.0](https://github.com/chef/chef-ruby-lvm-attrib/tree/v0.3.0) (2019-10-18)
|
|
29
|
+
|
|
30
|
+
#### Merged Pull Requests
|
|
31
|
+
- Wire up Expeditor and Buildkite [#22](https://github.com/chef/chef-ruby-lvm-attrib/pull/22) ([tas50](https://github.com/tas50))
|
|
32
|
+
- Added v2_02_186 attributes [#18](https://github.com/chef/chef-ruby-lvm-attrib/pull/18) ([b-dean](https://github.com/b-dean))
|
|
33
|
+
- Add the gem badge to the readme + resolve chefstyle warnings [#23](https://github.com/chef/chef-ruby-lvm-attrib/pull/23) ([tas50](https://github.com/tas50))
|
|
34
|
+
|
|
35
|
+
# 0.2.8 (2019-08-09)
|
|
36
|
+
|
|
37
|
+
- Added 2.02.185
|
|
38
|
+
- Added 2.03.02
|
|
39
|
+
|
|
1
40
|
# 0.2.7 (2019-01-04)
|
|
2
41
|
|
|
3
42
|
- Added all attributes up to 2.03.01 [@ctramnitz](https://github.com/ctramnitz)
|
|
@@ -147,4 +186,4 @@
|
|
|
147
186
|
|
|
148
187
|
- Added LVM attributes for version 2.02.111
|
|
149
188
|
- Added MIT license to the Gemspec
|
|
150
|
-
- Gemspec now properly loads the version from the lib/attributes.rb file
|
|
189
|
+
- Gemspec now properly loads the version from the lib/attributes.rb file
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Please refer to https://github.com/chef/chef/blob/master/CONTRIBUTING.md
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# chef-ruby-lvm-attrib
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/rb/chef-ruby-lvm-attrib)
|
|
4
|
+
|
|
3
5
|
This is a list of attributes for lvm objects. They are generated from the source code and broken down by version. See ADDING ATTRIBUTES below to contribute.
|
|
4
6
|
|
|
5
7
|
At their core these files exist to determine which arguments to pass lvs/vgs/pvs and the subsequent type conversions.
|
|
@@ -21,7 +23,7 @@ Currently this is split from the main ruby-lvm gem since these files require upd
|
|
|
21
23
|
## Installation
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
|
-
sudo gem install ruby-lvm-attrib
|
|
26
|
+
sudo gem install chef-ruby-lvm-attrib
|
|
25
27
|
```
|
|
26
28
|
|
|
27
29
|
## Updating for new LVM releases
|
data/Rakefile
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
require "bundler/gem_tasks"
|
|
2
2
|
|
|
3
|
-
task :
|
|
3
|
+
task default: :style
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
require "
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
begin
|
|
6
|
+
require "chefstyle"
|
|
7
|
+
require "rubocop/rake_task"
|
|
8
|
+
desc "Run Chefstyle tests"
|
|
9
|
+
RuboCop::RakeTask.new(:style) do |task|
|
|
10
|
+
task.options += ["--display-cop-names", "--no-color"]
|
|
11
|
+
end
|
|
12
|
+
rescue LoadError
|
|
13
|
+
puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed."
|
|
9
14
|
end
|
data/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.3
|
data/bin/generate_field_data
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
require "fileutils"
|
|
9
9
|
require "yaml"
|
|
10
10
|
|
|
11
|
-
VERSION_FILE = "/VERSION"
|
|
12
|
-
COLUMNS_FILE = "/lib/report/columns.h"
|
|
11
|
+
VERSION_FILE = "/VERSION".freeze
|
|
12
|
+
COLUMNS_FILE = "/lib/report/columns.h".freeze
|
|
13
13
|
|
|
14
14
|
debug = false
|
|
15
15
|
|
|
@@ -70,7 +70,6 @@ TYPE_CONVERSION_MAP = {
|
|
|
70
70
|
"raidminrecoveryrate" => "Integer",
|
|
71
71
|
"raidmaxrecoveryrate" => "Integer",
|
|
72
72
|
"segsizepe" => "Integer",
|
|
73
|
-
"thinid" => "Integer",
|
|
74
73
|
# New fields for caching
|
|
75
74
|
"cache_total_blocks" => "Integer",
|
|
76
75
|
"cache_used_blocks" => "Integer",
|
|
@@ -92,7 +91,29 @@ TYPE_CONVERSION_MAP = {
|
|
|
92
91
|
"seg_new_data_offset" => "Integer",
|
|
93
92
|
"seg_parity_chunks" => "Integer",
|
|
94
93
|
"cachemetadataformat" => "Integer",
|
|
95
|
-
|
|
94
|
+
|
|
95
|
+
# these seems to be integers
|
|
96
|
+
"vdo_used_size" => "Integer",
|
|
97
|
+
"vdo_saving_percent" => "Integer",
|
|
98
|
+
"writecache_total_blocks" => "Integer",
|
|
99
|
+
"writecache_free_blocks" => "Integer",
|
|
100
|
+
"writecache_writeback_blocks" => "Integer",
|
|
101
|
+
"writecache_error" => "Integer",
|
|
102
|
+
"vdo_minimum_io_size" => "Integer",
|
|
103
|
+
"vdo_block_map_cache_size" => "Integer",
|
|
104
|
+
"vdo_block_map_era_length" => "Integer",
|
|
105
|
+
"vdo_index_memory_size" => "Integer",
|
|
106
|
+
"vdo_slab_size" => "Integer",
|
|
107
|
+
"vdo_ack_threads" => "Integer",
|
|
108
|
+
"vdo_bio_threads" => "Integer",
|
|
109
|
+
"vdo_bio_rotation" => "Integer",
|
|
110
|
+
"vdo_cpu_threads" => "Integer",
|
|
111
|
+
"vdo_hash_zone_threads" => "Integer",
|
|
112
|
+
"vdo_logical_threads" => "Integer",
|
|
113
|
+
"vdo_physical_threads" => "Integer",
|
|
114
|
+
"vdo_max_discard" => "Integer",
|
|
115
|
+
"vdo_header_size" => "Integer",
|
|
116
|
+
}.freeze
|
|
96
117
|
|
|
97
118
|
lvm_source = ARGV[0]
|
|
98
119
|
|
|
@@ -105,12 +126,13 @@ pvssegs = []
|
|
|
105
126
|
vgs = []
|
|
106
127
|
File.readlines(lvm_source + COLUMNS_FILE).each do |line|
|
|
107
128
|
# eg: FIELD(LVS, lv, STR, "LV UUID", lvid.id[1], 38, uuid, "lv_uuid", "Unique identifier")
|
|
108
|
-
next unless line =~
|
|
129
|
+
next unless line =~ /^FIELD\((.*)\)$/
|
|
130
|
+
|
|
109
131
|
fields = $1.split(", ")
|
|
110
|
-
fields.each { |f| f.gsub!(
|
|
132
|
+
fields.each { |f| f.gsub!(/^"/, ""); f.gsub!(/"$/, "") }
|
|
111
133
|
p fields if debug
|
|
112
|
-
app
|
|
113
|
-
general_type
|
|
134
|
+
app = fields[0]
|
|
135
|
+
general_type = fields[2]
|
|
114
136
|
specific_type = fields[6]
|
|
115
137
|
column = fields[7]
|
|
116
138
|
method = fields[7].dup
|
|
@@ -133,24 +155,24 @@ File.readlines(lvm_source + COLUMNS_FILE).each do |line|
|
|
|
133
155
|
# with issues (seg_start).
|
|
134
156
|
case app
|
|
135
157
|
when "LVS", "LVSINFOSTATUS", "LVSSTATUS"
|
|
136
|
-
method.sub!(
|
|
158
|
+
method.sub!(/^lv_/, "")
|
|
137
159
|
when "SEGS"
|
|
138
|
-
method.sub!(
|
|
160
|
+
method.sub!(/^seg_/, "")
|
|
139
161
|
when "LABEL"
|
|
140
|
-
method.sub!(
|
|
162
|
+
method.sub!(/^pv_/, "")
|
|
141
163
|
when "PVS"
|
|
142
|
-
method.sub!(
|
|
164
|
+
method.sub!(/^pv_/, "")
|
|
143
165
|
when "PVSEGS"
|
|
144
|
-
method.sub!(
|
|
166
|
+
method.sub!(/^pvseg_/, "")
|
|
145
167
|
when "VGS"
|
|
146
|
-
method.sub!(
|
|
168
|
+
method.sub!(/^vg_/, "")
|
|
147
169
|
end
|
|
148
170
|
|
|
149
171
|
attribute = {
|
|
150
|
-
:
|
|
151
|
-
:
|
|
152
|
-
:
|
|
153
|
-
:
|
|
172
|
+
method: method,
|
|
173
|
+
column: column,
|
|
174
|
+
type_hint: attribute_type,
|
|
175
|
+
description: description,
|
|
154
176
|
}
|
|
155
177
|
|
|
156
178
|
case app
|
|
@@ -170,27 +192,27 @@ File.readlines(lvm_source + COLUMNS_FILE).each do |line|
|
|
|
170
192
|
end
|
|
171
193
|
|
|
172
194
|
# we use vg_uuid as our crossover attribute that links vg->lv and vg->pv
|
|
173
|
-
attribute = { :
|
|
174
|
-
:
|
|
175
|
-
:
|
|
176
|
-
:
|
|
195
|
+
attribute = { method: "vg_uuid",
|
|
196
|
+
column: "vg_uuid",
|
|
197
|
+
type_hint: "String",
|
|
198
|
+
description: "For VolumeGroup to LogicalVolume relationship." }
|
|
177
199
|
lvs << attribute
|
|
178
|
-
attribute = { :
|
|
179
|
-
:
|
|
180
|
-
:
|
|
181
|
-
:
|
|
200
|
+
attribute = { method: "vg_uuid",
|
|
201
|
+
column: "vg_uuid",
|
|
202
|
+
type_hint: "String",
|
|
203
|
+
description: "For VolumeGroup to PhysicalVolume relationship." }
|
|
182
204
|
pvs << attribute
|
|
183
205
|
|
|
184
206
|
# and we link lv->lvsegment, pv->pvsegment
|
|
185
|
-
attribute = { :
|
|
186
|
-
:
|
|
187
|
-
:
|
|
188
|
-
:
|
|
207
|
+
attribute = { method: "lv_uuid",
|
|
208
|
+
column: "lv_uuid",
|
|
209
|
+
type_hint: "String",
|
|
210
|
+
description: "For LogicalVolume to LogicalVolumeSegment relationship." }
|
|
189
211
|
lvssegs << attribute
|
|
190
|
-
attribute = { :
|
|
191
|
-
:
|
|
192
|
-
:
|
|
193
|
-
:
|
|
212
|
+
attribute = { method: "pv_uuid",
|
|
213
|
+
column: "pv_uuid",
|
|
214
|
+
type_hint: "String",
|
|
215
|
+
description: "For PhysicalVolume to PhysicalVolumeSegment relationship." }
|
|
194
216
|
pvssegs << attribute
|
|
195
217
|
|
|
196
218
|
lvs.sort! { |x, y| x[:column] <=> y[:column] }
|
|
@@ -202,11 +224,11 @@ vgs.sort! { |x, y| x[:column] <=> y[:column] }
|
|
|
202
224
|
attributes_dir = "lib/lvm/attributes/#{version}"
|
|
203
225
|
FileUtils.mkdir(attributes_dir)
|
|
204
226
|
|
|
205
|
-
disclaimer =
|
|
206
|
-
# These are column to object attribute mappings
|
|
207
|
-
# generated by #{$0} based on
|
|
208
|
-
# #{lvm_source}/lib/report/columns.h
|
|
209
|
-
|
|
227
|
+
disclaimer = <<~GO
|
|
228
|
+
# These are column to object attribute mappings
|
|
229
|
+
# generated by #{$0} based on
|
|
230
|
+
# #{lvm_source}/lib/report/columns.h
|
|
231
|
+
GO
|
|
210
232
|
|
|
211
233
|
File.open("#{attributes_dir}/lvs.yaml", "w") { |f| f.write(disclaimer); f.write(lvs.to_yaml) }
|
|
212
234
|
File.open("#{attributes_dir}/lvsseg.yaml", "w") { |f| f.write(disclaimer); f.write(lvssegs.to_yaml) }
|