azure-armrest 0.9.2 → 0.9.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 +4 -4
- data/CHANGES +6 -1
- data/lib/azure/armrest/resource_group_based_service.rb +13 -7
- data/lib/azure/armrest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a842138ac4ccb97028715b1975498aa6f9707aab
|
|
4
|
+
data.tar.gz: fdcd24eb8de27e193d8871e5899f65c845b8a833
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b3f2e25995360728b5963e9a1b3678fd23605450afe2de905646c346cbb45957437f883b85603c50cacd39a05b9b9c43cb689591837cda9b687191f75d691d0
|
|
7
|
+
data.tar.gz: d247131df9eb986b1d1c8108bd3a538373c8d3662026f9995631329f8270d14092fe56af004767f78bb11c7ea143906c557a21c3a7da3a1393e49f409df41215
|
data/CHANGES
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
= 0.9.3 - 2-Nov-2017
|
|
2
|
+
* Fixed an issue in the get_by_id and delete_by_id methods where an invalid
|
|
3
|
+
request string could be generated. This primarily affected the
|
|
4
|
+
TemplateDeploymentService#delete_associated_resources method.
|
|
5
|
+
|
|
1
6
|
= 0.9.2 - 31-Oct-2017
|
|
2
7
|
* Fixed a bug in the StorageAccountService#list_private_images method. It
|
|
3
8
|
now accepts an option to skip accessor definitions.
|
|
@@ -5,7 +10,7 @@
|
|
|
5
10
|
* Fixed a bug where an argument to a sleep call could be a string by mistake.
|
|
6
11
|
* Fixed issues with continuation results for list methods in the
|
|
7
12
|
StorageAccount model class.
|
|
8
|
-
* The json dependency restriction was loosened to
|
|
13
|
+
* The json dependency restriction was loosened to 2.anything.
|
|
9
14
|
* The nokogiri dependency was removed. We now rely on Hash#from_xml courtesy
|
|
10
15
|
of activesupport, which we were already using.
|
|
11
16
|
|
|
@@ -132,10 +132,9 @@ module Azure
|
|
|
132
132
|
#
|
|
133
133
|
def get_by_id(id_string)
|
|
134
134
|
info = parse_id_string(id_string)
|
|
135
|
-
|
|
136
|
-
service_name = info['subservice_name'] || info['service_name'] || 'resourceGroups'
|
|
135
|
+
url = convert_id_string_to_url(id_string, info)
|
|
137
136
|
|
|
138
|
-
|
|
137
|
+
service_name = info['subservice_name'] || info['service_name'] || 'resourceGroups'
|
|
139
138
|
|
|
140
139
|
model_class = SERVICE_NAME_MAP.fetch(service_name.downcase) do
|
|
141
140
|
raise ArgumentError, "unable to map service name #{service_name} to model"
|
|
@@ -147,10 +146,7 @@ module Azure
|
|
|
147
146
|
alias get_associated_resource get_by_id
|
|
148
147
|
|
|
149
148
|
def delete_by_id(id_string)
|
|
150
|
-
|
|
151
|
-
api_version = api_version_lookup(info['provider'], info['service_name'], info['subservice_name'])
|
|
152
|
-
url = File.join(configuration.environment.resource_url, id_string) + "?api-version=#{api_version}"
|
|
153
|
-
|
|
149
|
+
url = convert_id_string_to_url(id_string)
|
|
154
150
|
delete_by_url(url, id_string)
|
|
155
151
|
end
|
|
156
152
|
|
|
@@ -192,6 +188,16 @@ module Azure
|
|
|
192
188
|
|
|
193
189
|
private
|
|
194
190
|
|
|
191
|
+
def convert_id_string_to_url(id_string, info = nil)
|
|
192
|
+
if id_string.include?('api-version')
|
|
193
|
+
File.join(configuration.environment.resource_url, id_string)
|
|
194
|
+
else
|
|
195
|
+
info ||= parse_id_string(id_string)
|
|
196
|
+
api_version = api_version_lookup(info['provider'], info['service_name'], info['subservice_name'])
|
|
197
|
+
File.join(configuration.environment.resource_url, id_string) + "?api-version=#{api_version}"
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
195
201
|
# Parse the provider and service name out of an ID string.
|
|
196
202
|
def parse_id_string(id_string)
|
|
197
203
|
regex = %r{
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: azure-armrest
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel J. Berger
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2017-
|
|
14
|
+
date: 2017-11-02 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: json
|