Sha256: c99868489cb6b888b65d4112770c1353395d9cd1b67b4449aa62c93d41c695d9

Contents?: true

Size: 1.86 KB

Versions: 47

Compression:

Stored size: 1.86 KB

Contents

module ApiStub
  module Requests
    module Compute
      # Mock class for VirtualMachineExtension Requests
      class VirtualMachineExtension
        def self.create_vm_extension_response(compute_client)
          body = {
            'id' => '/subscriptions/########-####-####-####-############/resourceGroups/TestRG/providers/Microsoft.Compute/virtualMachines/TestVM/extensions/IaaSAntimalware',
            'name' => 'IaasAntimalware',
            'resource_group' => 'fog-test-rg',
            'location' => 'West US',
            'properties' => {
              'publisher' => 'Microsoft.Azure.Security',
              'type' => 'IaaSAntimalware',
              'typeHandlerVersion' => '1.3',
              'autoUpgradeMinorVersion' => 'true',
              'forceUpdateTag' => 'RerunExtension',
              'settings' => {
                'AnitmalwareEnabled' => 'true',
                'RealtimeProtectionEnabled' => 'false'
              },
              'protected_settings' => {}
            }
          }
          extension_mapper = Azure::ARM::Compute::Models::VirtualMachineExtension.mapper
          compute_client.deserialize(extension_mapper, body, 'result.body')
        end

        def self.vm_extension_params
          {
            resource_group: 'TestRG',
            location: 'eastus',
            vm_name: 'TestVM',
            name: 'IaaSAntimalware',
            publisher: 'Microsoft.Azure.Security',
            type: 'IaaSAntimalware',
            type_handler_version: '1.3',
            auto_upgrade_minor_version: true,
            settings: '{"AntimalwareEnabled": "true", "RealtimeProtectionEnabled": "false", "ScheduledScanSettings": {"isEnabled": "false", "day": "7", "time": "120", "scanType": "Quick"}, "Exclusions": {"Extensions": "", "Paths": "", "Processes": ""}}',
            protected_settings: '{}'
          }
        end
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.5.3 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.5.2 test/api_stub/requests/compute/virtual_machine_extension.rb
far-gem-0.5.6 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.5.1 test/api_stub/requests/compute/virtual_machine_extension.rb
far-gem-0.5.5 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.5.0 test/api_stub/requests/compute/virtual_machine_extension.rb
far-gem-0.5.4 test/api_stub/requests/compute/virtual_machine_extension.rb
far-gem-0.5.3 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.4.9 test/api_stub/requests/compute/virtual_machine_extension.rb
far-gem-0.5.2 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.4.8 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.4.7 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.4.6 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.4.5 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-temp-0.0.5 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.4.4 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.4.3 test/api_stub/requests/compute/virtual_machine_extension.rb
far-gem-0.5.1 test/api_stub/requests/compute/virtual_machine_extension.rb
fog-azure-rm-0.4.2 test/api_stub/requests/compute/virtual_machine_extension.rb