azure-armrest 0.9.13 → 0.9.14
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/.travis.yml +1 -1
 - data/CHANGES +12 -0
 - data/azure-armrest.gemspec +1 -1
 - data/lib/azure/armrest/configuration.rb +6 -2
 - data/lib/azure/armrest/resource_provider_service.rb +4 -0
 - data/lib/azure/armrest/version.rb +1 -1
 - data/lib/azure/armrest/virtual_machine_service.rb +13 -2
 - metadata +5 -6
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 6b0957efe3f85a19324899af360fbd31e7e63240743645e52d2f97853a0e8c47
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a32638465e060e560c607b1c0ea8143414f6b9b3a535ac1c1f65bc00743fc122
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 82cd043c9ae57d178edaf3078a9a4cb7d12ca79a08396b66c1cd0d24217dcb42d387750aa02282a4ee03b577d26114e05aa584234ce0cf4cd33eff9a78db93b6
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1909e23b186abc7992afc58b0b4755adefae92a6143de32c08abd5ddcef6b0ae54a80c37c7ce9505f97c4eeb15fa075a6ba7e5b36a2dd532a5c78707ef8ba336
         
     | 
    
        data/.travis.yml
    CHANGED
    
    
    
        data/CHANGES
    CHANGED
    
    | 
         @@ -1,3 +1,15 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            = 0.9.14 - 23-Oct-2019
         
     | 
| 
      
 2 
     | 
    
         
            +
            * Added the VirtualMachineService#list_by_location method.
         
     | 
| 
      
 3 
     | 
    
         
            +
            * The VirtualMachineService#vm_operations method now returns a response object
         
     | 
| 
      
 4 
     | 
    
         
            +
              instead of nil.
         
     | 
| 
      
 5 
     | 
    
         
            +
            * The results of the ResourceProviderService#supported? method are now cached.
         
     | 
| 
      
 6 
     | 
    
         
            +
            * Fixed a bug in the VirtualMachineService#vm_operate method where it wasn't
         
     | 
| 
      
 7 
     | 
    
         
            +
              setting the response code.
         
     | 
| 
      
 8 
     | 
    
         
            +
            * Fixed a bug in the Armrest::Configuration#log= method where it would bomb if
         
     | 
| 
      
 9 
     | 
    
         
            +
              you used an object that was neither a string nor a logger instance.
         
     | 
| 
      
 10 
     | 
    
         
            +
            * Made the requirements for the memoist gem less pessimistic.
         
     | 
| 
      
 11 
     | 
    
         
            +
            * Some spec updates and general refactoring.
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
       1 
13 
     | 
    
         
             
            = 0.9.13 - 12-Sep-2018
         
     | 
| 
       2 
14 
     | 
    
         
             
            * Updated the USGov AD authority endpoint, which was changed by Microsoft recently.
         
     | 
| 
       3 
15 
     | 
    
         
             
            * Added the timeout option for the Configuration class. This allows you to set
         
     | 
    
        data/azure-armrest.gemspec
    CHANGED
    
    | 
         @@ -19,7 +19,7 @@ behind the scenes. 
     | 
|
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
              spec.add_dependency 'json', '~> 2'
         
     | 
| 
       21 
21 
     | 
    
         
             
              spec.add_dependency 'rest-client', '~> 2.0.0'
         
     | 
| 
       22 
     | 
    
         
            -
              spec.add_dependency 'memoist', '~> 0.15 
     | 
| 
      
 22 
     | 
    
         
            +
              spec.add_dependency 'memoist', '~> 0.15'
         
     | 
| 
       23 
23 
     | 
    
         
             
              spec.add_dependency 'azure-signature', '~> 0.2.3'
         
     | 
| 
       24 
24 
     | 
    
         
             
              spec.add_dependency 'activesupport', '>= 4.2.2'
         
     | 
| 
       25 
25 
     | 
    
         
             
              spec.add_dependency 'addressable', '~> 2.5.0'
         
     | 
| 
         @@ -211,8 +211,12 @@ module Azure 
     | 
|
| 
       211 
211 
     | 
    
         
             
                  # a logger instance
         
     | 
| 
       212 
212 
     | 
    
         
             
                  #
         
     | 
| 
       213 
213 
     | 
    
         
             
                  def self.log=(output)
         
     | 
| 
       214 
     | 
    
         
            -
                     
     | 
| 
       215 
     | 
    
         
            -
             
     | 
| 
      
 214 
     | 
    
         
            +
                    case output
         
     | 
| 
      
 215 
     | 
    
         
            +
                      when String
         
     | 
| 
      
 216 
     | 
    
         
            +
                        RestClient.log = Logger.new(output)
         
     | 
| 
      
 217 
     | 
    
         
            +
                      else
         
     | 
| 
      
 218 
     | 
    
         
            +
                        RestClient.log = output
         
     | 
| 
      
 219 
     | 
    
         
            +
                    end
         
     | 
| 
       216 
220 
     | 
    
         
             
                  end
         
     | 
| 
       217 
221 
     | 
    
         | 
| 
       218 
222 
     | 
    
         
             
                  # Returns a list of subscriptions for the current configuration object.
         
     | 
| 
         @@ -131,10 +131,14 @@ module Azure 
     | 
|
| 
       131 
131 
     | 
    
         
             
                  # given +namespace+. By default it will search the Microsoft.Compute
         
     | 
| 
       132 
132 
     | 
    
         
             
                  # namespace.
         
     | 
| 
       133 
133 
     | 
    
         
             
                  #
         
     | 
| 
      
 134 
     | 
    
         
            +
                  # The results of this method are cached.
         
     | 
| 
      
 135 
     | 
    
         
            +
                  #
         
     | 
| 
       134 
136 
     | 
    
         
             
                  def supported?(resource_type, namespace = 'Microsoft.Compute')
         
     | 
| 
       135 
137 
     | 
    
         
             
                    get(namespace).resource_types.map(&:resource_type).map(&:downcase).include?(resource_type.downcase)
         
     | 
| 
       136 
138 
     | 
    
         
             
                  end
         
     | 
| 
       137 
139 
     | 
    
         | 
| 
      
 140 
     | 
    
         
            +
                  memoize :supported?
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
       138 
142 
     | 
    
         
             
                  private
         
     | 
| 
       139 
143 
     | 
    
         | 
| 
       140 
144 
     | 
    
         
             
                  def build_url(namespace = nil, *args)
         
     | 
| 
         @@ -16,6 +16,14 @@ module Azure 
     | 
|
| 
       16 
16 
     | 
    
         
             
                    super(configuration, 'virtualMachines', 'Microsoft.Compute', options)
         
     | 
| 
       17 
17 
     | 
    
         
             
                  end
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
      
 19 
     | 
    
         
            +
                  # Return a list of virtual machines for the given +location+.
         
     | 
| 
      
 20 
     | 
    
         
            +
                  #
         
     | 
| 
      
 21 
     | 
    
         
            +
                  def list_by_location(location, options = {})
         
     | 
| 
      
 22 
     | 
    
         
            +
                    url = url_with_api_version(api_version, base_url, 'providers', provider, 'locations', location, service_name)
         
     | 
| 
      
 23 
     | 
    
         
            +
                    response = rest_get(url)
         
     | 
| 
      
 24 
     | 
    
         
            +
                    get_all_results(response, options[:skip_accessors_definition])
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
       19 
27 
     | 
    
         
             
                  # Return a list of available VM series (aka sizes, flavors, etc), such
         
     | 
| 
       20 
28 
     | 
    
         
             
                  # as "Basic_A1", though other information is included as well.
         
     | 
| 
       21 
29 
     | 
    
         
             
                  #
         
     | 
| 
         @@ -306,8 +314,11 @@ module Azure 
     | 
|
| 
       306 
314 
     | 
    
         
             
                    raise ArgumentError, "must specify name of the vm" unless vmname
         
     | 
| 
       307 
315 
     | 
    
         | 
| 
       308 
316 
     | 
    
         
             
                    url = build_url(group, vmname, action)
         
     | 
| 
       309 
     | 
    
         
            -
                    rest_post(url)
         
     | 
| 
       310 
     | 
    
         
            -
             
     | 
| 
      
 317 
     | 
    
         
            +
                    response = rest_post(url)
         
     | 
| 
      
 318 
     | 
    
         
            +
             
     | 
| 
      
 319 
     | 
    
         
            +
                    Azure::Armrest::ResponseHeaders.new(response.headers).tap do |headers|
         
     | 
| 
      
 320 
     | 
    
         
            +
                      headers.response_code = response.code
         
     | 
| 
      
 321 
     | 
    
         
            +
                    end
         
     | 
| 
       311 
322 
     | 
    
         
             
                  end
         
     | 
| 
       312 
323 
     | 
    
         
             
                end
         
     | 
| 
       313 
324 
     | 
    
         
             
              end
         
     | 
    
        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.14
         
     | 
| 
       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:  
     | 
| 
      
 14 
     | 
    
         
            +
            date: 2019-10-23 00:00:00.000000000 Z
         
     | 
| 
       15 
15 
     | 
    
         
             
            dependencies:
         
     | 
| 
       16 
16 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       17 
17 
     | 
    
         
             
              name: json
         
     | 
| 
         @@ -47,14 +47,14 @@ dependencies: 
     | 
|
| 
       47 
47 
     | 
    
         
             
                requirements:
         
     | 
| 
       48 
48 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       49 
49 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       50 
     | 
    
         
            -
                    version: 0.15 
     | 
| 
      
 50 
     | 
    
         
            +
                    version: '0.15'
         
     | 
| 
       51 
51 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       52 
52 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       53 
53 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       54 
54 
     | 
    
         
             
                requirements:
         
     | 
| 
       55 
55 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       56 
56 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       57 
     | 
    
         
            -
                    version: 0.15 
     | 
| 
      
 57 
     | 
    
         
            +
                    version: '0.15'
         
     | 
| 
       58 
58 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       59 
59 
     | 
    
         
             
              name: azure-signature
         
     | 
| 
       60 
60 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -290,8 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       290 
290 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       291 
291 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       292 
292 
     | 
    
         
             
            requirements: []
         
     | 
| 
       293 
     | 
    
         
            -
             
     | 
| 
       294 
     | 
    
         
            -
            rubygems_version: 2.7.6
         
     | 
| 
      
 293 
     | 
    
         
            +
            rubygems_version: 3.0.6
         
     | 
| 
       295 
294 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       296 
295 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       297 
296 
     | 
    
         
             
            summary: An interface for ARM/JSON Azure REST API
         
     |