azure-armrest 0.3.12 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +6 -0
- data/lib/azure/armrest/billing/usage_service.rb +28 -1
- data/lib/azure/armrest/model/base_model.rb +4 -1
- data/lib/azure/armrest/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b520aacacd8fdef3e6e2ac80c456d2abcb283bd
|
4
|
+
data.tar.gz: 0a566e5530a3f87f153775905767cdab27eb1644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89e70a7bc4e5e822fe239260a5cc0f17b5e6bb06dec78373c64ab6f0a84b44f5a95295e257429fd29c64b5dbe3fe43675bc9fb86b6e26d7d7e83f459ff8f0260
|
7
|
+
data.tar.gz: d1dd5813b5681bfea7ffdb2a92e3d5265e49a3a451a5142a534e341c8e2d9d7d59bbcaf83ccfcd2dc6b3183c89cca2b32372d6c0f0e7cd4b0a3dd0ce369d4b44
|
data/CHANGES
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
= 0.3.13 - 30-Nov-2016
|
2
|
+
* Fixed the Billing::Usage model class name.
|
3
|
+
* Updated the Billing::Usage#list method so that it returns an ArmrestCollection
|
4
|
+
instead of a plain array. In addition, it now supports an :all option so
|
5
|
+
that you don't have to deal with continuation tokens.
|
6
|
+
|
1
7
|
= 0.3.12 - 15-Nov-2016
|
2
8
|
* Added the Insights::DiagnosticService class.
|
3
9
|
* Added the get_from_vm and get_os_disk methods to StorageAccountService.
|
@@ -18,15 +18,42 @@ module Azure
|
|
18
18
|
# :showDetails # Either true or false. Default is true.
|
19
19
|
# :continuationToken # Token received from previous call. No default.
|
20
20
|
#
|
21
|
+
# You may also pass ':all => true' to retrieve all records instead of
|
22
|
+
# dealing with continuation tokens yourself. By default Azure will only
|
23
|
+
# return the first 1000 records.
|
24
|
+
#
|
21
25
|
# The :reportedStartTime and :reportedEndTime values should be in
|
22
26
|
# UTC + iso8601 format. For "Daily" aggregation, the time should be set
|
23
27
|
# to midnight. For "Hourly" aggregation, only the hour should be
|
24
28
|
# set, with minutes and seconds set to "00".
|
25
29
|
#
|
30
|
+
# Example:
|
31
|
+
#
|
32
|
+
# require 'azure-armrest'
|
33
|
+
# require 'time'
|
34
|
+
#
|
35
|
+
# conf = Azure::Armrest::Configuration.new(<your_credentials>)
|
36
|
+
# bill = Azure::Armrest::Billing::UsageService.new(conf)
|
37
|
+
#
|
38
|
+
# options = {
|
39
|
+
# :reportedStartTime => Time.new(2016,10,1,0,0,0,0).utc.iso8601,
|
40
|
+
# :reportedEndTime => Time.new(2016,10,31,0,0,0,0).utc.iso8601,
|
41
|
+
# :showDetails => true,
|
42
|
+
# :aggregationGranularity => 'Daily',
|
43
|
+
# :all => true
|
44
|
+
# }
|
45
|
+
#
|
46
|
+
# list = bill.list(options)
|
47
|
+
#
|
26
48
|
def list(options = {})
|
27
49
|
url = build_url(options)
|
28
50
|
response = rest_get(url)
|
29
|
-
|
51
|
+
|
52
|
+
if options[:all]
|
53
|
+
get_all_results(response)
|
54
|
+
else
|
55
|
+
Azure::Armrest::ArmrestCollection.create_from_response(response, Azure::Armrest::Billing::Usage)
|
56
|
+
end
|
30
57
|
end
|
31
58
|
|
32
59
|
private
|
@@ -189,7 +189,10 @@ module Azure
|
|
189
189
|
class ResourceGroup < BaseModel; end
|
190
190
|
class ResourceProvider < BaseModel; end
|
191
191
|
class Sku < BaseModel; end
|
192
|
-
|
192
|
+
|
193
|
+
module Billing
|
194
|
+
class Usage < BaseModel; end
|
195
|
+
end
|
193
196
|
|
194
197
|
class ResponseHeaders < BaseModel
|
195
198
|
undef_method :response_headers
|
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.3.
|
4
|
+
version: 0.3.13
|
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: 2016-11-
|
14
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json
|
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
290
|
version: '0'
|
291
291
|
requirements: []
|
292
292
|
rubyforge_project:
|
293
|
-
rubygems_version: 2.6.
|
293
|
+
rubygems_version: 2.6.6
|
294
294
|
signing_key:
|
295
295
|
specification_version: 4
|
296
296
|
summary: An interface for ARM/JSON Azure REST API
|