avst-cloud 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/avst-cloud.gemspec +1 -1
- data/lib/avst-cloud/azure_rm_connection.rb +18 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWIwNjQwZjgyMmMwMDk4ZGFjYTZkZWFjNjg4OWYzZjhkOTU0ZTVhNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTczZDkzZTE0NjY0NzhjYWI3YjgzMTFkOWNkMDExY2M5MTAyNjg3Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2I4NDQwZjc3YzM2NGEwYmJiMjEwNGUxZWIxMDliYTNjZWY0YjJjODljOWM5
|
10
|
+
ODQ0ZGE0YmJlZDIwNTkyMDFkM2UyYWEwMTczY2Q2MWFlY2FlZjJkMGIyZWRk
|
11
|
+
NzFiOWFmZjgxZjc5Y2M5MmEwZDc1OGE5YzMzN2EzZWI0ZDQ1NDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjEwY2QwOWQ3MzhmZWYyNjc1NjIzYjRjMTgyMjUxMjk0NjczZWMyMzhhNGYw
|
14
|
+
ZTE2YjIyNDliM2JkMmQ0ZGM1ODc1ZDIxYjk3N2I5MTg5NDY3YzIxNGU2YjA2
|
15
|
+
MTY0ZDg5NTFhNGQ2MzNhNGZlNDEzZjJmNTkzYWE2YjEyMzM4NTE=
|
data/avst-cloud.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "avst-cloud"
|
7
|
-
spec.version = '0.1.
|
7
|
+
spec.version = '0.1.19'
|
8
8
|
spec.authors = ["Martin Brehovsky", "Jon Bevan", "Matthew Hope"]
|
9
9
|
spec.email = ["mbrehovsky@adaptavist.com", "jbevan@adaptavist.com", "mhope@adaptavist.com"]
|
10
10
|
spec.summary = %q{Automated creation, bootstrapping and provisioning of servers }
|
@@ -87,6 +87,7 @@ module AvstCloud
|
|
87
87
|
address_prefix,
|
88
88
|
use_public_ip,
|
89
89
|
create_public_ip_configuration,
|
90
|
+
data_disks={},
|
90
91
|
availability_set_name=nil,
|
91
92
|
storage_account_resource_group=nil,
|
92
93
|
virtual_network_resource_group=nil,
|
@@ -121,6 +122,7 @@ module AvstCloud
|
|
121
122
|
logger.debug "version - #{version}"
|
122
123
|
logger.debug "platform - #{platform}"
|
123
124
|
logger.debug "availability_set_name- #{availability_set_name}"
|
125
|
+
logger.debug "data_disks - #{data_disks}"
|
124
126
|
|
125
127
|
storage_account_resource_group = resource_group unless storage_account_resource_group
|
126
128
|
virtual_network_resource_group = resource_group unless virtual_network_resource_group
|
@@ -161,7 +163,11 @@ module AvstCloud
|
|
161
163
|
platform: platform,
|
162
164
|
availability_set_id: availability_set_id
|
163
165
|
)
|
164
|
-
|
166
|
+
if data_disks
|
167
|
+
data_disks.keys.each do |data_disk_name|
|
168
|
+
attach_data_disk(server, data_disk_name, data_disks[data_disk_name], storage_account_name)
|
169
|
+
end
|
170
|
+
end
|
165
171
|
result_server = AvstCloud::AzureRmServer.new(server, server_name, ip_address, user, password)
|
166
172
|
logger.debug "[DONE]\n\n"
|
167
173
|
logger.debug "The server has been successfully created, to login onto the server:\n"
|
@@ -170,6 +176,17 @@ module AvstCloud
|
|
170
176
|
end
|
171
177
|
end
|
172
178
|
|
179
|
+
def attach_data_disk(server, disk_name, size_in_gb, storage_account_name)
|
180
|
+
server.attach_data_disk(disk_name, size_in_gb, storage_account_name)
|
181
|
+
end
|
182
|
+
|
183
|
+
def detatch_data_disk(server_name, resource_group, storage_account, disk_name)
|
184
|
+
server = find_fog_server(server_name, resource_group)
|
185
|
+
if server
|
186
|
+
server.detach_data_disk(disk_name)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
173
190
|
def list_storage_accounts(storage_account_name, resource_group)
|
174
191
|
storage_acc = connect_to_storages.storage_accounts(resource_group: resource_group)
|
175
192
|
.get(storage_account_name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avst-cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Brehovsky
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-08-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|