Top Level Namespace
Instance Method Summary collapse
-
#cassandramajorversion ⇒ integer
Extract the major version from the cassandrarelease fact.
-
#cassandraminorversion ⇒ integer
Extract the minor version from the cassandrarelease fact.
-
#cassandrapatchversion ⇒ integer
Extract the patch version from the cassandrarelease fact.
-
#cassandrarelease ⇒ string
Extract the release string from the running Cassandra instance.
Instance Method Details
#cassandramajorversion ⇒ integer
Extract the major version from the cassandrarelease fact.
21 22 23 24 25 26 |
# File 'lib/facter/cassandra.rb', line 21 Facter.add('cassandramajorversion') do setcode do release = Facter.value(:cassandrarelease) release.split('.')[0].to_i if release end end |
#cassandraminorversion ⇒ integer
Extract the minor version from the cassandrarelease fact.
33 34 35 36 37 38 |
# File 'lib/facter/cassandra.rb', line 33 Facter.add('cassandraminorversion') do setcode do release = Facter.value(:cassandrarelease) release.split('.')[1].to_i if release end end |
#cassandrapatchversion ⇒ integer
Extract the patch version from the cassandrarelease fact.
45 46 47 48 49 50 |
# File 'lib/facter/cassandra.rb', line 45 Facter.add('cassandrapatchversion') do setcode do release = Facter.value(:cassandrarelease) release.split('.')[2].to_i if release end end |
#cassandrarelease ⇒ string
Extract the release string from the running Cassandra instance.
undefined.
9 10 11 12 13 14 |
# File 'lib/facter/cassandra.rb', line 9 Facter.add('cassandrarelease') do setcode do version = Facter::Util::Resolution.exec('nodetool version') version.match(/\d+\.\d+\.\d+/).to_s if version && version != '' end end |