fog-gridscale 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 255110f078a60e7dcad1b1e202591cb9bc9f47ec
4
- data.tar.gz: 48d2a079388fd559d21c32f8b44d203d7f016b44
3
+ metadata.gz: 858e47525db8ef2cb9c67dfb032cd1bce2ba9a0b
4
+ data.tar.gz: '0018efdb58fdf79e0576f8cfa1d88346d05a287d'
5
5
  SHA512:
6
- metadata.gz: 60faca06f642ce0f608b54a64d44efea710599caf155ce4227b7dc2b0f1e307f5aa273d1fe6d0655ac43632898d4ba545c30390326a1cd08f8fb81b24374aa55
7
- data.tar.gz: c80298500e39fefd13c1dd6bd69bec8aea999ea59c81289aca86f173cd1cc6ff22f564e52110654b4fa3445e447cdb4417ace40d29d6d375a6b61a0d8f3e1ae1
6
+ metadata.gz: c1f4bc889ddbd7b421d6049cc184ea3b5763eb7de29eac21251f4c552b195ed0666b7df0248ebaf6df3e819aaf1be23936e5606bfc67b2a519362b168cebd154
7
+ data.tar.gz: be867a1dbd9e9aebb4e78a6b40f54f59ee6018a0c367e73a7860934c1e40a0773e5abb1076ba3a01d9f9b9bb73153cca3c422440170c9fb163a2619faf7e7570
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.1.3]
4
+
5
+ - fixed empty sshkey handler for storage with private template creation in
6
+ server add
7
+ - Allowed creating host to choose isoimage which available in gridscale user account
8
+
3
9
  ## [v0.1.2]
4
10
 
5
11
  - Commented out publishing protection in gemfile.
@@ -48,6 +48,7 @@ module Fog
48
48
  attribute :sshkey_uuid
49
49
  attribute :ip4_add_in
50
50
  attribute :ip6_add_in
51
+ attribute :isoimage_uuid
51
52
 
52
53
 
53
54
  def cpu
@@ -123,6 +124,10 @@ module Fog
123
124
  options[:sshkey_uuid] = sshkey_uuid
124
125
  end
125
126
 
127
+ if attributes[:isoimage_uuid]
128
+ options[:isoimage_uuid] = isoimage_uuid
129
+ end
130
+
126
131
  data = service.server_create(name, cores, memory, options)
127
132
  merge_attributes(data.body['server'])
128
133
  end
@@ -9,6 +9,7 @@ module Fog
9
9
  storage = options[:storage]
10
10
  template_uuid = options[:template_uuid]
11
11
  sshkey_uuid = options[:sshkey_uuid]
12
+ isoimage_uuid = options[:isoimage_uuid]
12
13
  if options[:location_uuid]
13
14
  location_uuid = options[:location_uuid]
14
15
  else
@@ -16,13 +17,12 @@ module Fog
16
17
  end
17
18
 
18
19
 
19
- relations = {
20
- :isoimages => [],
21
- }
20
+ relations = {}
22
21
 
23
22
  networks = []
24
23
  storages = []
25
24
  ipaddrs = []
25
+ isoimages = []
26
26
  bootable_set = false
27
27
  if interfaces_attributes != nil
28
28
  interfaces_attributes.each do |key, value|
@@ -45,23 +45,32 @@ module Fog
45
45
 
46
46
  end
47
47
  end
48
-
48
+ if sshkey_uuid == ""
49
+ sshkey_uuid = nil
50
+ end
49
51
  if storage != nil && storage > 0
50
52
  if template_uuid !=nil
51
53
  storages << {"create"=>{"name"=>"#{name} Storage", "capacity"=>storage, "location_uuid"=>location_uuid,"storage_type"=>"storage","template"=>{"template_uuid"=> template_uuid }} , "relation"=>{"bootdevice"=>true}}
54
+
52
55
  if sshkey_uuid != nil
53
56
  storages = []
54
57
  storages << {"create"=>{"name"=>"#{name} Storage", "capacity"=>storage, "location_uuid"=>location_uuid,"storage_type"=>"storage","template"=>{"template_uuid"=> template_uuid, "sshkeys" => [sshkey_uuid] }} , "relation"=>{"bootdevice"=>true}}
55
- # print
58
+ else
59
+ storages = []
60
+ storages << {"create"=>{"name"=>"#{name} Storage", "capacity"=>storage, "location_uuid"=>location_uuid,"storage_type"=>"storage","template"=>{"template_uuid"=> template_uuid}} , "relation"=>{"bootdevice"=>true}}
56
61
  end
57
62
  else
58
63
  storages << {"create"=>{"name"=>"#{name} Storage", "capacity"=>storage, "location_uuid"=>location_uuid,"storage_type"=>"storage"}, "relation"=>{"bootdevice"=>true}}
59
64
  end
60
65
  end
61
-
66
+ if isoimage_uuid != nil && isoimage_uuid != ""
67
+ isoimages = []
68
+ isoimages << {"isoimage_uuid" => isoimage_uuid}
69
+ end
62
70
  relations[:networks] = networks
63
71
  relations[:storages] = storages
64
72
  relations[:public_ips] = ipaddrs
73
+ relations[:isoimages] = isoimages
65
74
 
66
75
  create_options = {
67
76
  :name => name,
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Gridscale
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-gridscale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - aldemuro haris
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-05 00:00:00.000000000 Z
11
+ date: 2019-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler