serverspec 2.38.1 → 2.39.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eeb0003b816b3338779711cafd7d7cdde61af950
4
- data.tar.gz: 71262c0fb9e1947ef803bc5ce5a5fd52182b61aa
3
+ metadata.gz: c1fae319342574a56ff1a007de710e292a47c567
4
+ data.tar.gz: c148c65e4917d1aa23f1bca1e1850dfd8d450e38
5
5
  SHA512:
6
- metadata.gz: 612062be584c874a5c57fa46ea5132829d0c783cce1cb0a6314cfee875d195bbc8cc9b6ba78404f4e1d993d6adad2641b76e99b51015b1441243ee081a7337bd
7
- data.tar.gz: 4bbddc32fd1a3516cadca781713c6c362f204a697c58c366a092992bd1a2acb4d2ea2a2c708169eb198edf67507d12084293ef733dc25ade4d298fc63dc111cd
6
+ metadata.gz: 91aa1b78d48b987514f50809b672c979c59649e3bc34b628fb95fbedf5eb651b1ae6a7a55d89b51c80d5f6119a9d1a21afa68e5b1655c12c9563da7f79d560ba
7
+ data.tar.gz: cb2843e738b4c0a4c373e9fccf707f799ac91a0ca2c83447e21cef22da2f22b3c4a690dfee03194a3829e3745f81300a6349672074e570966be9c821b081899d
@@ -4,7 +4,7 @@ module Serverspec
4
4
  types = %w(
5
5
  base bridge bond cgroup command cron default_gateway file fstab
6
6
  group host iis_website iis_app_pool interface ipfilter ipnat
7
- iptables ip6tables json_file kernel_module linux_kernel_parameter lxc
7
+ iptables ip6tables json_file kernel_module kvm linux_kernel_parameter lxc
8
8
  mail_alias mysql_config package php_config port ppa process
9
9
  routing_table selinux selinux_module service user yumrepo
10
10
  windows_feature windows_hot_fix windows_registry_key
@@ -0,0 +1,19 @@
1
+ module Serverspec::Type
2
+ class Kvm < Base
3
+ def exists?
4
+ @runner.check_kvm_guest_exists(@name)
5
+ end
6
+
7
+ def running?
8
+ @runner.check_kvm_guest_is_running(@name)
9
+ end
10
+
11
+ def enabled?
12
+ @runner.check_kvm_guest_is_enabled(@name)
13
+ end
14
+
15
+ def to_s
16
+ 'KVM'
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "2.38.1"
2
+ VERSION = "2.39.0"
3
3
  end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ set :os, :family => 'linux'
4
+
5
+ describe kvm('ct01') do
6
+ it { should exist }
7
+ end
8
+
9
+ describe kvm('ct01') do
10
+ it { should be_running }
11
+ end
12
+
13
+ describe kvm('ct01') do
14
+ it { should be_enabled }
15
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.38.1
4
+ version: 2.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-10 00:00:00.000000000 Z
11
+ date: 2017-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -167,6 +167,7 @@ files:
167
167
  - lib/serverspec/type/iptables.rb
168
168
  - lib/serverspec/type/json_file.rb
169
169
  - lib/serverspec/type/kernel_module.rb
170
+ - lib/serverspec/type/kvm.rb
170
171
  - lib/serverspec/type/linux_audit_system.rb
171
172
  - lib/serverspec/type/linux_kernel_parameter.rb
172
173
  - lib/serverspec/type/lxc.rb
@@ -249,6 +250,7 @@ files:
249
250
  - spec/type/linux/ip6tables_spec.rb
250
251
  - spec/type/linux/iptables_spec.rb
251
252
  - spec/type/linux/kernel_module_spec.rb
253
+ - spec/type/linux/kvm_guest_spec.rb
252
254
  - spec/type/linux/linux_audit_system_spec.rb
253
255
  - spec/type/linux/linux_kernel_parameter_spec.rb
254
256
  - spec/type/linux/lxc_container_spec.rb
@@ -394,6 +396,7 @@ test_files:
394
396
  - spec/type/linux/ip6tables_spec.rb
395
397
  - spec/type/linux/iptables_spec.rb
396
398
  - spec/type/linux/kernel_module_spec.rb
399
+ - spec/type/linux/kvm_guest_spec.rb
397
400
  - spec/type/linux/linux_audit_system_spec.rb
398
401
  - spec/type/linux/linux_kernel_parameter_spec.rb
399
402
  - spec/type/linux/lxc_container_spec.rb