foreman_xen 0.3.2 → 0.4.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: 8d4e7a7c9e4fabcd5946a7b155453661efd872f2
4
- data.tar.gz: 30ced528a243b7267340ba682f01d27e3e8400db
3
+ metadata.gz: 252a85f3d108973f856c0e3a60cf03baa59614d1
4
+ data.tar.gz: a2e2bfd8fe410b24048747ec484cae6224658ad4
5
5
  SHA512:
6
- metadata.gz: 4cb8a8f9329784a6bdf9ca7d2869ddabdb1becda7e355b195511bc5173df093c775e1f9c30ca0e712f1f24f60b246f4d5b0ef37d1d7b56dfb6347e0f0b12cb0b
7
- data.tar.gz: d0bbbec49fd6d0c921aed943cd46e7a45006b135a3a31a0650cc45d5bfba3918ac60db26429ee6955a1680551d2d6c2bfbfa41b2d35959d8a5c7e40bbfe1cf79
6
+ metadata.gz: 78b409752919f56e5103edd9622e5b380f9fce7ff5cc0186f95fa8f97fb11f9b49349212b59132e345d2cd5e1a850a45914299b38686dfe7bfe17a7c5f169286
7
+ data.tar.gz: 23f9bd44e6b29436b8820887281000d98d254a96dc6b1a2b3893b3b75226f7c5c45c73bcc9e091177d6fdbd093841a9c28e40387b146518e0252161367f50a5b
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Foreman XEN Plugin
2
2
 
3
+ [![Build Status](https://api.travis-ci.org/theforeman/foreman-xen.svg)](https://travis-ci.org/theforeman/foreman-xen)
4
+ [![Code Climate](https://codeclimate.com/github/theforeman/foreman-xen/badges/gpa.svg)](https://codeclimate.com/github/theforeman/foreman-xen)
5
+
3
6
  This plugin enables managing of XEN Server as a Compute Resource in Foreman.
4
7
 
5
8
  ## Installation
@@ -16,8 +19,9 @@ Please see the Foreman manual for further instructions:
16
19
  |:--------------- |:--------------------- |
17
20
  | >=1.5, <1.8 | 0.0.x (unmaintained) |
18
21
  | >=1.8.1, <1.10 | 0.1.x (unmaintained) |
19
- | >=1.10, <1.11 | 0.2.x |
20
- | >=1.11 | 0.3.x |
22
+ | >=1.10, <1.11 | 0.2.x (unmaintained) |
23
+ | >=1.11, <1.13 | 0.3.x |
24
+ | >=1.13 | 0.4.x |
21
25
 
22
26
  ## Support
23
27
 
@@ -12,9 +12,11 @@ module FogExtensions
12
12
  name
13
13
  end
14
14
 
15
- def nics_attributes=(attrs); end
15
+ def nics_attributes=(attrs)
16
+ end
16
17
 
17
- def volumes_attributes=(attrs); end
18
+ def volumes_attributes=(attrs)
19
+ end
18
20
 
19
21
  def memory
20
22
  memory_static_max.to_i
@@ -2,8 +2,6 @@ module ForemanXen
2
2
  class Xenserver < ComputeResource
3
3
  validates :url, :user, :password, :presence => true
4
4
 
5
- attr_accessible :uuid
6
-
7
5
  def provided_attributes
8
6
  super.merge(
9
7
  :uuid => :reference,
@@ -153,7 +151,7 @@ module ForemanXen
153
151
  end
154
152
 
155
153
  def associated_host(vm)
156
- associate_by('mac', vm.interfaces.map(&:mac).map { |mac| Net::Validations.normalize_mac(mac) })
154
+ associate_by('mac', vm.interfaces.map(&:mac))
157
155
  end
158
156
 
159
157
  def find_snapshots_for_vm(vm)
@@ -206,8 +204,8 @@ module ForemanXen
206
204
  logger.info "create_vm(): builtin_template_name: #{builtin_template_name}"
207
205
  vm = custom_template_name != '' ? create_vm_from_custom(args) : create_vm_from_builtin(args)
208
206
  vm.set_attribute('name_description', 'Provisioned by Foreman')
209
- vm.set_attribute('VCPUs_max', args[:vcpus_max])
210
207
  vm.set_attribute('VCPUs_at_startup', args[:vcpus_max])
208
+ vm.set_attribute('VCPUs_max', args[:vcpus_max])
211
209
  vm.reload
212
210
  return vm
213
211
  rescue => e
@@ -15,9 +15,10 @@ module ForemanXen
15
15
 
16
16
  initializer 'foreman_xen.register_plugin', :before => :finisher_hook do |app|
17
17
  Foreman::Plugin.register :foreman_xen do
18
- requires_foreman '>= 1.11'
18
+ requires_foreman '>= 1.13'
19
19
  # Register xen compute resource in foreman
20
20
  compute_resource ForemanXen::Xenserver
21
+ parameter_filter(ComputeResource, :uuid)
21
22
  end
22
23
  end
23
24
 
@@ -1,3 +1,3 @@
1
1
  module ForemanXen
2
- VERSION = '0.3.2'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_xen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Nemirovsky
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-23 00:00:00.000000000 Z
13
+ date: 2016-11-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: fog-xenserver
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.5.2
101
+ rubygems_version: 2.5.1
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Provision and manage XEN Server from Foreman