di-ruby-lvm-attrib 0.0.4 → 0.0.7

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.
data/Manifest.txt CHANGED
@@ -31,6 +31,11 @@ lib/lvm/attributes/2.02.95(2)/lvsseg.yaml
31
31
  lib/lvm/attributes/2.02.95(2)/pvs.yaml
32
32
  lib/lvm/attributes/2.02.95(2)/pvsseg.yaml
33
33
  lib/lvm/attributes/2.02.95(2)/vgs.yaml
34
+ lib/lvm/attributes/2.02.98(2)/lvs.yaml
35
+ lib/lvm/attributes/2.02.98(2)/lvsseg.yaml
36
+ lib/lvm/attributes/2.02.98(2)/pvs.yaml
37
+ lib/lvm/attributes/2.02.98(2)/pvsseg.yaml
38
+ lib/lvm/attributes/2.02.98(2)/vgs.yaml
34
39
  Manifest.txt
35
40
  Rakefile
36
41
  README.txt
data/README.txt CHANGED
@@ -6,7 +6,8 @@
6
6
  == DESCRIPTION:
7
7
 
8
8
  This is a list of attributes for lvm objects. They are generated from the
9
- source code and broken down by version.
9
+ source code and broken down by version. See ADDING ATTRIBUTES below
10
+ to contribute.
10
11
 
11
12
  At their core these files exist to determine which arguments to pass
12
13
  lvs/vgs/pvs and the subsequent type conversions.
@@ -32,6 +33,35 @@ updating to follow LVM2 releases.
32
33
 
33
34
  * sudo gem install ruby-lvm-attrib
34
35
 
36
+ == ADDING ATTRIBUTES:
37
+
38
+ To add attributes:
39
+ * Download and extract LVM2 source version from: http://git.fedorahosted.org/cgit/lvm2.git/refs/tags
40
+ * Fork this repository
41
+ * `git clone your-forked-repo`
42
+ * `cd your-forked-repo`
43
+ * `git checkout -b mybranch`
44
+ * `bin/generate_field_data path/to/lvm2-source`
45
+ * See missing attribute type note below if there's issues, otherwise will just return "Done."
46
+ * `mv LVM_VERSION_FULL lib/lvm/attributes/LVM_VERSION`
47
+ * LVM_VERSION_FULL being something like 2.02.86(2)-cvs or 2.02.98(2)-git
48
+ * LVM_VERSION being something like 2.02.86(2) or 2.02.98(2)
49
+ * `git commit -am "Added LVM_VERSION attributes"`
50
+ * `git push origin mybranch`
51
+ * Submit PR to this repository. Please make sure to point your pull at the
52
+ `next` branch -- NOT MASTER!
53
+
54
+ === MISSING ATTRIBUTE TYPE:
55
+
56
+ If you get an error like the below:
57
+
58
+ Oops, missing type conversion data of column 'discards' use by 'SEGS' which says its going to return a 'discards'
59
+ Figure out the missing type and rerun.
60
+
61
+ * Look in `path/to/lvm-source/lib/report/columns.rb` for the column name in the 7th field.
62
+ * If the 3rd field is NUM, type will be Integer. If 3rd field is STR, type will be String.
63
+ * Add the information to `bin/generate_field_data` in the TYPE_CONVERSION_MAP and try running again
64
+
35
65
  == FEEDBACK:
36
66
 
37
67
  Please feel free to submit patches or constructive criticism, I'm still pretty
@@ -59,6 +59,7 @@ TYPE_CONVERSION_MAP = {
59
59
  "vgmdasused" => "Integer",
60
60
  "vgmdacopies" => "Integer",
61
61
  "thincount" => "Integer",
62
+ "discards" => "Integer",
62
63
  "thinzero" => "Integer",
63
64
  "transactionid" => "Integer"
64
65
  }
@@ -2,7 +2,7 @@ require 'yaml'
2
2
 
3
3
  module LVM
4
4
  module Attributes
5
- VERSION = '0.0.4'
5
+ VERSION = '0.0.7'
6
6
 
7
7
  def load(version, name)
8
8
  cwd = File.dirname(__FILE__)
@@ -0,0 +1,124 @@
1
+ # These are column to object attribute mappings
2
+ # generated by bin/generate_field_data based on
3
+ # /Users/bflad/Desktop/lvm2-2_02_98/lib/report/columns.h
4
+ ---
5
+ - :method: convert_lv
6
+ :column: convert_lv
7
+ :type_hint: String
8
+ :description: For lvconvert
9
+ - :method: copy_percent
10
+ :column: copy_percent
11
+ :type_hint: Float
12
+ :description: For mirrors and pvmove
13
+ - :method: data_lv
14
+ :column: data_lv
15
+ :type_hint: String
16
+ :description: For thin pools
17
+ - :method: data_percent
18
+ :column: data_percent
19
+ :type_hint: Float
20
+ :description: For snapshot and thin pools and volumes
21
+ - :method: attr
22
+ :column: lv_attr
23
+ :type_hint: String
24
+ :description: Various attributes - see man page.
25
+ - :method: host
26
+ :column: lv_host
27
+ :type_hint: String
28
+ :description: Creation host of the LV
29
+ - :method: kernel_major
30
+ :column: lv_kernel_major
31
+ :type_hint: String
32
+ :description: Currently assigned major number or -1 if LV is not active.
33
+ - :method: kernel_minor
34
+ :column: lv_kernel_minor
35
+ :type_hint: String
36
+ :description: Currently assigned minor number or -1 if LV is not active.
37
+ - :method: kernel_read_ahead
38
+ :column: lv_kernel_read_ahead
39
+ :type_hint: Integer
40
+ :description: Currently-in-use read ahead setting in current units.
41
+ - :method: major
42
+ :column: lv_major
43
+ :type_hint: Integer
44
+ :description: Persistent major number or -1 if not persistent.
45
+ - :method: metadata_size
46
+ :column: lv_metadata_size
47
+ :type_hint: Integer
48
+ :description: For thin pools
49
+ - :method: minor
50
+ :column: lv_minor
51
+ :type_hint: Integer
52
+ :description: Persistent minor number or -1 if not persistent.
53
+ - :method: name
54
+ :column: lv_name
55
+ :type_hint: String
56
+ :description: Name. LVs created for internal use are enclosed in brackets.
57
+ - :method: path
58
+ :column: lv_path
59
+ :type_hint: String
60
+ :description: Full pathname for LV.
61
+ - :method: read_ahead
62
+ :column: lv_read_ahead
63
+ :type_hint: String
64
+ :description: Read ahead setting in current units.
65
+ - :method: size
66
+ :column: lv_size
67
+ :type_hint: Integer
68
+ :description: Size of LV in current units.
69
+ - :method: tags
70
+ :column: lv_tags
71
+ :type_hint: String
72
+ :description: Tags
73
+ - :method: time
74
+ :column: lv_time
75
+ :type_hint: String
76
+ :description: Creation time of the LV
77
+ - :method: uuid
78
+ :column: lv_uuid
79
+ :type_hint: String
80
+ :description: Unique identifier.
81
+ - :method: metadata_lv
82
+ :column: metadata_lv
83
+ :type_hint: String
84
+ :description: For thin pools
85
+ - :method: metadata_percent
86
+ :column: metadata_percent
87
+ :type_hint: Float
88
+ :description: For thin pools
89
+ - :method: mirror_log
90
+ :column: mirror_log
91
+ :type_hint: String
92
+ :description: For mirrors
93
+ - :method: modules
94
+ :column: modules
95
+ :type_hint: String
96
+ :description: Kernel device-mapper modules required for this LV.
97
+ - :method: move_pv
98
+ :column: move_pv
99
+ :type_hint: String
100
+ :description: For pvmove
101
+ - :method: origin
102
+ :column: origin
103
+ :type_hint: String
104
+ :description: For snapshots
105
+ - :method: origin_size
106
+ :column: origin_size
107
+ :type_hint: Integer
108
+ :description: For snapshots
109
+ - :method: pool_lv
110
+ :column: pool_lv
111
+ :type_hint: String
112
+ :description: For thin volumes
113
+ - :method: seg_count
114
+ :column: seg_count
115
+ :type_hint: Integer
116
+ :description: Number of segments in LV.
117
+ - :method: snap_percent
118
+ :column: snap_percent
119
+ :type_hint: Float
120
+ :description: For snapshots
121
+ - :method: vg_uuid
122
+ :column: vg_uuid
123
+ :type_hint: String
124
+ :description: For VolumeGroup to LogicalVolume relationship.
@@ -0,0 +1,80 @@
1
+ # These are column to object attribute mappings
2
+ # generated by bin/generate_field_data based on
3
+ # /Users/bflad/Desktop/lvm2-2_02_98/lib/report/columns.h
4
+ ---
5
+ - :method: chunk_size
6
+ :column: chunk_size
7
+ :type_hint: Integer
8
+ :description: For snapshots
9
+ - :method: chunksize
10
+ :column: chunksize
11
+ :type_hint: Integer
12
+ :description: For snapshots
13
+ - :method: devices
14
+ :column: devices
15
+ :type_hint: String
16
+ :description: Underlying devices used with starting extent numbers.
17
+ - :method: discards
18
+ :column: discards
19
+ :type_hint: Integer
20
+ :description: For thin pools
21
+ - :method: lv_uuid
22
+ :column: lv_uuid
23
+ :type_hint: String
24
+ :description: For LogicalVolume to LogicalVolumeSegment relationship.
25
+ - :method: region_size
26
+ :column: region_size
27
+ :type_hint: Integer
28
+ :description: For mirrors
29
+ - :method: regionsize
30
+ :column: regionsize
31
+ :type_hint: Integer
32
+ :description: For mirrors
33
+ - :method: pe_ranges
34
+ :column: seg_pe_ranges
35
+ :type_hint: String
36
+ :description: Ranges of Physical Extents of underlying devices in command line format.
37
+ - :method: size
38
+ :column: seg_size
39
+ :type_hint: Integer
40
+ :description: Size of segment in current units.
41
+ - :method: start
42
+ :column: seg_start
43
+ :type_hint: Integer
44
+ :description: Offset within the LV to the start of the segment in current units.
45
+ - :method: start_pe
46
+ :column: seg_start_pe
47
+ :type_hint: Integer
48
+ :description: Offset within the LV to the start of the segment in physical extents.
49
+ - :method: tags
50
+ :column: seg_tags
51
+ :type_hint: String
52
+ :description: Tags
53
+ - :method: segtype
54
+ :column: segtype
55
+ :type_hint: String
56
+ :description: Type of LV segment.
57
+ - :method: stripe_size
58
+ :column: stripe_size
59
+ :type_hint: Integer
60
+ :description: For stripes
61
+ - :method: stripes
62
+ :column: stripes
63
+ :type_hint: Integer
64
+ :description: Number of stripes or mirror legs.
65
+ - :method: stripesize
66
+ :column: stripesize
67
+ :type_hint: Integer
68
+ :description: For stripes
69
+ - :method: thin_count
70
+ :column: thin_count
71
+ :type_hint: Integer
72
+ :description: For thin pools
73
+ - :method: transaction_id
74
+ :column: transaction_id
75
+ :type_hint: Integer
76
+ :description: For thin pools
77
+ - :method: zero
78
+ :column: zero
79
+ :type_hint: Integer
80
+ :description: For thin pools
@@ -0,0 +1,72 @@
1
+ # These are column to object attribute mappings
2
+ # generated by bin/generate_field_data based on
3
+ # /Users/bflad/Desktop/lvm2-2_02_98/lib/report/columns.h
4
+ ---
5
+ - :method: dev_size
6
+ :column: dev_size
7
+ :type_hint: Integer
8
+ :description: Size of underlying device in current units.
9
+ - :method: pe_start
10
+ :column: pe_start
11
+ :type_hint: Integer
12
+ :description: Offset to the start of data on the underlying device.
13
+ - :method: attr
14
+ :column: pv_attr
15
+ :type_hint: String
16
+ :description: Various attributes - see man page.
17
+ - :method: fmt
18
+ :column: pv_fmt
19
+ :type_hint: String
20
+ :description: Type of metadata.
21
+ - :method: free
22
+ :column: pv_free
23
+ :type_hint: Integer
24
+ :description: Total amount of unallocated space in current units.
25
+ - :method: mda_count
26
+ :column: pv_mda_count
27
+ :type_hint: Integer
28
+ :description: Number of metadata areas on this device.
29
+ - :method: mda_free
30
+ :column: pv_mda_free
31
+ :type_hint: Integer
32
+ :description: Free metadata area space on this device in current units.
33
+ - :method: mda_size
34
+ :column: pv_mda_size
35
+ :type_hint: Integer
36
+ :description: Size of smallest metadata area on this device in current units.
37
+ - :method: mda_used_count
38
+ :column: pv_mda_used_count
39
+ :type_hint: Integer
40
+ :description: Number of metadata areas in use on this device.
41
+ - :method: name
42
+ :column: pv_name
43
+ :type_hint: String
44
+ :description: Name.
45
+ - :method: pe_alloc_count
46
+ :column: pv_pe_alloc_count
47
+ :type_hint: Integer
48
+ :description: Total number of allocated Physical Extents.
49
+ - :method: pe_count
50
+ :column: pv_pe_count
51
+ :type_hint: Integer
52
+ :description: Total number of Physical Extents.
53
+ - :method: size
54
+ :column: pv_size
55
+ :type_hint: Integer
56
+ :description: Size of PV in current units.
57
+ - :method: tags
58
+ :column: pv_tags
59
+ :type_hint: String
60
+ :description: Tags
61
+ - :method: used
62
+ :column: pv_used
63
+ :type_hint: Integer
64
+ :description: Total amount of allocated space in current units.
65
+ - :method: uuid
66
+ :column: pv_uuid
67
+ :type_hint: String
68
+ :description: Unique identifier.
69
+ - :method: vg_uuid
70
+ :column: vg_uuid
71
+ :type_hint: String
72
+ :description: For VolumeGroup to PhysicalVolume relationship.
@@ -0,0 +1,16 @@
1
+ # These are column to object attribute mappings
2
+ # generated by bin/generate_field_data based on
3
+ # /Users/bflad/Desktop/lvm2-2_02_98/lib/report/columns.h
4
+ ---
5
+ - :method: pv_uuid
6
+ :column: pv_uuid
7
+ :type_hint: String
8
+ :description: For PhysicalVolume to PhysicalVolumeSegment relationship.
9
+ - :method: size
10
+ :column: pvseg_size
11
+ :type_hint: Integer
12
+ :description: Number of extents in segment.
13
+ - :method: start
14
+ :column: pvseg_start
15
+ :type_hint: Integer
16
+ :description: Physical Extent number of start of segment.
@@ -0,0 +1,92 @@
1
+ # These are column to object attribute mappings
2
+ # generated by bin/generate_field_data based on
3
+ # /Users/bflad/Desktop/lvm2-2_02_98/lib/report/columns.h
4
+ ---
5
+ - :method: lv_count
6
+ :column: lv_count
7
+ :type_hint: Integer
8
+ :description: Number of LVs.
9
+ - :method: max_lv
10
+ :column: max_lv
11
+ :type_hint: Integer
12
+ :description: Maximum number of LVs allowed in VG or 0 if unlimited.
13
+ - :method: max_pv
14
+ :column: max_pv
15
+ :type_hint: Integer
16
+ :description: Maximum number of PVs allowed in VG or 0 if unlimited.
17
+ - :method: pv_count
18
+ :column: pv_count
19
+ :type_hint: Integer
20
+ :description: Number of PVs.
21
+ - :method: snap_count
22
+ :column: snap_count
23
+ :type_hint: Integer
24
+ :description: Number of snapshots.
25
+ - :method: attr
26
+ :column: vg_attr
27
+ :type_hint: String
28
+ :description: Various attributes - see man page.
29
+ - :method: extent_count
30
+ :column: vg_extent_count
31
+ :type_hint: Integer
32
+ :description: Total number of Physical Extents.
33
+ - :method: extent_size
34
+ :column: vg_extent_size
35
+ :type_hint: Integer
36
+ :description: Size of Physical Extents in current units.
37
+ - :method: fmt
38
+ :column: vg_fmt
39
+ :type_hint: String
40
+ :description: Type of metadata.
41
+ - :method: free
42
+ :column: vg_free
43
+ :type_hint: Integer
44
+ :description: Total amount of free space in current units.
45
+ - :method: free_count
46
+ :column: vg_free_count
47
+ :type_hint: Integer
48
+ :description: Total number of unallocated Physical Extents.
49
+ - :method: mda_copies
50
+ :column: vg_mda_copies
51
+ :type_hint: Integer
52
+ :description: Target number of in use metadata areas in the VG.
53
+ - :method: mda_count
54
+ :column: vg_mda_count
55
+ :type_hint: Integer
56
+ :description: Number of metadata areas on this VG.
57
+ - :method: mda_free
58
+ :column: vg_mda_free
59
+ :type_hint: Integer
60
+ :description: Free metadata area space for this VG in current units.
61
+ - :method: mda_size
62
+ :column: vg_mda_size
63
+ :type_hint: Integer
64
+ :description: Size of smallest metadata area for this VG in current units.
65
+ - :method: mda_used_count
66
+ :column: vg_mda_used_count
67
+ :type_hint: Integer
68
+ :description: Number of metadata areas in use on this VG.
69
+ - :method: name
70
+ :column: vg_name
71
+ :type_hint: String
72
+ :description: Name.
73
+ - :method: seqno
74
+ :column: vg_seqno
75
+ :type_hint: Integer
76
+ :description: Revision number of internal metadata. Incremented whenever it changes.
77
+ - :method: size
78
+ :column: vg_size
79
+ :type_hint: Integer
80
+ :description: Total size of VG in current units.
81
+ - :method: sysid
82
+ :column: vg_sysid
83
+ :type_hint: String
84
+ :description: System ID indicating when and where it was created.
85
+ - :method: tags
86
+ :column: vg_tags
87
+ :type_hint: String
88
+ :description: Tags
89
+ - :method: uuid
90
+ :column: vg_uuid
91
+ :type_hint: String
92
+ :description: Unique identifier.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: di-ruby-lvm-attrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-07 00:00:00.000000000 Z
13
+ date: 2013-02-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdoc
@@ -45,10 +45,10 @@ dependencies:
45
45
  - !ruby/object:Gem::Version
46
46
  version: '3.5'
47
47
  description: ! "This is a list of attributes for lvm objects. They are generated from
48
- the \nsource code and broken down by version.\n\nAt their core these files exist
49
- to determine which arguments to pass\nlvs/vgs/pvs and the subsequent type conversions.\n\nCurrently
50
- this is split from the main ruby-lvm gem since these files require\nupdating to
51
- follow LVM2 releases."
48
+ the \nsource code and broken down by version. See ADDING ATTRIBUTES below\nto contribute.\n\nAt
49
+ their core these files exist to determine which arguments to pass\nlvs/vgs/pvs and
50
+ the subsequent type conversions.\n\nCurrently this is split from the main ruby-lvm
51
+ gem since these files require\nupdating to follow LVM2 releases."
52
52
  email:
53
53
  - mkent@magoazul.com
54
54
  - gsymons@drillinginfo.com
@@ -94,6 +94,11 @@ files:
94
94
  - lib/lvm/attributes/2.02.95(2)/pvs.yaml
95
95
  - lib/lvm/attributes/2.02.95(2)/pvsseg.yaml
96
96
  - lib/lvm/attributes/2.02.95(2)/vgs.yaml
97
+ - lib/lvm/attributes/2.02.98(2)/lvs.yaml
98
+ - lib/lvm/attributes/2.02.98(2)/lvsseg.yaml
99
+ - lib/lvm/attributes/2.02.98(2)/pvs.yaml
100
+ - lib/lvm/attributes/2.02.98(2)/pvsseg.yaml
101
+ - lib/lvm/attributes/2.02.98(2)/vgs.yaml
97
102
  - Manifest.txt
98
103
  - Rakefile
99
104
  - README.txt