thinp_xml 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWQzNjRkODNhYmI1NjMzZTUzNjk3OGRiNjIxY2M0NTI1ODdjYTcwYQ==
4
+ MWY0MTQ0ZmY5YTQ0MmQwNTE4Mjg1YWE3ZWU3MzhhZmFmODFiNDk3ZA==
5
5
  data.tar.gz: !binary |-
6
- ZmZiYjljNmJkNmRiYzQ4MDQ2M2Q5MTZkMzVhODI3ZGZiMjkwMjk5MQ==
6
+ NzUxMmVmMzU0YTIwZTViYmRkNjI5NzRkNzkzZjUxZGVlMjQ4NjRjMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmYzZDJjYTZmNGQ1NDkyOGNiODBlOGIzOWJiZGE5NzM3NDZkNTkxYjlmMjdh
10
- MWQ2ODlhNTkzZjQwYzE5MzQ3MjVhMjA5OTJjNTA4NDU5ZTNjNjI0N2NiYzk2
11
- YmI0ZmRmZWVlMDY3YWYzNzQwZWE3NjdmMzBlMTlkMzgzYjljODA=
9
+ OTAxNWM1Yzk0NzQ1YzFmMDhlY2I4ZDVlMzE3NTA5ZDMwNjhlYWExMTA2MmI0
10
+ NzJjMGJhYjg1YjhkYjNhYTJhYjZjOTg3ZWNhYjY2Mjk3M2NmNTY5MGNlMzMx
11
+ ZDNiYmZmNmQyOGI5NTcxY2Q2NWRlOGJkMDkxZGU4M2JlNWJmNjI=
12
12
  data.tar.gz: !binary |-
13
- ZWIxYzZmMWJkMTNiMDAwZDE5ZjA4ZDdkM2U3NWM3ZWU5MGMwNTQxOGRjYjMz
14
- OGVjNzUwMGM3NTVlMTU2MjhhNTkyYjg2NDkxMDRlYjY0MTFiYzAwOGJkMzU0
15
- YTc3OWZkNjIxZGJkZmJiOThiZGE0NDBhYzA4NTk3YzllNDJlYzc=
13
+ ZDM1Yzc0MDlhZDI3MzY1YzQ2MThkM2VhZGFiNThiZjYyZmI1ODY4NWE5NTYx
14
+ MzlmMzViNDg2Yjg4NDljYTRlNDFhY2M0MmRmM2U0NTQ3YTI5NzRmMzE1M2Fl
15
+ YjAxY2U0NzNhYTY3MDA2MjMyODMxOTI4NWE1N2E0ODM5MGMwN2Y=
data/README.md CHANGED
@@ -1,6 +1,12 @@
1
- # ThinpXml
1
+ # ThinpXML
2
2
 
3
- TODO: Write a gem description
3
+ This gem contains a library and command line tool for manipulating the
4
+ XML format for thin provisioning metadata.
5
+
6
+ Convert thinp's binary format to/from xml using the _thin\_dump_ and
7
+ _thin\_restore_ tools in [thin-provisioning-tools][tpt]
8
+
9
+ [tpt]: https://github.com/jthornber/thin-provisioning-tools "Thin provisioning tools"
4
10
 
5
11
  ## Installation
6
12
 
@@ -18,12 +24,12 @@ Or install it yourself as:
18
24
 
19
25
  ## Usage
20
26
 
21
- TODO: Write usage instructions here
27
+ $ thinp_xml create --nr-thins 4 --nr-mappings 100
28
+
29
+ When specifying numerical constants you may also give a random number distribution.
30
+
31
+ uniform[<begin>..<end inclusive>]
32
+
33
+ $ thinp_xml create --nr-thins uniform[4..9] --nr-mappings uniform[1000..10000]
22
34
 
23
- ## Contributing
24
35
 
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Add some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
@@ -14,7 +14,6 @@ module ThinpXML
14
14
 
15
15
  def generate
16
16
  nr_thins = @nr_thins.to_i
17
- nr_mappings = @nr_mappings.to_i
18
17
 
19
18
  superblock = Superblock.new(@uuid, 0, 1, 128, 100)
20
19
 
@@ -22,6 +21,7 @@ module ThinpXML
22
21
  offset = 0
23
22
  0.upto(nr_thins - 1) do |dev|
24
23
  mappings = Array.new
24
+ nr_mappings = @nr_mappings.to_i
25
25
 
26
26
  if nr_mappings > 0
27
27
  mappings << Mapping.new(0, offset, nr_mappings, 1)
@@ -1,3 +1,3 @@
1
1
  module ThinpXml
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thinp_xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Thornber
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-03 00:00:00.000000000 Z
11
+ date: 2013-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ejt_command_line