fog-azure-rm 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +17 -5
- data/CHANGELOG.md +12 -1
- data/fog-azure-rm.gemspec +1 -1
- data/lib/fog/azurerm/async_response.rb +4 -1
- data/lib/fog/azurerm/constants.rb +7 -3
- data/lib/fog/azurerm/docs/compute.md +1 -5
- data/lib/fog/azurerm/docs/storage.md +8 -9
- data/lib/fog/azurerm/models/compute/server.rb +26 -2
- data/lib/fog/azurerm/models/compute/servers.rb +2 -2
- data/lib/fog/azurerm/models/dns/a_record.rb +15 -0
- data/lib/fog/azurerm/models/dns/cname_record.rb +15 -0
- data/lib/fog/azurerm/models/dns/record_set.rb +20 -8
- data/lib/fog/azurerm/models/storage/directories.rb +6 -1
- data/lib/fog/azurerm/models/storage/storage_accounts.rb +7 -0
- data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +69 -31
- data/lib/fog/azurerm/requests/dns/create_or_update_record_set.rb +3 -2
- data/lib/fog/azurerm/version.rb +1 -1
- data/test/integration/record_set.rb +5 -5
- data/test/integration/server_custom_image.rb +78 -23
- metadata +44 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5739d794d701fe153ca306a2aa5c7409db70071a
|
4
|
+
data.tar.gz: 99c2a40c35f19f50622dce9a8b0efd83fe1eb399
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e0f89cc3179b58e2f898938831106b9677d748815c8ab664611318ad30c723846c5699a1b43b6b591a9e8811ee3f6845861fd9cf03764e562c4c20285573312
|
7
|
+
data.tar.gz: 68de5ecf3ab00bd154878b0701e785cb33ae9973a4133004815f748e7d9d91d0aa1e2a287b5836ce80228c72d07d3384eb9d5d875218ca13e215083607a57f73
|
data/.travis.yml
CHANGED
@@ -23,11 +23,23 @@ matrix:
|
|
23
23
|
notifications:
|
24
24
|
email:
|
25
25
|
recipients:
|
26
|
-
-
|
26
|
+
- dev-oneops@confiz.com
|
27
27
|
on_success: always
|
28
28
|
on_failure: always
|
29
|
-
|
30
|
-
|
29
|
+
|
31
30
|
addons:
|
32
|
-
|
33
|
-
|
31
|
+
code_climate:
|
32
|
+
repo_token: b1401494baa004d90402414cb33a7fc6420fd3693e60c677a120ddefd7d84cfd
|
33
|
+
|
34
|
+
jobs:
|
35
|
+
include:
|
36
|
+
- stage: gem release
|
37
|
+
deploy:
|
38
|
+
provider: rubygems
|
39
|
+
api_key:
|
40
|
+
secure: "aKIOqa6gFMQOcwdNBNsfRoAQm+LVCRf9JpEFnDH8YLRp9A+roj0BL3hZ+pP+pb2sQSEQqU46bfBBrhB2b6Xmjnmv5d0878bl+eYOXeu90CfqRf+v/y+2k/pMsVsKs3Su7M0bHGOeHYT+segRqDHaZaJHkAW8RwLLm5A+0TyEeVjkkpFcyX8fjr5sfvD+XbEmXmmPWPuShQjKTTj1HFYJknRLLNXVYd7ZM9eKgiQfuyomdUTk8yguqNDBWW1BjiEE/0JYqx4wJxdGKPHYT+enP1xIebJVx1gEEnc/OgyBZqtmOirlh2Rnuk58NZfArzwMzIvVclJvPmynmEAlHEWtXwUgQMW5Wu/RYpxRRpr5tDRfru99hll4N9bcA439GlsNHTNJf82zmGNFIdDJ8kUJ08tVPwTvEnWGzLIdKAKWyRV+SESmZb5u3m9e4VTd06/q8gdbW9pG9UGmoes/j32lKzk9DkheCVzQjdxfRs81Z/7uTB3OhhpQnrRlf7qa2OnMDZKrip67UQHiruzAX6naQ7D5fEHR64DGZG7fQ/xRi0oG21UdNl1n/Bioj6ChFXLyInKeA0fiEwwquWK2S/2Sr5ERTBzbv9TkvbJ/1vv8FWcYYmb7bL22699V9yWcsOxEdZEYDucg71g6OrPeNeFZDsJ1749fZzW2X444+4Xtwys="
|
41
|
+
gem: fog-azure-rm
|
42
|
+
gemspec: fog-azure-rm.gemspec
|
43
|
+
on:
|
44
|
+
tags: true
|
45
|
+
branch: master
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,19 @@
|
|
1
|
+
## 0.3.6
|
2
|
+
|
3
|
+
**Added:**
|
4
|
+
- Compute Service - Added support for custom image provisioning with managed disk
|
5
|
+
- DNS Service - Fog Models for RecordSet Types 'A' and 'CNAME'
|
6
|
+
- Automated gem publishing on release tagging
|
7
|
+
|
8
|
+
**Changed:**
|
9
|
+
- Loosened dependency on fog-core
|
10
|
+
- Updated documentation
|
11
|
+
|
1
12
|
## 0.3.5
|
2
13
|
|
3
14
|
**Added:**
|
4
15
|
- Compute Service - Added platform update domain and platform fault domain propertied in server model
|
5
|
-
- Compute Service - Added
|
16
|
+
- Compute Service - Added custom image support for managed VM
|
6
17
|
|
7
18
|
**Changed:**
|
8
19
|
- Compute Service - Changed required arguments for server create method
|
data/fog-azure-rm.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency 'minitest', '~> 5.8.4'
|
23
23
|
spec.add_development_dependency 'simplecov'
|
24
24
|
spec.add_development_dependency 'codeclimate-test-reporter' , '~> 1.0.0'
|
25
|
-
spec.add_dependency 'fog-core', '~> 1.43
|
25
|
+
spec.add_dependency 'fog-core', '~> 1.43'
|
26
26
|
spec.add_dependency 'fog-json', '~> 1.0'
|
27
27
|
spec.add_dependency 'azure_mgmt_compute', '~> 0.9.0'
|
28
28
|
spec.add_dependency 'azure_mgmt_resources', '~> 0.9.0'
|
@@ -2,14 +2,17 @@ module Fog
|
|
2
2
|
module AzureRM
|
3
3
|
# class for Async Response
|
4
4
|
class AsyncResponse
|
5
|
-
def initialize(model, promise)
|
5
|
+
def initialize(model, promise, delete_extra_resource = false)
|
6
6
|
@fog_model = model
|
7
7
|
@promise = promise
|
8
|
+
@delete_extra_resource = delete_extra_resource
|
8
9
|
end
|
9
10
|
|
10
11
|
def value
|
11
12
|
response = @promise.value.body
|
12
13
|
@fog_model.merge_attributes(@fog_model.class.parse(response))
|
14
|
+
@fog_model.delete_extra_resources if @delete_extra_resource
|
15
|
+
@fog_model
|
13
16
|
end
|
14
17
|
|
15
18
|
def state
|
@@ -5,7 +5,7 @@ PUBLIC_IP = 'Public-IP-Address'.freeze
|
|
5
5
|
NETWORK_SECURITY_GROUP = 'Network-Security-Group'.freeze
|
6
6
|
STANDARD_STORAGE = 'Standard'.freeze
|
7
7
|
PREMIUM_STORAGE = 'Premium'.freeze
|
8
|
-
ALLOWED_STANDARD_REPLICATION = %w
|
8
|
+
ALLOWED_STANDARD_REPLICATION = %w[LRS ZRS GRS RAGRS].freeze
|
9
9
|
API_VERSION = '2016-06-01'.freeze
|
10
10
|
FAULT_DOMAIN_COUNT = 2
|
11
11
|
UPDATE_DOMAIN_COUNT = 5
|
@@ -17,7 +17,7 @@ RESOURCE_PROVIDER_NAMESPACE = 6
|
|
17
17
|
RESOURCE_TYPE = 7
|
18
18
|
RESOURCE_NAME = 8
|
19
19
|
ENDPOINT_PREFIX = 'Microsoft.Network/trafficManagerProfiles'.freeze
|
20
|
-
DISK_PREFIX = 'Microsoft.Compute/disks'
|
20
|
+
DISK_PREFIX = 'Microsoft.Compute/disks'.freeze
|
21
21
|
AZURE_ENDPOINTS = 'azureEndpoints'.freeze
|
22
22
|
EXTERNAL_ENDPOINTS = 'externalEndpoints'.freeze
|
23
23
|
NESTED_ENDPOINTS = 'nestedEndpoints'.freeze
|
@@ -58,6 +58,10 @@ MAXIMUM_CHUNK_SIZE = 4 * 1024 * 1024
|
|
58
58
|
|
59
59
|
# The hash value of 4MB empty content
|
60
60
|
HASH_OF_4MB_EMPTY_CONTENT = 'b5cfa9d6c8febd618f91ac2843d50a1c'.freeze
|
61
|
-
REST_CLIENT_API_VERSION = %w
|
61
|
+
REST_CLIENT_API_VERSION = %w[2014-04-01-preview 2016-05-01].freeze
|
62
62
|
AS_SKU_CLASSIC = 'Classic'.freeze
|
63
63
|
AS_SKU_ALIGNED = 'Aligned'.freeze
|
64
|
+
|
65
|
+
# The tag key and tag value for creating a temporary storage account for generalized image
|
66
|
+
TEMPORARY_STORAGE_ACCOUNT_TAG_KEY = 'generalized_image'.freeze
|
67
|
+
TEMPORARY_STORAGE_ACCOUNT_TAG_VALUE = 'delete'.freeze
|
@@ -15,8 +15,7 @@ require 'fog/azurerm'
|
|
15
15
|
Next, create a connection to the Compute Service:
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
azure_compute_service = Fog::Compute.new(
|
19
|
-
provider: 'AzureRM',
|
18
|
+
azure_compute_service = Fog::Compute::AzureRM.new(
|
20
19
|
tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
|
21
20
|
client_id: '<Clientid>', # Client id of Azure Active Directory Application
|
22
21
|
client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
|
@@ -39,9 +38,6 @@ azure_compute_service.servers.check_vm_exists(<Resource Group name>, <VM Name>)
|
|
39
38
|
- To create VM with managed OS disk, use the _managed_disk_storage_type_ argument
|
40
39
|
- To create VM with unmanaged OS disk, use the _storage_account_name_ argument
|
41
40
|
|
42
|
-
|
43
|
-
### Virtual Machine (Managed OS Disk)
|
44
|
-
|
45
41
|
### Virtual Machine (Managed OS Disk)
|
46
42
|
|
47
43
|
```ruby
|
@@ -15,15 +15,14 @@ require 'fog/azurerm'
|
|
15
15
|
Next, create a connection to the Storage Service:
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
azure_storage_service = Fog::Storage.new(
|
19
|
-
:
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:environment => '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
|
18
|
+
azure_storage_service = Fog::Storage::AzureRM.new(
|
19
|
+
tenant_id: '<Tenantid>', # Tenant id of Azure Active Directory Application
|
20
|
+
client_id: '<Clientid>', # Client id of Azure Active Directory Application
|
21
|
+
client_secret: '<ClientSecret>', # Client Secret of Azure Active Directory Application
|
22
|
+
subscription_id: '<Subscriptionid>', # Subscription id of an Azure Account
|
23
|
+
azure_storage_account_name: '<StorageAccountName>', # Name of an Azure Storage Account
|
24
|
+
azure_storage_access_key: '<StorageAccountKey>', # Key of an Azure Storage Account
|
25
|
+
environment: '<AzureCloud/AzureChinaCloud/AzureUSGovernment/AzureGermanCloud>' # Azure cloud environment. Default is AzureCloud.
|
27
26
|
)
|
28
27
|
```
|
29
28
|
|
@@ -176,15 +176,22 @@ module Fog
|
|
176
176
|
async ? create_fog_async_response(response) : merge_attributes(Fog::Compute::AzureRM::Server.parse(response))
|
177
177
|
end
|
178
178
|
|
179
|
+
def delete_extra_resources
|
180
|
+
unless vhd_path.nil? || !managed_disk_storage_type.nil?
|
181
|
+
service.delete_generalized_image(resource_group, name)
|
182
|
+
delete_storage_account_or_container(resource_group, storage_account_name, name)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
179
186
|
private
|
180
187
|
|
181
188
|
def platform_is_linux?(platform)
|
182
189
|
platform.strip.casecmp(PLATFORM_LINUX).zero?
|
183
190
|
end
|
184
191
|
|
185
|
-
def create_fog_async_response(response)
|
192
|
+
def create_fog_async_response(response, delete_extra_resource = false)
|
186
193
|
server = Fog::Compute::AzureRM::Server.new(service: service)
|
187
|
-
Fog::AzureRM::AsyncResponse.new(server, response)
|
194
|
+
Fog::AzureRM::AsyncResponse.new(server, response, delete_extra_resource)
|
188
195
|
end
|
189
196
|
|
190
197
|
def virtual_machine_params(ssh_key_path)
|
@@ -227,6 +234,23 @@ module Fog
|
|
227
234
|
disk_resource_group: disk_resource_group
|
228
235
|
}
|
229
236
|
end
|
237
|
+
|
238
|
+
def delete_storage_account_or_container(resource_group, storage_account_name, vm_name)
|
239
|
+
delete_storage_account(resource_group) if storage_account_name.nil?
|
240
|
+
delete_storage_container(resource_group, storage_account_name, vm_name) unless storage_account_name.nil?
|
241
|
+
end
|
242
|
+
|
243
|
+
def delete_storage_container(resource_group, storage_account_name, vm_name)
|
244
|
+
@storage_service = service.instance_variable_get(:@storage_service)
|
245
|
+
access_key = @storage_service.get_storage_access_keys(resource_group, storage_account_name).first.value
|
246
|
+
container_name = "customvhd-#{vm_name.downcase}-os-image"
|
247
|
+
@storage_service.directories.delete_temporary_container(storage_account_name, access_key, container_name)
|
248
|
+
end
|
249
|
+
|
250
|
+
def delete_storage_account(resource_group)
|
251
|
+
@storage_service = service.instance_variable_get(:@storage_service)
|
252
|
+
@storage_service.storage_accounts.delete_storage_account_from_tag(resource_group, TEMPORARY_STORAGE_ACCOUNT_TAG_KEY, TEMPORARY_STORAGE_ACCOUNT_TAG_VALUE)
|
253
|
+
end
|
230
254
|
end
|
231
255
|
end
|
232
256
|
end
|
@@ -18,8 +18,8 @@ module Fog
|
|
18
18
|
|
19
19
|
def create_async(attributes = {})
|
20
20
|
server = new(attributes)
|
21
|
-
|
22
|
-
Fog::AzureRM::AsyncResponse.new(server,
|
21
|
+
promise = server.save(true)
|
22
|
+
Fog::AzureRM::AsyncResponse.new(server, promise, true)
|
23
23
|
end
|
24
24
|
|
25
25
|
def get(resource_group_name, virtual_machine_name, async = false)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Fog
|
2
|
+
module DNS
|
3
|
+
class AzureRM
|
4
|
+
# This class is giving an implementation of 'A' RecordSet type
|
5
|
+
class ARecord < Fog::Model
|
6
|
+
attribute :ipv4address
|
7
|
+
|
8
|
+
def self.parse(arecord)
|
9
|
+
hash = get_hash_from_object(arecord)
|
10
|
+
hash
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Fog
|
2
|
+
module DNS
|
3
|
+
class AzureRM
|
4
|
+
# This class is giving an implementation of 'CNAME' RecordSet type
|
5
|
+
class CnameRecord < Fog::Model
|
6
|
+
attribute :cname
|
7
|
+
|
8
|
+
def self.parse(cnamerecord)
|
9
|
+
hash = get_hash_from_object(cnamerecord)
|
10
|
+
hash
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -15,13 +15,11 @@ module Fog
|
|
15
15
|
attribute :a_records
|
16
16
|
|
17
17
|
def self.parse(recordset)
|
18
|
-
hash =
|
19
|
-
hash['id'] = recordset.id
|
20
|
-
hash['name'] = recordset.name
|
18
|
+
hash = get_hash_from_object(recordset)
|
21
19
|
hash['resource_group'] = get_resource_group_from_id(recordset.id)
|
22
20
|
hash['zone_name'] = get_record_set_from_id(recordset.id)
|
23
|
-
hash['type'] = recordset.type
|
24
21
|
type = get_type_from_recordset_type(recordset.type)
|
22
|
+
|
25
23
|
hash['records'] = []
|
26
24
|
if type == 'A'
|
27
25
|
record_entries = recordset.arecords
|
@@ -31,11 +29,25 @@ module Fog
|
|
31
29
|
end
|
32
30
|
if type == 'CNAME'
|
33
31
|
record_entries = recordset.cname_record
|
34
|
-
hash['records'] << record_entries
|
32
|
+
hash['records'] << record_entries.cname
|
33
|
+
end
|
34
|
+
|
35
|
+
unless recordset.arecords.nil?
|
36
|
+
a_records = []
|
37
|
+
recordset.arecords.each do |record|
|
38
|
+
a_record = Fog::DNS::AzureRM::ARecord.new
|
39
|
+
a_record.merge_attributes(Fog::DNS::AzureRM::ARecord.parse(record))
|
40
|
+
a_records.push(a_record)
|
41
|
+
end
|
42
|
+
hash['a_records'] = a_records
|
35
43
|
end
|
36
|
-
|
37
|
-
|
38
|
-
|
44
|
+
|
45
|
+
unless recordset.cname_record.nil?
|
46
|
+
cname_record = Fog::DNS::AzureRM::CnameRecord.new
|
47
|
+
cname_record.merge_attributes(Fog::DNS::AzureRM::CnameRecord.parse(recordset.cname_record))
|
48
|
+
hash['cname_record'] = cname_record
|
49
|
+
end
|
50
|
+
|
39
51
|
hash
|
40
52
|
end
|
41
53
|
|
@@ -56,11 +56,16 @@ module Fog
|
|
56
56
|
end
|
57
57
|
directory.files.load(blobs)
|
58
58
|
directory
|
59
|
-
rescue => error
|
59
|
+
rescue Exception => error
|
60
60
|
return nil if error.message == 'NotFound'
|
61
61
|
raise error
|
62
62
|
end
|
63
63
|
|
64
|
+
def delete_temporary_container(storage_account_name, access_key, container_name)
|
65
|
+
storage_data = Fog::Storage::AzureRM.new(azure_storage_account_name: storage_account_name, azure_storage_access_key: access_key)
|
66
|
+
storage_data.delete_container(container_name)
|
67
|
+
end
|
68
|
+
|
64
69
|
def check_container_exists(name)
|
65
70
|
service.check_container_exists(name)
|
66
71
|
end
|
@@ -31,6 +31,13 @@ module Fog
|
|
31
31
|
service.check_storage_account_name_availability(name, type)
|
32
32
|
end
|
33
33
|
|
34
|
+
def delete_storage_account_from_tag(resource_group_name, tag_key, tag_value)
|
35
|
+
storage_accounts = service.storage_accounts(resource_group: resource_group_name)
|
36
|
+
storage_accounts.each do |account|
|
37
|
+
account.destroy if account.tags[tag_key].eql? tag_value
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
34
41
|
def check_storage_account_exists(resource_group_name, storage_account_name)
|
35
42
|
service.check_storage_account_exists(resource_group_name, storage_account_name)
|
36
43
|
end
|
@@ -63,9 +63,12 @@ module Fog
|
|
63
63
|
rescue MsRestAzure::AzureOperationError => e
|
64
64
|
raise_azure_exception(e, msg)
|
65
65
|
end
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
unless async
|
67
|
+
unless vm_config[:vhd_path].nil? || vm_config[:managed_disk_storage_type].nil?
|
68
|
+
delete_generalized_image(vm_config[:resource_group], vm_config[:name])
|
69
|
+
delete_storage_account_or_container(vm_config[:resource_group], vm_config[:storage_account_name], vm_config[:name])
|
70
|
+
end
|
71
|
+
end
|
69
72
|
Fog::Logger.debug "Virtual Machine #{vm_config[:name]} Created Successfully." unless async
|
70
73
|
response
|
71
74
|
end
|
@@ -92,7 +95,7 @@ module Fog
|
|
92
95
|
storage_profile.image_reference = image_reference(publisher, offer, sku, version) if vhd_path.nil?
|
93
96
|
os_disk = Azure::ARM::Compute::Models::OSDisk.new
|
94
97
|
|
95
|
-
new_vhd_path = copy_vhd_to_storage_account(resource_group, storage_account_name, vhd_path) unless vhd_path.nil?
|
98
|
+
new_vhd_path = copy_vhd_to_storage_account(resource_group, storage_account_name, vhd_path, location, vm_name) unless vhd_path.nil?
|
96
99
|
|
97
100
|
if managed_disk_storage_type.nil?
|
98
101
|
vhd = Azure::ARM::Compute::Models::VirtualHardDisk.new
|
@@ -116,20 +119,18 @@ module Fog
|
|
116
119
|
managed_disk.storage_account_type = managed_disk_storage_type
|
117
120
|
os_disk.managed_disk = managed_disk
|
118
121
|
end
|
119
|
-
|
120
122
|
storage_profile.os_disk = configure_os_disk_object(os_disk, os_disk_caching, os_disk_size, platform, vm_name)
|
121
123
|
storage_profile
|
122
124
|
end
|
123
125
|
|
124
126
|
def image_config_params(location, new_vhd_path, platform, resource_group, vm_name)
|
125
|
-
|
127
|
+
{
|
126
128
|
location: location,
|
127
129
|
new_vhd_path: new_vhd_path,
|
128
130
|
platform: platform,
|
129
131
|
resource_group: resource_group,
|
130
132
|
vm_name: vm_name
|
131
133
|
}
|
132
|
-
image_config
|
133
134
|
end
|
134
135
|
|
135
136
|
def configure_os_disk_object(os_disk, os_disk_caching, os_disk_size, platform, vm_name)
|
@@ -150,30 +151,6 @@ module Fog
|
|
150
151
|
os_disk
|
151
152
|
end
|
152
153
|
|
153
|
-
def copy_vhd_to_storage_account(resource_group, storage_account_name, vhd_path)
|
154
|
-
# Copy if VHD does not exist belongs to same storage account.
|
155
|
-
vhd_storage_account = (vhd_path.split('/')[2]).split('.')[0]
|
156
|
-
if storage_account_name != vhd_storage_account
|
157
|
-
storage_account = @storage_service.storage_accounts.get(resource_group, storage_account_name)
|
158
|
-
access_key = storage_account.get_access_keys.first.value
|
159
|
-
storage_data = Fog::Storage::AzureRM.new(provider: 'AzureRM', azure_storage_account_name: storage_account_name, azure_storage_access_key: access_key)
|
160
|
-
new_time = current_time
|
161
|
-
container_name = "customvhd#{new_time}"
|
162
|
-
blob_name = "vhd_image#{new_time}.vhd"
|
163
|
-
storage_data.directories.create(key: container_name)
|
164
|
-
storage_data.copy_blob_from_uri(container_name, blob_name, vhd_path)
|
165
|
-
until storage_data.get_blob_properties(container_name, blob_name).properties[:copy_status] == 'success'
|
166
|
-
Fog::Logger.debug 'Waiting disk to ready'
|
167
|
-
sleep(10)
|
168
|
-
end
|
169
|
-
new_vhd_path = get_blob_endpoint(storage_account_name) + "/#{container_name}/#{blob_name}"
|
170
|
-
Fog::Logger.debug "Path:#{new_vhd_path}. | Copy done"
|
171
|
-
else
|
172
|
-
new_vhd_path = vhd_path
|
173
|
-
end
|
174
|
-
new_vhd_path
|
175
|
-
end
|
176
|
-
|
177
154
|
def define_windows_os_profile(vm_name, username, password, provision_vm_agent, enable_automatic_updates, encoded_data)
|
178
155
|
os_profile = Azure::ARM::Compute::Models::OSProfile.new
|
179
156
|
windows_config = Azure::ARM::Compute::Models::WindowsConfiguration.new
|
@@ -209,6 +186,52 @@ module Fog
|
|
209
186
|
os_profile
|
210
187
|
end
|
211
188
|
|
189
|
+
def copy_vhd_to_storage_account(resource_group, storage_account_name, vhd_path, location, vm_name)
|
190
|
+
# Copy if VHD does not exist belongs to same storage account.
|
191
|
+
vhd_storage_account = (vhd_path.split('/')[2]).split('.')[0]
|
192
|
+
if storage_account_name != vhd_storage_account
|
193
|
+
if storage_account_name.nil?
|
194
|
+
new_time = current_time
|
195
|
+
storage_account_name = "sa#{new_time}"
|
196
|
+
storage_account = @storage_service.storage_accounts.create(
|
197
|
+
storage_account_config_params(location, resource_group, storage_account_name)
|
198
|
+
)
|
199
|
+
else
|
200
|
+
storage_account = @storage_service.storage_accounts.get(resource_group, storage_account_name)
|
201
|
+
end
|
202
|
+
access_key = storage_account.get_access_keys.first.value
|
203
|
+
storage_data = Fog::Storage::AzureRM.new(azure_storage_account_name: storage_account_name, azure_storage_access_key: access_key)
|
204
|
+
new_time = current_time
|
205
|
+
container_name = "customvhd-#{vm_name.downcase}-os-image"
|
206
|
+
blob_name = "vhd_image#{new_time}.vhd"
|
207
|
+
storage_data.directories.create(key: container_name)
|
208
|
+
storage_data.copy_blob_from_uri(container_name, blob_name, vhd_path)
|
209
|
+
until storage_data.get_blob_properties(container_name, blob_name).properties[:copy_status] == 'success'
|
210
|
+
Fog::Logger.debug 'Waiting disk to ready'
|
211
|
+
sleep(10)
|
212
|
+
end
|
213
|
+
new_vhd_path = get_blob_endpoint(storage_account_name) + "/#{container_name}/#{blob_name}"
|
214
|
+
Fog::Logger.debug "Path:#{new_vhd_path}. | Copy done"
|
215
|
+
else
|
216
|
+
new_vhd_path = vhd_path
|
217
|
+
end
|
218
|
+
new_vhd_path
|
219
|
+
end
|
220
|
+
|
221
|
+
def storage_account_config_params(location, resource_group, storage_account_name)
|
222
|
+
{
|
223
|
+
name: storage_account_name,
|
224
|
+
location: location,
|
225
|
+
resource_group: resource_group,
|
226
|
+
account_type: 'Standard',
|
227
|
+
replication: 'LRS',
|
228
|
+
tags:
|
229
|
+
{
|
230
|
+
TEMPORARY_STORAGE_ACCOUNT_TAG_KEY => TEMPORARY_STORAGE_ACCOUNT_TAG_VALUE
|
231
|
+
}
|
232
|
+
}
|
233
|
+
end
|
234
|
+
|
212
235
|
def define_network_profile(network_interface_card_ids)
|
213
236
|
network_interface_cards = []
|
214
237
|
network_interface_card_ids.each_with_index do |id, index|
|
@@ -222,6 +245,21 @@ module Fog
|
|
222
245
|
network_profile.network_interfaces = network_interface_cards
|
223
246
|
network_profile
|
224
247
|
end
|
248
|
+
|
249
|
+
def delete_storage_account_or_container(resource_group, storage_account_name, vm_name)
|
250
|
+
delete_storage_account(resource_group) if storage_account_name.nil?
|
251
|
+
delete_storage_container(resource_group, storage_account_name, vm_name) unless storage_account_name.nil?
|
252
|
+
end
|
253
|
+
|
254
|
+
def delete_storage_container(resource_group, storage_account_name, vm_name)
|
255
|
+
access_key = @storage_service.get_storage_access_keys(resource_group, storage_account_name).first.value
|
256
|
+
container_name = "customvhd-#{vm_name.downcase}-os-image"
|
257
|
+
@storage_service.directories.delete_temporary_container(storage_account_name, access_key, container_name)
|
258
|
+
end
|
259
|
+
|
260
|
+
def delete_storage_account(resource_group)
|
261
|
+
@storage_service.storage_accounts.delete_storage_account_from_tag(resource_group, TEMPORARY_STORAGE_ACCOUNT_TAG_KEY, TEMPORARY_STORAGE_ACCOUNT_TAG_VALUE)
|
262
|
+
end
|
225
263
|
end
|
226
264
|
# This class provides the mock implementation for unit tests.
|
227
265
|
class Mock
|
@@ -34,9 +34,10 @@ module Fog
|
|
34
34
|
end
|
35
35
|
record_set.arecords = a_type_records_array
|
36
36
|
when 'CNAME'
|
37
|
-
|
37
|
+
cname_record = Azure::ARM::Dns::Models::CnameRecord.new
|
38
|
+
cname_record.cname = record_set_params[:records].first # because cname only has 1 value and we know the object is an array passed in.
|
39
|
+
record_set.cname_record = cname_record
|
38
40
|
end
|
39
|
-
|
40
41
|
record_set
|
41
42
|
end
|
42
43
|
end
|
data/lib/fog/azurerm/version.rb
CHANGED
@@ -57,13 +57,13 @@ begin
|
|
57
57
|
type: 'CNAME',
|
58
58
|
ttl: 60
|
59
59
|
)
|
60
|
-
puts "Created CNAME type record set: #{record_set.
|
60
|
+
puts "Created CNAME type record set: #{record_set.inspect}"
|
61
61
|
|
62
62
|
########################################################################################################################
|
63
63
|
###################### Create A Type Record Set in a Zone ######################
|
64
64
|
########################################################################################################################
|
65
65
|
|
66
|
-
dns.record_sets.create(
|
66
|
+
record_set = dns.record_sets.create(
|
67
67
|
name: 'TestRS2',
|
68
68
|
resource_group: 'TestRG-RS',
|
69
69
|
zone_name: 'test-zone.com',
|
@@ -71,14 +71,14 @@ begin
|
|
71
71
|
type: 'A',
|
72
72
|
ttl: 60
|
73
73
|
)
|
74
|
-
puts "Created A type record set: #{record_set.
|
74
|
+
puts "Created A type record set: #{record_set.inspect}"
|
75
75
|
|
76
76
|
########################################################################################################################
|
77
77
|
###################### Get And Destroy CNAME Type Record Set in a Zone ######################
|
78
78
|
########################################################################################################################
|
79
79
|
|
80
80
|
record_set = dns.record_sets.get('TestRG-RS', 'TestRS1', 'test-zone.com', 'CNAME')
|
81
|
-
puts "Get CNAME Type record set: #{record_set.
|
81
|
+
puts "Get CNAME Type record set: #{record_set.inspect}"
|
82
82
|
record_set.destroy
|
83
83
|
|
84
84
|
########################################################################################################################
|
@@ -86,7 +86,7 @@ begin
|
|
86
86
|
########################################################################################################################
|
87
87
|
|
88
88
|
record_set = dns.record_sets.get('TestRG-RS', 'TestRS2', 'test-zone.com', 'A')
|
89
|
-
puts "Get A Type record set: #{record_set.
|
89
|
+
puts "Get A Type record set: #{record_set.inspect}"
|
90
90
|
|
91
91
|
########################################################################################################################
|
92
92
|
###################### Update a Record Set ######################
|
@@ -40,9 +40,11 @@ network = Fog::Network::AzureRM.new(
|
|
40
40
|
###################### Prerequisites ######################
|
41
41
|
########################################################################################################################
|
42
42
|
|
43
|
+
RG_NAME = 'TestRG-CustomVM'.freeze
|
44
|
+
|
43
45
|
begin
|
44
46
|
resource_group = rs.resource_groups.create(
|
45
|
-
name:
|
47
|
+
name: RG_NAME,
|
46
48
|
location: LOCATION
|
47
49
|
)
|
48
50
|
|
@@ -51,7 +53,7 @@ begin
|
|
51
53
|
storage.storage_accounts.create(
|
52
54
|
name: storage_account_name,
|
53
55
|
location: LOCATION,
|
54
|
-
resource_group:
|
56
|
+
resource_group: RG_NAME,
|
55
57
|
account_type: 'Standard',
|
56
58
|
replication: 'LRS'
|
57
59
|
)
|
@@ -59,31 +61,40 @@ begin
|
|
59
61
|
network.virtual_networks.create(
|
60
62
|
name: 'testVnet',
|
61
63
|
location: LOCATION,
|
62
|
-
resource_group:
|
64
|
+
resource_group: RG_NAME,
|
63
65
|
network_address_list: '10.1.0.0/16,10.2.0.0/16'
|
64
66
|
)
|
65
67
|
|
66
68
|
network.subnets.create(
|
67
69
|
name: 'mysubnet',
|
68
|
-
resource_group:
|
70
|
+
resource_group: RG_NAME,
|
69
71
|
virtual_network_name: 'testVnet',
|
70
72
|
address_prefix: '10.2.0.0/24'
|
71
73
|
)
|
72
74
|
|
73
75
|
network.network_interfaces.create(
|
74
76
|
name: 'NetInt',
|
75
|
-
resource_group:
|
77
|
+
resource_group: RG_NAME,
|
76
78
|
location: LOCATION,
|
77
|
-
subnet_id: "/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/
|
79
|
+
subnet_id: "/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/#{RG_NAME}/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/mysubnet",
|
78
80
|
ip_configuration_name: 'testIpConfiguration',
|
79
81
|
private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic
|
80
82
|
)
|
81
83
|
|
82
84
|
network.network_interfaces.create(
|
83
85
|
name: 'NetInt2',
|
84
|
-
resource_group:
|
86
|
+
resource_group: RG_NAME,
|
85
87
|
location: LOCATION,
|
86
|
-
subnet_id: "/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/
|
88
|
+
subnet_id: "/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/#{RG_NAME}/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/mysubnet",
|
89
|
+
ip_configuration_name: 'testIpConfiguration',
|
90
|
+
private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic
|
91
|
+
)
|
92
|
+
|
93
|
+
network.network_interfaces.create(
|
94
|
+
name: 'NetInt3',
|
95
|
+
resource_group: RG_NAME,
|
96
|
+
location: LOCATION,
|
97
|
+
subnet_id: "/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/#{RG_NAME}/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/mysubnet",
|
87
98
|
ip_configuration_name: 'testIpConfiguration',
|
88
99
|
private_ip_allocation_method: Fog::ARM::Network::Models::IPAllocationMethod::Dynamic
|
89
100
|
)
|
@@ -95,16 +106,17 @@ begin
|
|
95
106
|
custom_image_virtual_machine = compute.servers.create(
|
96
107
|
name: 'TestVM',
|
97
108
|
location: LOCATION,
|
98
|
-
resource_group:
|
99
|
-
vm_size: 'Basic_A0',
|
109
|
+
resource_group: RG_NAME,
|
100
110
|
storage_account_name: storage_account_name,
|
111
|
+
vm_size: 'Basic_A0',
|
101
112
|
username: 'testuser',
|
102
113
|
password: 'Confiz=123',
|
103
114
|
disable_password_authentication: false,
|
104
|
-
network_interface_card_ids: ["/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/
|
115
|
+
network_interface_card_ids: ["/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/#{RG_NAME}/providers/Microsoft.Network/networkInterfaces/NetInt"],
|
105
116
|
platform: 'linux',
|
106
|
-
vhd_path: 'https://myblob.blob.core.windows.net/vhds/
|
117
|
+
vhd_path: 'https://myblob.blob.core.windows.net/vhds/my_vhd.vhd'
|
107
118
|
)
|
119
|
+
|
108
120
|
puts "Created custom image un-managed virtual machine: #{custom_image_virtual_machine.name}"
|
109
121
|
|
110
122
|
########################################################################################################################
|
@@ -114,48 +126,91 @@ begin
|
|
114
126
|
custom_image_virtual_machine_managed = compute.servers.create(
|
115
127
|
name: 'TestVM-Managed',
|
116
128
|
location: LOCATION,
|
117
|
-
resource_group:
|
118
|
-
vm_size: 'Basic_A0',
|
129
|
+
resource_group: RG_NAME,
|
119
130
|
storage_account_name: storage_account_name,
|
131
|
+
vm_size: 'Basic_A0',
|
120
132
|
username: 'testuser',
|
121
133
|
password: 'Confiz=123',
|
122
134
|
disable_password_authentication: false,
|
123
|
-
network_interface_card_ids: ["/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/
|
135
|
+
network_interface_card_ids: ["/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/#{RG_NAME}/providers/Microsoft.Network/networkInterfaces/NetInt2"],
|
124
136
|
platform: 'linux',
|
125
|
-
vhd_path: 'https://myblob.blob.core.windows.net/vhds/
|
137
|
+
vhd_path: 'https://myblob.blob.core.windows.net/vhds/my_vhd.vhd',
|
126
138
|
managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS
|
127
139
|
)
|
140
|
+
|
128
141
|
puts "Created custom image managed virtual machine: #{custom_image_virtual_machine_managed.name}"
|
129
142
|
|
143
|
+
########################################################################################################################
|
144
|
+
############## Create Managed Server Async ################
|
145
|
+
########################################################################################################################
|
146
|
+
|
147
|
+
async_response = compute.servers.create_async(
|
148
|
+
name: 'TestVM-ManagedAsync',
|
149
|
+
location: LOCATION,
|
150
|
+
resource_group: RG_NAME,
|
151
|
+
storage_account_name: storage_account_name,
|
152
|
+
vm_size: 'Basic_A0',
|
153
|
+
username: 'testuser',
|
154
|
+
password: 'Confiz=123',
|
155
|
+
disable_password_authentication: false,
|
156
|
+
network_interface_card_ids: ["/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/#{RG_NAME}/providers/Microsoft.Network/networkInterfaces/NetInt3"],
|
157
|
+
platform: 'linux',
|
158
|
+
vhd_path: 'https://myblob.blob.core.windows.net/vhds/my_vhd.vhd',
|
159
|
+
managed_disk_storage_type: Azure::ARM::Compute::Models::StorageAccountTypes::StandardLRS
|
160
|
+
)
|
161
|
+
|
162
|
+
loop do
|
163
|
+
puts async_response.state
|
164
|
+
|
165
|
+
sleep(2) if async_response.pending?
|
166
|
+
|
167
|
+
if async_response.fulfilled?
|
168
|
+
puts "Created custom image managed virtual machine: #{async_response.value.name}"
|
169
|
+
break
|
170
|
+
end
|
171
|
+
|
172
|
+
if async_response.rejected?
|
173
|
+
puts async_response.reason.inspect
|
174
|
+
break
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
130
178
|
########################################################################################################################
|
131
179
|
###################### Get and Delete Server ######################
|
132
180
|
########################################################################################################################
|
133
181
|
|
134
|
-
custom_image_virtual_machine = compute.servers.get(
|
182
|
+
custom_image_virtual_machine = compute.servers.get(RG_NAME, 'TestVM')
|
135
183
|
puts "Get custom image un-managed virtual machine: #{custom_image_virtual_machine.name}"
|
136
184
|
puts "Deleted custom image un-managed virtual machine: #{custom_image_virtual_machine.destroy}"
|
137
185
|
|
138
|
-
custom_image_virtual_machine_managed = compute.servers.get(
|
186
|
+
custom_image_virtual_machine_managed = compute.servers.get(RG_NAME, 'TestVM-Managed')
|
139
187
|
puts "Get custom image managed virtual machine: #{custom_image_virtual_machine_managed.name}"
|
140
188
|
puts "Deleted custom image managed virtual machine: #{custom_image_virtual_machine_managed.destroy}"
|
141
189
|
|
190
|
+
custom_image_virtual_machine_managed_async = compute.servers.get(RG_NAME, 'TestVM-ManagedAsync')
|
191
|
+
puts "Get custom image managed virtual machine async: #{custom_image_virtual_machine_managed_async.name}"
|
192
|
+
puts "Deleted custom image managed virtual machine async: #{custom_image_virtual_machine_managed_async.destroy}"
|
193
|
+
|
142
194
|
########################################################################################################################
|
143
195
|
###################### CleanUp ######################
|
144
196
|
########################################################################################################################
|
145
197
|
|
146
|
-
nic = network.network_interfaces.get(
|
198
|
+
nic = network.network_interfaces.get(RG_NAME, 'NetInt')
|
199
|
+
nic.destroy
|
200
|
+
|
201
|
+
nic = network.network_interfaces.get(RG_NAME, 'NetInt2')
|
147
202
|
nic.destroy
|
148
203
|
|
149
|
-
nic = network.network_interfaces.get(
|
204
|
+
nic = network.network_interfaces.get(RG_NAME, 'NetInt3')
|
150
205
|
nic.destroy
|
151
206
|
|
152
|
-
vnet = network.virtual_networks.get(
|
207
|
+
vnet = network.virtual_networks.get(RG_NAME, 'testVnet')
|
153
208
|
vnet.destroy
|
154
209
|
|
155
|
-
storage = storage.storage_accounts.get(
|
210
|
+
storage = storage.storage_accounts.get(RG_NAME, storage_account_name)
|
156
211
|
storage.destroy
|
157
212
|
|
158
|
-
resource_group = rs.resource_groups.get(
|
213
|
+
resource_group = rs.resource_groups.get(RG_NAME)
|
159
214
|
resource_group.destroy
|
160
215
|
rescue
|
161
216
|
puts 'Integration Test for custom image virtual machine is failing'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-azure-rm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaffan Chaudhry
|
@@ -18,202 +18,202 @@ authors:
|
|
18
18
|
autorequire:
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
|
-
date: 2017-10-
|
21
|
+
date: 2017-10-24 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: rake
|
25
25
|
requirement: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - ~>
|
27
|
+
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '10.0'
|
30
30
|
type: :development
|
31
31
|
prerelease: false
|
32
32
|
version_requirements: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- - ~>
|
34
|
+
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: '10.0'
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: minitest
|
39
39
|
requirement: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - ~>
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 5.8.4
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - ~>
|
48
|
+
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
50
|
version: 5.8.4
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: simplecov
|
53
53
|
requirement: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- -
|
55
|
+
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
type: :development
|
59
59
|
prerelease: false
|
60
60
|
version_requirements: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- -
|
62
|
+
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
64
|
version: '0'
|
65
65
|
- !ruby/object:Gem::Dependency
|
66
66
|
name: codeclimate-test-reporter
|
67
67
|
requirement: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- - ~>
|
69
|
+
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: 1.0.0
|
72
72
|
type: :development
|
73
73
|
prerelease: false
|
74
74
|
version_requirements: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- - ~>
|
76
|
+
- - "~>"
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 1.0.0
|
79
79
|
- !ruby/object:Gem::Dependency
|
80
80
|
name: fog-core
|
81
81
|
requirement: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- - ~>
|
83
|
+
- - "~>"
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.43
|
85
|
+
version: '1.43'
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- - ~>
|
90
|
+
- - "~>"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 1.43
|
92
|
+
version: '1.43'
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: fog-json
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- - ~>
|
97
|
+
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '1.0'
|
100
100
|
type: :runtime
|
101
101
|
prerelease: false
|
102
102
|
version_requirements: !ruby/object:Gem::Requirement
|
103
103
|
requirements:
|
104
|
-
- - ~>
|
104
|
+
- - "~>"
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '1.0'
|
107
107
|
- !ruby/object:Gem::Dependency
|
108
108
|
name: azure_mgmt_compute
|
109
109
|
requirement: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- - ~>
|
111
|
+
- - "~>"
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: 0.9.0
|
114
114
|
type: :runtime
|
115
115
|
prerelease: false
|
116
116
|
version_requirements: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- - ~>
|
118
|
+
- - "~>"
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: 0.9.0
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: azure_mgmt_resources
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- - ~>
|
125
|
+
- - "~>"
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: 0.9.0
|
128
128
|
type: :runtime
|
129
129
|
prerelease: false
|
130
130
|
version_requirements: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- - ~>
|
132
|
+
- - "~>"
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: 0.9.0
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: azure_mgmt_storage
|
137
137
|
requirement: !ruby/object:Gem::Requirement
|
138
138
|
requirements:
|
139
|
-
- - ~>
|
139
|
+
- - "~>"
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: 0.9.0
|
142
142
|
type: :runtime
|
143
143
|
prerelease: false
|
144
144
|
version_requirements: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- - ~>
|
146
|
+
- - "~>"
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: 0.9.0
|
149
149
|
- !ruby/object:Gem::Dependency
|
150
150
|
name: azure_mgmt_network
|
151
151
|
requirement: !ruby/object:Gem::Requirement
|
152
152
|
requirements:
|
153
|
-
- - ~>
|
153
|
+
- - "~>"
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: 0.9.0
|
156
156
|
type: :runtime
|
157
157
|
prerelease: false
|
158
158
|
version_requirements: !ruby/object:Gem::Requirement
|
159
159
|
requirements:
|
160
|
-
- - ~>
|
160
|
+
- - "~>"
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: 0.9.0
|
163
163
|
- !ruby/object:Gem::Dependency
|
164
164
|
name: azure_mgmt_dns
|
165
165
|
requirement: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
|
-
- - ~>
|
167
|
+
- - "~>"
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
version: 0.9.0
|
170
170
|
type: :runtime
|
171
171
|
prerelease: false
|
172
172
|
version_requirements: !ruby/object:Gem::Requirement
|
173
173
|
requirements:
|
174
|
-
- - ~>
|
174
|
+
- - "~>"
|
175
175
|
- !ruby/object:Gem::Version
|
176
176
|
version: 0.9.0
|
177
177
|
- !ruby/object:Gem::Dependency
|
178
178
|
name: azure_mgmt_traffic_manager
|
179
179
|
requirement: !ruby/object:Gem::Requirement
|
180
180
|
requirements:
|
181
|
-
- - ~>
|
181
|
+
- - "~>"
|
182
182
|
- !ruby/object:Gem::Version
|
183
183
|
version: 0.9.0
|
184
184
|
type: :runtime
|
185
185
|
prerelease: false
|
186
186
|
version_requirements: !ruby/object:Gem::Requirement
|
187
187
|
requirements:
|
188
|
-
- - ~>
|
188
|
+
- - "~>"
|
189
189
|
- !ruby/object:Gem::Version
|
190
190
|
version: 0.9.0
|
191
191
|
- !ruby/object:Gem::Dependency
|
192
192
|
name: azure_mgmt_sql
|
193
193
|
requirement: !ruby/object:Gem::Requirement
|
194
194
|
requirements:
|
195
|
-
- - ~>
|
195
|
+
- - "~>"
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: 0.9.0
|
198
198
|
type: :runtime
|
199
199
|
prerelease: false
|
200
200
|
version_requirements: !ruby/object:Gem::Requirement
|
201
201
|
requirements:
|
202
|
-
- - ~>
|
202
|
+
- - "~>"
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: 0.9.0
|
205
205
|
- !ruby/object:Gem::Dependency
|
206
206
|
name: azure_mgmt_key_vault
|
207
207
|
requirement: !ruby/object:Gem::Requirement
|
208
208
|
requirements:
|
209
|
-
- - ~>
|
209
|
+
- - "~>"
|
210
210
|
- !ruby/object:Gem::Version
|
211
211
|
version: 0.9.0
|
212
212
|
type: :runtime
|
213
213
|
prerelease: false
|
214
214
|
version_requirements: !ruby/object:Gem::Requirement
|
215
215
|
requirements:
|
216
|
-
- - ~>
|
216
|
+
- - "~>"
|
217
217
|
- !ruby/object:Gem::Version
|
218
218
|
version: 0.9.0
|
219
219
|
- !ruby/object:Gem::Dependency
|
@@ -253,12 +253,12 @@ extensions: []
|
|
253
253
|
extra_rdoc_files:
|
254
254
|
- README.md
|
255
255
|
files:
|
256
|
-
- .arclint
|
257
|
-
- .codeclimate.yml
|
258
|
-
- .gitignore
|
259
|
-
- .hound.yml
|
260
|
-
- .rubocop.yml
|
261
|
-
- .travis.yml
|
256
|
+
- ".arclint"
|
257
|
+
- ".codeclimate.yml"
|
258
|
+
- ".gitignore"
|
259
|
+
- ".hound.yml"
|
260
|
+
- ".rubocop.yml"
|
261
|
+
- ".travis.yml"
|
262
262
|
- CHANGELOG.md
|
263
263
|
- CONTRIBUTING.md
|
264
264
|
- CONTRIBUTORS.md
|
@@ -313,6 +313,8 @@ files:
|
|
313
313
|
- lib/fog/azurerm/models/compute/servers.rb
|
314
314
|
- lib/fog/azurerm/models/compute/virtual_machine_extension.rb
|
315
315
|
- lib/fog/azurerm/models/compute/virtual_machine_extensions.rb
|
316
|
+
- lib/fog/azurerm/models/dns/a_record.rb
|
317
|
+
- lib/fog/azurerm/models/dns/cname_record.rb
|
316
318
|
- lib/fog/azurerm/models/dns/record_set.rb
|
317
319
|
- lib/fog/azurerm/models/dns/record_sets.rb
|
318
320
|
- lib/fog/azurerm/models/dns/zone.rb
|
@@ -1024,22 +1026,22 @@ licenses:
|
|
1024
1026
|
metadata: {}
|
1025
1027
|
post_install_message: Thanks for installing!
|
1026
1028
|
rdoc_options:
|
1027
|
-
- --charset=UTF-8
|
1029
|
+
- "--charset=UTF-8"
|
1028
1030
|
require_paths:
|
1029
1031
|
- lib
|
1030
1032
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1031
1033
|
requirements:
|
1032
|
-
- -
|
1034
|
+
- - ">="
|
1033
1035
|
- !ruby/object:Gem::Version
|
1034
1036
|
version: 2.0.0
|
1035
1037
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1036
1038
|
requirements:
|
1037
|
-
- -
|
1039
|
+
- - ">="
|
1038
1040
|
- !ruby/object:Gem::Version
|
1039
1041
|
version: '0'
|
1040
1042
|
requirements: []
|
1041
1043
|
rubyforge_project:
|
1042
|
-
rubygems_version: 2.
|
1044
|
+
rubygems_version: 2.6.14
|
1043
1045
|
signing_key:
|
1044
1046
|
specification_version: 4
|
1045
1047
|
summary: Module for the 'fog' gem to support Azure Resource Manager cloud services.
|