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 +8 -8
- data/app/models/foreman_one/one.rb +4 -4
- data/lib/foreman_one/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2JkOWJjM2ViYjIxZGE3YjZjOTFjNTA4NjkxZmVkZTU2MDJjMjU5Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjMyOGUzZWE2YTI1MDdhMDIwOTIwZmQwNmM1MWZjYWRkMjZmMGUwOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDBhZjZkNmM3ZTQ3MTJiMjc3ZTQxNGM2NWMyOTAxZTY3MTUyOTc3MmM4NDBh
|
10
|
+
ZWZjYWFiMDRlN2Q5MWFlZDA3ZDc1NWFiZTc0OWFmNzQ3ZDExNTdlNGY1NjE5
|
11
|
+
NzgxZTQyMTY5YjIzMWU2ZmE4NjFjNjk3ZmZkYzE4Y2FiMDA5MWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
-
|
74
|
-
|
75
|
-
|
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
|
|
data/lib/foreman_one/version.rb
CHANGED