foreman_one 0.1 → 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
- MDExZGNkMjdhNjlkZWQzNGVhYWZjNmFiNjljNmI0OGEyNWM4ZjkyOA==
4
+ M2JkOWJjM2ViYjIxZGE3YjZjOTFjNTA4NjkxZmVkZTU2MDJjMjU5Nw==
5
5
  data.tar.gz: !binary |-
6
- YzM5MmQ0ZmUzZTU5Mjg5MDgzNDA5MGI4NzAyNTlmZDA3YmMzZTI0MA==
6
+ MjMyOGUzZWE2YTI1MDdhMDIwOTIwZmQwNmM1MWZjYWRkMjZmMGUwOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGNkOWUzMTk2ZTZkODNiYWY1MjhiYjdjM2JlNWVlMjM0ODE0ODYzZDdjZTVh
10
- YzQxNjlmMDJhNGNhZTE3NWIzZDE3ZmUwY2QwOWMzZDkwMTFlMjhhM2M0YTI1
11
- ZDBmNzc1ZmU1YTcyYTEwMmU5ZTJhYTk2MDMzNmFjY2Q4Yzc2M2Y=
9
+ ZDBhZjZkNmM3ZTQ3MTJiMjc3ZTQxNGM2NWMyOTAxZTY3MTUyOTc3MmM4NDBh
10
+ ZWZjYWFiMDRlN2Q5MWFlZDA3ZDc1NWFiZTc0OWFmNzQ3ZDExNTdlNGY1NjE5
11
+ NzgxZTQyMTY5YjIzMWU2ZmE4NjFjNjk3ZmZkYzE4Y2FiMDA5MWI=
12
12
  data.tar.gz: !binary |-
13
- YjdmNTY3YmVhYTgxMmZkZDk2ZWEyNmEwMzk5YjJiMjA2ZDQxNTk0YmFkZDUw
14
- NWVjOTViY2VhNzQ0ZjNmYzE1NGQ1YWQ3ZjgzNjE1MjViZDkwM2YzNmI1NzY5
15
- YjRmY2JlMDgwMjRmYjVmYjQxNDljYjdhYzJkMmQ2OWU0OWQ5YzY=
13
+ MDQ2ZjllMWU0MDMxOWNlNmZlYWQ4ZjlmZWVjY2RiZWQwOTExYzFkNTMxMDBk
14
+ OWQ5MWM1YzJjMTk4Mzc1YmE1MTg3YWJkYzliYjU2NDQ2MjY4NmY4YmQ2ZDQ5
15
+ YWQwZGEzOGU2MTI2NjlkZTA3MzhhZDc4YWNkOWZhZjYxODdlNGU=
@@ -63,16 +63,16 @@ module ForemanOne
63
63
 
64
64
  vm.flavor.vcpu = args[:vcpu] unless args[:vcpu].empty?
65
65
  vm.flavor.memory = args[:memory] unless args[:memory].empty?
66
- vm.flavor.nic = []
66
+ vm.flavor.nic = [] unless vm.flavor.nic.is_a? Array
67
67
 
68
68
  #INTERFACES {"new_interfaces"=>{"vnetid"=>"0", "_delete"=>"", "model"=>"virtio"}, "new_1398239695352"=>{"vnetid"=>"2", "_delete"=>"", "model"=>"virtio"}, "new_1398239700415"=>{"vnetid"=>"2", "_delete"=>"", "model"=>"virtio"}, "new_1398239705632"=>{"vnetid"=>"0", "_delete"=>"", "model"=>"e1000"}}
69
69
  logger.info "INTERFACES #{args[:vminterfaces_attributes].inspect}"
70
70
  nics = args[:vminterfaces_attributes].values
71
71
  if nics.is_a? Array then
72
72
  nics.each do |nic|
73
- unless (nic["vnetid"].empty? || nic["model"].empty?)
74
- vm.flavor.nic << client.interfaces.new({ :vnet => client.networks.get(nic["vnetid"]), :model => nic["model"]})
75
- end
73
+ unless (nic["vnetid"].empty? || nic["model"].empty?)
74
+ vm.flavor.nic << client.interfaces.new({ :vnet => client.networks.get(nic["vnetid"]), :model => nic["model"]})
75
+ end
76
76
  end
77
77
  end
78
78
 
@@ -1,3 +1,3 @@
1
1
  module ForemanOne
2
- VERSION = "0.1"
2
+ VERSION = "0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_one
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - NETWAYS Managed Services GmbH